Sfoglia il codice sorgente

Merge branch 'mergeBranch' into greenUrgent

qymljy 9 mesi fa
parent
commit
def6676563

+ 17 - 3
src/Form/publicCustomer/add.vue

@@ -18,7 +18,7 @@
       size="600px"
     >
       <div class="drawer__panel">
-        <el-row :gutter="20">
+        <el-row :gutter="2">
           <el-form
             :model="form"
             :rules="rules"
@@ -278,7 +278,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="21">
               <el-form-item
                 :label="$t('上级企业') + ':'"
                 prop="superiorenterprisename"
@@ -365,12 +365,15 @@
                     :readonly="true"
                     v-model="form.superiorenterprisename"
                     autocomplete="off"
-                    :placeholder="$t('请选择客户')"
+                    :placeholder="$t('请选择上级企业')"
                     @input="selectCustomer"
                   ></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="3">
+              <el-button style="width: 100%" type="primary" size="mini" @click="clearClick('上级企业')">{{$t('清空')}}</el-button>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t(`客户来源`) + `:`" prop="source">
                 <selectTemp
@@ -490,6 +493,7 @@ export default {
         telephone: "",
         sa_agentsid: "",
         erpagentnum: "",
+        superiorenterprisename:"",
         contactsinfo: {
           name: "",
           telephone: "",
@@ -1082,6 +1086,16 @@ export default {
     selectSource(data) {
       this.form.source = data;
     },
+    /*清空按钮*/
+    clearClick(type){
+      if (type == '归属经销商'){
+        this.form.sa_agentsid = '';
+        this.form.agentname = '';
+      }else if (type == '上级企业'){
+        this.form.parentid = '';
+        this.form.superiorenterprisename = '';
+      }
+    }
   },
   mounted() {},
 };

+ 16 - 3
src/Form/publicCustomer/edit.vue

@@ -14,7 +14,7 @@
       @close="onClose"
     >
       <div class="drawer__panel">
-        <el-row :gutter="20">
+        <el-row :gutter="2">
           <el-form
             :model="form"
             :rules="rules"
@@ -255,7 +255,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="21">
               <el-form-item :label="$t('上级企业') + ':'">
                 <el-popover
                   placement="bottom"
@@ -339,12 +339,15 @@
                     :readonly="true"
                     v-model="form.superiorenterprisename"
                     autocomplete="off"
-                    :placeholder="$t('请选择客户')"
+                    :placeholder="$t('请选择上级企业')"
                     @input="selectCustomer"
                   ></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="3">
+              <el-button style="width: 100%" type="primary" size="mini" @click="clearClick('上级企业')">{{$t('清空')}}</el-button>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('客户来源') + ':'" prop="source">
                 <selectTemp
@@ -826,6 +829,16 @@ export default {
     selectSource(data) {
       this.form.source = data;
     },
+    /*清空按钮*/
+    clearClick(type){
+      if (type == '归属经销商'){
+        this.form.sa_agentsid = '';
+        this.form.agentname = '';
+      }else if (type == '上级企业'){
+        this.form.parentid = '';
+        this.form.superiorenterprisename = '';
+      }
+    }
   },
   mounted() {},
 };

+ 26 - 7
src/Form/salerPrivatecustomer/add.vue

@@ -14,7 +14,7 @@
       @close="onClose"
     >
       <div class="drawer__panel">
-        <el-row :gutter="20">
+        <el-row :gutter="2">
           <el-form
             ref="form"
             :model="form"
@@ -271,10 +271,10 @@
               </el-form-item>
             </el-col>
 
-            <el-col :span="24">
+            <el-col :span="21">
               <el-form-item
                 :label="$t('上级企业') + ':'"
-                prop="superiorenterprisename"
+                prop="parentid"
               >
                 <el-popover
                   v-model="customerShow"
@@ -358,12 +358,16 @@
                     v-model="form.superiorenterprisename"
                     :readonly="true"
                     autocomplete="off"
