wangzhuo hace 1 año
padre
commit
9df5daceb6

+ 23 - 68
src/views/basicData/commodityType/detailsPageEdit.vue

@@ -3,7 +3,7 @@
     <div class="customer-head">
       <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-          @click="backToList">返回列表
+                   @click="backToList">返回列表
         </el-button>
       </div>
       <div class="add-customer-btn">
@@ -11,7 +11,7 @@
           复制单据
         </el-button>
         <el-button class="el-button--small-yh" type="primary" :disabled="disabled" size="small" @click="editCustomer">{{
-        form.id ? "确认修改" : "确认新增" }}
+            form.id ? "确认修改" : "确认新增" }}
         </el-button>
       </div>
     </div>
@@ -23,28 +23,16 @@
             <el-col v-for="(item, index) in basicData.column" :key="index" :span="item.span ? item.span : 6">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <avue-input-tree v-if="item.prop === 'goodsTypeId'" leaf-only multiple style="width: 100%;"
-                  :props="{ label: 'title' }" v-model="form[item.prop]" placeholder=" " type="tree" size="small"
-                  dataType="string" :dic="dicData" tags/>
-
+                                 :props="{ label: 'title' }" v-model="form[item.prop]" placeholder=" " type="tree" size="small"
+                                 dataType="string" :dic="dicData" tags/>
                 <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small"
-                  autocomplete="off" placeholder=" "></el-input>
-
+                          autocomplete="off" placeholder=" "></el-input>
                 <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small"
-                  placeholder="请选择" clearable filterable>
+                           placeholder="请选择" clearable filterable>
                   <!--                  <el-option v-for="(item,index) in selectData" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>-->
                 </el-select>
-
-                <el-select v-model="form[item.prop]" style="width: 300px;" size="medium" v-else-if="item.prop === 'supervisorUserIdList'" multiple placeholder="请选择">
-                  <el-option
-                    v-for="item in userList"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id">
-                  </el-option>
-                </el-select>
-
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
-                  :configuration="configuration" typeData="GYS" style="width: 100%" />
+                                 :configuration="configuration" typeData="GYS" style="width: 100%" />
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
               </el-form-item>
             </el-col>
@@ -56,9 +44,9 @@
             <el-col v-for="(item, index) in packingData.column" :key="index" :span="item.span ? item.span : 6">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-input type="textarea" v-if="item.type === 'textarea'" v-model="form[item.prop]" size="small"
-                  autocomplete="off" placeholder=" "></el-input>
+                          autocomplete="off" placeholder=" "></el-input>
                 <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small"
-                  placeholder="请选择" clearable filterable>
+                           placeholder="请选择" clearable filterable>
                   <!--                  <el-option v-for="(item,index) in selectData" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>-->
                 </el-select>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
@@ -113,7 +101,7 @@
             </template>
             <template slot="status" slot-scope="{ row, index }">
               <el-switch v-model="row.status" active-color="#13ce66" inactive-color="#ff4949" :active-value="0"
-                :inactive-value="1">
+                         :inactive-value="1">
               </el-switch>
             </template>
             <template slot="menu" slot-scope="{ row, index }">
@@ -129,13 +117,13 @@
         <containerTitle title="配件信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <avue-crud ref="crud" :data="partList" :option="partOption" @saveColumn="partsaveColumn"
-            :cell-style="cellStyle">
+                     :cell-style="cellStyle">
             <template slot="menuLeft">
               <el-button type="primary" :disabled="partList.length>0" size="small" @click.stop="rowAdd">默认模板</el-button>
             </template>
             <template slot="status" slot-scope="{ row, index }">
               <el-switch v-model="row.status" active-color="#13ce66" inactive-color="#ff4949" :active-value="0"
-                :inactive-value="1">
+                         :inactive-value="1">
               </el-switch>
             </template>
           </avue-crud>
@@ -143,10 +131,10 @@
         <containerTitle title="销售价格"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <avue-crud :option="customerContact" v-model="contactsForm" :data="contactsData" ref="crudContact"
-            @row-save="rowContactSave" @row-del="rowContactsDel">
+                     @row-save="rowContactSave" @row-del="rowContactsDel">
             <template slot-scope="{ row, index }" slot="menu">
               <el-button type="text" size="small" @click="rowContactCell(row, index)">{{ row.$cellEdit ? "修改完成" : "修改"
-              }}
+                }}
               </el-button>
             </template>
           </avue-crud>
@@ -154,18 +142,18 @@
         <containerTitle title="采购价格"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <avue-crud :option="customerPurchase" v-model="contactsForm" :data="purchaseData" ref="crudPurchase"
-            @row-save="rowPurchaseSave" @row-del="rowPurchaseDel">
+                     @row-save="rowPurchaseSave" @row-del="rowPurchaseDel">
             <template slot="corpId" slot-scope="{ row }">
               <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
               <span style="margin-left: 12px;padding-top: 2px">{{
-              row.corpName
-              }}</span>
+                  row.corpName
+                }}</span>
               <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="selectUser(row)">选择
               </el-button>
             </template>
             <template slot-scope="{ row, index }" slot="menu">
               <el-button type="text" size="small" @click="rowPurchaseCell(row, index)">{{ row.$cellEdit ? "修改完成" : "修改"
-              }}
+                }}
               </el-button>
             </template>
           </avue-crud>
