|
@@ -0,0 +1,131 @@
|
|
|
+<template>
|
|
|
+ <a-modal
|
|
|
+ centered
|
|
|
+ :footer="null"
|
|
|
+ :maskClosable="false"
|
|
|
+ title="关联备货单"
|
|
|
+ v-model="isShow"
|
|
|
+ @cancle="handleCommonCancel"
|
|
|
+ width="50%">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <div v-if="detailData">
|
|
|
+ <a-descriptions :column="{ xs: 2, sm: 3, md: 3}">
|
|
|
+ <a-descriptions-item label="收款单号">{{ detailData&&detailData.bookNo || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ </div>
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y: 500 }"
|
|
|
+ :showPagination="false"
|
|
|
+ :defaultLoadData="true"
|
|
|
+ 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>
|
|
|
+ <div class="btn-box">
|
|
|
+ <a-button @click="handleCommonCancel">关闭</a-button>
|
|
|
+ </div>
|
|
|
+ </a-spin>
|
|
|
+ </a-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { STable } from '@/components'
|
|
|
+import { queryDispatchBillListBySn } from '@/api/financeBook.js'
|
|
|
+export default {
|
|
|
+ name: 'DispatchModal',
|
|
|
+ components: { STable },
|
|
|
+ props: {
|
|
|
+ openModal: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ itemSn: {
|
|
|
+ type: [Number, String],
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ spinning: false,
|
|
|
+ isShow: this.openModal,
|
|
|
+ detailData: null,
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
|
|
|
+ { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
|
|
|
+ { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
|
|
|
+ { title: '发货编号', dataIndex: 'sendNo', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '收货客户名称', dataIndex: 'receiverName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品款数', dataIndex: 'totalCategory', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '产品数量', dataIndex: 'totalQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '总售价', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.spinning = true
|
|
|
+ delete parameter.tableId
|
|
|
+ delete parameter.index
|
|
|
+ return queryDispatchBillListBySn({ bookSn: this.itemSn }).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.total = data.count || 0
|
|
|
+ this.disabled = false
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleCommonCancel () {
|
|
|
+ this.$emit('close')
|
|
|
+ this.$refs.table.clearTable()
|
|
|
+ this.detailData = null
|
|
|
+ },
|
|
|
+ setDetail (data) {
|
|
|
+ this.detailData = data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ openModal (nVal, oVal) {
|
|
|
+ this.isShow = nVal
|
|
|
+ },
|
|
|
+ isShow (nVal, oVal) {
|
|
|
+ if (!nVal) {
|
|
|
+ this.handleCommonCancel()
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+</style>
|