-                    :placeholder="$t('请选择客户')"
+                    :placeholder="$t('请选择上级企业')"
                     @input="selectCustomer"
-                  ></el-input>
+                  >
+                  </el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="3">
+              <el-button style="width: 100%" type="primary" size="mini" @click="clearClick('上级企业')">{{$t('清空')}}</el-button>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t(`客户来源`)+`:`" prop="source">
                 <selectTemp
@@ -374,7 +378,7 @@
                 ></selectTemp>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="21">
               <el-form-item :label="$t(`归属经销商`) + ':'" prop="sa_agentsid">
                 <el-popover
                   v-model="agentsShow"
@@ -454,10 +458,14 @@
                     autocomplete="off"
                     :placeholder="$t(`请选择经销商`)"
                     @input="selectAgents"
-                  ></el-input>
+                  >
+                  </el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="3">
+              <el-button style="width: 100%" type="primary" size="mini" @click="clearClick('归属经销商')">{{$t('清空')}}</el-button>
+            </el-col>
           </el-form>
         </el-row>
       </div>
@@ -555,6 +563,7 @@ export default {
         sa_agentsid: "",
         erpagentnum: "",
         agentname: "",
+        superiorenterprisename:"",
         contactsinfo: {
           name: "",
           telephone: "",
@@ -1107,6 +1116,16 @@ export default {
     selectSource(data) {
       this.form.source = data;
     },
+    /*清空按钮*/
+    clearClick(type){
+      if (type == '归属经销商'){
+        this.form.sa_agentsid = '';
+        this.form.agentname = '';
+      }else if (type == '上级企业'){
+        this.form.parentid = '';
+        this.form.superiorenterprisename = '';
+      }
+    }
   },
 };
 </script>

+ 20 - 4
src/Form/salerPrivatecustomer/edit.vue

@@ -18,7 +18,7 @@
       @close="onClose"
     >
       <div class="drawer__panel">
-        <el-row :gutter="20">
+        <el-row :gutter="2">
           <el-form
             :model="form"
             :rules="rules"
@@ -263,7 +263,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="21">
               <el-form-item
                 :label="$t('上级企业') + ':'"
                 prop="superiorenterprisename"
@@ -350,12 +350,15 @@
                     :readonly="true"
                     v-model="form.superiorenterprisename"
                     autocomplete="off"
-                    :placeholder="$t('请选择客户')"
+                    :placeholder="$t('请选择上级企业')"
                     @input="selectCustomer"
                   ></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="3">
+              <el-button style="width: 100%" type="primary" size="mini" @click="clearClick('上级企业')">{{$t('清空')}}</el-button>
+            </el-col>
             <el-col :span="24">
               <el-form-item :label="$t('客户来源') + ':'">
                 <selectTemp
@@ -367,7 +370,7 @@
                 ></selectTemp>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
+            <el-col :span="21">
               <el-form-item :label="$t(`归属经销商`) + ':'">
                 <el-popover
                   placement="bottom"
@@ -451,6 +454,9 @@
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="3">
+              <el-button style="width: 100%" type="primary" size="mini" @click="clearClick('归属经销商')">{{$t('清空')}}</el-button>
+            </el-col>
           </el-form>
         </el-row>
       </div>
@@ -1010,6 +1016,16 @@ export default {
     selectSource(data) {
       this.form.source = data;
     },
+    /*清空按钮*/
+    clearClick(type){
+      if (type == '归属经销商'){
+        this.form.sa_agentsid = '';
+        this.form.agentname = '';
+      }else if (type == '上级企业'){
+        this.form.parentid = '';
+        this.form.superiorenterprisename = '';
+      }
+    }
   },
 };
 </script>

+ 10 - 7
src/HDrpManagement/logistics/details/tabs/logisticsBox/add.vue

@@ -30,6 +30,11 @@
               :data="tableData"
               size="small"
               border>
+              <el-table-column
+                  prop="billno"
+                  :label="$t(`发货单号`)"
+                  width="180">
+              </el-table-column>
               <el-table-column
                 prop="itemno"
                 :label="$t(`产品编码`)"
