lilei %!s(int64=3) %!d(string=hai) anos
pai
achega
3b753c45c7

+ 12 - 6
src/views/allocationManagement/transferOut/edit.vue

@@ -460,12 +460,14 @@ export default {
     },
     // 基本信息
     getDetail () {
+      this.spinning = true
       allocateBillDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
         } else {
           this.basicInfoData = null
         }
+        this.spinning = false
       })
     },
     // 合计
@@ -549,8 +551,16 @@ export default {
       }
     },
     pageInit () {
-      this.getDetail()
-      this.getDetailCount()
+      if (!this.spinning) {
+        this.getDetail()
+        this.getDetailCount()
+      }
+      if (!this.disabled) {
+        this.resetSearchForm()
+      }
+      if (!this.chooseDisabled) {
+        this.chooseResetSearchForm()
+      }
     }
   },
   mounted () {
@@ -559,10 +569,6 @@ export default {
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.pageInit()
-      if (!vm.disabled) {
-        vm.resetSearchForm()
-        vm.chooseResetSearchForm()
-      }
     })
   }
 }

+ 1 - 0
src/views/dealerManagement/dealerAccountManagement/detailModal.vue

@@ -57,6 +57,7 @@ export default {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
       this.isShow = newValue
+      this.detailData = null
     },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {

+ 2 - 0
src/views/financialManagement/returnConfirmation/detailModal.vue

@@ -115,6 +115,8 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailData = null
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 1 - 0
src/views/financialManagement/warehousingConfirmation/detailModal.vue

@@ -86,6 +86,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 8 - 0
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -115,12 +115,20 @@ export default {
           }
         }
       })
+    },
+    resetPage () {
+      this.currentStock = { // 合计信息
+        currentQty: '',
+        putCost: ''
+      }
+      this.$refs.table.clearTable()
     }
   },
   watch: {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
       this.isShow = newValue
+      this.resetPage()
     },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {

+ 1 - 0
src/views/productManagement/productBrand/detailModal.vue

@@ -78,6 +78,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailsData = null
       }
     },
     itemSn (newValue, oldValue) {

+ 1 - 0
src/views/promotionRulesManagement/orderStatistics/detailModal.vue

@@ -96,6 +96,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 1 - 0
src/views/promotionRulesManagement/productStatistics/detailModal.vue

@@ -97,6 +97,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 2 - 0
src/views/salesManagement/backorder/detailModal.vue

@@ -153,6 +153,8 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.detailData = null
+        this.$refs.table.clearTable()
       }
     },
     itemSn (newValue, oldValue) {

+ 4 - 3
src/views/salesManagement/salesQuery/detail.vue

@@ -111,7 +111,7 @@
         style="width: 150px;"
         id="salesDetail-edit-btn"
         v-if="detailData&&detailData.salesBillSource != 'PURCHASE' && (detailData.billStatus == 'WAIT_SUBMIT' || detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
-        @click="handleEdit(record)"
+        @click="handleEdit()"
       >
         编辑
       </a-button>
@@ -122,7 +122,7 @@
         class="button-info"
         id="salesDetail-edit-btn"
         v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')"
-        @click="handleEdit(record)"
+        @click="handleEdit()"
       >
         改单
       </a-button>
@@ -214,7 +214,8 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } })
+      // this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } })
+      this.$router.go(-1)
     },
     // 编辑
     handleEdit () {

+ 26 - 27
src/views/salesManagement/salesReturn/queryPart.vue

@@ -122,33 +122,6 @@ export default {
       }
     }
   },
-  mounted () {
-    // 抓单
-    if (this.grabFlag == 1) {
-      this.columns = [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '剩余可退数量', dataIndex: 'refundableQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '本次退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
-        { title: '采购价', dataIndex: 'showCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }]
-    } else {
-      this.columns = [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '当前售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
-        { title: '采购价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 80, align: 'center' }
-      ]
-    }
-  },
   methods: {
     // 双击列表选择配件
     handleClickRow (record) {
@@ -174,8 +147,34 @@ export default {
       this.$refs.table.refresh(true)
     },
     pageInit (buyerSn, grabFlag) {
+      console.log(grabFlag, buyerSn)
       this.buyerSn = buyerSn
       this.grabFlag = grabFlag
+      // 抓单
+      if (this.grabFlag == 1) {
+        this.columns = [
+          { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+          { title: '销售单号', dataIndex: 'salesBillNo', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '剩余可退数量', dataIndex: 'refundableQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '本次退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
+          { title: '采购价', dataIndex: 'showCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+          { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }]
+      } else {
+        this.columns = [
+          { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
+          { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '当前售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
+          { title: '采购价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+          { title: '单位', dataIndex: 'productUnit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+          { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 80, align: 'center' }
+        ]
+      }
       this.resetSearchForm()
     },
     // 选择配件

+ 1 - 3
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -314,9 +314,7 @@ export default {
       this.orderSn = this.$route.params.sn
       this.buyerSn = this.$route.params.buyerSn
       this.resetSearchForm(true)
-      this.$nextTick(() => {
-        this.$refs.partQuery.pageInit(this.buyerSn, 0)
-      })
+      this.$refs.partQuery.pageInit(this.buyerSn, 0)
     }
   },
   mounted () {

+ 1 - 3
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -304,9 +304,7 @@ export default {
       this.buyerSn = this.$route.params.buyerSn
       this.getOrderDetail()
       this.$refs.table.refresh(true)
-      this.$nextTick(() => {
-        this.$refs.partQuery.pageInit(this.buyerSn, 1)
-      })
+      this.$refs.queryPart.pageInit(this.buyerSn, 1)
     }
   },
   mounted () {

+ 3 - 5
src/views/salesManagement/waitDispatch/edit.vue

@@ -228,13 +228,10 @@ export default {
     },
     //  重置
     resetSearchForm (flag) {
+      console.log(flag)
       this.$refs.table.refresh(!!flag)
       this.getOrderDetail()
     },
-    // 重置列表
-    resetForm () {
-      this.$refs.table.refresh()
-    },
     //  返回
     handleBack () {
       this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } })
@@ -384,8 +381,9 @@ export default {
     },
     pageInit () {
       this.salesBillSn = this.$route.params.salesBillSn
+      this.getOrderDetail()
       if (!this.disabled) {
-        this.resetSearchForm(true)
+        this.$refs.table.refresh(true)
       }
     }
   },

+ 7 - 0
src/views/supplierManagement/associatedProduct/add.vue

@@ -255,6 +255,13 @@ export default {
         _this.setTableH()
       }, 400)
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      if (!vm.disabled) {
+        vm.resetSearchForm()
+      }
+    })
   }
 }
 </script>