|
@@ -223,11 +223,14 @@
|
|
|
<choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
|
|
|
<!-- 操作提示 -->
|
|
|
<commonModal modalTit="操作提示" :openModal="showTipModal" @cancel="canselModal" @ok="updatePrintStatus">
|
|
|
- <div style="text-align: center;">
|
|
|
+ <div style="text-align: center;" v-if="this.tipData&&this.tipData.length">
|
|
|
<div style="margin-bottom: 15px;font-size: 14px;"><strong>确认允许此单进行备货打印吗?</strong></div>
|
|
|
- <div style="line-height: 24px;">
|
|
|
- <div>备货单号:{{ tipData&&tipData.dispatchBillNo }}</div>
|
|
|
- <div>客户名称:{{ tipData&&tipData.buyerName }}</div>
|
|
|
+ <div style="line-height: 24px;" v-if="this.tipData.length == 1">
|
|
|
+ <div>备货单号:{{ tipData[0]&&tipData[0].dispatchBillNo }}</div>
|
|
|
+ <div>客户名称:{{ tipData[0]&&tipData[0].buyerName }}</div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</commonModal>
|
|
@@ -246,7 +249,7 @@ import commonModal from '@/views/common/commonModal.vue'
|
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import { salesList, salesDel, salesCount } from '@/api/sales'
|
|
|
-import { findBySalesBillSn, dispatchPrintStatus } from '@/api/dispatch'
|
|
|
+import { findBySalesBillSn, dispatchBatchPrintStatus, queryBySalesBillSn } from '@/api/dispatch'
|
|
|
export default {
|
|
|
name: 'SalesQueryList',
|
|
|
mixins: [commonMixin],
|
|
@@ -317,7 +320,8 @@ export default {
|
|
|
},
|
|
|
addrProvinceList: [], // 省下拉
|
|
|
showCancelNum: false, // 是否显示取消数量和待下推数量
|
|
|
- tipData: null // 备货单信息
|
|
|
+ tipData: null, // 备货单信息
|
|
|
+ tempSalesBillSn: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -412,15 +416,30 @@ export default {
|
|
|
},
|
|
|
// 允许备货打印
|
|
|
handlePrint (row) {
|
|
|
- this.tipData = row
|
|
|
- this.showTipModal = true
|
|
|
+ // 获取关联的下推单
|
|
|
+ this.tempSalesBillSn = row.salesBillSn
|
|
|
+ queryBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
|
|
|
+ this.tipData = res.data || []
|
|
|
+ this.showTipModal = true
|
|
|
+ })
|
|
|
},
|
|
|
canselModal () {
|
|
|
this.tipData = null
|
|
|
this.showTipModal = false
|
|
|
+ this.tempSalesBillSn = null
|
|
|
},
|
|
|
+ // 允许备货打印状态
|
|
|
updatePrintStatus () {
|
|
|
- dispatchPrintStatus({ dispatchBillSn: this.tipData.dispatchBillSn, printStatus: 'NO_PRINT' }).then(res => {
|
|
|
+ const dispatchBillSnList = []
|
|
|
+ this.tipData.map(item => {
|
|
|
+ dispatchBillSnList.push(item.dispatchBillSn)
|
|
|
+ })
|
|
|
+ const params = {
|
|
|
+ 'salesBillSn': this.tempSalesBillSn,
|
|
|
+ 'dispatchBillSnList': dispatchBillSnList,
|
|
|
+ 'printStatus': 'NO_PRINT'
|
|
|
+ }
|
|
|
+ dispatchBatchPrintStatus(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.canselModal()
|
|
|
this.$message.info(res.message)
|