|
@@ -27,10 +27,10 @@
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="借贷类型">
|
|
|
<v-select
|
|
|
- v-model="queryParam.status"
|
|
|
- ref="status"
|
|
|
- id="conFrontModal-status"
|
|
|
- code="FINANCE_BOOK_STATE"
|
|
|
+ v-model="queryParam.changeType"
|
|
|
+ ref="changeType"
|
|
|
+ id="conFrontModal-changeType"
|
|
|
+ code="VERIFY_ACCOUNT_CHANGE_TYPE"
|
|
|
placeholder="请选择状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -41,7 +41,7 @@
|
|
|
v-model="queryParam.bizType"
|
|
|
ref="bizType"
|
|
|
id="conFrontModal-bizType"
|
|
|
- code="FINANCE_BOOK_STATE"
|
|
|
+ code="VERIFY_ACCOUNT_BIZ_TYPE"
|
|
|
placeholder="请选择业务类型"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -64,14 +64,6 @@
|
|
|
</div>
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false" class="conFrontModal-wrap">
|
|
|
- <div style="margin-bottom: 10px;">
|
|
|
- <div class="conFrontModal-title">箭冠汽配 应收账款明细表</div>
|
|
|
- <div class="conFrontModal-flex">
|
|
|
- <div class="conFrontModal-subTitle"><span>营业执照名称:</span>{{ dealear.licenseName }}</div>
|
|
|
- <div class="conFrontModal-subTitle"><span>系统名称:</span></div>
|
|
|
- <div class="conFrontModal-subTitle"><span>财务编号:</span>{{ dealear.kdMidCustomerFnumber }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable"
|
|
@@ -80,25 +72,29 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :pageSize="30"
|
|
|
+ :showPagination="false"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
- <div class="conFrontModal-info">
|
|
|
+ <div class="conFrontModal-info" v-if="detailData">
|
|
|
备注:{{ detailData.remarks }}
|
|
|
</div>
|
|
|
- <div class="conFrontModal-flex">
|
|
|
+ <div class="conFrontModal-flex" v-if="detailData">
|
|
|
<div class="conFrontModal-subTitle">
|
|
|
- <div><span>公司名称:</span> 东莞市箭冠汽车配件制造有限公司</div>
|
|
|
+ <div><span>公司名称:</span> {{ detailData.signName }}</div>
|
|
|
<div><span>签名:</span>{{ detailData.signName }}</div>
|
|
|
<div><span>盖章</span></div>
|
|
|
</div>
|
|
|
<div class="conFrontModal-subTitle">
|
|
|
- <div><span>公司名称:</span></div>
|
|
|
+ <div><span>公司名称:</span>{{ detailData.dealerName }}</div>
|
|
|
<div><span>签名:</span></div>
|
|
|
<div><span>盖章</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="conFrontModal-footer-bar" v-if="detailData">
|
|
|
+ <a-button @click="cancel" style="margin-right: 15px" id="conFrontModal-btn-back">取消</a-button>
|
|
|
+ <a-button type="primary" v-if="orderType==1" :loading="confirmLoading" @click="handleSubmit" id="conFrontModal-btn-submit">对单</a-button>
|
|
|
+ </div>
|
|
|
</a-card>
|
|
|
</a-spin>
|
|
|
</a-modal>
|
|
@@ -110,7 +106,9 @@ import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import {
|
|
|
verifyAcountBillDetailQueryList,
|
|
|
- verifyAcountBillDetail
|
|
|
+ verifyAcountBillDetail,
|
|
|
+ verifyAcountBillConfirmCheck,
|
|
|
+ verifyAcountBillConfirm
|
|
|
} from '@/api/verifyAccount'
|
|
|
|
|
|
export default {
|
|
@@ -118,17 +116,14 @@ export default {
|
|
|
mixins: [commonMixin],
|
|
|
components: { STable, VSelect, rangeDate },
|
|
|
props: {
|
|
|
- show: [Boolean],
|
|
|
- bookSn: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
- }
|
|
|
+ show: [Boolean]
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
opened: this.show,
|
|
|
spinning: false,
|
|
|
disabled: false,
|
|
|
+ confirmLoading: false,
|
|
|
title: '',
|
|
|
exportLoading: false,
|
|
|
queryParam: {
|
|
@@ -150,15 +145,24 @@ export default {
|
|
|
data = res.data
|
|
|
const no = 0
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
- data.no = no + i + 1
|
|
|
+ data[i].no = no + i + 1
|
|
|
+ const dates = data[i].bizDate.split('-')
|
|
|
+ data[i].year = dates[0]
|
|
|
+ data[i].month = dates[1]
|
|
|
+ data[i].day = dates[2].split(' ')[0]
|
|
|
// 正为借方, 负数为贷方
|
|
|
- if (data.bizAmount > 0) {
|
|
|
- data.debitAmount = data.bizAmount
|
|
|
+ if (data[i].bizAmount > 0) {
|
|
|
+ data[i].debitAmount = data[i].bizAmount
|
|
|
} else {
|
|
|
- data.creditorAmount = data.bizAmount
|
|
|
+ data[i].creditorAmount = data[i].bizAmount
|
|
|
}
|
|
|
}
|
|
|
- this.total = data.count || 0
|
|
|
+ // data.push({ no: '备注:' + this.detailData.remarks })
|
|
|
+ // data.push({
|
|
|
+ // no: '公司名称:东莞市箭冠汽车配件制造有限公司\n签名:' + (this.detailData.signName || '') + '\n盖章',
|
|
|
+ // expenseAllocateType: '公司名称:' + this.dealear.dealerName + '\n签名:\n盖章'
|
|
|
+ // })
|
|
|
+ this.total = data.length || 0 + 1
|
|
|
this.disabled = false
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -167,27 +171,91 @@ export default {
|
|
|
},
|
|
|
total: 0, // 合计
|
|
|
detailData: null,
|
|
|
- dealear: null
|
|
|
+ dealear: null,
|
|
|
+ verifyAccountBillSn: undefined,
|
|
|
+ orderType: 0
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
columns () {
|
|
|
- const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '单据类型', dataIndex: 'bizType', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '费用/调拨类型', dataIndex: 'expenseAllocateType', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
- { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '余额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ const _this = this
|
|
|
+ const renderContent = (value, row, index) => {
|
|
|
+ const obj = {
|
|
|
+ children: value || '--',
|
|
|
+ attrs: {}
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ title: '箭冠汽配 应收账款明细表',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '营业执照名称',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '财务编号',
|
|
|
+ children: [
|
|
|
+ { title: '序号',
|
|
|
+ dataIndex: 'no',
|
|
|
+ width: '4%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: renderContent
|
|
|
+ },
|
|
|
+ { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: renderContent }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.dealear ? this.dealear.dealerName : '--',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: this.dealear ? this.dealear.kdMidCustomerFnumber : '--',
|
|
|
+ children: [
|
|
|
+ { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '费用/调拨类型',
|
|
|
+ dataIndex: 'expenseAllocateType',
|
|
|
+ width: '8%',
|
|
|
+ align: 'center',
|
|
|
+ customRender: renderContent
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '系统名称',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '',
|
|
|
+ children: [
|
|
|
+ { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: renderContent },
|
|
|
+ { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: renderContent }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.dealear ? this.dealear.dealerAlias : '--',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '',
|
|
|
+ children: [
|
|
|
+ { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: renderContent },
|
|
|
+ { title: '余额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: renderContent },
|
|
|
+ { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: renderContent }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
]
|
|
|
- return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -199,7 +267,9 @@ export default {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.creatDate = []
|
|
|
- this.$refs.rangeDate.resetDate(this.creatDate)
|
|
|
+ if (this.$refs.rangeDate) {
|
|
|
+ this.$refs.rangeDate.resetDate(this.creatDate)
|
|
|
+ }
|
|
|
this.queryParam.beginDate = ''
|
|
|
this.queryParam.endDate = ''
|
|
|
this.queryParam.bizNo = ''
|
|
@@ -210,9 +280,10 @@ export default {
|
|
|
// 详情
|
|
|
getDetail () {
|
|
|
this.spinning = true
|
|
|
- verifyAcountBillDetail({ verifyAccountBillSn: this.verifyAccountBillSn }).then(res => {
|
|
|
+ verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
|
|
|
this.detailData = res.data
|
|
|
this.spinning = false
|
|
|
+ this.resetSearchForm()
|
|
|
})
|
|
|
},
|
|
|
// 关闭弹框
|
|
@@ -223,9 +294,39 @@ export default {
|
|
|
// 导出
|
|
|
handleExport () {
|
|
|
|
|
|
+ },
|
|
|
+ // 对单
|
|
|
+ async handleSubmit () {
|
|
|
+ const _this = this
|
|
|
+ this.confirmLoading = true
|
|
|
+ const ret = await verifyAcountBillConfirmCheck({ sn: this.verifyAccountBillSn })
|
|
|
+ this.confirmLoading = false
|
|
|
+ console.log(ret)
|
|
|
+ const snList = ret.data.length ? ret.data.map(item => item.bizNo) : []
|
|
|
+ if (snList.length) {
|
|
|
+ this.$info({
|
|
|
+ title: '提示(' + _this.dealear.dealerName + ')',
|
|
|
+ content: <div style="font-size:14px;">{snList.toString()}不可对单</div>,
|
|
|
+ centered: true,
|
|
|
+ closable: true,
|
|
|
+ onOk () {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.confirmLoading = true
|
|
|
+ verifyAcountBillConfirm({ sn: this.verifyAccountBillSn }).then(res => {
|
|
|
+ this.confirmLoading = false
|
|
|
+ this.$message.success('对单成功')
|
|
|
+ this.$emit('confirm')
|
|
|
+ this.cancel()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 初始化
|
|
|
async pageInit (row, dealear, type) {
|
|
|
+ // console.log(row, dealear, type)
|
|
|
+ this.orderType = type
|
|
|
+ this.verifyAccountBillSn = row.verifyAccountBillSn
|
|
|
this.dealear = dealear
|
|
|
this.title = type ? '对单' : '单据详情'
|
|
|
this.getDetail()
|
|
@@ -234,9 +335,6 @@ export default {
|
|
|
watch: {
|
|
|
show (newValue, oldValue) {
|
|
|
this.opened = newValue
|
|
|
- if (newValue) {
|
|
|
- this.pageInit()
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -276,4 +374,8 @@ export default {
|
|
|
line-height: 20px;
|
|
|
color: #333;
|
|
|
}
|
|
|
+ .conFrontModal-footer-bar{
|
|
|
+ text-align: center;
|
|
|
+ padding: 30px 0 20px;
|
|
|
+ }
|
|
|
</style>
|