zhangqiOMG 2 years ago
parent
commit
3c72d4d30c

+ 1 - 1
src/HDrpManagement/orderManage/details/importFile.vue

@@ -91,7 +91,7 @@ export default {
   },
   mounted () {
     this.getModelUrl()
-    this.listData()
+    // this.listData()
   },
   methods: {
     cancel () {

+ 14 - 3
src/HDrpManagement/orderManage/details/index.vue

@@ -54,7 +54,7 @@
       <div slot="slot0">
         <product-list @select="select" @onSuccess="queryMainData()" :data="mainData" ref="prod">
           <div slot="operation">
-            <importFile class="inline-16" :bindData="{ownertable:'sa_order',ownerid:$route.query.id,usetype:'import'}" @onSuccess="bindImportOrder"></importFile>
+            <!-- <importFile class="inline-16" :bindData="{ownertable:'sa_order',ownerid:$route.query.id,usetype:'default'}" @onSuccess="bindImportOrder"></importFile> -->
             <changeOrderMx v-if="mainData.status === '审核'" class="inline-16" :data="selection" @onSuccess="$refs['prod'].listData()"></changeOrderMx>
             <el-button :disabled="mainData.status !== '审核' || selection.length === 0"  size="small" type="primary" style="margin-bottom:12px" @click="adddispatch">一键发货</el-button>
           </div>
@@ -482,8 +482,19 @@ export default {
         this.$router.replace({path:'/dispatchdetail',query:{id:res.data.sa_dispatchid,rowindex:res.data.rowindex}})
       })
     },
-    async bindImportOrder () {
-      const res = await this.$api.requested()
+    async bindImportOrder (id) {
+      console.log(id)
+      const res = await this.$api.requested({
+        "id": 20230227194803,
+        "content": {
+        "sa_orderid":this.$route.query.id,
+        "attachmentid":id
+        }
+      })
+      this.$refs['prod'].listData()
+      if (res.data) {
+        console.log(res.data)
+      }
     }
   },
   mounted () {

+ 35 - 31
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -231,13 +231,15 @@
           label="仓库"
           width="150">
           <template slot-scope="scope">
-            <el-select v-model="scope.row.stockid" size="mini" placeholder="请选择">
+            <el-select v-model="scope.row.stockid" size="mini" @visible-change="queryStock(scope.row)" placeholder="请选择">
               <el-option
                 v-for="item in stockOptions"
-                :key="item.stockid"
-                :label="item.stockname"
-                :value="item.stockid"
-                @click.native="rowChange(scope.row,scope.$index)">
+                :key="item.stockno"
+                :label="item.WAREHOUSE"
+                :value="item.stockno"
+                @click.native="stockChange(item,scope.row,scope.$index)">
+                <span>{{ item.WAREHOUSE }}</span>
+                <div style="float: right; color: #8492a6; font-size: 13px">数量:{{item.qty}}仓位:{{ item.LOCATION }}/批号:{{ item.LOT }}</div>
               </el-option>
             </el-select>
           </template>
@@ -248,7 +250,7 @@
           label="仓位"
           width="150">
           <template slot-scope="scope">
-            <el-input size="mini" v-model="scope.row.position" @input="rowChange(scope.row,scope.$index)" placeholder="输入仓位"></el-input>
+            <el-input size="mini" readonly v-model="scope.row.position" @input="rowChange(scope.row,scope.$index)" placeholder="输入仓位"></el-input>
           </template>
         </el-table-column>
         <el-table-column
@@ -257,7 +259,7 @@
           label="批号"
           width="150">
           <template slot-scope="scope">
-            <el-input size="mini" v-model="scope.row.batchno" @input="rowChange(scope.row,scope.$index)" placeholder="输入批号"></el-input>
+            <el-input size="mini" readonly v-model="scope.row.batchno" @input="rowChange(scope.row,scope.$index)" placeholder="输入批号"></el-input>
           </template>
         </el-table-column>
         <el-table-column
@@ -390,31 +392,31 @@ export default {
         this.$emit('onSuccess')
       })
     },
