|
@@ -7,13 +7,21 @@
|
|
</template>
|
|
</template>
|
|
<template slot="extra">
|
|
<template slot="extra">
|
|
<a-button
|
|
<a-button
|
|
- key="3"
|
|
|
|
|
|
+ key="4"
|
|
type="primary"
|
|
type="primary"
|
|
class="button-info"
|
|
class="button-info"
|
|
id="purchaseOrderDetail-export-btn"
|
|
id="purchaseOrderDetail-export-btn"
|
|
:disabled="localDataSource.length==0"
|
|
:disabled="localDataSource.length==0"
|
|
v-if="$hasPermissions('B_dispatchExport')"
|
|
v-if="$hasPermissions('B_dispatchExport')"
|
|
@click="openExcelModal=true">导出Excel</a-button>
|
|
@click="openExcelModal=true">导出Excel</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ key="3"
|
|
|
|
+ type="default"
|
|
|
|
+ class="button-info"
|
|
|
|
+ id="salesDetail-fhfl-print-btn"
|
|
|
|
+ :disabled="localDataSource.length==0"
|
|
|
|
+ v-if="$hasPermissions('B_dispatchTypeExport')"
|
|
|
|
+ @click="handleFlExport('DISPATCH_BILL_TYPE')">发货分类导出</a-button>
|
|
<a-divider type="vertical" />
|
|
<a-divider type="vertical" />
|
|
<a-button
|
|
<a-button
|
|
key="2"
|
|
key="2"
|
|
@@ -94,7 +102,13 @@
|
|
</a-card>
|
|
</a-card>
|
|
</a-spin>
|
|
</a-spin>
|
|
<!-- 发货分类打印 -->
|
|
<!-- 发货分类打印 -->
|
|
- <sendTypeModal ref="typePrint" :hasNoPrint="hasNoPrint" :openModal="openModal" @ok="handlePrintOk" @close="openModal=false" />
|
|
|
|
|
|
+ <sendTypeModal
|
|
|
|
+ ref="typePrint"
|
|
|
|
+ :hasNoPrint="hasNoPrint"
|
|
|
|
+ :nowType="nowType"
|
|
|
|
+ :openModal="openModal"
|
|
|
|
+ @ok="handlePrintOk"
|
|
|
|
+ @close="openModal=false" />
|
|
<!-- 导出Excel -->
|
|
<!-- 导出Excel -->
|
|
<export-excel-modal :openModal="openExcelModal" :itemData="detailData" @ok="handleExcelOk" @close="openExcelModal=false" />
|
|
<export-excel-modal :openModal="openExcelModal" :itemData="detailData" @ok="handleExcelOk" @close="openExcelModal=false" />
|
|
<!-- 打印 -->
|
|
<!-- 打印 -->
|
|
@@ -165,7 +179,8 @@ export default {
|
|
localDataSource: [],
|
|
localDataSource: [],
|
|
nowPrintType: '', // 当前打印类型
|
|
nowPrintType: '', // 当前打印类型
|
|
openExcelModal: false,
|
|
openExcelModal: false,
|
|
- fromRouter: null
|
|
|
|
|
|
+ fromRouter: null,
|
|
|
|
+ nowType: 'print'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -209,17 +224,24 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 导出Excel
|
|
// 导出Excel
|
|
- handleExcelOk (priceType) {
|
|
|
|
|
|
+ handleExcelOk (priceType, data, fileName) {
|
|
const _this = this
|
|
const _this = this
|
|
const params = {
|
|
const params = {
|
|
dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn,
|
|
dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn,
|
|
- printType: priceType
|
|
|
|
|
|
+ printType: priceType,
|
|
|
|
+ ...data
|
|
}
|
|
}
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- exportExcel(dispatchDetailExcel, params, '下推产品', function () {
|
|
|
|
|
|
+ exportExcel(dispatchDetailExcel, params, fileName, function () {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 发货分类导出
|
|
|
|
+ handleFlExport () {
|
|
|
|
+ this.openModal = true
|
|
|
|
+ this.nowType = 'export'
|
|
|
|
+ this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.bizSn || this.$route.params.sn)
|
|
|
|
+ },
|
|
// 打印预览/快捷打印
|
|
// 打印预览/快捷打印
|
|
handlePrint (type) {
|
|
handlePrint (type) {
|
|
this.nowPrintType = type
|
|
this.nowPrintType = type
|
|
@@ -231,6 +253,7 @@ export default {
|
|
this.handlePrintOk(params, '发货', 'preview')
|
|
this.handlePrintOk(params, '发货', 'preview')
|
|
} else if (type == 'DISPATCH_BILL_TYPE') { // 发货分类打印
|
|
} else if (type == 'DISPATCH_BILL_TYPE') { // 发货分类打印
|
|
this.openModal = true
|
|
this.openModal = true
|
|
|
|
+ this.nowType = 'print'
|
|
this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.bizSn || this.$route.params.sn)
|
|
this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.bizSn || this.$route.params.sn)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -241,22 +264,27 @@ export default {
|
|
type: this.nowPrintType,
|
|
type: this.nowPrintType,
|
|
dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn
|
|
dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn
|
|
}
|
|
}
|
|
- _this.spinning = true
|
|
|
|
- printFun(
|
|
|
|
- dispatchDetailPrint,
|
|
|
|
- Object.assign(params, obj || {}),
|
|
|
|
- type,
|
|
|
|
- taskName,
|
|
|
|
- (res) => {
|
|
|
|
- _this.$message.info(res.message)
|
|
|
|
- _this.spinning = false
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- billType: 'DISPATCH',
|
|
|
|
- billSn: obj.dispatchBillSn,
|
|
|
|
- billNo: obj.dispatchBillNo,
|
|
|
|
- printType: taskName + '打印'
|
|
|
|
- }, this.hasNoPrint)
|
|
|
|
|
|
+
|
|
|
|
+ if (type != 'export') {
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ printFun(
|
|
|
|
+ dispatchDetailPrint,
|
|
|
|
+ Object.assign(params, obj || {}),
|
|
|
|
+ type,
|
|
|
|
+ taskName,
|
|
|
|
+ (res) => {
|
|
|
|
+ _this.$message.info(res.message)
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ billType: 'DISPATCH',
|
|
|
|
+ billSn: obj.dispatchBillSn,
|
|
|
|
+ billNo: obj.dispatchBillNo,
|
|
|
|
+ printType: taskName + '打印'
|
|
|
|
+ }, this.hasNoPrint)
|
|
|
|
+ } else {
|
|
|
|
+ this.handleExcelOk('DISPATCH_BILL_TYPE', obj, taskName)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|