|
@@ -33,13 +33,16 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="同步状态">
|
|
|
- <v-select
|
|
|
+ <a-select
|
|
|
v-model="queryParam.syncFlag"
|
|
|
ref="syncFlag"
|
|
|
id="accountStatement-syncFlag"
|
|
|
- code="VERIFY_ACCOUNT_STATUS"
|
|
|
placeholder="请选择同步状态"
|
|
|
- allowClear></v-select>
|
|
|
+ allowClear
|
|
|
+ >
|
|
|
+ <a-select-option value="1">已同步</a-select-option>
|
|
|
+ <a-select-option value="0">未同步</a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
@@ -85,6 +88,15 @@
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<div>
|
|
|
+ <a-button
|
|
|
+ v-if="record.syncFlag=='0'"
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ @click="handleSync(record)"
|
|
|
+ >
|
|
|
+ 同步
|
|
|
+ </a-button>
|
|
|
<a-button
|
|
|
v-if="record.billStatus=='WAIT_CONFIRM'&&$hasPermissions('B_as_confirm')"
|
|
|
size="small"
|
|
@@ -140,7 +152,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import baseModal from './baseModal.vue'
|
|
|
import confrontModal from './confrontModal.vue'
|
|
|
-import { verifyAcountBillList, verifyAcountBillDel, verifyAcountBillVerify } from '@/api/verifyAccount.js'
|
|
|
+import { verifyAcountBillList, verifyAcountBillDel, verifyAcountBillVerify, verifyAcountBillSyncBill } from '@/api/verifyAccount.js'
|
|
|
export default {
|
|
|
name: 'AccountStatementList',
|
|
|
mixins: [commonMixin],
|
|
@@ -157,7 +169,8 @@ export default {
|
|
|
verifyAccountBillNo: '',
|
|
|
dealerName: undefined,
|
|
|
dealerSn: undefined,
|
|
|
- billStatus: undefined
|
|
|
+ billStatus: undefined,
|
|
|
+ syncFlag: undefined
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
creatDate: [], // 创建时间
|
|
@@ -204,7 +217,7 @@ export default {
|
|
|
{ title: '对单时间', dataIndex: 'confirmDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '对账时间', dataIndex: 'verifyDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '同步状态', dataIndex: 'syncFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '同步状态', dataIndex: 'syncFlag', width: '6%', align: 'center', customRender: function (text) { return ['未同步', '已同步'][text] } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
]
|
|
|
return arr
|
|
@@ -236,6 +249,7 @@ export default {
|
|
|
this.queryParam.dealerSn = undefined
|
|
|
this.queryParam.verifyAccountBillNo = ''
|
|
|
this.queryParam.billStatus = undefined
|
|
|
+ this.queryParam.syncFlag = undefined
|
|
|
if (this.$refs.dealer) {
|
|
|
this.$refs.dealer.resetForm()
|
|
|
}
|
|
@@ -271,6 +285,28 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 同步
|
|
|
+ handleSync (row) {
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: <div style="font-size:14px;"><div>您要同步对账单【{row.verifyAccountBillNo}】给【{row.dealerName}】客户吗?</div></div>,
|
|
|
+ centered: true,
|
|
|
+ closable: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ verifyAcountBillSyncBill({ sn: row.verifyAccountBillSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 0详情,1对单
|
|
|
handleDetail (row, type) {
|
|
|
this.spinning = true
|