|
@@ -20,13 +20,15 @@
|
|
ref="partQuery"
|
|
ref="partQuery"
|
|
:newLoading="isInster"
|
|
:newLoading="isInster"
|
|
:addMoreLoading="addMoreLoading"
|
|
:addMoreLoading="addMoreLoading"
|
|
|
|
+ :itemSn="verifyAccountBillSn"
|
|
|
|
+ :dealerSn="dealerSn"
|
|
@add="saveProduct"
|
|
@add="saveProduct"
|
|
@bachAdd="saveMoreProduct"></queryPart>
|
|
@bachAdd="saveMoreProduct"></queryPart>
|
|
</a-card>
|
|
</a-card>
|
|
<a-card size="small" :bordered="false" class="salesReturnEdit-cont">
|
|
<a-card size="small" :bordered="false" class="salesReturnEdit-cont">
|
|
- <a-alert style="margin-bottom: 10px;" type="info">
|
|
|
|
|
|
+ <a-alert style="margin-bottom: 10px;" type="info" v-if="countData">
|
|
<div slot="message" class="total-bar">
|
|
<div slot="message" class="total-bar">
|
|
- <div v-if="countData">
|
|
|
|
|
|
+ <div>
|
|
<span>余额:{{ countData && (countData.bizAmount || countData.bizAmount == 0) ? countData.bizAmount : '--' }};</span>
|
|
<span>余额:{{ countData && (countData.bizAmount || countData.bizAmount == 0) ? countData.bizAmount : '--' }};</span>
|
|
<span>借方:{{ countData && (countData.borrowAmount || countData.borrowAmount == 0) ? countData.borrowAmount : '--' }};</span>
|
|
<span>借方:{{ countData && (countData.borrowAmount || countData.borrowAmount == 0) ? countData.borrowAmount : '--' }};</span>
|
|
<span>贷方:{{ countData && (countData.loanAmount || countData.loanAmount == 0) ? countData.loanAmount : '--' }};</span>
|
|
<span>贷方:{{ countData && (countData.loanAmount || countData.loanAmount == 0) ? countData.loanAmount : '--' }};</span>
|
|
@@ -53,7 +55,7 @@
|
|
v-model="productForm.changeType"
|
|
v-model="productForm.changeType"
|
|
ref="changeType"
|
|
ref="changeType"
|
|
id="accountStatement-changeType1"
|
|
id="accountStatement-changeType1"
|
|
- code="FINANCE_BOOK_STATE"
|
|
|
|
|
|
+ code="VERIFY_ACCOUNT_CHANGE_TYPE"
|
|
placeholder="请选择借贷类型"
|
|
placeholder="请选择借贷类型"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -94,6 +96,7 @@
|
|
<a-input
|
|
<a-input
|
|
size="small"
|
|
size="small"
|
|
v-model="record.remarks"
|
|
v-model="record.remarks"
|
|
|
|
+ @blur="changeRemarks(record)"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
placeholder="请输入备注"/>
|
|
placeholder="请输入备注"/>
|
|
</div>
|
|
</div>
|
|
@@ -137,7 +140,9 @@ import {
|
|
verifyAcountBillDetailQueryCount,
|
|
verifyAcountBillDetailQueryCount,
|
|
verifyAcountBillDetailDel,
|
|
verifyAcountBillDetailDel,
|
|
verifyAcountBillDetailSave,
|
|
verifyAcountBillDetailSave,
|
|
|
|
+ verifyAcountBillDetailModify,
|
|
verifyAcountBillSubmit,
|
|
verifyAcountBillSubmit,
|
|
|
|
+ verifyAcountBillSubmitCheck,
|
|
verifyAcountBillDetail
|
|
verifyAcountBillDetail
|
|
} from '@/api/verifyAccount'
|
|
} from '@/api/verifyAccount'
|
|
export default {
|
|
export default {
|
|
@@ -166,13 +171,23 @@ export default {
|
|
chooseList: [],
|
|
chooseList: [],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- return verifyAcountBillDetailList(Object.assign(parameter, this.productForm)).then(res => {
|
|
|
|
|
|
+ const params = {
|
|
|
|
+ ...parameter,
|
|
|
|
+ verifyAccountBillSn: this.verifyAccountBillSn,
|
|
|
|
+ verifyAccountBillNo: this.detailData.verifyAccountBillNo,
|
|
|
|
+ ...this.productForm
|
|
|
|
+ }
|
|
|
|
+ return verifyAcountBillDetailList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
|
|
+ const dates = data.list[i].bizDate.split('-')
|
|
|
|
+ data.list[i].year = dates[0]
|
|
|
|
+ data.list[i].month = dates[1]
|
|
|
|
+ data.list[i].day = dates[2].split(' ')[0]
|
|
// 正为借方, 负数为贷方
|
|
// 正为借方, 负数为贷方
|
|
if (data.list[i].bizAmount > 0) {
|
|
if (data.list[i].bizAmount > 0) {
|
|
data.list[i].debitAmount = data.list[i].bizAmount
|
|
data.list[i].debitAmount = data.list[i].bizAmount
|
|
@@ -181,6 +196,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.getStatisticsData(params)
|
|
this.chooseList = data.list
|
|
this.chooseList = data.list
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
@@ -193,6 +209,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ dealerSn () {
|
|
|
|
+ return this.detailData ? this.detailData.dealerSn : ''
|
|
|
|
+ },
|
|
columns () {
|
|
columns () {
|
|
const _this = this
|
|
const _this = this
|
|
const arr = [
|
|
const arr = [
|
|
@@ -201,8 +220,8 @@ export default {
|
|
{ title: '月', dataIndex: 'month', 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: 'day', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '业务单号', dataIndex: 'bizNo', width: '8%', 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: 'bizStatus', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'bizStatusDictValue', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '费用/调拨类型', dataIndex: 'expenseAllocateType', 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: '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: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
@@ -225,8 +244,8 @@ export default {
|
|
},
|
|
},
|
|
// 创建时间 change
|
|
// 创建时间 change
|
|
dateChange (date) {
|
|
dateChange (date) {
|
|
- this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
|
|
- this.queryParam.endDate = date[1] ? date[1] : ''
|
|
|
|
|
|
+ this.productForm.beginDate = date[0] ? date[0] : ''
|
|
|
|
+ this.productForm.endDate = date[1] ? date[1] : ''
|
|
},
|
|
},
|
|
// 删除所选产品
|
|
// 删除所选产品
|
|
handleDel (row) {
|
|
handleDel (row) {
|
|
@@ -237,26 +256,29 @@ export default {
|
|
centered: true,
|
|
centered: true,
|
|
closable: true,
|
|
closable: true,
|
|
onOk () {
|
|
onOk () {
|
|
- _this.delLoading = true
|
|
|
|
- _this.spinning = true
|
|
|
|
- verifyAcountBillDetailDel({ verifyAccountBillSn: row.verifyAccountBillSn, detailSnList: [row.verifyAccountBillDetailSn] })
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.resetTable(false)
|
|
|
|
- _this.getStatisticsData()
|
|
|
|
- _this.getChooseList()
|
|
|
|
- _this.$refs.partQuery.clearSelected()
|
|
|
|
- }
|
|
|
|
- _this.$message.info(res.message)
|
|
|
|
- _this.delLoading = false
|
|
|
|
- _this.spinning = false
|
|
|
|
- })
|
|
|
|
- .catch(err => {
|
|
|
|
- _this.delLoading = false
|
|
|
|
- })
|
|
|
|
|
|
+ _this.delDetail([row.detailSn])
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ delDetail (snList) {
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.delLoading = true
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ verifyAcountBillDetailDel({ verifyAccountBillSn: _this.verifyAccountBillSn, detailSnList: snList })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.resetTable(false)
|
|
|
|
+ _this.getChooseList()
|
|
|
|
+ _this.$refs.partQuery.clearSelected()
|
|
|
|
+ }
|
|
|
|
+ _this.$message.info(res.message)
|
|
|
|
+ _this.delLoading = false
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ .catch(err => {
|
|
|
|
+ _this.delLoading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 刷新已选表格
|
|
// 刷新已选表格
|
|
resetTable (flag) {
|
|
resetTable (flag) {
|
|
this.$refs.table.refresh(flag)
|
|
this.$refs.table.refresh(flag)
|
|
@@ -273,6 +295,14 @@ export default {
|
|
this.$refs.rangeDate.resetDate(this.creatDate)
|
|
this.$refs.rangeDate.resetDate(this.creatDate)
|
|
this.$refs.table.refresh(!!flag)
|
|
this.$refs.table.refresh(!!flag)
|
|
},
|
|
},
|
|
|
|
+ // 修改备注
|
|
|
|
+ changeRemarks (record) {
|
|
|
|
+ if (!record.remarks) return
|
|
|
|
+ this.spinning = true
|
|
|
|
+ verifyAcountBillDetailModify({ id: record.id, remarks: record.remarks }).then(res => {
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 单个添加单据
|
|
// 单个添加单据
|
|
saveProduct (row) {
|
|
saveProduct (row) {
|
|
if (this.isInster) {
|
|
if (this.isInster) {
|
|
@@ -284,7 +314,7 @@ export default {
|
|
verifyAccountBillSn: this.detailData.verifyAccountBillSn,
|
|
verifyAccountBillSn: this.detailData.verifyAccountBillSn,
|
|
verifyAccountBillNo: this.detailData.verifyAccountBillNo,
|
|
verifyAccountBillNo: this.detailData.verifyAccountBillNo,
|
|
verifyAccountBizSn: this.detailData.verifyAccountBizSn,
|
|
verifyAccountBizSn: this.detailData.verifyAccountBizSn,
|
|
- verifyAccountBillDetailList: [row]
|
|
|
|
|
|
+ detailList: [row]
|
|
}
|
|
}
|
|
this.saveMore(paramsData)
|
|
this.saveMore(paramsData)
|
|
},
|
|
},
|
|
@@ -299,7 +329,7 @@ export default {
|
|
verifyAccountBillSn: this.detailData.verifyAccountBillSn,
|
|
verifyAccountBillSn: this.detailData.verifyAccountBillSn,
|
|
verifyAccountBillNo: this.detailData.verifyAccountBillNo,
|
|
verifyAccountBillNo: this.detailData.verifyAccountBillNo,
|
|
verifyAccountBizSn: this.detailData.verifyAccountBizSn,
|
|
verifyAccountBizSn: this.detailData.verifyAccountBizSn,
|
|
- verifyAccountBillDetailList: data
|
|
|
|
|
|
+ detailList: data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 添加
|
|
// 添加
|
|
@@ -308,7 +338,6 @@ export default {
|
|
verifyAcountBillDetailSave(params)
|
|
verifyAcountBillDetailSave(params)
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.getStatisticsData()
|
|
|
|
this.getChooseList()
|
|
this.getChooseList()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.partQuery.clearSelected()
|
|
this.$refs.partQuery.clearSelected()
|
|
@@ -324,29 +353,42 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
- handleSubmit (data) {
|
|
|
|
|
|
+ async handleSubmit () {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- verifyAcountBillSubmit({ verifyAccountBillSn: this.verifyAccountBillSn, ...data }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.handleBack()
|
|
|
|
- this.$message.success(res.message)
|
|
|
|
- }
|
|
|
|
- this.spinning = false
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- pageInit () {
|
|
|
|
- this.verifyAccountBillSn = this.$route.query.sn
|
|
|
|
- this.getStatisticsData()
|
|
|
|
- this.getBasicsData()
|
|
|
|
- this.resetSearchForm(true)
|
|
|
|
|
|
+ const ret = await verifyAcountBillSubmitCheck({ sn: this.verifyAccountBillSn })
|
|
|
|
+ this.spinning = false
|
|
|
|
+ const noList = ret.data.length ? ret.data.map(item => item.bizNo) : []
|
|
|
|
+ const snList = ret.data.length ? ret.data.map(item => item.detailSn) : []
|
|
|
|
+ // 通过校验提交
|
|
|
|
+ if (noList.length == 0) {
|
|
|
|
+ this.spinning = true
|
|
|
|
+ verifyAcountBillSubmit({ sn: this.verifyAccountBillSn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.handleBack()
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ // 提示不能参与的单子
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示(' + _this.detailData.dealerName + ')',
|
|
|
|
+ content: <div style="font-size:14px;"><div>{noList.toString()}不能参与对单,</div><div>点击【确定】后自动移除上述单据</div></div>,
|
|
|
|
+ centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.delDetail(snList)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
getChooseList () {
|
|
getChooseList () {
|
|
this.$refs.partQuery.pageInit()
|
|
this.$refs.partQuery.pageInit()
|
|
},
|
|
},
|
|
// 获取页面统计数据
|
|
// 获取页面统计数据
|
|
- getStatisticsData () {
|
|
|
|
- this.getBasicsData(true)
|
|
|
|
- verifyAcountBillDetailQueryCount({ verifyAccountBillSn: this.verifyAccountBillSn }).then(res => {
|
|
|
|
|
|
+ getStatisticsData (params) {
|
|
|
|
+ verifyAcountBillDetailQueryCount(params).then(res => {
|
|
this.countData = res.data
|
|
this.countData = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -354,13 +396,18 @@ export default {
|
|
getBasicsData (flag) {
|
|
getBasicsData (flag) {
|
|
const _this = this
|
|
const _this = this
|
|
verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
|
|
verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
|
|
- this.detailData = res.data
|
|
|
|
|
|
+ _this.detailData = res.data
|
|
if (!flag) {
|
|
if (!flag) {
|
|
- this.$nextTick(() => {
|
|
|
|
|
|
+ _this.$nextTick(() => {
|
|
|
|
+ _this.resetSearchForm(true)
|
|
_this.getChooseList()
|
|
_this.getChooseList()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ pageInit () {
|
|
|
|
+ this.verifyAccountBillSn = this.$route.params.sn
|
|
|
|
+ this.getBasicsData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|