|
@@ -6,118 +6,47 @@
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="审核时间">
|
|
|
+ <a-form-item label="创建时间">
|
|
|
<rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="销售单号">
|
|
|
- <a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
|
|
|
+ <a-form-item label="收款单号">
|
|
|
+ <a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入收款单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="备货单号">
|
|
|
+ <a-form-item label="关联备货单号">
|
|
|
<a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="客户名称">
|
|
|
- <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入经销商名称"/>
|
|
|
+ <a-form-item label="申请人">
|
|
|
+ <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入申请人"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="商户级别">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.dealerLevel"
|
|
|
- ref="dealerLevel"
|
|
|
- id="financialCollectionList-dealerLevel"
|
|
|
- code="DEALER_LEVEL"
|
|
|
- placeholder="请选择商户级别"
|
|
|
- allowClear></v-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="收款方式">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.settleStyle"
|
|
|
- ref="settleStyle"
|
|
|
- id="financialCollectionList-settleStyle"
|
|
|
- code="SETTLE_STYLE"
|
|
|
- placeholder="请选择收款方式"
|
|
|
- allowClear></v-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="区域">
|
|
|
- <subarea id="financialCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
|
+ <a-form-item label="收款事由">
|
|
|
+ <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" 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"
|
|
|
- code="DISPATCH_BILL_STATUS"
|
|
|
- placeholder="请选择业务状态"
|
|
|
- allowClear></v-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="财务状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.settleState"
|
|
|
- ref="settleState"
|
|
|
- id="financialCollectionList-settleState"
|
|
|
- code="FINANCIAL_RECEIVE_STATUS"
|
|
|
- placeholder="请选择财务状态"
|
|
|
- allowClear></v-select>
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="单据状态">
|
|
|
+ <a-form-item label="状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.voidFlag"
|
|
|
ref="voidFlag"
|
|
|
id="financialCollectionList-voidFlag"
|
|
|
code="VOID_FLAG"
|
|
|
- placeholder="请选择单据状态"
|
|
|
+ placeholder="请选择状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="收款时间">
|
|
|
- <rangeDate ref="rangeSettleDate" @change="dateSettleChange" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="12" :sm="24">
|
|
|
- <a-row>
|
|
|
- <a-form-item label="经销商地区">
|
|
|
- <a-col span="7">
|
|
|
- <a-form-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerProvinceSn" allowClear @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="dealerCitySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerCitySn" allowClear @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="dealerCountySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerCountySn" allowClear 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>
|
|
|
- </a-col>
|
|
|
- </a-form-item>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
|
|
@@ -130,6 +59,10 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
|
|
|
+ </div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
@@ -157,14 +90,14 @@
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')"
|
|
|
class="button-warning"
|
|
|
- @click="handleAudit(record)"
|
|
|
- id="financialCollectionList-audit-btn">收款</a-button>
|
|
|
- <span v-else>--</span>
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ id="financialCollectionList-audit-btn">编辑</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
+ <!-- 基础信息 -->
|
|
|
+ <baseModal :show="openModal" @cancel="openModal=false"></baseModal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -174,16 +107,16 @@ import moment from 'moment'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
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 baseModal from './baseModal.vue'
|
|
|
import { settleReceiptList, settleReceipt } from '@/api/settleReceipt'
|
|
|
export default {
|
|
|
name: 'FinancialCollectionList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, subarea, rangeDate },
|
|
|
+ components: { STable, VSelect, rangeDate, baseModal },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
+ openModal: false,
|
|
|
tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
|
|
@@ -195,7 +128,6 @@ export default {
|
|
|
settleClientName: '',
|
|
|
dealerLevel: undefined,
|
|
|
settleStyle: undefined,
|
|
|
- subareaSn: undefined,
|
|
|
billStatus: undefined,
|
|
|
settleState: undefined,
|
|
|
voidFlag: undefined,
|
|
@@ -238,24 +170,19 @@ export default {
|
|
|
computed: {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
- { 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: 'voidFlagDictValue', width: '6%', 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: 'totalAmount', 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: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ 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 : '--') } })
|
|
|
- }
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
@@ -285,7 +212,6 @@ export default {
|
|
|
this.queryParam.settleClientName = ''
|
|
|
this.queryParam.dealerLevel = undefined
|
|
|
this.queryParam.settleStyle = undefined
|
|
|
- this.queryParam.subareaSn = undefined
|
|
|
this.queryParam.billStatus = undefined
|
|
|
this.queryParam.settleState = undefined
|
|
|
this.queryParam.voidFlag = undefined
|
|
@@ -294,6 +220,10 @@ export default {
|
|
|
this.queryParam.dealerCountySn = undefined
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
+ // 新增
|
|
|
+ handleAdd () {
|
|
|
+ this.openModal = true
|
|
|
+ },
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
this.$router.push({ name: 'salesDetail', params: { sn: row.bizSn, type: 'financialCollection' } })
|
|
@@ -301,79 +231,15 @@ export default {
|
|
|
handleBhDetail (row) {
|
|
|
this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'financialCollection' } })
|
|
|
},
|
|
|
- // 收款
|
|
|
- handleAudit (row) {
|
|
|
- const _this = this
|
|
|
- this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: '确认要收款吗?',
|
|
|
- centered: true,
|
|
|
- onOk () {
|
|
|
- _this.spinning = true
|
|
|
- settleReceipt({ sn: row.accountReceiptSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.$message.success(res.message)
|
|
|
- _this.$refs.table.refresh()
|
|
|
- _this.spinning = false
|
|
|
- } else {
|
|
|
- _this.spinning = false
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取城市列表
|
|
|
- getCityList (val) {
|
|
|
- this.addrCityList = []
|
|
|
- this.addrDistrictList = []
|
|
|
- this.queryParam.dealerCitySn = undefined
|
|
|
- this.queryParam.dealerCountySn = undefined
|
|
|
- if (val) {
|
|
|
- this.getArea('city', val)
|
|
|
- }
|
|
|
- },
|
|
|
- // 获取区县列表
|
|
|
- getAreaList (val) {
|
|
|
- this.addrDistrictList = []
|
|
|
- this.queryParam.dealerCountySn = undefined
|
|
|
- if (val) {
|
|
|
- this.getArea('district', val)
|
|
|
- }
|
|
|
- },
|
|
|
- // 省/市/区
|
|
|
- getArea (leve, sn) {
|
|
|
- let params
|
|
|
- if (leve == 'province') {
|
|
|
- params = { type: '2' }
|
|
|
- } else {
|
|
|
- params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
|
|
|
- }
|
|
|
- getArea(params).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- if (leve == 'province') {
|
|
|
- this.addrProvinceList = res.data || []
|
|
|
- } else if (leve == 'city') {
|
|
|
- this.addrCityList = res.data || []
|
|
|
- } else if (leve == 'district') {
|
|
|
- this.addrDistrictList = res.data || []
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (leve == 'province') {
|
|
|
- this.addrProvinceList = []
|
|
|
- } else if (leve == 'city') {
|
|
|
- this.addrCityList = []
|
|
|
- } else if (leve == 'district') {
|
|
|
- this.addrDistrictList = []
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ // 编辑
|
|
|
+ handleEdit (row) {
|
|
|
+ this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bizSn } })
|
|
|
},
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
- this.getArea('province')
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|