+    stockChange (item,row,index) {
+      row.position = item.LOCATION
+      row.batchno = item.LOT
+      this.$set(this.tableData,index,row)
+      that.updateOrder({
+        "sa_orderid": this.data.sa_orderid, //订单ID
+        "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
+        "sa_contractid": this.data.contacts.contactsid, //合同ID
+        "type": this.data.type, //订单类型
+        "items": this.tableData
+      })
+    },
     rowChange (val,index) {
       let that = this
       if(this.time !== null){
         clearTimeout(this.time);
       }
       this.time = setTimeout(() => {
+        this.$set(this.tableData,index,val)
         that.updateOrder({
           "sa_orderid": this.data.sa_orderid, //订单ID
           "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
           "sa_contractid": this.data.contacts.contactsid, //合同ID
           "type": this.data.type, //订单类型
-          "items": [{
-            "sa_orderitemsid": val.sa_orderitemsid,//0表示新增
-            "itemid": val.itemid, //商品ID
-            "qty": val.qty, //数量
-            "needdate": val.needdate,//可以不传,修改交期
-            "price":val.price,
-            "remarks":val.remarks,
-            "defaultprice":val.defaultprice,
-            "stockid":val.stockid,
-            "position":val.position,
-            "batchno":val.batchno
-          }]
-        },()=>{
-          this.$set(this.tableData,index,val)
+          "items": this.tableData
         })
       },500)
     },
@@ -425,12 +427,7 @@ export default {
         "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
         "sa_contractid": this.data.contacts.contactsid, //合同ID
         "type": this.data.type, //订单类型
-        "items": [{
-          "sa_orderitemsid": val.sa_orderitemsid,//0表示新增
-          "itemid": val.itemid, //商品ID
-          "qty": val.qty, //数量
-          "deliverydate": val.deliverydate//可以不传,修改交期
-        }]
+        "items": this.tableData
       })
     },
     async updateOrder (val,fn) {
@@ -440,7 +437,6 @@ export default {
       })
       this.$emit('onSuccess')
       this.listData()
-      res.code === 1?fn():""
     },
     async dateChangeNeed(val){
       const res = await this.$api.requested({
@@ -515,14 +511,22 @@ export default {
         this.$emit('onSuccess')
       })
     },
-    async queryStock () {
-      const res = await this.$store.dispatch('optiontypeselect','stockselect')
+    async queryStock (val) {
+      console.log(val)
+      const res = await this.$api.requested({
+        "id": 20230228193201,
+        "content": {
+          "itemid": val.itemid,
+          "qty": val.qty
+        }
+
+      })
       this.stockOptions = res.data
     }
   },
   mounted () {
     this.listData()
-    this.queryStock()
+    // this.queryStock()
     this.columnTitle  = []
     this.$refs.multipleTable.$children.forEach(obj => {
 

+ 2 - 2
src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

@@ -25,8 +25,8 @@
       <div>
         <p class="normal-margin">标准:&emsp;{{selectProduct.standards}}</p>
       </div>
-      <div v-if="selectProduct.itemextend">
-        <p class="normal-margin">材质:&emsp;{{selectProduct.itemextend[0].material}}</p>
+      <div v-if="selectProduct.itemextend.length > 0">
+        <p class="normal-margin">材质:&emsp;{{selectProduct.itemextend?selectProduct.itemextend[0].material:''}}</p>
       </div>
       <div class="flex-align-center" style="margin-bottom:30px">
         <p>数量:&emsp;</p>

+ 2 - 12
src/SDrpManagement/agentOrder/modules/productlist.vue

@@ -295,12 +295,7 @@ export default {
           "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
           "sa_contractid": this.data.contacts.contactsid, //合同ID
           "type": this.data.type, //订单类型
-          "items": [{
-            "sa_orderitemsid": val.sa_orderitemsid,//0表示新增
-            "itemid": val.itemid, //商品ID
-            "qty": val.qty, //数量
-            "needdate": val.needdate//可以不传,修改交期
-          }]
+          "items": this.tableData
         })
         this.$emit("qtyChange")
       },500)
@@ -313,12 +308,7 @@ export default {
         "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
         "sa_contractid": this.data.contacts.contactsid, //合同ID
         "type": this.data.type, //订单类型
-        "items": [{
-          "sa_orderitemsid": val.sa_orderitemsid,//0表示新增
-          "itemid": val.itemid, //商品ID
-          "qty": val.qty, //数量
-          "needdate": val.needdate//可以不传,修改交期
-        }]
+        "items": this.tableData
       })
       
     },