@@ -180,9 +185,7 @@ export default {
         }
       })
       if(res.data.length) {
-        this.tableData.push(...res.data)
-        const res2 = new Map();
-        this.tableData = this.tableData.filter((item) => !res2.has(item['itemno']) && res2.set(item['itemno'], 1));
+        this.tableData = res.data
         this.$refs.logislist.tableData = []
       }
     },
@@ -191,15 +194,15 @@ export default {
     },
     onConfirm (val) {
       this.tableData = [...val,...this.tableData]
-      const res = new Map();
-      this.tableData = this.tableData.filter((item) => !res.has(item['itemno']) && res.set(item['itemno'], 1));
+      // const res = new Map();
+      // this.tableData = this.tableData.filter((item) => !res.has(item['itemno']) && res.set(item['itemno'], 1));
     },
     deleteRow (row) {
       this.tableData = this.tableData.filter(e=>{
-        if (e.itemno !== row.itemno)
+        if (e.sa_dispatch_itemsid !== row.sa_dispatch_itemsid)
         return e
       })
-
+      this.$refs.logislist.listData()
     }
   }
 }

+ 36 - 17
src/HDrpManagement/logistics/details/tabs/logisticsBox/edit.vue

@@ -30,6 +30,11 @@
               :data="tableData"
               size="small"
               border>
+              <el-table-column
+                  prop="billno"
+                  :label="$t(`发货单号`)"
+                  width="180">
+              </el-table-column>
               <el-table-column
                 prop="itemno"
                 :label="$t(`产品编码`)"
@@ -77,7 +82,7 @@
             </el-table>
           </el-col>
           <el-col :span="24 - setcol">
-            <logisticsCanUseProduct ref="logislist" :sa_logistics_boxid="0" @onConfirm="onConfirm">
+            <logisticsCanUseProduct ref="logislist" :sa_logistics_boxid="this.data.sa_logistics_boxid" @onConfirm="onConfirm" :addList="delList" type="edit">
               <el-button class="inline-16" slot="allBtn" type="primary" size="small" @click="handlePullData">{{$t(`一键全选`)}}</el-button>
             </logisticsCanUseProduct>
           </el-col>
@@ -100,7 +105,8 @@ export default {
       drawer:false,
       form:{},
       setcol:24,
-      tableData:[]
+      tableData:[],
+      delList:[]
     }
   },
   components:{
@@ -109,9 +115,23 @@ export default {
   methods:{
     onShow () {
       this.form = Object.assign({},this.form,this.data)
+      this.delList = []
+      this.setcol = 24
       this.listData()
     },
     async onSubmit (){
+      // let delID = []
+      // delID = this.delList.map(item=>item.sa_logistics_boxmxid)
+      // const res1 = await this.$api.requested({
+      //   "id": "20230109155504",
+      //   "content": {
+      //     "sa_logisticsid":this.data.sa_logisticsid,
+      //     "sa_logistics_boxmxids":delID
+      //   }
+      // })
+      // if (res1.code == 0){
+      //   this.tool.showMessage(res,()=>{})
+      // }
       const res = await this.$api.requested({
         "id": "20230109155104",
         "content": {
@@ -139,21 +159,19 @@ export default {
     },
     onConfirm (val) {
       this.tableData = [...val,...this.tableData]
-      const res = new Map();
-      this.tableData = this.tableData.filter((item) => !res.has(item['itemno']) && res.set(item['itemno'], 1));
+      // const res = new Map();
+      // this.tableData = this.tableData.filter((item) => !res.has(item['itemno']) && res.set(item['itemno'], 1));
     },
     async deleteRow (row) {
-      const res = await this.$api.requested({
-        "id": "20230109155504",
-        "content": {
-            "sa_logisticsid":this.data.sa_logisticsid,
-            "sa_logistics_boxmxids":[row.sa_logistics_boxmxid]
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.$emit('onSuccess')
-        this.listData()
+      this.tableData = this.tableData.filter(e=>{
+        if (e.sa_dispatch_itemsid !== row.sa_dispatch_itemsid)
+          return e
       })
+      console.log(row,'row删除')
+      let delNew = []
+      delNew[0] = row
+      this.delList = [...this.delList,...delNew]
+      this.$refs.logislist.listData()
     },
     async handlePullData () {
       let res = await this.$api.requested({
@@ -169,9 +187,10 @@ export default {
         }
       })
       if(res.data.length) {
-        this.tableData.push(...res.data)
-        const res2 = new Map();
-        this.tableData = this.tableData.filter((item) => !res2.has(item['itemno']) && res2.set(item['itemno'], 1));
+        this.tableData = res.data
+        // this.tableData.push(...res.data)
+        // const res2 = new Map();
+        // this.tableData = this.tableData.filter((item) => !res2.has(item['itemno']) && res2.set(item['itemno'], 1));
         this.$refs.logislist.tableData = []
       }
     },

+ 2 - 1
src/HDrpManagement/logistics/details/tabs/logisticsBox/logisticsBoxmx.vue

@@ -69,11 +69,12 @@ export default {
   data () {
     return {
       params:{
-        "id": 20230109155304,
+        "id": 2025073110370102,
         "content": {
           "pageNumber": 1,
           "pageSize": 20,
           "sa_logistics_boxid":0,
+          "sa_logisticsid":this.$route.query.id,
           "where": {
             "condition": ""
           }

+ 6 - 2
src/HDrpManagement/logistics/modules/add.vue

@@ -65,10 +65,10 @@
         </div>
         <el-row :gutter="10">
           <el-col :span="setcol">
-            <dispatch-table type="add" ref="dislist"></dispatch-table>
+            <dispatch-table type="add" ref="dislist" status="新建" @delSuccess="delSuccess"></dispatch-table>
           </el-col>
           <el-col :span="24 - setcol">
-            <add-disbill v-if="drawer" ref="addbill" :data="enterpriseInfo" :paytype="form.paytype" @onConfirm="onConfirm" :addList="selectList"></add-disbill>
+            <addDisbill v-if="drawer" ref="addbill" :data="enterpriseInfo" :paytype="form.paytype" @onConfirm="onConfirm" :addList="selectList"></addDisbill>
           </el-col>
         </el-row>
       </div>
@@ -204,6 +204,10 @@ export default {
       this.isCorrelate = 0
       this.$refs.dislist.tableData = []
       this.enterpriseInfo = null
+    },
+    delSuccess(data){
+      this.selectList = data
+      this.$refs.addbill.listData()
     }
   }
 }

+ 4 - 4
src/HDrpManagement/logistics/modules/dispatchTable.vue

@@ -34,9 +34,9 @@
     },
     methods:{
       async deleteDisBill (row,val) {
-        if (val == '删除'){
-          this.needQuery = true
-        }
+        // if (val == '删除'){
+        //   this.needQuery = true
+        // }
         if (this.needQuery) {
           const res = await this.$api.requested({
             "id": "20221122133404",
@@ -56,7 +56,7 @@
           this.tableData = this.tableData.filter(e=>{
             return e.sa_dispatchid !== row.sa_dispatchid
           })
-
+          this.$emit('delSuccess',this.tableData,row)
         }
       },
       async listData(val){

+ 41 - 32
src/HDrpManagement/logistics/modules/edit.vue

@@ -69,7 +69,7 @@ ed<template>
             <dispatch-table type="edit" :needQuery="false" ref="dislist" @isCorrelation="isCorrelation" @delSuccess="delSuccess" :status="data.status"></dispatch-table>
           </el-col>
           <el-col :span="24 - setcol">
-            <add-disbill ref="addbill" :data="enterpriseInfo" @onConfirm="onConfirm" :addList="selectList"></add-disbill>
+            <addDisbill ref="addbill" :data="enterpriseInfo" @onConfirm="onConfirm" :addList="selectList" type="编辑" :delList="delList"></addDisbill>
           </el-col>
         </el-row>
       </div>
@@ -118,21 +118,8 @@ export default {
       setcol:24,
       isCorrelate:0,
       selectList:[],
-      form:{
-       "freightamount": "",
-        "logisticno": "",
-        "paytype": "",
-        "remarks": "",
-        "sa_dispatchids": [],
-        "sa_logiscompid": 0,
-        "sa_logisticsid": 0,
-        "sys_enterpriseid": '',
-        "carnum":"",
-        "logisphone":"",
-         "logiscontact":"",
-        "rec_contactsid":'',
-        "billdate":'',
-      },
+      delList:[],
+      form:{},
       enterpriseInfo:null,
        pickerOptions: {
         disabledDate(time) {
@@ -145,6 +132,7 @@ export default {
     onShow () {
       this.form = Object.assign({},this.form,this.data)
       this.enterpriseInfo = this.data
+      this.delList = []
       this.$nextTick(()=>{
         this.$refs['ent'].form.enterprisename = this.data.enterprisename
         this.$refs['logis'].form.abbreviation = this.data.logiscomp_enterprisename
@@ -154,7 +142,11 @@ export default {
       })
 
     },
-    delSuccess(){
+    delSuccess(data,row){
+      this.selectList = data
+      const delNew = []
+      delNew[0] = row
+      this.delList = [...this.delList,...delNew]
       this.$refs['addbill'].listData()
     },
     isCorrelation(val,data){
@@ -198,22 +190,39 @@ export default {
       this.tool.showMessage(res,()=>{
         this.drawer = false
         this.$emit('onSuccess')
-        this.form = {
-          "freightamount": "",
-          "logisticno": "",
-          "paytype": "",
-          "remarks": "",
-          "sa_dispatchids": [],
-          "sa_logiscompid": 0,
-          "sa_logisticsid": 0,
-          "sys_enterpriseid": '',
-          "carnum":"",
-          "logisphone":"",
-          "logiscontact":"",
-          "rec_contactsid":'',
-          "billdate":''
-        }
       })
+      // if (res.code == 0){
+      //   this.tool.showMessage(res,()=>{})
+      // }else {
+      //   let delId = []
+      //   delId = this.delList.map(item=>item.sa_logistics_itemsid)
+      //   const res1 = await this.$api.requested({
+      //     "id": "20221122133404",
+      //     "content": {
+      //       "sa_logisticsid":this.$route.query.id,
+      //       "sa_logistics_itemsids":delId
+      //     }
+      //   })
+      //   this.tool.showMessage(res1,()=>{
+      //     this.drawer = false
+      //     this.$emit('onSuccess')
+      //     this.form = {
+      //       "freightamount": "",
+      //       "logisticno": "",
+      //       "paytype": "",
+      //       "remarks": "",
+      //       "sa_dispatchids": [],
+      //       "sa_logiscompid": 0,
+      //       "sa_logisticsid": 0,
+      //       "sys_enterpriseid": '',
+      //       "carnum":"",
+      //       "logisphone":"",
+      //       "logiscontact":"",
+      //       "rec_contactsid":'',
+      //       "billdate":''
+      //     }
+      //   })
+      // }
     },
     onClose () {
       this.$refs['ent'].form = this.$refs['logis'].form = {}

+ 25 - 76
src/HDrpManagement/logistics/modules/productlist.vue

@@ -1,81 +1,26 @@
 <template>
   <div>
-    <el-table
-      ref="multipleTable"
-      :data="tableData"
-      style="width: 100%;"
-      size="small"
-      stripe
-      border>
-      <!-- <el-table-column
-        type="selection"
-        width="55"
-        align="center">
-      </el-table-column> -->
-      <el-table-column
-          prop="rowno"
-          width="55"
-          :label="$t('行号')">
-      </el-table-column>
-      <el-table-column
-        prop="itemname"
-       :label="$t('产品名称')">
-      </el-table-column>
-      <el-table-column
-        prop="itemno"
-       :label="$t('产品编号')">
-      </el-table-column>
-      <el-table-column
-        :label="$t('型号')">
-        <template slot-scope="scope">
-          <p><span>{{scope.row.model}}</span></p>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('公称通径')" width="150" prop="caliber" v-if="siteid == 'HY' || siteid == 'YOSTEST1'">
-        <template slot-scope="scope">
-          <p>
-            <span>{{ scope.row.caliber || '--'}}</span>
-          </p>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('公称压力')" width="150" prop="nominalpressure" v-if="siteid == 'HY' || siteid == 'YOSTEST1'">
-        <template slot-scope="scope">
-          {{tool.nominalPressureSet(scope.row.nominalpressure)}}
-        </template>
-      </el-table-column>
-      <el-table-column
-          :label="$t('规格')" v-if="siteid != 'HY' && siteid != 'YOSTEST1'">
-        <template slot-scope="scope">
-          <p><span>{{scope.row.spec}}</span></p>
-        </template>
-      </el-table-column>
-      <el-table-column
-        :label="$t(`数量`)">
-        <template slot-scope="scope">
-           <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="type === 'edit' && tool.checkAuth($route.name,'update') && status == '新建' && logistics_qty_editable" size="mini" v-model="scope.row.qty" :min="1" :step="scope.row.orderaddqty" :label="$t(`输入数量`)" @change="qtyChange(scope.row,scope.$index)"></el-input-number>
-          <span v-else>{{scope.row.qty}}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-          :label="$t(`未出货数量`)">
-        <template slot-scope="scope">
-          <span>{{scope.row.unlogisticsqty?scope.row.unlogisticsqty:scope.row.unlogisticsqty == 0?'0':'--'}}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        prop="unit"
-        :label="$t('计量单位')"
-        width="90">
-        <template slot-scope="scope">
-          <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}</el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="type === 'edit'" width="90" fixed="right" :label="$t('操作')">
-        <template slot-scope="scope">
-          <el-button type="text" size="mini" @click="deleteOrderProduct(scope.row)" :disabled="!logistics_qty_editable || status != '新建'">{{$t('删 除')}}</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
+    <tableDetail :layout="tablecols" :data="tableData" :opwidth="200" :custom="true" fixedName="operation">
+      <template v-slot:customcol="scope">
+        <div v-if="scope.column.columnname == 'nominalpressure'">
+          {{tool.nominalPressureSet(scope.column.data.nominalpressure)}}
+        </div>
+        <div v-else-if="scope.column.columnname == 'qty'">
+          <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="type === 'edit' && tool.checkAuth($route.name,'update') && status == '新建' && logistics_qty_editable" size="mini" v-model="scope.column.data.qty" :min="1" :step="scope.column.data.orderaddqty" :label="$t(`输入数量`)" @change="qtyChange(scope.column.data,scope.$index)"></el-input-number>
+          <span v-else>{{scope.column.data.qty}}</span>
+        </div>
+        <div v-else-if="scope.column.columnname == 'unlogisticsqty'">
+          {{tool.qtyShow(scope.column.data.unlogisticsqty)}}
+        </div>
+        <div v-else-if="scope.column.columnname == 'unit'">
+          <el-tag size="mini" type="info" effect="plain">{{scope.column.data.unitname}}</el-tag>
+        </div>
+        <div v-else>{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
+      </template>
+      <template v-slot:opreation="scope">
+        <el-button type="text" size="mini" @click="deleteOrderProduct(scope.data)" :disabled="!logistics_qty_editable || status != '新建'">{{$t('删 除')}}</el-button>
+      </template>
+    </tableDetail>
     <div style="margin-top:16px;text-align:right">
       <el-pagination
         background
@@ -110,6 +55,7 @@ export default {
           }
         },
       },
+      tablecols:[],
       total:0,
       currentPage:0,
       time: null,
@@ -178,6 +124,9 @@ export default {
     }
   },
   mounted () {
+  },
+  created() {
+    this.tablecols = this.type == 'edit' ? this.tool.tabelCol(this.$route.name).productTable.tablecols : tool.tabelCol($route.name).productTable.tablecols.splice(0,tool.tabelCol($route.name).productTable.tablecols.length - 1)
   }
 }
 

+ 4 - 1
src/HDrpManagement/orderManage/details/index.vue

@@ -723,8 +723,11 @@ export default {
         }
       })
       this.$refs['prod'].listData()
-      if (res.data !== '成功') {
+      console.log(res.data.substr(0,4))
+      if (res.data.substr(0,4) == 'http'){
         this.errorUrl = res.data
+      }else {
+        this.tool.showMessage(res,()=>{})
       }
       this.queryMainData()
     }

+ 4 - 2
src/SDrpManagement/agentOrder/details/index.vue

@@ -717,8 +717,10 @@ export default {
         },
       });
       this.$refs["prod"].listData();
-      if (res.data !== "成功") {
-        this.errorUrl = res.data;
+      if (res.data.substr(0,4) == 'http'){
+        this.errorUrl = res.data
+      }else {
+        this.tool.showMessage(res,()=>{})
       }
       this.queryMainData();
     },

+ 4 - 2
src/SDrpManagement/salerOrder/details/index.vue

@@ -861,8 +861,10 @@ export default {
         },
       });
       this.$refs["prod"].listData();
-      if (res.data !== "成功") {
-        this.errorUrl = res.data;
+      if (res.data.substr(0,4) == 'http'){
+        this.errorUrl = res.data
+      }else {
+        this.tool.showMessage(res,()=>{})
       }
       this.queryMainData();
     },

+ 5 - 5
src/SDrpManagement/salerPrivatecustomer/detail/modules/financialInfo/modules/add.vue

@@ -147,11 +147,11 @@ export default {
             message: this.$t("请输入联系电话"),
             trigger: "blur",
           },
-          {
-            pattern: /^1[3-9][0-9]\d{8}$/,
-            message: this.$t("请输入正确手机号码"),
-            trigger: "blur",
-          },
+          // {
+          //   pattern: /^1[3-9][0-9]\d{8}$/,
+          //   message: this.$t("请输入正确手机号码"),
+          //   trigger: "blur",
+          // },
         ],
       },
     };

+ 0 - 5
src/SDrpManagement/salerPrivatecustomer/detail/modules/financialInfo/modules/edit.vue

@@ -155,11 +155,6 @@ export default {
             message: this.$t("请输入联系电话"),
             trigger: "blur",
           },
-          {
-            pattern: /^1[3-9][0-9]\d{8}$/,
-            message: this.$t("请输入正确手机号码"),
-            trigger: "blur",
-          },
         ],
       },
     };

+ 37 - 25
src/template/logisticsCanUseProduct/index.vue

@@ -19,6 +19,11 @@
         type="selection"
         width="55">
       </el-table-column>
+      <el-table-column
+          prop="billno"
+          :label="$t(`发货单号`)"
+          width="180">
+      </el-table-column>
       <el-table-column
         prop="itemno"
         :label="$t(`产品编码`)"
@@ -74,7 +79,7 @@
 
 <script>
 export default {
-  props:['sa_logistics_boxid','addList'],
+  props:['sa_logistics_boxid','addList','type'],
   data () {
     return {
       params:{
@@ -98,33 +103,40 @@ export default {
   },
   methods:{
     async listData () {
-      console.log(this.addList)
       this.params.content.sa_logisticsid = this.$route.query.id
       this.params.content.sa_logistics_boxid = this.sa_logistics_boxid
       const res = await this.$api.requested(this.params)
       res.data.forEach(e => {
         e.remarks = ''
       });
-      if (this.addList && this.addList.length > 0){
-        let indexof = 0
-        let dataNew = []
-        res.data.forEach((t,indexs)=>{
-          let float = 0
-          this.addList.forEach((i,index)=>{
-            if (t.itemid == i.itemid){
-              float = 1
+      if (this.type == 'edit'){
+        this.tableData = res.data
+        if (this.addList && this.addList.length > 0){
+          this.tableData = [...this.tableData,...this.addList]
+        }
+      }else {
+        if (this.addList && this.addList.length > 0){
+          let indexof = 0
+          let dataNew = []
+          res.data.forEach((t,indexs)=>{
+            let float = 0
+            this.addList.forEach((i,index)=>{
+              if (t.sa_dispatch_itemsid == i.sa_dispatch_itemsid){
+                float = 1
+              }
+            })
+            if (float != 1){
+              dataNew[indexof] = res.data[indexs]
+              indexof = indexof + 1
             }
           })
-          if (float != 1){
-            dataNew[indexof] = res.data[indexs]
-            indexof = indexof + 1
-          }
-        })
-        this.tableData = dataNew
+          this.tableData = dataNew
 
-      }else {
-        this.tableData = res.data
+        }else {
+          this.tableData = res.data
+        }
       }
+
       // this.tableData = res.data
       // this.total = res.total
       // this.currentPage = res.pageNumber
@@ -143,13 +155,13 @@ export default {
       this.tableSelectData = val
     },
     onConfirm () {
-      this.tableSelectData.forEach((item,index) => {
-        this.tableData.forEach((item2,indexs) => {
-          if (item.itemid == item2.itemid) {
-            this.tableData.splice(indexs,1)
-          }
-        })
-      })
+      // this.tableSelectData.forEach((item,index) => {
+      //   this.tableData.forEach((item2,indexs) => {
+      //     if (item.itemid == item2.itemid) {
+      //       this.tableData.splice(indexs,1)
+      //     }
+      //   })
+      // })
       this.$emit('onConfirm',this.tableSelectData)
     },
   }

+ 47 - 17
src/template/logisyticCanUseDisBill/index.vue

@@ -33,7 +33,7 @@
 
   <script>
     export default {
-      props:['data','paytype','addList'],
+      props:['data','paytype','addList','type','delList'],
       data() {
         return {
           tableSelectData:[],
@@ -65,28 +65,58 @@
           const res = await this.$api.requested(this.params)
 
           // this.tableData = res.data
-
-          if (this.addList && this.addList.length > 0){
-            let indexof = 0
-            let dataNew = []
-            res.data.forEach((t,indexs)=>{
-              let float = 0
-              this.addList.forEach((i,index)=>{
-                if (t.sa_dispatchid == i.sa_dispatchid){
-                  float = 1
+          if (this.type == '编辑'){
+            if (this.addList && this.addList.length > 0){
+              let indexof = 0
+              let dataNew = []
+              res.data.forEach((t,indexs)=>{
+                let float = 0
+                this.addList.forEach((i,index)=>{
+                  if (t.sa_dispatchid == i.sa_dispatchid){
+                    float = 1
+                  }
+                })
+                if (float != 1){
+                  dataNew[indexof] = res.data[indexs]
+                  indexof = indexof + 1
                 }
               })
-              if (float != 1){
-                dataNew[indexof] = res.data[indexs]
-                indexof = indexof + 1
+              if (this.delList && this.delList.length > 0){
+                this.tableData = [...dataNew,...this.delList]
+              }else {
+                this.tableData = dataNew
               }
-            })
-            this.tableData = dataNew
-
+            }else {
+              if (this.delList && this.delList.length > 0){
+                this.tableData = [...res.data,...this.delList]
+              }else {
+                this.tableData = res.data
+              }
+            }
           }else {
-            this.tableData = res.data
+            if (this.addList && this.addList.length > 0){
+              let indexof = 0
+              let dataNew = []
+              res.data.forEach((t,indexs)=>{
+                let float = 0
+                this.addList.forEach((i,index)=>{
+                  if (t.sa_dispatchid == i.sa_dispatchid){
+                    float = 1
+                  }
+                })
+                if (float != 1){
+                  dataNew[indexof] = res.data[indexs]
+                  indexof = indexof + 1
+                }
+              })
+              this.tableData = dataNew
+
+            }else {
+              this.tableData = res.data
+            }
           }
 
+
           // this.total = res.total
           // this.currentPage = res.pageNumber
         },