@@ -173,7 +161,7 @@
         <containerTitle title="商品图片"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <avue-crud ref="imgUpload" :option="imgUploadList" :data="imgUploadData" @row-save="imgUploadSave"
-            @row-update="imgUploadUpdate" @row-del="imgUploadDel" :upload-before="uploadBefore"></avue-crud>
+                     @row-update="imgUploadUpdate" @row-del="imgUploadDel" :upload-before="uploadBefore"></avue-crud>
         </basic-container>
         <containerTitle title="详情页编辑"></containerTitle>
         <basic-container style="margin-bottom: 10px">
@@ -181,7 +169,7 @@
         </basic-container>
       </el-form>
       <el-dialog title="导入供应商" :visible.sync="userDialog" class="el-dialogDeep" append-to-body
-        :close-on-click-modal="false" width="80%">
+                 :close-on-click-modal="false" width="80%">
         <el-row style="margin-top: -5px;height: 0">
           <el-col :span="5">
             <div class="box">
@@ -195,9 +183,9 @@
           <el-col :span="19">
             <basic-container>
               <avue-crud ref="userCrud" :option="userOption" :data="userDataList" :table-loading="userLoading"
-                :page.sync="userPage" v-model="userForm" @search-change="userSearchChange"
-                @search-reset="userSearchReset" @refresh-change="userRefreshChange"
-                @selection-change="userSelectionChange" @on-load="userOnLoad">
+                         :page.sync="userPage" v-model="userForm" @search-change="userSearchChange"
+                         @search-reset="userSearchReset" @refresh-change="userRefreshChange"
+                         @selection-change="userSelectionChange" @on-load="userOnLoad">
               </avue-crud>
             </basic-container>
           </el-col>
@@ -235,7 +223,6 @@ import _ from "lodash";
 import partOption from "./configuration/partList.json";
 import { getPartTree, getGoodstype } from "@/api/basicData/customerInquiry";
 import { costCal } from "@/util/calculate";
-import { gainUser } from "@/api/basicData/customerInquiry";
 export default {
   name: "detailsPage",
   data() {
@@ -414,12 +401,6 @@ export default {
             ]
           },
           {
-            label: '分管员',
-            prop: 'supervisorUserIdList',
-            multiple:true,
-            dicData: [],
-          },
-          {
             label: "HS代码",
             prop: "hsCode",
             rules: [
@@ -693,7 +674,6 @@ export default {
         total: 0,
         pageSize: 10
       },
-      userList: [],
     };
   },
   props: {
@@ -768,11 +748,6 @@ export default {
             });
           }
         }
-        console.log(res.data.data.supervisorUserIdGroup)
-        if (res.data.data.supervisorUserIdGroup != null && res.data.data.supervisorUserIdGroup != '') {
-          res.data.data.supervisorUserIdList = res.data.data.supervisorUserIdGroup.split(',')
-        }
-
         this.form = res.data.data;
         if (res.data.data.saleGoodsPrice) {
           this.contactsData = res.data.data.saleGoodsPrice;
@@ -795,9 +770,6 @@ export default {
     this.getWorkDicts("goods_Props").then(res => {
       this.goodsProps = res.data.data;
     });
-    gainUser().then(res => {
-      this.userList = res.data.data;
-    });
   },
   methods: {
     copyDoc() {
@@ -970,28 +942,11 @@ export default {
           this.partList.forEach((e, index) => {
             e.sort = Number(index + 1)
           })
-
-          var userName = null
-          if (this.form.supervisorUserIdList != null) {
-            userName = ''
-            for (const userId of this.form.supervisorUserIdList) {
-              for (const user of this.userList) {
-                if (user.id == userId) {
-                  userName += user.name + ','
-                }
-              }
-            }
-            userName = userName.substring(0, userName.length - 1);
-          }
-
-
           const params = {
             ...this.form,
             type: 0,
             saleGoodsPrice: this.contactsData,
             buyGoodsPrice: this.purchaseData,
-            supervisorUserIdGroup: this.form.supervisorUserIdList == null || this.form.supervisorUserIdList == [] ? '' : this.form.supervisorUserIdList.toString(),
-            supervisorUserNameGroup: userName,
             goodsSpecificationList: this.sftData.concat(this.partList),
           };
           updateDetail(params).then(res => {

+ 8 - 17
src/views/exportTrade/purchaseInquiry/config/commodity.json

@@ -14,14 +14,14 @@
   "selection": true,
   "tip": false,
   "column": [{
-      "label": "商品编号",
-      "prop": "code",
-      "index": 1,
-      "width": 100,
-      "search": true,
-      "searchSpan": 8,
-      "overHidden": true
-    },
+    "label": "商品编号",
+    "prop": "code",
+    "index": 1,
+    "width": 100,
+    "search": true,
+    "searchSpan": 8,
+    "overHidden": true
+  },
     {
       "label": "商品名称",
       "search": true,
@@ -50,15 +50,6 @@
       "overHidden": true
     },
     {
-      "label": "分管员",
-      "prop": "supervisorUserNameGroup",
-      "index": 4,
-      "width": 100,
-      "search": true,
-      "searchSpan": 8,
-      "overHidden": true
-    },
-    {
       "label": "中文规格",
       "prop": "typeno",
       "index": 5,