-
+
@@ -206,24 +212,24 @@
-
+
-
+
-
+
-
+
@@ -255,15 +261,15 @@ import SelecAreaCmps from "@/components/wm/SelecAreaCmps.vue";
export default {
name: "Area",
dicts: ['sys_yes_no'],
- components: {SelecLocationCmps, BarcodeImg,SelecAreaCmps } ,
+ components: {SelecLocationCmps, BarcodeImg, SelecAreaCmps},
data() {
return {
//库位选择
- selecareaVisible:false,
+ selecareaVisible: false,
//库区选择
- selecocationVisible:false,
+ selecocationVisible: false,
//自动生成编码
- autoGenFlag:false,
+ autoGenFlag: false,
optType: undefined,
locationId: undefined,
// 遮罩层
@@ -302,16 +308,16 @@ export default {
// 表单校验
rules: {
areaCode: [
- { required: true, message: "库位编码不能为空", trigger: "blur" }
+ {required: true, message: "库位编码不能为空", trigger: "blur"}
],
areaName: [
- { required: true, message: "库位名称不能为空", trigger: "blur" }
+ {required: true, message: "库位名称不能为空", trigger: "blur"}
],
locationId: [
- { required: true, message: "库区不能为空", trigger: "blur" }
+ {required: true, message: "库区不能为空", trigger: "blur"}
],
attr1: [
- { required: true, message: "上级库位名称不能为空", trigger: "blur" }
+ {required: true, message: "上级库位名称不能为空", trigger: "blur"}
]
}
};
@@ -389,7 +395,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.areaId)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
@@ -400,7 +406,7 @@ export default {
this.optType = "add";
},
// 查询明细按钮操作
- handleView(row){
+ handleView(row) {
this.reset();
const areaId = row.areaId || this.ids
getArea(areaId).then(response => {
@@ -445,25 +451,26 @@ export default {
* 冻结状态变更
* @param row
*/
- handleFrozenChange(row){
+ handleFrozenChange(row) {
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
- this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function() {
- return changeFrozenState(row.areaId,row.frozenFlag);
+ this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function () {
+ return changeFrozenState(row.areaId, row.frozenFlag);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
- }).catch(function() {
+ }).catch(function () {
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
});
},
/** 删除按钮操作 */
handleDelete(row) {
const areaIds = row.areaId || this.ids;
- this.$modal.confirm('是否确认删除库位设置编号为"' + areaIds + '"的数据项?').then(function() {
+ this.$modal.confirm('是否确认删除库位设置编号为"' + areaIds + '"的数据项?').then(function () {
return delArea(areaIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
- }).catch(() => {});
+ }).catch(() => {
+ });
},
/** 导出按钮操作 */
handleExport() {
@@ -472,12 +479,12 @@ export default {
}, `area_${new Date().getTime()}.xlsx`)
},
//自动生成编码
- handleAutoGenChange(autoGenFlag){
- if(autoGenFlag){
- genCode('AREA_CODE').then(response =>{
+ handleAutoGenChange(autoGenFlag) {
+ if (autoGenFlag) {
+ genCode('AREA_CODE').then(response => {
this.form.areaCode = response;
});
- }else{
+ } else {
this.form.areaCode = null;
}
}