lilei há 1 ano atrás
pai
commit
64aa5c607a

+ 11 - 0
src/api/salesReturnDetail.js

@@ -86,6 +86,17 @@ export const salesReturnDetailSetReason = (params) => {
     }
   })
 }
+// 整单修改退货原因
+export const salesReturnUpdateAllReason = (params) => {
+  return axios({
+    url: '/salesReturn/detail/updateAllReason',
+    data: params,
+    method: 'post',
+    headers:{
+        'module': encodeURIComponent('整单设置退货原因')
+    }
+  })
+}
 // 生成新的销退单
 export const salesReturnAgainCreate = (params) => {
   return axios({

+ 2 - 1
src/store/modules/app.js

@@ -106,7 +106,8 @@ const app = {
           'salesReturn/detail/deleteByCustomerService',
           'salesReturn/detail/deleteByReceiver',
           'salesReturn/detail/insertByReceive',
-          'salesReturn/detail/insertByCustomerService'
+          'salesReturn/detail/insertByCustomerService',
+          'salesReturn/detail/updateAllReason'
           ],
         timeStr: ''
       },

+ 25 - 23
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -192,7 +192,8 @@ import {
   salesReturnDetailInsert,
   salesReturnDetailUpdateQty,
   salesReturnDetailUpdateReason,
-  salesReturnDetailSetReason
+  salesReturnDetailSetReason,
+  salesReturnUpdateAllReason
 } from '@/api/salesReturnDetail'
 export default {
   name: 'SalesReturnEdit',
@@ -388,32 +389,33 @@ export default {
       if (!this.plReturnReason) {
         this.$message.warning('请选择退货原因!')
       } else {
-        // 批量设置
-        if(this.selNums){
-          this.spinning = true
-          const snList = []
-          const arr = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
-          const rows = this.returnReasonlist.find(item => item.code == this.plReturnReason)
-          arr.map(item => {
-            snList.push(item.salesReturnDetailSn)
-          })
-          salesReturnDetailSetReason({
-            salesReturnBillDetailSnList: snList,
+        const rows = this.returnReasonlist.find(item => item.code == this.plReturnReason)
+        const params = {
             salesReturnBillSn: this.orderSn,
             returnReason: rows ? rows.dispName : '',
             returnReasonCode: this.plReturnReason,
             returnReasonRemarks: this.showEditRemarks ? this.plReturnRemark || '' : undefined
-          }).then(res => {
-            if (res.status == 200) {
-              this.showPlModal = false
-              this.$refs.table.clearSelected()
-              this.resetTable(false)
-            }
-            this.spinning = false
-          })
-        }else{
-          // 整单设置
-        }
+          }
+        // 批量或整单设置
+        const funs = this.selNums ? salesReturnDetailSetReason : salesReturnUpdateAllReason
+        
+        // 批量设置
+        if(this.selNums){
+          const snList = []
+          const arr = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+          arr.map(item => snList.push(item.salesReturnDetailSn))
+          params.salesReturnBillDetailSnList = snList
+        } 
+        
+        this.spinning = true
+        funs(params).then(res => {
+          if (res.status == 200) {
+            this.showPlModal = false
+            this.$refs.table.clearSelected()
+            this.resetTable(false)
+          }
+          this.spinning = false
+        })
       }
     },
     // 获取单据详细

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.103:8602/ocs-admin',
+        target: 'http://192.168.2.117:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {