zhangqiOMG пре 3 година
родитељ
комит
9026fd1e20

+ 1 - 1
src/HDrpManagement/orderManage/details/tabs/changeOrderMx.vue

@@ -45,7 +45,7 @@
           label="原数量"
           width="180">
           <template slot-scope="scope">
-            <span>{{scope.row.undeliqty}}</span>
+            <span>{{scope.row.qty}}</span>
           </template>
         </el-table-column>
         <el-table-column

+ 4 - 4
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -234,12 +234,12 @@
           label="仓库"
           width="150">
           <template slot-scope="scope">
-            <el-select v-model="scope.row.stockid" size="mini" @visible-change="queryStock(scope.row)" placeholder="请选择">
+            <el-select v-model="scope.row.stockno" size="mini" @visible-change="queryStock(scope.row)" placeholder="请选择">
               <el-option
                 v-for="item in stockOptions"
-                :key="item.stockno"
+                :key="item.WAREHOUSE"
                 :label="item.WAREHOUSE"
-                :value="item.stockno"
+                :value="item.WAREHOUSE"
                 @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>
@@ -396,6 +396,7 @@ export default {
       })
     },
     stockChange (item,row,index) {
+      row.stockno = item.WAREHOUSE
       row.position = item.LOCATION
       row.batchno = item.LOT
       this.$set(this.tableData,index,row)
@@ -519,7 +520,6 @@ export default {
       })
     },
     async queryStock (val) {
-      console.log(val)
       const res = await this.$api.requested({
         "id": 20230228193201,
         "content": {

+ 1 - 1
src/HDrpManagement/orderManage/modules/edit.vue

@@ -333,7 +333,7 @@ export default {
         "id": 20230218225002,
         "content": {
           "sa_orderid": this.data.sa_orderid, //订单金额
-          "isused": this.data.rebate_used == 1 ? 0 : 1, //是否使用
+          "isused": this.checked, //是否使用
           "rebateamount": rebatebalance > amount ? amount : rebatebalance //返利金使用金额
         }
       })

+ 15 - 20
src/SDrpManagement/agentOrder/modules/edit.vue

@@ -41,8 +41,8 @@
             <p><small>本单金额:&nbsp;</small>{{data.rebate_used ? tool.formatAmount(data.defaultamount - rebateamount,2) : data.defaultamount}}</p>
           </div>
           <div v-if="(data.type === '标准订单' ||  data.type === '特殊订单') && isusedrebate === 1">
-            <el-checkbox v-model="data.rebate_used" :true-label="1" :false-label="0" @change="rebateUsedChange">使用返利金</el-checkbox>
-            <div v-if="data.rebate_used" class="flex-align-center">
+            <el-checkbox v-model="checked" :true-label="1" :false-label="0" @change="rebateUsedChange">使用返利金</el-checkbox>
+            <div v-if="checked" class="flex-align-center">
               <p class="inline-16"><b>返利金余额:{{tool.formatAmount(data.rebatebalance,2)}}</b></p>
               <el-input class="inline-16" size="mini" style="width:150px" v-model="data.rebateamount" @blur="useRebate(data.rebateamount)" placeholder="输入使用金额"></el-input>
               <small>(返利金最高使用比例{{data.order_rebate_userate}})</small>
@@ -121,7 +121,7 @@
                   v-model="addressparam.content.where.condition" 
                   placeholder="请输入搜索内容" 
                   style="width:150px"
-                  @keyup.enter.native="receiveAddress(addressparam.content.pageNumber = 1)" @clear="receiveAddress(addressparam.content.pageNumber = 1)" clearable></el-input>&nbsp;
+                  @keyup.enter.native="receiveAddress(addressparam.content.pageNumber = 1)" @clear="receiveAddress(addressparam.content.pageNumber = 1)" clearable></el-input>&nbsp;
                 <addAddressInfo @onAddSuccess="receiveAddress()" :mainData="{sys_enterpriseid:data.sys_enterpriseid}"/>
               </div>
               <el-table
@@ -416,9 +416,9 @@ export default {
     },
     async useRebate (e) {
       let that = this
-      /* 修改返利金 */
-        let rebateamount = e;
-        let amount = this.data.order_rebate_userate * this.data.defaultamount;//最大可用金额
+      /* 修改返利金 */
+      let rebateamount = e;
+      let amount = this.data.order_rebate_userate * this.data.defaultamount;//最大可用金额
       const res = await this.$api.requested({
               "id":20230218225002,
               "content":{
@@ -471,23 +471,18 @@ export default {
     },
     async rebateUsedChange(){
       console.log(this.data)
-
-
-      if(this.data.status != '新建') return 1
-
-
-      let amount = this.data.order_rebate_userate * this.data.defaultamount; //最大可用金额
-      let rebatebalance = this.data.rebatebalance; //返利金账户余额
+      if(this.data.status != '新建') return 1
+      let amount=this.data.order_rebate_userate*this.data.defaultamount;//最大可用金额
+      let rebatebalance = this.data.rebatebalance;//返利金账户余额
       const res = await this.$api.requested({
-        "id": 20230218225002,
-        "content": {
-          "sa_orderid": this.data.sa_orderid, //订单金额
-          "isused": this.data.rebate_used == 1 ? 0 : 1, //是否使用
-          "rebateamount": rebatebalance > amount ? amount : rebatebalance //返利金使用金额
+        "id": 20230218225002,
+        "content": {
+          "sa_orderid": this.data.sa_orderid,//订单金额
+          "isused": this.checked,//是否使用
+          "rebateamount":rebatebalance > amount ? amount : rebatebalance//返利金使用金额
         }
       })
-      console.log(res)
-      this.data.rebate_used = res.msg !== '成功' ? this.data.rebate_used == 0?1:0:this.data.rebate_used
+      // this.data.rebate_used = res.msg !== '成功' ? this.data.rebate_used == 0?1:0:this.data.rebate_used
 
     }
   },

+ 18 - 18
src/SDrpManagement/salerOrder/modules/edit.vue

@@ -111,7 +111,7 @@
                   v-model="addressparam.content.where.condition" 
                   placeholder="请输入搜索内容" 
                   style="width:150px"
-                  @keyup.enter.native="receiveAddress(addressparam.content.pageNumber = 1)" @clear="receiveAddress(addressparam.content.pageNumber = 1)" clearable></el-input>&nbsp;
+                  @keyup.enter.native="receiveAddress(addressparam.content.pageNumber = 1)" @clear="receiveAddress(addressparam.content.pageNumber = 1)" clearable></el-input>&nbsp;
                 <addAddressInfo style="text-align:right" @onAddSuccess="receiveAddress()" :mainData="{sys_enterpriseid:data.sys_enterpriseid}"/>
               </div>
               <el-table
@@ -298,19 +298,19 @@ export default {
     },
     async rebateUsedChange(){
       console.log(this.data)
-      if(this.data.status != '新建') return 1
-      let amount = this.data.order_rebate_userate * this.data.defaultamount; //最大可用金额
-      let rebatebalance = this.data.rebatebalance; //返利金账户余额
+      if(this.data.status != '新建') return 1
+      let amount = this.data.order_rebate_userate * this.data.defaultamount; //最大可用金额
+      let rebatebalance = this.data.rebatebalance; //返利金账户余额
       const res = await this.$api.requested({
-        "id": 20230218225002,
-        "content": {
-          "sa_orderid": this.data.sa_orderid, //订单金额
-          "isused": this.data.rebate_used == 1 ? 0 : 1, //是否使用
-          "rebateamount": rebatebalance > amount ? amount : rebatebalance //返利金使用金额
+        "id": 20230218225002,
+        "content": {
+          "sa_orderid": this.data.sa_orderid, //订单金额
+          "isused": this.checked, //是否使用
+          "rebateamount": rebatebalance > amount ? amount : rebatebalance //返利金使用金额
         }
       })
       console.log(res)
-      this.data.rebate_used = res.msg !== '成功' ? this.data.rebate_used == 0?1:0:this.data.rebate_used
+      // this.data.rebate_used = res.msg !== '成功' ? this.data.rebate_used == 0?1:0:this.data.rebate_used
     },
     onShow () {
       this.initPage()
@@ -420,17 +420,17 @@ export default {
     },
     async useRebate (e) {
       let that = this
-      /* 修改返利金 */
+      /* 修改返利金 */
       let rebateamount = e;
       let amount = this.data.order_rebate_userate * this.data.defaultamount;//最大可用金额
       const res = await this.$api.requested({
-              "id":20230218225002,
-              "content":{
-                "sa_orderid":this.data.sa_orderid,//订单金额
-                "isused":1,//是否使用
-                "rebateamount":rebateamount>amount?amount:rebateamount
-              }
-            })
+        "id":20230218225002,
+        "content":{
+          "sa_orderid":this.data.sa_orderid,//订单金额
+          "isused":1,//是否使用
+          "rebateamount":rebateamount>amount?amount:rebateamount
+          }
+        })
       if(res.data=='成功'){
         this.$emit('onSuccess')
         this.initPage()

+ 1 - 0
src/SDrpManagement/salerOrder/modules/productlist.vue

@@ -266,6 +266,7 @@ export default {
   },
   computed:{
     canUseInput () {
+      if (this.data.saler.length === 0) return false
       let salerIsEditPrice = this.data.saler[0].iseditprice
       if (this.data.type === '标准订单' && salerIsEditPrice && this.data.status === '新建') {
         return true