|
@@ -3,10 +3,10 @@
|
|
centered
|
|
centered
|
|
:footer="null"
|
|
:footer="null"
|
|
:maskClosable="false"
|
|
:maskClosable="false"
|
|
- title="关联备货单"
|
|
|
|
|
|
+ title="关联单据"
|
|
v-model="isShow"
|
|
v-model="isShow"
|
|
@cancel="handleCommonCancel"
|
|
@cancel="handleCommonCancel"
|
|
- width="50%">
|
|
|
|
|
|
+ width="70%">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<div v-if="detailData">
|
|
<div v-if="detailData">
|
|
<a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
|
|
<a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
|
|
@@ -27,44 +27,20 @@
|
|
:showPagination="false"
|
|
:showPagination="false"
|
|
:defaultLoadData="true"
|
|
:defaultLoadData="true"
|
|
bordered>
|
|
bordered>
|
|
- <!-- 销售单号 -->
|
|
|
|
- <template slot="salesBillNo" slot-scope="text, record">
|
|
|
|
- <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
|
|
|
|
- <span v-else>{{ record.salesBillNo }}</span>
|
|
|
|
- </template>
|
|
|
|
- <!-- 备货单号 -->
|
|
|
|
- <template slot="dispatchBillNo" slot-scope="text, record">
|
|
|
|
- <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
|
|
|
|
- <span v-else>{{ record.dispatchBillNo }}</span>
|
|
|
|
- </template>
|
|
|
|
</s-table>
|
|
</s-table>
|
|
<div class="btn-box" style="text-align:center;padding-top:20px;">
|
|
<div class="btn-box" style="text-align:center;padding-top:20px;">
|
|
<a-button @click="handleCommonCancel">关闭</a-button>
|
|
<a-button @click="handleCommonCancel">关闭</a-button>
|
|
</div>
|
|
</div>
|
|
</a-spin>
|
|
</a-spin>
|
|
- <!-- 查看销售单或备货单详情 -->
|
|
|
|
- <commonModal
|
|
|
|
- :modalTit="detailType?'备货单详情':'销售单详情'"
|
|
|
|
- bodyPadding="10px"
|
|
|
|
- width="70%"
|
|
|
|
- :showFooter="false"
|
|
|
|
- :openModal="showDetailModal"
|
|
|
|
- @cancel="cancelDetail">
|
|
|
|
- <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
|
|
|
|
- <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
|
|
|
|
- </commonModal>
|
|
|
|
</a-modal>
|
|
</a-modal>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
-import commonModal from '@/views/common/commonModal.vue'
|
|
|
|
-import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
|
|
|
|
-import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
|
|
|
|
-import { queryDispatchBillListBySn } from '@/api/financeBook.js'
|
|
|
|
|
|
+import { querySettleReceiptFinanceBookList } from '@/api/financeBook.js'
|
|
export default {
|
|
export default {
|
|
name: 'DispatchModal',
|
|
name: 'DispatchModal',
|
|
- components: { STable, commonModal, salesDetail, dispatchDetail },
|
|
|
|
|
|
+ components: { STable },
|
|
props: {
|
|
props: {
|
|
openModal: {
|
|
openModal: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -78,40 +54,55 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
- showDetailModal: false,
|
|
|
|
- detailType: 2,
|
|
|
|
- bizSn: null,
|
|
|
|
isShow: this.openModal,
|
|
isShow: this.openModal,
|
|
detailData: null,
|
|
detailData: null,
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
- { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '13%', align: 'center' },
|
|
|
|
- { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '13%', align: 'center' },
|
|
|
|
- { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总售价', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品款数', dataIndex: 'totalCategory', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
|
|
|
|
+ { title: '产品数量', dataIndex: 'totalQty', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
|
|
|
|
+ { title: '总售价', dataIndex: 'totalAmount', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '财务状态', dataIndex: 'financialStatusDictValue', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- this.spinning = true
|
|
|
|
- delete parameter.tableId
|
|
|
|
- delete parameter.index
|
|
|
|
- return queryDispatchBillListBySn({ bookSn: this.itemSn }).then(res => {
|
|
|
|
|
|
+ const params = Object.assign(parameter, { bookSn: this.itemSn })
|
|
|
|
+ return querySettleReceiptFinanceBookList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
- const no = 0
|
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
- data[i].no = no + i + 1
|
|
|
|
|
|
+ data[i].no = i + 1
|
|
|
|
+ const cons = data[i].bizType == 'DISPATCH' ? {
|
|
|
|
+ buyerName: data[i].dispatchBill.buyerName,
|
|
|
|
+ receiverName: data[i].dispatchBill.receiverName,
|
|
|
|
+ sendNo: data[i].dispatchBill.sendNo,
|
|
|
|
+ totalCategory: data[i].dispatchBill.totalCategory,
|
|
|
|
+ totalQty: data[i].dispatchBill.totalQty,
|
|
|
|
+ totalAmount: data[i].dispatchBill.totalAmount,
|
|
|
|
+ billStatusDictValue: data[i].dispatchBill.billStatusDictValue,
|
|
|
|
+ financialStatusDictValue: data[i].dispatchBill.financialStatusDictValue,
|
|
|
|
+ dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
|
|
|
|
+ salesBillSn: data[i].dispatchBill.salesBillSn
|
|
|
|
+ } : {
|
|
|
|
+ buyerName: data[i].allocateBill.targetName,
|
|
|
|
+ receiverName: data[i].allocateBill.receiverName,
|
|
|
|
+ sendNo: data[i].allocateBill.sendNo,
|
|
|
|
+ totalCategory: data[i].allocateBill.totalCategory,
|
|
|
|
+ totalQty: data[i].allocateBill.totalQty,
|
|
|
|
+ totalAmount: data[i].allocateBill.totalPrice,
|
|
|
|
+ billStatusDictValue: data[i].allocateBill.stateDictValue,
|
|
|
|
+ allocateNo: data[i].allocateBill.allocateNo,
|
|
|
|
+ allocateSn: data[i].allocateBill.allocateSn
|
|
|
|
+ }
|
|
|
|
+ data[i] = Object.assign(data[i], cons)
|
|
}
|
|
}
|
|
- this.total = data.length
|
|
|
|
- this.disabled = false
|
|
|
|
}
|
|
}
|
|
- this.spinning = false
|
|
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -125,16 +116,6 @@ export default {
|
|
},
|
|
},
|
|
setDetail (data) {
|
|
setDetail (data) {
|
|
this.detailData = data
|
|
this.detailData = data
|
|
- },
|
|
|
|
- handleDetail (row, type) {
|
|
|
|
- this.detailType = type
|
|
|
|
- this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
|
|
|
|
- this.showDetailModal = true
|
|
|
|
- },
|
|
|
|
- cancelDetail () {
|
|
|
|
- this.showDetailModal = false
|
|
|
|
- this.detailType = 2
|
|
|
|
- this.bizSn = null
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|