+ 2 - 12
src/SDrpManagement/salerOrder/modules/productlist.vue

@@ -308,12 +308,7 @@ export default {
           "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
           "sa_contractid": this.data.contacts.contactsid, //合同ID
           "type": this.data.type, //订单类型
-          "items": [{
-            "sa_orderitemsid": val.sa_orderitemsid,//0表示新增
-            "itemid": val.itemid, //商品ID
-            "qty": val.qty, //数量
-            "needdate": val.needdate//可以不传,修改交期
-          }]
+          "items":  this.tableData
         })
       },500)
     },
@@ -325,12 +320,7 @@ export default {
         "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
         "sa_contractid": this.data.contacts.contactsid, //合同ID
         "type": this.data.type, //订单类型
-        "items": [{
-          "sa_orderitemsid": val.sa_orderitemsid,//0表示新增
-          "itemid": val.itemid, //商品ID
-          "qty": val.qty, //数量
-          "needdate": val.needdate//可以不传,修改交期
-        }]
+        "items": this.tableData
       })
       
     },

+ 14 - 6
src/SDrpManagement/shopCart/modules/list.vue

@@ -15,7 +15,8 @@
     <el-table
       ref="multipleTable"
       :data="tableData"
-      style="width: 100%;height:calc(100vh - 346px)"
+      style="width: 100%;"
+      height="calc(100vh - 400px)"
       :header-cell-style="{height:'50px',color:'#768093',fontWeight:'400'}"
       :cell-style="{height:'50px',color:'#768093',fontWeight:'400'}"
       @selection-change="selectionChange">
@@ -74,7 +75,7 @@
         label="数量"
         width="150">
         <template slot-scope="scope">
-        <el-input-number size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" :step="scope.row.orderaddqty" label="输入数量" @change="qtyChange"></el-input-number>
+        <el-input-number size="mini" v-model="scope.row.qty" :min="scope.row.orderminqty" @change="changeQty(scope.row)" :step="scope.row.orderaddqty" label="输入数量"></el-input-number>
         </template>
       </el-table-column>
       <el-table-column
@@ -124,7 +125,7 @@ export default {
         "id": 20220924095302,
         "content": {
           "pageNumber": 1,
-          "pageSize": 20,
+          "pageSize": 9999,
           "istool":0,
           "where": {
             "condition": ''
@@ -176,13 +177,20 @@ export default {
     clearSelection () {
       this.$refs.multipleTable.clearSelection();
     },
-    qtyChange () {
-      this.$emit('qtyChange')
-    },
     onRadioChange () {
       this.params.content.pageNumber = 1
       this.listData()
       this.$emit('onRadioChange',this.params.content.istool)
+    },
+    async changeQty (row) {
+      const res = await this.$api.requested({
+        "id": 20220924104302,
+        "content": {
+          "sa_shoppingcartid": row.sa_shoppingcartid, 
+          "qty": row.qty //数量
+        },
+      })
+      this.$emit('qtyChange')
     }
   },
   mounted () {

+ 0 - 1
src/SDrpManagement/sinvoiceapp/modules/add.vue

@@ -116,7 +116,6 @@ export default {
       visible:false,
       visible1:false,
       form:{
-        enterprisename:'',
         taxno:'',
         sa_invoiceapplyid:0,
         remarks:'',