|
@@ -19,28 +19,28 @@
|
|
|
<rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
<a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
<dealerSubareaScopeList ref="dealerSubareaScopeList" id="stockPrint-buyerName" @change="custChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
<a-form-item label="销售单号">
|
|
|
<a-input id="stockPrint-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ <a-form-item label="备货单号">
|
|
|
+ <a-input id="stockPrint-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<template v-if="advanced">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="备货单号">
|
|
|
- <a-input id="stockPrint-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
<a-form-item label="收货客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
<dealerSubareaScopeList ref="shbuyerName" id="stockPrint-shbuyerName" @change="shcustChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="3" :sm="24">
|
|
|
<a-form-item label="业务状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.billStatus"
|
|
@@ -51,7 +51,7 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24" v-if="currentTab == 1">
|
|
|
+ <a-col :md="3" :sm="24" v-if="currentTab == 1">
|
|
|
<a-form-item label="单据状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.voidFlag"
|
|
@@ -62,7 +62,7 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24" v-if="currentTab == 1">
|
|
|
+ <a-col :md="4" :sm="24" v-if="currentTab == 1">
|
|
|
<a-form-item label="备货打印状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.printStatus"
|
|
@@ -73,12 +73,12 @@
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="3" :sm="24">
|
|
|
<a-form-model-item label="所在区域">
|
|
|
<subarea id="stockPrint-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="3" :sm="24">
|
|
|
<a-form-model-item label="地区">
|
|
|
<a-form-model-item prop="shippingAddrProvinceSn">
|
|
|
<Area id="stockPrint-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
|
|
@@ -134,21 +134,24 @@
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
+ v-if="record.printStatus == 'NO_PRINT'&&record.voidFlag==0"
|
|
|
class="button-warning"
|
|
|
- @click="viewPrint(record)"
|
|
|
- >打印记录</a-button>
|
|
|
+ @click="handlePrint(record)"
|
|
|
+ >发货分类打印</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-warning"
|
|
|
- @click="handlePrint(record)"
|
|
|
- >发货分类打印</a-button>
|
|
|
+ v-else-if="record.printStatus == 'PRINT'"
|
|
|
+ @click="viewPrint(record)"
|
|
|
+ >打印记录</a-button>
|
|
|
+ <span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
<!-- 分类打印 -->
|
|
|
<sendTypeModal ref="typePrint" :openModal="showTipModal" @ok="handlePrintOk" @close="showTipModal=false" />
|
|
|
<!-- 打印记录 -->
|
|
|
- <recordModal modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
|
|
|
+ <recordModal ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
|
</div>
|
|
@@ -164,6 +167,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import sendTypeModal from '@/views/salesManagement/pushOrderManagement/sendTypeModal.vue'
|
|
|
import recordModal from './recordModal.vue'
|
|
|
import { dispatchlList, dispatchDetailPrint } from '@/api/dispatch'
|
|
|
+import { printFun } from '@/libs/JGPrint.js'
|
|
|
export default {
|
|
|
name: 'PushOrderManagementList',
|
|
|
mixins: [commonMixin],
|
|
@@ -188,11 +192,10 @@ export default {
|
|
|
subareaSn: undefined,
|
|
|
shippingAddrProvinceSn: undefined,
|
|
|
voidFlag: undefined,
|
|
|
- printStatus: undefined
|
|
|
+ printStatus: 'NO_PRINT'
|
|
|
},
|
|
|
showTipModal: false,
|
|
|
showRecordModal: false,
|
|
|
- recordData: null,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -270,45 +273,23 @@ export default {
|
|
|
this.$refs.typePrint.setData(row, row.dispatchBillSn)
|
|
|
this.showTipModal = true
|
|
|
},
|
|
|
- // 打印
|
|
|
- handlePrintOk (obj) {
|
|
|
+ // 发货分类打印
|
|
|
+ handlePrintOk (obj, taskName, type) {
|
|
|
const _this = this
|
|
|
const params = {
|
|
|
type: 'DISPATCH_BILL_TYPE',
|
|
|
dispatchBillSn: obj.dispatchBillSn
|
|
|
}
|
|
|
_this.spinning = true
|
|
|
- dispatchDetailPrint(Object.assign(params, obj || {})).then(res => {
|
|
|
- _this.spinning = false
|
|
|
- if (res.type == 'application/json') {
|
|
|
- var reader = new FileReader()
|
|
|
- reader.addEventListener('loadend', function () {
|
|
|
- const obj = JSON.parse(reader.result)
|
|
|
- _this.$notification.error({
|
|
|
- message: '提示',
|
|
|
- description: obj.message
|
|
|
- })
|
|
|
- })
|
|
|
- reader.readAsText(res)
|
|
|
- } else {
|
|
|
- this.print(res)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- print (data) {
|
|
|
- this.spinLoading = false
|
|
|
- if (!data) {
|
|
|
- return
|
|
|
- }
|
|
|
- const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
|
|
|
- document.getElementById('print').innerHTML = '<iframe id="printfpmd" name="printfpmd" src="' + url + '" hidden></iframe>'
|
|
|
- window.frames['printfpmd'].focus()
|
|
|
- window.frames['printfpmd'].print()
|
|
|
+ printFun(dispatchDetailPrint, Object.assign(params, obj || {}), type, taskName, () => { _this.spinning = false })
|
|
|
},
|
|
|
// 打印记录
|
|
|
viewPrint (row) {
|
|
|
- this.recordData = row
|
|
|
this.showRecordModal = true
|
|
|
+ this.$refs.recordModal.setData(row, {
|
|
|
+ billType: 'SETTLE_RECEIPT',
|
|
|
+ billSn: row.accountReceiptSn
|
|
|
+ })
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
@@ -325,7 +306,7 @@ export default {
|
|
|
this.queryParam.subareaSn = undefined
|
|
|
this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
this.queryParam.voidFlag = undefined
|
|
|
- this.queryParam.printStatus = undefined
|
|
|
+ this.queryParam.printStatus = this.currentTab == 1 ? '' : 'NO_PRINT'
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
pageInit () {
|