Moss 1 gadu atpakaļ
vecāks
revīzija
1f2df575ee
1 mainītis faili ar 10 papildinājumiem un 3 dzēšanām
  1. 10 3
      src/views/mallManagement/storage/index.vue

+ 10 - 3
src/views/mallManagement/storage/index.vue

@@ -53,6 +53,8 @@ export default {
         status: true,
         type: [],
         websitId: '',
+        websitName: '',
+        isDefault: false,
       },
 			formType: 'add',
 			formVisible: false,
@@ -114,7 +116,7 @@ export default {
         isShow: true,
         name: 'el-checkbox',
         options: [{value: '商品', label: '商品'}, {value: '辅材', label: '辅材'}, {value: '配件', label: '配件'}],
-        attributes: {},
+        attributes: { disabled: this.formDialogType == 1 },
         formItemAttributes: {
           label: '仓储属性',
           prop: 'type',
@@ -125,18 +127,23 @@ export default {
         isShow: true,
         name: 'el-select',
         options: this.websitList,
-        attributes: { filterable: true, placeholder: '请选择', disabled: this.formDialogType == 2, },
+        attributes: { filterable: true, placeholder: '请选择', disabled: this.formDialogType == 1 },
         formItemAttributes: {
           label: '所属网点',
           prop: 'websitId',
           rules: [...required]
+        },
+        events: {
+          change: () => {
+            this.formData.websitName = this.websitList.find(o => o.value == this.formData.websitId).label;
+          }
         }
       }, {
         md: 6,
         isShow: true,
         name: 'el-radio',
         options: [{value: true, label: '启用'}, {value: false, label: '禁用'}],
-        attributes: {},
+        attributes: { disabled: this.formData.isDefault },
         formItemAttributes: {
           label: '状态',
           prop: 'status',