优化收付款和对账报表功能,支持退款单修改退款金额
This commit is contained in:
@@ -139,7 +139,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' ]" @change="onChangeChangeAmount" :readOnly="backStatus"/>
|
<a-input placeholder="请输入本次退款" v-decorator.trim="[ 'changeAmount' ]" @change="onChangeChangeAmount"/>
|
||||||
</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">
|
||||||
@@ -212,7 +212,6 @@
|
|||||||
prefixNo: 'CGTH',
|
prefixNo: 'CGTH',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
backStatus: true,
|
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -302,14 +301,10 @@
|
|||||||
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)
|
||||||
@@ -383,7 +378,6 @@
|
|||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, 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)
|
||||||
|
|||||||
@@ -139,7 +139,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' ]" @change="onChangeChangeAmount" :readOnly="backStatus"/>
|
<a-input placeholder="请输入本次退款" v-decorator.trim="[ 'changeAmount' ]" @change="onChangeChangeAmount"/>
|
||||||
</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">
|
||||||
@@ -217,7 +217,6 @@
|
|||||||
prefixNo: 'XSTH',
|
prefixNo: 'XSTH',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
rowCanEdit: true,
|
rowCanEdit: true,
|
||||||
backStatus: true,
|
|
||||||
model: {},
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -308,14 +307,10 @@
|
|||||||
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)
|
||||||
@@ -394,7 +389,6 @@
|
|||||||
},
|
},
|
||||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark) {
|
linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, 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)
|
||||||
|
|||||||
@@ -65,12 +65,6 @@
|
|||||||
<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 -->
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
@@ -134,9 +128,6 @@
|
|||||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
|
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
|
||||||
{ title: '操作员', dataIndex: 'userName',width:70, ellipsis:true},
|
{ title: '操作员', dataIndex: 'userName',width:70, ellipsis:true},
|
||||||
{ title: '本单欠款', dataIndex: 'needDebt',width:70 },
|
{ title: '本单欠款', dataIndex: 'needDebt',width:70 },
|
||||||
{ dataIndex: 'realNeedDebt',width:80,
|
|
||||||
slots: { title: 'customTitle' }
|
|
||||||
},
|
|
||||||
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
||||||
{ title: '待收欠款', dataIndex: 'debt',width:70 }
|
{ title: '待收欠款', dataIndex: 'debt',width:70 }
|
||||||
],
|
],
|
||||||
@@ -160,11 +151,11 @@
|
|||||||
this.queryParam.status = status
|
this.queryParam.status = status
|
||||||
this.columns[0].title = organType
|
this.columns[0].title = organType
|
||||||
if(type === '入库') {
|
if(type === '入库') {
|
||||||
this.columns[7].title = '已付欠款'
|
this.columns[6].title = '已付欠款'
|
||||||
this.columns[8].title = '待付欠款'
|
this.columns[7].title = '待付欠款'
|
||||||
} else if(type === '出库') {
|
} else if(type === '出库') {
|
||||||
this.columns[7].title = '已收欠款'
|
this.columns[6].title = '已收欠款'
|
||||||
this.columns[8].title = '待收欠款'
|
this.columns[7].title = '待收欠款'
|
||||||
}
|
}
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ 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.realNeedDebt
|
info.needDebt = info.needDebt
|
||||||
info.eachAmount = info.debt
|
info.eachAmount = info.debt
|
||||||
if(info.eachAmount != 0) {
|
if(info.eachAmount != 0) {
|
||||||
changeAmount += info.eachAmount-0
|
changeAmount += info.eachAmount-0
|
||||||
@@ -279,7 +279,7 @@ export const FinancialModalMixin = {
|
|||||||
info.billNumber = 'QiChu'
|
info.billNumber = 'QiChu'
|
||||||
getAction('/supplier/getBeginNeedByOrganId', {'organId': organId}).then((res)=>{
|
getAction('/supplier/getBeginNeedByOrganId', {'organId': organId}).then((res)=>{
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
info.needDebt = res.data.needDebt
|
info.needDebt = res.data.needDebt?res.data.needDebt:0
|
||||||
info.finishDebt = res.data.finishDebt
|
info.finishDebt = res.data.finishDebt
|
||||||
info.eachAmount = res.data.eachAmount
|
info.eachAmount = res.data.eachAmount
|
||||||
listEx.push(info)
|
listEx.push(info)
|
||||||
|
|||||||
@@ -278,7 +278,7 @@
|
|||||||
let organId = this.form.getFieldValue('organId')
|
let organId = this.form.getFieldValue('organId')
|
||||||
if(organId){
|
if(organId){
|
||||||
this.$refs.debtBillList.show(organId, '出库', '销售', '客户', "")
|
this.$refs.debtBillList.show(organId, '出库', '销售', '客户', "")
|
||||||
this.$refs.debtBillList.title = "选择销售出库欠款单据"
|
this.$refs.debtBillList.title = "选择销售欠款单据"
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning('请选择客户!');
|
this.$message.warning('请选择客户!');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,7 +282,7 @@
|
|||||||
let organId = this.form.getFieldValue('organId')
|
let organId = this.form.getFieldValue('organId')
|
||||||
if(organId){
|
if(organId){
|
||||||
this.$refs.debtBillList.show(organId, '入库', '采购', '供应商', "")
|
this.$refs.debtBillList.show(organId, '入库', '采购', '供应商', "")
|
||||||
this.$refs.debtBillList.title = "选择采购入库欠款单据"
|
this.$refs.debtBillList.title = "选择采购欠款单据"
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning('请选择供应商!');
|
this.$message.warning('请选择供应商!');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,9 +131,6 @@
|
|||||||
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
|
{ title: '单据日期', dataIndex: 'operTimeStr',width:130},
|
||||||
{ title: '操作员', dataIndex: 'userName',width:60, ellipsis:true},
|
{ title: '操作员', dataIndex: 'userName',width:60, ellipsis:true},
|
||||||
{ title: '本单欠款', dataIndex: 'needDebt',width:70},
|
{ title: '本单欠款', dataIndex: 'needDebt',width:70},
|
||||||
{ dataIndex: 'realNeedDebt',width:80,
|
|
||||||
slots: { title: 'customTitle' }
|
|
||||||
},
|
|
||||||
{ title: '已收欠款', dataIndex: 'finishDebt',width:70},
|
{ title: '已收欠款', dataIndex: 'finishDebt',width:70},
|
||||||
{ title: '待收欠款', dataIndex: 'debt',width:70}
|
{ title: '待收欠款', dataIndex: 'debt',width:70}
|
||||||
],
|
],
|
||||||
@@ -159,11 +156,11 @@
|
|||||||
this.queryParam.endTime = endTime
|
this.queryParam.endTime = endTime
|
||||||
this.columns[2].title = organType
|
this.columns[2].title = organType
|
||||||
if(type === '入库') {
|
if(type === '入库') {
|
||||||
this.columns[8].title = '已付欠款'
|
this.columns[7].title = '已付欠款'
|
||||||
this.columns[9].title = '待付欠款'
|
this.columns[8].title = '待付欠款'
|
||||||
} else if(type === '出库') {
|
} else if(type === '出库') {
|
||||||
this.columns[8].title = '已收欠款'
|
this.columns[7].title = '已收欠款'
|
||||||
this.columns[9].title = '待收欠款'
|
this.columns[8].title = '待收欠款'
|
||||||
}
|
}
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
@@ -190,10 +187,10 @@
|
|||||||
console.log(value);
|
console.log(value);
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
let aoa = [['单据编号', this.columns[2].title, '商品信息', '单据日期', '操作员', '本单欠款', '实际欠款', '已收欠款', '待收欠款']]
|
let aoa = [['单据编号', this.columns[2].title, '商品信息', '单据日期', '操作员', '本单欠款', '已收欠款', '待收欠款']]
|
||||||
for (let i = 0; i < this.dataSource.length; i++) {
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
let ds = this.dataSource[i]
|
let ds = this.dataSource[i]
|
||||||
let item = [ds.number, ds.organName, ds.materialsList, ds.operTimeStr, ds.userName, ds.needDebt, ds.realNeedDebt, ds.finishDebt, ds.debt]
|
let item = [ds.number, ds.organName, ds.materialsList, ds.operTimeStr, ds.userName, ds.needDebt, ds.finishDebt, ds.debt]
|
||||||
aoa.push(item)
|
aoa.push(item)
|
||||||
}
|
}
|
||||||
openDownloadDialog(sheet2blob(aoa), '欠款详情')
|
openDownloadDialog(sheet2blob(aoa), '欠款详情')
|
||||||
|
|||||||
Reference in New Issue
Block a user