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