|
@@ -8,24 +8,24 @@
|
|
|
<a-form-item label="审核时间">
|
|
|
<a-range-picker
|
|
|
style="width:100%"
|
|
|
- id="financialCollectionList-createDate"
|
|
|
+ id="financialCollectionList-auditDate"
|
|
|
:disabledDate="disabledDate"
|
|
|
- v-model="createDate"
|
|
|
+ v-model="auditDate"
|
|
|
:format="dateFormat"
|
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="经销商名称">
|
|
|
- <a-input id="financialCollectionList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入经销商名称"/>
|
|
|
+ <a-input id="financialCollectionList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入经销商名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="商户级别">
|
|
|
<v-select
|
|
|
- v-model="queryParam.billStatus"
|
|
|
- ref="billStatus"
|
|
|
- id="financialCollectionList-billStatus"
|
|
|
+ v-model="queryParam.dealerLevel"
|
|
|
+ ref="dealerLevel"
|
|
|
+ id="financialCollectionList-dealerLevel"
|
|
|
code="DEALER_LEVEL"
|
|
|
placeholder="请选择商户级别"
|
|
|
allowClear></v-select>
|
|
@@ -35,9 +35,9 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="收款方式">
|
|
|
<v-select
|
|
|
- v-model="queryParam.billStatus"
|
|
|
- ref="billStatus"
|
|
|
- id="financialCollectionList-billStatus"
|
|
|
+ v-model="queryParam.settleStyleSn"
|
|
|
+ ref="settleStyleSn"
|
|
|
+ id="financialCollectionList-settleStyleSn"
|
|
|
code="SETTLE_STYLE"
|
|
|
placeholder="请选择收款方式"
|
|
|
allowClear></v-select>
|
|
@@ -51,9 +51,9 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="业务状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.grabFlag"
|
|
|
- ref="grabFlag"
|
|
|
- id="financialCollectionList-grabFlag"
|
|
|
+ v-model="queryParam.billStatus"
|
|
|
+ ref="billStatus"
|
|
|
+ id="financialCollectionList-billStatus"
|
|
|
code="SALES_RECEIVE_LIST_STATUS"
|
|
|
placeholder="请选择业务状态"
|
|
|
allowClear></v-select>
|
|
@@ -74,9 +74,9 @@
|
|
|
<a-form-item label="收款时间">
|
|
|
<a-range-picker
|
|
|
style="width:100%"
|
|
|
- id="financialCollectionList-createDate"
|
|
|
+ id="financialCollectionList-settleDate"
|
|
|
:disabledDate="disabledDate"
|
|
|
- v-model="createDate"
|
|
|
+ v-model="settleDate"
|
|
|
:format="dateFormat"
|
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
|
</a-form-item>
|
|
@@ -85,22 +85,22 @@
|
|
|
<a-row>
|
|
|
<a-form-item label="经销商地区">
|
|
|
<a-col span="7">
|
|
|
- <a-form-item prop="provinceSn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.provinceSn" @change="getCityList" placeholder="请选择省">
|
|
|
+ <a-form-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
+ <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
|
|
|
<a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col span="7" offset="1">
|
|
|
- <a-form-item prop="citySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.citySn" @change="getAreaList" placeholder="请选择市">
|
|
|
+ <a-form-item prop="dealerCitySn" style="margin: 0;">
|
|
|
+ <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
|
|
|
<a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col span="7" offset="1">
|
|
|
- <a-form-item prop="countySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.countySn" placeholder="请选择区/县">
|
|
|
+ <a-form-item prop="dealerCountySn" style="margin: 0;">
|
|
|
+ <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
|
|
|
<a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -132,7 +132,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1460, y: tableHeight }"
|
|
|
+ :scroll="{ x: 1820, y: tableHeight }"
|
|
|
bordered>
|
|
|
<!-- 单号 -->
|
|
|
<template slot="salesBillNo" slot-scope="text, record">
|
|
@@ -143,10 +143,10 @@
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT'"
|
|
|
+ v-if="record.financialStatus=='WAIT'"
|
|
|
class="button-warning"
|
|
|
@click="handleAudit(record)"
|
|
|
- id="financialCollectionList-audit-btn">退货确认</a-button>
|
|
|
+ id="financialCollectionList-audit-btn">收款</a-button>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -158,20 +158,27 @@ import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
import { getArea } from '@/api/data'
|
|
|
-import { salesReceiptList } from '@/api/sales'
|
|
|
+import { salesReceiptList, salesReceipt } from '@/api/sales'
|
|
|
export default {
|
|
|
components: { STable, VSelect, subarea },
|
|
|
data () {
|
|
|
return {
|
|
|
queryParam: { // 查询条件
|
|
|
salesReturnBillNo: '', // 单号
|
|
|
- buyerName: undefined,
|
|
|
- grabFlag: undefined,
|
|
|
- billStatus: undefined // 状态
|
|
|
+ buyerName: '',
|
|
|
+ dealerLevel: undefined,
|
|
|
+ settleStyleSn: undefined,
|
|
|
+ subareaSn: undefined,
|
|
|
+ billStatus: undefined,
|
|
|
+ financialStatus: undefined,
|
|
|
+ dealerProvinceSn: undefined,
|
|
|
+ dealerCitySn: undefined,
|
|
|
+ dealerCountySn: undefined
|
|
|
},
|
|
|
tableHeight: 0,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- createDate: [], // 创建时间
|
|
|
+ auditDate: [], // 审核时间
|
|
|
+ settleDate: [], // 收款时间
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
advanced: false,
|
|
|
columns: [
|
|
@@ -179,12 +186,12 @@ export default {
|
|
|
{ title: '审核时间', dataIndex: 'auditDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 220, align: 'center' },
|
|
|
{ title: '经销商名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '商户级别', dataIndex: 'salesReturnBillSourceDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '商户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '销售数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '订单金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '收款时间', dataIndex: 'settleDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '备注', dataIndex: 'remarks', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '备注', dataIndex: 'remarks', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '业务状态', dataIndex: 'billStatusDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '财务状态', dataIndex: 'financialStatusDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
@@ -195,22 +202,22 @@ export default {
|
|
|
if (this.tableHeight == 0) {
|
|
|
this.tableHeight = window.innerHeight - 380
|
|
|
}
|
|
|
- // // 审核时间
|
|
|
- // if (this.createDate && this.createDate.length > 0) {
|
|
|
- // this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
|
|
|
- // this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
|
|
|
- // } else {
|
|
|
- // this.queryParam.beginDate = undefined
|
|
|
- // this.queryParam.endDate = undefined
|
|
|
- // }
|
|
|
- // // 收款时间
|
|
|
- // if (this.createDate && this.createDate.length > 0) {
|
|
|
- // this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
|
|
|
- // this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
|
|
|
- // } else {
|
|
|
- // this.queryParam.beginDate = undefined
|
|
|
- // this.queryParam.endDate = undefined
|
|
|
- // }
|
|
|
+ // 审核时间
|
|
|
+ if (this.auditDate && this.auditDate.length > 0) {
|
|
|
+ this.queryParam.beginAuditDate = moment(this.auditDate[0]).format(this.dateFormat)
|
|
|
+ this.queryParam.endAuditDate = moment(this.auditDate[1]).format(this.dateFormat)
|
|
|
+ } else {
|
|
|
+ this.queryParam.beginAuditDate = undefined
|
|
|
+ this.queryParam.endAuditDate = undefined
|
|
|
+ }
|
|
|
+ // 收款时间
|
|
|
+ if (this.settleDate && this.settleDate.length > 0) {
|
|
|
+ this.queryParam.beginSettleDate = moment(this.settleDate[0]).format(this.dateFormat)
|
|
|
+ this.queryParam.endSettleDate = moment(this.settleDate[1]).format(this.dateFormat)
|
|
|
+ } else {
|
|
|
+ this.queryParam.beginSettleDate = undefined
|
|
|
+ this.queryParam.endSettleDate = undefined
|
|
|
+ }
|
|
|
return salesReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
const data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
@@ -236,47 +243,37 @@ export default {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.salesReturnBillNo = ''
|
|
|
- this.queryParam.buyerName = undefined
|
|
|
- this.queryParam.grabFlag = undefined
|
|
|
+ this.queryParam.buyerName = ''
|
|
|
+ this.queryParam.dealerLevel = undefined
|
|
|
+ this.queryParam.settleStyleSn = undefined
|
|
|
+ this.queryParam.subareaSn = undefined
|
|
|
this.queryParam.billStatus = undefined
|
|
|
- this.createDate = []
|
|
|
+ this.queryParam.financialStatus = undefined
|
|
|
+ this.queryParam.dealerProvinceSn = undefined
|
|
|
+ this.queryParam.dealerCitySn = undefined
|
|
|
+ this.queryParam.dealerCountySn = undefined
|
|
|
+ this.auditDate = []
|
|
|
+ this.settleDate = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
- this.itemSn = row.salesReturnBillSn
|
|
|
- this.openModal = true
|
|
|
+ this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
|
|
|
},
|
|
|
- closeModal () {
|
|
|
- this.itemSn = ''
|
|
|
- this.openModal = false
|
|
|
- },
|
|
|
- // 单个审核
|
|
|
+ // 收款
|
|
|
handleAudit (row) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '请点击下方按钮确认操作',
|
|
|
+ content: '确认要收款吗?',
|
|
|
centered: true,
|
|
|
- okText: '通过',
|
|
|
- cancelText: '不通过',
|
|
|
onOk () {
|
|
|
- _this.auditOrder(row.salesReturnBillSn, 'FINISH')
|
|
|
- },
|
|
|
- onCancel (e) {
|
|
|
- if (!e.triggerCancel) {
|
|
|
- _this.auditOrder(row.salesReturnBillSn, 'FINANCIAL_REJECT')
|
|
|
- }
|
|
|
- _this.$destroyAll()
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- auditOrder (sn, flag) {
|
|
|
- const _this = this
|
|
|
- salesReturnFinancial({ salesReturnBillSn: sn, billStatus: flag }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.$message.success(res.message)
|
|
|
- _this.$refs.table.refresh()
|
|
|
+ salesReceipt({ sn: row.salesBillSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -284,7 +281,7 @@ export default {
|
|
|
getCityList (val) {
|
|
|
this.addrCityList = []
|
|
|
this.addrDistrictList = []
|
|
|
- this.queryParam.citySn = undefined
|
|
|
+ this.queryParam.dealerCitySn = undefined
|
|
|
this.queryParam.districtSn = undefined
|
|
|
this.getArea('city', val)
|
|
|
},
|