给采购和销售退货单增加校验逻辑,支持特殊情况的欠款,并给收付款单增加实际欠款的列
This commit is contained in:
@@ -232,6 +232,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '退款', dataIndex: 'changeAmount',width:50},
|
{ title: '退款', dataIndex: 'changeAmount',width:50},
|
||||||
|
{ title: '欠款', dataIndex: 'debt',width:60},
|
||||||
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
|
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
|
||||||
scopedSlots: { customRender: 'customRenderStatus' }
|
scopedSlots: { customRender: 'customRenderStatus' }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -232,6 +232,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '退款', dataIndex: 'changeAmount',width:50},
|
{ title: '退款', dataIndex: 'changeAmount',width:50},
|
||||||
|
{ title: '欠款', dataIndex: 'debt',width:60},
|
||||||
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
|
{ title: '状态', dataIndex: 'status', width: 80, align: "center",
|
||||||
scopedSlots: { customRender: 'customRenderStatus' }
|
scopedSlots: { customRender: 'customRenderStatus' }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
|
||||||
<a-input placeholder="请输入本次退款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount" :readOnly="true"/>
|
<a-input placeholder="请输入本次退款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount" :readOnly="backStatus"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
@@ -214,6 +214,7 @@
|
|||||||
prefixNo: 'CGTH',
|
prefixNo: 'CGTH',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
|
backStatus: true,
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -302,10 +303,14 @@
|
|||||||
if (this.action === 'add') {
|
if (this.action === 'add') {
|
||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
|
this.backStatus = true
|
||||||
} else {
|
} else {
|
||||||
if(this.model.linkNumber) {
|
if(this.model.linkNumber) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
|
this.backStatus = false
|
||||||
|
} else {
|
||||||
|
this.backStatus = true
|
||||||
}
|
}
|
||||||
this.model.operTime = this.model.operTimeStr
|
this.model.operTime = this.model.operTimeStr
|
||||||
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
||||||
@@ -378,6 +383,7 @@
|
|||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
|
this.backStatus = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
|
||||||
<a-input placeholder="请输入本次退款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount" :readOnly="true"/>
|
<a-input placeholder="请输入本次退款" v-decorator.trim="[ 'changeAmount' ]" @keyup="onKeyUpChangeAmount" :readOnly="backStatus"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
@@ -219,6 +219,7 @@
|
|||||||
prefixNo: 'XSTH',
|
prefixNo: 'XSTH',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
|
backStatus: true,
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -308,10 +309,14 @@
|
|||||||
this.addInit(this.prefixNo)
|
this.addInit(this.prefixNo)
|
||||||
this.personList.value = ''
|
this.personList.value = ''
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
|
this.backStatus = true
|
||||||
} else {
|
} else {
|
||||||
if(this.model.linkNumber) {
|
if(this.model.linkNumber) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
|
this.backStatus = false
|
||||||
|
} else {
|
||||||
|
this.backStatus = true
|
||||||
}
|
}
|
||||||
this.model.operTime = this.model.operTimeStr
|
this.model.operTime = this.model.operTimeStr
|
||||||
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
|
||||||
@@ -389,6 +394,7 @@
|
|||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||||
this.rowCanEdit = false
|
this.rowCanEdit = false
|
||||||
|
this.backStatus = false
|
||||||
this.materialTable.columns[1].type = FormTypes.normal
|
this.materialTable.columns[1].type = FormTypes.normal
|
||||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:width="1250"
|
:width="1300"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@@ -13,20 +13,20 @@
|
|||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-form-item label="单据编号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
<a-input placeholder="请输入单据编号查询" v-model="queryParam.number"></a-input>
|
<a-input placeholder="请输入单据编号查询" v-model="queryParam.number"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="商品信息" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-form-item label="商品信息" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
<a-input placeholder="请输入名称、规格、型号" v-model="queryParam.materialParam"></a-input>
|
<a-input placeholder="请输入名称、规格、型号" v-model="queryParam.materialParam"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="7" :sm="10">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
style="width: 210px"
|
style="width: 100%"
|
||||||
v-model="queryParam.createTimeRange"
|
v-model="queryParam.createTimeRange"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
:placeholder="['开始时间', '结束时间']"
|
:placeholder="['开始时间', '结束时间']"
|
||||||
@@ -60,6 +60,12 @@
|
|||||||
<span slot="numberCustomRender" slot-scope="text, record">
|
<span slot="numberCustomRender" slot-scope="text, record">
|
||||||
<a @click="myHandleDetail(record)">{{record.number}}</a>
|
<a @click="myHandleDetail(record)">{{record.number}}</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span slot="customTitle">
|
||||||
|
实际欠款
|
||||||
|
<a-tooltip title="实际欠款=本单欠款-退货单欠款(主要针对存在退货的情况)">
|
||||||
|
<a-icon type="question-circle" />
|
||||||
|
</a-tooltip>
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<!-- table区域-end -->
|
<!-- table区域-end -->
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
@@ -106,16 +112,6 @@
|
|||||||
},
|
},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
|
||||||
title: '#',
|
|
||||||
dataIndex: '',
|
|
||||||
key:'rowIndex',
|
|
||||||
width:40,
|
|
||||||
align:"center",
|
|
||||||
customRender:function (t,r,index) {
|
|
||||||
return parseInt(index)+1;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ title: '', dataIndex: 'organName',width:120, ellipsis:true},
|
{ title: '', dataIndex: 'organName',width:120, ellipsis:true},
|
||||||
{
|
{
|
||||||
title: '单据编号', dataIndex: 'number', width: 120,
|
title: '单据编号', dataIndex: 'number', width: 120,
|
||||||
@@ -129,18 +125,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
|
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
|
||||||
{ title: '操作员', dataIndex: 'userName',width:60},
|
{ title: '操作员', dataIndex: 'userName',width:70, ellipsis:true},
|
||||||
{ title: '欠款', dataIndex: 'needDebt',width:70,
|
{ title: '本单欠款', dataIndex: 'needDebt',width:70 },
|
||||||
customRender:function (text,record,index) {
|
{ dataIndex: 'realNeedDebt',width:80,
|
||||||
return (record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount)).toFixed(2);
|
slots: { title: 'customTitle' }
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
||||||
{ title: '待收欠款', dataIndex: 'debt',width:70,
|
{ title: '待收欠款', dataIndex: 'debt',width:70 }
|
||||||
customRender:function (text,record,index) {
|
|
||||||
return (record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount + record.finishDebt)).toFixed(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: "/depotHead/debtList"
|
list: "/depotHead/debtList"
|
||||||
@@ -197,6 +188,8 @@
|
|||||||
handleOk () {
|
handleOk () {
|
||||||
this.getSelectBillRows();
|
this.getSelectBillRows();
|
||||||
this.$emit('ok', this.selectBillRows);
|
this.$emit('ok', this.selectBillRows);
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
this.selectBillRows = []
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
onDateChange: function (value, dateString) {
|
onDateChange: function (value, dateString) {
|
||||||
@@ -216,7 +209,7 @@
|
|||||||
getSelectBillRows() {
|
getSelectBillRows() {
|
||||||
let dataSource = this.dataSource;
|
let dataSource = this.dataSource;
|
||||||
let billIds = "";
|
let billIds = "";
|
||||||
this.selectBillRows = [];
|
this.selectBillRows = []
|
||||||
for (let i = 0, len = dataSource.length; i < len; i++) {
|
for (let i = 0, len = dataSource.length; i < len; i++) {
|
||||||
if (this.selectedRowKeys.includes(dataSource[i].id)) {
|
if (this.selectedRowKeys.includes(dataSource[i].id)) {
|
||||||
this.selectBillRows.push(dataSource[i]);
|
this.selectBillRows.push(dataSource[i]);
|
||||||
|
|||||||
@@ -233,8 +233,8 @@ export const FinancialModalMixin = {
|
|||||||
for(let i=0; i<selectBillRows.length; i++){
|
for(let i=0; i<selectBillRows.length; i++){
|
||||||
let info = selectBillRows[i]
|
let info = selectBillRows[i]
|
||||||
info.billNumber = info.number
|
info.billNumber = info.number
|
||||||
info.needDebt = (info.discountLastMoney + info.otherMoney - (info.deposit + info.changeAmount)).toFixed(2)
|
info.needDebt = info.realNeedDebt
|
||||||
info.eachAmount = (info.discountLastMoney + info.otherMoney - (info.deposit + info.changeAmount + info.finishDebt)).toFixed(2);
|
info.eachAmount = info.debt
|
||||||
if(info.eachAmount != 0) {
|
if(info.eachAmount != 0) {
|
||||||
changeAmount += info.eachAmount-0
|
changeAmount += info.eachAmount-0
|
||||||
listEx.push(info)
|
listEx.push(info)
|
||||||
|
|||||||
Reference in New Issue
Block a user