lilei 2 years ago
parent
commit
66aca0f6cb

+ 1 - 1
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -51,7 +51,7 @@
       :openModal="showDetailModal"
       @cancel="cancelDetail">
       <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
-      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :outBizSubSn="bizSn"></dispatchDetail>
+      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
     </commonModal>
   </a-modal>
 </template>

+ 11 - 7
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -2,7 +2,7 @@
   <div class="salesDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" :style="{ padding: !outBizSubSn ? '16px 24px' : '0px 24px' }">
-        <template slot="subTitle" v-if="!outBizSubSn">
+        <template slot="subTitle" v-if="!outBizSubSn&&!bizSn">
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
         </template>
         <template slot="extra" v-if="$hasPermissions('B_dispatchPrint')">
@@ -114,6 +114,10 @@ export default {
     outBizSubSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
       default: ''
+    },
+    bizSn: { //  有值则为弹框,无值则为页面
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -131,7 +135,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return dispatchDetaillList(Object.assign(parameter, { dispatchBillSn: this.outBizSubSn || this.$route.params.sn })).then(res => {
+        return dispatchDetaillList(Object.assign(parameter, { dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -199,7 +203,7 @@ export default {
     },
     //  详情
     getDetail () {
-      dispatchFindBySn({ dispatchBillSn: this.outBizSubSn || this.$route.params.sn }).then(res => {
+      dispatchFindBySn({ dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
         } else {
@@ -211,7 +215,7 @@ export default {
     handleExcelOk (priceType) {
       const _this = this
       const params = {
-        dispatchBillSn: this.outBizSubSn || this.$route.params.sn,
+        dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn,
         printType: priceType
       }
       this.spinning = true
@@ -226,7 +230,7 @@ export default {
         this.handlePrintOk(null, '发货', 'preview')
       } else if (type == 'DISPATCH_BILL_TYPE') { // 发货分类打印
         this.openModal = true
-        this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.$route.params.sn)
+        this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.bizSn || this.$route.params.sn)
       }
     },
     // 发货分类打印
@@ -234,14 +238,14 @@ export default {
       const _this = this
       const params = {
         type: this.nowPrintType,
-        dispatchBillSn: this.outBizSubSn || this.$route.params.sn
+        dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn
       }
       _this.spinning = true
       printFun(dispatchDetailPrint, Object.assign(params, obj || {}), type, taskName, () => { _this.spinning = false })
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab || this.outBizSubSn) { // 页签刷新 或 为弹框时调用
+    if (!this.$store.state.app.isNewTab || this.outBizSubSn || this.bizSn) { // 页签刷新 或 为弹框时调用
       this.$refs.table.refresh(true)
       this.getDetail()
     }

+ 1 - 1
src/views/salesManagement/salesQuery/detail.vue

@@ -426,7 +426,7 @@ export default {
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+    if (!this.$store.state.app.isNewTab || this.bizSn) { // 页签刷新时调用
       this.getDetail()
     }
   },