|
@@ -12,7 +12,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="经销商名称">
|
|
|
- <a-input id="financialCollectionList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入经销商名称"/>
|
|
|
+ <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入经销商名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -30,9 +30,9 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="收款方式">
|
|
|
<v-select
|
|
|
- v-model="queryParam.settleStyleSn"
|
|
|
- ref="settleStyleSn"
|
|
|
- id="financialCollectionList-settleStyleSn"
|
|
|
+ v-model="queryParam.settleStyle"
|
|
|
+ ref="settleStyle"
|
|
|
+ id="financialCollectionList-settleStyle"
|
|
|
code="SETTLE_STYLE"
|
|
|
placeholder="请选择收款方式"
|
|
|
allowClear></v-select>
|
|
@@ -49,7 +49,7 @@
|
|
|
v-model="queryParam.billStatus"
|
|
|
ref="billStatus"
|
|
|
id="financialCollectionList-billStatus"
|
|
|
- code="SALES_RECEIVE_LIST_STATUS"
|
|
|
+ code="DISPATCH_BILL_STATUS"
|
|
|
placeholder="请选择业务状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -57,9 +57,9 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="财务状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.financialStatus"
|
|
|
- ref="financialStatus"
|
|
|
- id="financialCollectionList-financialStatus"
|
|
|
+ v-model="queryParam.settleState"
|
|
|
+ ref="settleState"
|
|
|
+ id="financialCollectionList-settleState"
|
|
|
code="FINANCIAL_RECEIVE_STATUS"
|
|
|
placeholder="请选择财务状态"
|
|
|
allowClear></v-select>
|
|
@@ -122,15 +122,24 @@
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<!-- 单号 -->
|
|
|
- <template slot="salesBillNo" slot-scope="text, record">
|
|
|
- <span :class="$hasPermissions('B_salesDetail')?'active':'common'" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
+ <template slot="bizNo" slot-scope="text, record">
|
|
|
+ <span :class="$hasPermissions('B_salesDetail')?'active':'common'"v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.bizNo }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 下推单号 -->
|
|
|
+ <template slot="dispatchBillNo" slot-scope="text, record">
|
|
|
+ <span :class="$hasPermissions('B_dispatchDetail')?'active':'common'" v-if="$hasPermissions('B_dispatchDetail')" @click="handleBhDetail(record)">{{ record.dispatchBillNo || '--' }}</span>
|
|
|
+ <span v-else>{{ record.dispatchBillNo || '--' }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 单据状态 -->
|
|
|
+ <template slot="voidFlag" slot-scope="text, record">
|
|
|
+ <span>{{ record.voidFlag==1 ? '作废' : record.voidFlag==0 ? '有效' : '--' }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.financialStatus=='WAIT' && $hasPermissions('B_financialCollection_receipt')"
|
|
|
+ v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')"
|
|
|
class="button-warning"
|
|
|
@click="handleAudit(record)"
|
|
|
id="financialCollectionList-audit-btn">收款</a-button>
|
|
@@ -148,7 +157,7 @@ import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
import { getArea } from '@/api/data'
|
|
|
-import { salesReceiptList, salesReceipt } from '@/api/sales'
|
|
|
+import { settleReceiptList, settleReceipt } from '@/api/settleReceipt'
|
|
|
export default {
|
|
|
components: { STable, VSelect, subarea, rangeDate },
|
|
|
data () {
|
|
@@ -156,16 +165,16 @@ export default {
|
|
|
spinning: false,
|
|
|
tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
- beginAuditDate: getDate.getThreeMonthDays().starttime,
|
|
|
- endAuditDate: getDate.getCurrMonthDays().endtime,
|
|
|
- beginSettleDate: '',
|
|
|
- endSettleDate: '',
|
|
|
- buyerName: '',
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
|
|
|
+ beginDateSettle: '',
|
|
|
+ endDateSettle: '',
|
|
|
+ settleClientName: '',
|
|
|
dealerLevel: undefined,
|
|
|
- settleStyleSn: undefined,
|
|
|
+ settleStyle: undefined,
|
|
|
subareaSn: undefined,
|
|
|
billStatus: undefined,
|
|
|
- financialStatus: undefined,
|
|
|
+ settleState: undefined,
|
|
|
dealerProvinceSn: undefined,
|
|
|
dealerCitySn: undefined,
|
|
|
dealerCountySn: undefined
|
|
@@ -180,14 +189,17 @@ export default {
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return salesReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
- const data = res.data
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
+ return settleReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.total = data.count || 0
|
|
|
+ this.disabled = false
|
|
|
}
|
|
|
- this.total = data.count || 0
|
|
|
- this.disabled = false
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
@@ -202,22 +214,23 @@ export default {
|
|
|
computed: {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '审核时间', dataIndex: 'auditDate', width: '11.5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '15%', align: 'center' },
|
|
|
- { title: '经销商名称', dataIndex: 'buyerName', align: 'center', width: '12%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '商户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '销售数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- // { title: '订单金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '收款时间', dataIndex: 'settleDate', width: '11.5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '备注', dataIndex: 'remarks', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '审核时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '10%', align: 'center' },
|
|
|
+ { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
|
|
|
+ { title: '经销商名称', dataIndex: 'settleClientName', align: 'left', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '销售金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '收款时间', dataIndex: 'settleTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收款方式', dataIndex: 'settleStyleDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '备注', dataIndex: 'remark', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单据状态', dataIndex: 'voidFlag', scopedSlots: { customRender: 'voidFlag' }, width: '6%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
|
|
|
]
|
|
|
if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
- arr.splice(6, 0, { title: '订单金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(6, 0, { title: '销售金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -225,13 +238,13 @@ export default {
|
|
|
methods: {
|
|
|
// 审核时间 change
|
|
|
dateAuditChange (date) {
|
|
|
- this.queryParam.beginAuditDate = date[0]
|
|
|
- this.queryParam.endAuditDate = date[1]
|
|
|
+ this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
|
|
|
+ this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
|
|
|
},
|
|
|
// 收款时间 change
|
|
|
dateSettleChange (date) {
|
|
|
- this.queryParam.beginSettleDate = date[0]
|
|
|
- this.queryParam.endSettleDate = date[1]
|
|
|
+ this.queryParam.beginDateSettle = date[0] ? date[0] + ' 00:00:00' : ''
|
|
|
+ this.queryParam.endDateSettle = date[1] ? date[1] + ' 23:59:59' : ''
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
@@ -239,16 +252,16 @@ export default {
|
|
|
if (this.advanced) { // 查询条件未展开时,该组件未渲染
|
|
|
this.$refs.rangeSettleDate.resetDate()
|
|
|
}
|
|
|
- this.queryParam.beginAuditDate = getDate.getThreeMonthDays().starttime
|
|
|
- this.queryParam.endAuditDate = getDate.getCurrMonthDays().endtime
|
|
|
- this.queryParam.beginSettleDate = ''
|
|
|
- this.queryParam.endSettleDate = ''
|
|
|
- this.queryParam.buyerName = ''
|
|
|
+ this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
|
|
|
+ this.queryParam.beginDateSettle = ''
|
|
|
+ this.queryParam.endDateSettle = ''
|
|
|
+ this.queryParam.settleClientName = ''
|
|
|
this.queryParam.dealerLevel = undefined
|
|
|
- this.queryParam.settleStyleSn = undefined
|
|
|
+ this.queryParam.settleStyle = undefined
|
|
|
this.queryParam.subareaSn = undefined
|
|
|
this.queryParam.billStatus = undefined
|
|
|
- this.queryParam.financialStatus = undefined
|
|
|
+ this.queryParam.settleState = undefined
|
|
|
this.queryParam.dealerProvinceSn = undefined
|
|
|
this.queryParam.dealerCitySn = undefined
|
|
|
this.queryParam.dealerCountySn = undefined
|
|
@@ -256,9 +269,10 @@ export default {
|
|
|
},
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
- if (this.$hasPermissions('B_salesDetail')) {
|
|
|
- this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
|
|
|
- }
|
|
|
+ this.$router.push({ name: 'salesDetail', params: { sn: row.bizSn, type: 'financialCollection' } })
|
|
|
+ },
|
|
|
+ handleBhDetail (row) {
|
|
|
+ this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'financialCollection' } })
|
|
|
},
|
|
|
// 收款
|
|
|
handleAudit (row) {
|
|
@@ -269,7 +283,7 @@ export default {
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- salesReceipt({ sn: row.salesBillSn }).then(res => {
|
|
|
+ settleReceipt({ sn: row.accountReceiptSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|