增加功能:根据出入库单据id查询收付款单号

This commit is contained in:
季圣华
2022-06-04 17:26:39 +08:00
parent 9883501a2a
commit aac42f8de2
2 changed files with 42 additions and 19 deletions

View File

@@ -342,6 +342,13 @@
{{model.debt}}
</a-form-item>
</a-col>
<a-col v-if="financialBillNoList.length" :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款单号">
<template v-for="(item, index) in financialBillNoList">
<a @click="myHandleFinancialDetail(item.billNo)">{{item.billNo}}</a><br/>
</template>
</a-form-item>
</a-col>
</a-row>
</section>
</template>
@@ -605,6 +612,13 @@
{{model.salesManStr}}
</a-form-item>
</a-col>
<a-col v-if="financialBillNoList.length" :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款单号">
<template v-for="(item, index) in financialBillNoList">
<a @click="myHandleFinancialDetail(item.billNo)">{{item.billNo}}</a><br/>
</template>
</a-form-item>
</a-col>
</a-row>
</section>
</template>
@@ -954,21 +968,24 @@
</template>
</a-form>
<bill-print-iframe ref="modalDetail"></bill-print-iframe>
<financial-detail ref="financialDetailModal"></financial-detail>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api'
import { findBillDetailByNumber, findFinancialDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api'
import { getMpListShort } from "@/utils/util"
import BillPrintIframe from './BillPrintIframe'
import FinancialDetail from '../../financial/dialog/FinancialDetail'
import JUpload from '@/components/jeecg/JUpload'
import Vue from 'vue'
export default {
name: 'BillDetail',
components: {
BillPrintIframe,
FinancialDetail,
JUpload
},
data () {
@@ -981,6 +998,7 @@
billPrintFlag: false,
fileList: [],
purchaseBySaleFlag: false,
financialBillNoList: [],
tableWidth: {
'width': '1550px'
},
@@ -1387,6 +1405,13 @@
}
})
},
getFinancialBillNoByBillId(billId) {
getAction('/accountHead/getFinancialBillNoByBillId', {billId: billId}).then(res => {
if(res && res.code === 200){
this.financialBillNoList = res.data
}
})
},
show(record, type) {
this.billType = type
//附件下载
@@ -1417,6 +1442,7 @@
this.requestSubTableData(record, type, url, params);
this.initPlatform()
this.getSystemConfig()
this.getFinancialBillNoByBillId(this.model.id)
},
requestSubTableData(record, type, url, params, success) {
this.loading = true
@@ -1446,6 +1472,17 @@
}
})
},
myHandleFinancialDetail(billNo) {
let that = this
findFinancialDetailByNumber({ billNo: billNo }).then((res) => {
if (res && res.code === 200) {
if(that.$refs.financialDetailModal) {
that.$refs.financialDetailModal.show(res.data, res.data.type);
that.$refs.financialDetailModal.title= res.data.type + "-详情";
}
}
})
},
//三联打印预览
handlePrint() {
getPlatformConfigByKey({"platformKey": "bill_print_url"}).then((res)=> {

View File

@@ -283,9 +283,6 @@
:pagination="false"
:columns="moneyInColumns"
:dataSource="dataSource">
<span slot="numberCustomRender" slot-scope="text, record">
<a @click="myHandleDetail(record)">{{record.billNumber}}</a>
</span>
</a-table>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
@@ -395,20 +392,16 @@
</a-row>
</template>
</a-form>
<!-- 表单区域 -->
<bill-detail ref="modalDetail"></bill-detail>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import BillDetail from '../../bill/dialog/BillDetail'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber} from '@/api/api'
import JUpload from '@/components/jeecg/JUpload'
export default {
name: 'FinancialDetail',
components: {
BillDetail,
JUpload
},
data () {
@@ -455,8 +448,7 @@
],
moneyInColumns: [
{
title: '销售单据编号', dataIndex: 'billNumber', width: '20%',
scopedSlots: { customRender: 'numberCustomRender' },
title: '销售单据编号', dataIndex: 'billNumber', width: '20%'
},
{ title: '应收欠款',dataIndex: 'needDebt', width: '10%'},
{ title: '已收欠款',dataIndex: 'finishDebt', width: '10%'},
@@ -464,7 +456,9 @@
{ title: '备注',dataIndex: 'remark', width: '20%'}
],
moneyOutColumns: [
{ title: '采购单据编号',dataIndex: 'billNumber',width: '20%'},
{
title: '采购单据编号', dataIndex: 'billNumber', width: '20%'
},
{ title: '应付欠款',dataIndex: 'needDebt', width: '10%'},
{ title: '已付欠款',dataIndex: 'finishDebt', width: '10%'},
{ title: '本次付款',dataIndex: 'eachAmount', width: '10%'},
@@ -510,14 +504,6 @@
this.$emit('close');
this.visible = false;
},
myHandleDetail(record) {
findBillDetailByNumber({ number: record.billNumber }).then((res) => {
if (res && res.code === 200) {
this.$refs.modalDetail.show(res.data, res.data.subType + res.data.type);
this.$refs.modalDetail.title= res.data.subType + res.data.type + "-详情";
}
})
}
}
}
</script>