Pārlūkot izejas kodu

Merge branch 'develop_yh33' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh33

chenrui 1 gadu atpakaļ
vecāks
revīzija
f2de802e42

+ 13 - 9
src/views/allocationManagement/transferReturn/edit.vue

@@ -13,7 +13,7 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
-          <print :params="{allocateReturnSn: $route.params.sn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
+          <print :params="{allocateReturnSn: allocateReturnSn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont" v-show="showDetail">
@@ -219,7 +219,7 @@
         style="padding: 0 60px;">提交</a-button>
     </div>
     <!-- 导入产品 -->
-    <!-- <importGuideModal :openModal="openGuideModal" :params="{allocateReturnSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" /> -->
+    <!-- <importGuideModal :openModal="openGuideModal" :params="{allocateReturnSn: allocateReturnSn}" @close="openGuideModal=false" @ok="handleGuideOk" /> -->
     <!-- 修改基础信息 -->
     <a-modal
       centered
@@ -289,7 +289,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        const dealerLevel = this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel
+        const dealerLevel = this.dealerLevel == 'OTHER' ? undefined : this.dealerLevel
         const warehouseSn = this.basicInfoData.warehouseSn
         return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn })).then(res => {
           const data = res.data
@@ -305,10 +305,12 @@ export default {
       },
       loadDataSource: [],
       localDataSource: [],
+      dealerLevel: '',
+      allocateReturnSn: '',
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
         this.chooseDisabled = true
-        const params = Object.assign(parameter, { product: { name: this.chooseQueryParam.productName, code: this.chooseQueryParam.productCode }, allocateReturnSn: this.$route.params.sn })
+        const params = Object.assign(parameter, { product: { name: this.chooseQueryParam.productName, code: this.chooseQueryParam.productCode }, allocateReturnSn: this.allocateReturnSn })
         return allocReturnDetailQueryPage(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -439,7 +441,7 @@ export default {
     //  添加/编辑
     handleAdd (row, isEdit, isRefresh) {
       const params = {
-        allocateReturnSn: this.$route.params.sn,
+        allocateReturnSn: this.allocateReturnSn,
         productSn: row.productSn,
         price: isEdit ? row.price : row.productPrice,
         returnQty: isEdit ? row.returnQty : row.qty,
@@ -484,7 +486,7 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
-            // allocateBillDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
+            // allocateBillDetailDelAll({ sn: _this.allocateReturnSn }).then(res => {
             //   if (res.status == 200) {
             //     _this.$message.success(res.message)
             //     _this.refashPage()
@@ -492,7 +494,7 @@ export default {
             // })
           } else { //  单个删除
             allocReturnDetailDelete({
-              allocateReturnSn: _this.$route.params.sn,
+              allocateReturnSn: _this.allocateReturnSn,
               allocateDetailSn: row.allocateDetailSn,
               price: row.price,
               productSn: row.productSn
@@ -514,7 +516,7 @@ export default {
         return
       }
       _this.spinning = true
-      allocateReturnSubmit({ allocateReturnSn: this.$route.params.sn }).then(res => {
+      allocateReturnSubmit({ allocateReturnSn: this.allocateReturnSn }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           setTimeout(() => {
@@ -529,7 +531,7 @@ export default {
     // 基本信息
     getDetail (flag) {
       this.spinning = true
-      allocateReturnQueryBySn({ allocateReturnSn: this.$route.params.sn }).then(res => {
+      allocateReturnQueryBySn({ allocateReturnSn: this.allocateReturnSn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
           if (this.basicInfoData.costTypeSn) {
@@ -568,6 +570,8 @@ export default {
       this.$refs.chooseTable.refresh()
     },
     pageInit () {
+      this.dealerLevel = this.$route.params.dealerLevel
+      this.allocateReturnSn = this.$route.params.sn
       this.refashPage()
     }
   },

+ 14 - 11
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -13,7 +13,7 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
-          <print :params="{allocateReturnSn: $route.params.sn}" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
+          <print :params="{allocateReturnSn: allocateReturnSn}" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" v-show="showDetail" class="editGrap-cont">
@@ -211,7 +211,7 @@
         style="padding: 0 60px;">提交</a-button>
     </div>
     <!-- 导入产品 -->
-    <!-- <importGuideModal :openModal="openGuideModal" :params="{allocateReturnSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" /> -->
+    <!-- <importGuideModal :openModal="openGuideModal" :params="{allocateReturnSn: allocateReturnSn}" @close="openGuideModal=false" @ok="handleGuideOk" /> -->
     <!-- 修改基础信息 -->
     <a-modal
       centered
@@ -278,14 +278,15 @@ export default {
       loading: false,
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
+      targetType: '',
+      allocateReturnSn: '',
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         const warehouseSn = this.basicInfoData.warehouseSn
         const targetSn =  this.basicInfoData.targetSn
-        const targetType = this.$route.params.targetType
         const allocateNo = this.queryParam.allocateNo
-        const otherParams = { allocateBill: { targetType: targetType , targetSn:targetSn, allocateNo: allocateNo } }
+        const otherParams = { allocateBill: { targetType: this.targetType , targetSn:targetSn, allocateNo: allocateNo } }
         return allocDetailQueryPageForReturn(Object.assign(parameter, this.queryParam, otherParams)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -304,7 +305,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
         this.chooseDisabled = true
-        const params = Object.assign(parameter, { product: { name: this.chooseQueryParam.productName, code: this.chooseQueryParam.productCode }, allocateReturnSn: this.$route.params.sn })
+        const params = Object.assign(parameter, { product: { name: this.chooseQueryParam.productName, code: this.chooseQueryParam.productCode }, allocateReturnSn: this.allocateReturnSn })
         return allocReturnDetailQueryPage(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -390,7 +391,7 @@ export default {
         onOk () {
           _this.spinning = true
           allocReturnDetailInsertBatch({
-            allocateReturnSn: _this.$route.params.sn,
+            allocateReturnSn: _this.allocateReturnSn,
             detailDtoList: obj
           }).then(res => {
             if (res.status == 200) {
@@ -498,7 +499,7 @@ export default {
     //  添加/编辑
     handleAdd (row, isEdit, isRefresh) {
       const params = {
-        allocateReturnSn: this.$route.params.sn,
+        allocateReturnSn: this.allocateReturnSn,
         productSn: row.productSn,
         price: isEdit ? row.price : row.returnPrice,
         allocateNo: row.allocateNo,
@@ -541,7 +542,7 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
-            // allocReturnDetailDeleteAll({ sn: _this.$route.params.sn }).then(res => {
+            // allocReturnDetailDeleteAll({ sn: _this.allocateReturnSn }).then(res => {
             //   if (res.status == 200) {
             //     _this.$message.success(res.message)
             //     _this.refashPage()
@@ -549,7 +550,7 @@ export default {
             // })
           } else { //  单个删除
             allocReturnDetailDelete({
-              allocateReturnSn: _this.$route.params.sn,
+              allocateReturnSn: _this.allocateReturnSn,
               allocateDetailSn: row.allocateDetailSn,
               price: row.price,
               productSn: row.productSn }).then(res => {
@@ -570,7 +571,7 @@ export default {
         return
       }
       _this.spinning = true
-      allocateReturnSubmit({ allocateReturnSn: this.$route.params.sn }).then(res => {
+      allocateReturnSubmit({ allocateReturnSn: this.allocateReturnSn }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           setTimeout(() => {
@@ -585,7 +586,7 @@ export default {
     // 基本信息
     getDetail (flag) {
       this.spinning = true
-      allocateReturnQueryBySn({ allocateReturnSn: this.$route.params.sn }).then(res => {
+      allocateReturnQueryBySn({ allocateReturnSn: this.allocateReturnSn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
           if (this.basicInfoData.costTypeSn) {
@@ -618,6 +619,8 @@ export default {
       this.$refs.chooseTable.refresh()
     },
     pageInit () {
+      this.targetType = this.$route.params.targetType
+      this.allocateReturnSn = this.$route.params.sn
       this.getDetail()
       this.chooseResetSearchForm()
     }

+ 2 - 2
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -230,7 +230,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         // 查询总计
-        this.productForm.salesReturnBillSn = this.$route.params.sn
+        this.productForm.salesReturnBillSn = this.orderSn
         return salesReturnDetailList(Object.assign(parameter, this.productForm)).then(res => {
           let data
           if (res.status == 200) {
@@ -391,7 +391,7 @@ export default {
         })
         salesReturnDetailSetReason({
           salesReturnBillDetailSnList: snList,
-          salesReturnBillSn: this.$route.params.sn,
+          salesReturnBillSn: this.orderSn,
           returnReason: rows ? rows.dispName : '',
           returnReasonCode: this.plReturnReason,
           returnReasonRemarks: this.showEditRemarks ? this.plReturnRemark || '' : undefined