aXin-0810 před 9 měsíci
rodič
revize
1f69ac4d6a

+ 2 - 2
src/api/departmentManagement.js

@@ -48,11 +48,11 @@ export function adminDeptDel(params) {
   })
 }
 
-export function adminDeptAddWebsit(data) {
+export function adminDeptAddWebsit(params) {
   return request({
     url: '/admin/dept/addWebsit',
     method: 'post',
-    data
+    params
   })
 }
 

+ 0 - 1
src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue

@@ -34,7 +34,6 @@
       ></attachmentSalesOrderDetail>
     </div>
     <print-preview ref="preView" @initPrint="handleInitPrint" @refreshList="handleRefreshList" />
-
     <el-dialog title="导入结果" :visible.sync="showImportResult" width="600px">
       <div class="importResultList">
         <div class="item" v-for="(item, index) in importResultList" :key="index">{{ item }}</div>

+ 3 - 1
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -210,7 +210,9 @@
                   "
                   @change="
                     e => {
-                      dataList = []
+                      if (!formData.isImport) {
+                        dataList = []
+                      }
                       formData.storageId = e.storageId
                       formData.storageName = e.storageName
                     }

+ 18 - 9
src/views/setting/departmentManagement/index.vue

@@ -66,7 +66,11 @@
             <el-input disabled v-model="form2.deptName"></el-input>
           </el-form-item>
           <el-form-item label="管理网点名称">
-            <el-select style="width: 100%" v-model="form2.websitId" filterable placeholder="请选择" @change="gengxin">
+            <el-select v-if="form2.id" style="width: 100%" v-model="form2.websitId" filterable placeholder="请选择">
+              <el-option v-for="(item, index) in keyixuan" :key="index" :label="item.websitName" :value="item.websitId">
+              </el-option>
+            </el-select>
+            <el-select v-else style="width: 100%" multiple v-model="form2.websitIds" filterable placeholder="请选择">
               <el-option v-for="(item, index) in keyixuan" :key="index" :label="item.websitName" :value="item.websitId">
               </el-option>
             </el-select>
@@ -126,7 +130,8 @@ export default {
         deptName: '',
         adminDeptWebsitId: '',
         websitId: '',
-        websitName: ''
+        websitName: '',
+        websitIds: []
       },
       adminDept: null,
       keyixuan: []
@@ -150,7 +155,8 @@ export default {
                         adminDeptId: this.adminDept.adminDeptId,
                         adminDeptWebsitId: '',
                         websitId: '',
-                        websitName: ''
+                        websitName: '',
+                        websitIds: []
                       }
                       this.dialogVisible2 = true
                     } else {
@@ -193,9 +199,9 @@ export default {
       })
       this.$refs.pageRef.refreshList()
     },
-    gengxin(val) {
-      this.form2.websitName = this.keyixuan?.find(item => item.websitId == val)?.websitName
-    },
+    // gengxin(val) {
+    //   this.form2.websitName = this.keyixuan?.find(item => item.websitId == val)?.websitName
+    // },
     // 列表请求函数
     getList(pam, cb) {
       try {
@@ -271,12 +277,14 @@ export default {
       }
     },
     queding2() {
-      if (!this.form2.websitId) {
+      if (!this?.form2?.websitIds?.length && !this?.form2?.websitId) {
         this.$message.warning('请选择网点')
       }
       ;(this.form2.id ? adminDeptUpdateWebsit : adminDeptAddWebsit)({
         ...this.form2,
-        adminDeptId: this.adminDept.adminDeptId,
+        id: this?.form2?.id,
+        adminDeptId: this?.adminDept?.adminDeptId,
+        websitIds: this?.form2?.websitIds?.join(','),
         adminDeptWebsitId: this?.form2?.adminDeptWebsitId
       }).then(res => {
         this.$refs.pageRef.refreshList()
@@ -294,7 +302,8 @@ export default {
         adminDeptId: '',
         adminDeptWebsitId: '',
         websitId: '',
-        websitName: ''
+        websitName: '',
+        websitIds: []
       }
     }
   }