|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <a-card size="small" :bordered="false" class="shelfSetList-wrap jg-page-wrap">
|
|
|
|
|
|
+ <a-card size="small" :bordered="false" class="storeAccount-wrap jg-page-wrap">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
@@ -7,17 +7,17 @@
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="货架名称">
|
|
<a-form-item label="货架名称">
|
|
- <shelfSList v-model="queryParam.shelfSn" id="shelfSetList-shelfName"></shelfSList>
|
|
|
|
|
|
+ <shelfSList v-model="queryParam.shelfSn" id="storeAccount-shelfName"></shelfSList>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="关联客户">
|
|
<a-form-item label="关联客户">
|
|
- <custList ref="custList" id="shelfSetList-custList" @change="custChange" :isEnabled="true"></custList>
|
|
|
|
|
|
+ <custList ref="custList" id="storeAccount-custList" @change="custChange" :isEnabled="true"></custList>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px">
|
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shelfSetList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shelfSetList-reset">重置</a-button>
|
|
|
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeAccount-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeAccount-reset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -25,12 +25,12 @@
|
|
<!-- 统计 -->
|
|
<!-- 统计 -->
|
|
<div class="table-operator" style="margin-bottom:10px;">
|
|
<div class="table-operator" style="margin-bottom:10px;">
|
|
<div class="alert-message">
|
|
<div class="alert-message">
|
|
- 总充值:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
|
|
|
|
- 已用充值:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
|
|
|
|
- 充值余额:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
|
- 总补贴:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>;
|
|
|
|
- 已用补贴:<strong>{{ totalData&&(totalData.paymentAmount || totalData.paymentAmount==0) ? toThousands(totalData.paymentAmount) : '--' }}</strong>;
|
|
|
|
- 补贴余额:<strong>{{ totalData&&(totalData.refundingAmount || totalData.refundingAmount==0) ? toThousands(totalData.refundingAmount) : '--' }}</strong>;
|
|
|
|
|
|
+ 总充值:<strong>{{ totalData&&(totalData.totalRecharge || totalData.totalRecharge==0) ? toThousands(totalData.totalRecharge) : '--' }}</strong>;
|
|
|
|
+ 已用充值:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? toThousands(totalData.totalCategory) : '--' }}</strong>;
|
|
|
|
+ 充值余额:<strong>{{ totalData&&(totalData.rechargeBalance || totalData.rechargeBalance==0) ? toThousands(totalData.rechargeBalance) : '--' }}</strong>;
|
|
|
|
+ 总抵扣:<strong>{{ totalData&&(totalData.totalGive || totalData.totalGive==0) ? toThousands(totalData.totalGive) : '--' }}</strong>;
|
|
|
|
+ 已用抵扣:<strong>{{ totalData&&(totalData.paymentAmount || totalData.paymentAmount==0) ? toThousands(totalData.paymentAmount) : '--' }}</strong>;
|
|
|
|
+ 抵扣余额:<strong>{{ totalData&&(totalData.giveBalance || totalData.giveBalance==0) ? toThousands(totalData.giveBalance) : '--' }}</strong>;
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
@@ -45,11 +45,21 @@
|
|
:scroll="{ y: tableHeight }"
|
|
:scroll="{ y: tableHeight }"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <!-- 充值余额 -->
|
|
|
|
+ <template slot="rechargeBalance" slot-scope="text, record">
|
|
|
|
+ <span class="table-td-link" :id="'storeAccount-recharge'+record.id" v-if="$hasPermissions('B_salesDetail')" @click="handleFlow(record,'1')">{{ (record.rechargeBalance||record.rechargeBalance==0)?toThousands(record.rechargeBalance):'--' }}</span>
|
|
|
|
+ <span v-else>{{ (record.rechargeBalance||record.rechargeBalance==0)?toThousands(record.rechargeBalance):'--' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 抵扣余额 -->
|
|
|
|
+ <template slot="giveBalance" slot-scope="text, record">
|
|
|
|
+ <span class="table-td-link" :id="'storeAccount-give'+record.id" v-if="$hasPermissions('B_salesDetail')" @click="handleFlow(record,'2')">{{ (record.giveBalance||record.giveBalance==0)?toThousands(record.giveBalance):'--' }}</span>
|
|
|
|
+ <span v-else>{{ (record.giveBalance||record.giveBalance==0)?toThousands(record.giveBalance):'--' }}</span>
|
|
|
|
+ </template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button id="shelfSetList-setView" size="small" type="link" class="button-primary" @click="handleClearRecord(record)">清零记录</a-button>
|
|
|
|
|
|
+ <a-button :id="'storeAccount-clearRecord'+record.id" size="small" type="link" class="button-primary" @click="handleClearRecord(record)">清零记录</a-button>
|
|
<a-button
|
|
<a-button
|
|
- :id="'shelfSetList-cancel-'+record.id"
|
|
|
|
|
|
+ :id="'storeAccount-ZeroClear-'+record.id"
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-error"
|
|
class="button-error"
|
|
@@ -69,16 +79,17 @@
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
// 组件
|
|
// 组件
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
|
|
+import { STable } from '@/components'
|
|
import custList from '@/views/common/custList.vue' // 客户列表组件
|
|
import custList from '@/views/common/custList.vue' // 客户列表组件
|
|
import shelfSList from '@/views/common/shelfList' // 货架列表组件
|
|
import shelfSList from '@/views/common/shelfList' // 货架列表组件
|
|
import transactionFlowModal from './transactionFlowModal.vue' // 交易流水弹框
|
|
import transactionFlowModal from './transactionFlowModal.vue' // 交易流水弹框
|
|
-import zeroClearingModal from './zeroClearingModal.vue' // 交易流水弹框
|
|
|
|
|
|
+import zeroClearingModal from './zeroClearingModal.vue' // 清零弹框
|
|
import clearRecordModal from './clearRecordModal.vue' // 清零记录弹框
|
|
import clearRecordModal from './clearRecordModal.vue' // 清零记录弹框
|
|
// 接口
|
|
// 接口
|
|
-import { shelfList, modifFinishFlag, shelfModifState } from '@/api/shelf' // 接口api
|
|
|
|
|
|
+import { storeAccountList, storeAccountCount } from '@/api/storeAccount' // 接口api
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
- components: { STable, VSelect, custList, shelfSList, transactionFlowModal, zeroClearingModal, clearRecordModal },
|
|
|
|
|
|
+ components: { STable, custList, shelfSList, transactionFlowModal, zeroClearingModal, clearRecordModal },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -86,36 +97,36 @@ export default {
|
|
spinning: false, // loading
|
|
spinning: false, // loading
|
|
tableHeight: 0, // 表格高度
|
|
tableHeight: 0, // 表格高度
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
- showTip: false, // 注销弹框
|
|
|
|
queryParam: {
|
|
queryParam: {
|
|
shelfSn: undefined, // 货架sn
|
|
shelfSn: undefined, // 货架sn
|
|
customerSn: undefined, // 关联客户sn
|
|
customerSn: undefined, // 关联客户sn
|
|
- finishFlag: undefined, // 是否完成设置
|
|
|
|
customerEntity: { // 关联客户名称
|
|
customerEntity: { // 关联客户名称
|
|
customerName: undefined
|
|
customerName: undefined
|
|
}
|
|
}
|
|
},
|
|
},
|
|
modalType: '1',
|
|
modalType: '1',
|
|
- openFlowModal: true, // 打开 交易流水弹窗
|
|
|
|
|
|
+ openFlowModal: false, // 打开 交易流水弹窗
|
|
openZeroClearModal: false, // 打开 清零弹窗
|
|
openZeroClearModal: false, // 打开 清零弹窗
|
|
openClearRecordModal: false, // 打开 清零记录弹窗
|
|
openClearRecordModal: false, // 打开 清零记录弹窗
|
|
|
|
+ totalData: null, // 统计数据
|
|
// 列定义
|
|
// 列定义
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
- { title: '创建时间', dataIndex: 'customerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '货架名称', dataIndex: 'customerEntity1', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '关联客户', dataIndex: 'customerEntity.customerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '总充值', dataIndex: 'customerName1', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
|
|
|
|
- { title: '总补贴', dataIndex: 'customerName2', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
|
|
|
|
- { title: '充值余额', dataIndex: 'customerName3', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
|
|
|
|
- { title: '补贴余额', dataIndex: 'customerName4', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
|
|
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '货架名称', dataIndex: 'shelfName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '关联客户', dataIndex: 'customerName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '总充值', dataIndex: 'totalRecharge', width: '12%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
|
|
|
|
+ { title: '总抵扣', dataIndex: 'totalGive', width: '12%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
|
|
|
|
+ { title: '充值余额', dataIndex: 'rechargeBalance', width: '12%', align: 'right', scopedSlots: { customRender: 'rechargeBalance' } },
|
|
|
|
+ { title: '抵扣余额', dataIndex: 'giveBalance', width: '12%', align: 'right', scopedSlots: { customRender: 'giveBalance' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return shelfList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ return storeAccountList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -123,17 +134,29 @@ export default {
|
|
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
|
|
}
|
|
}
|
|
|
|
+ this.getCount(params)
|
|
this.disabled = false
|
|
this.disabled = false
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
- },
|
|
|
|
- openModal: false, // 新增编辑弹框
|
|
|
|
- nowData: null // 当前操作行数据
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 统计
|
|
|
|
+ getCount (val) {
|
|
|
|
+ storeAccountCount(val).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.totalData = res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 交易流水 1 充值余额 2抵扣余额
|
|
|
|
+ handleFlow (row, type) {
|
|
|
|
+ this.modalType = type
|
|
|
|
+ this.openFlowModal = true
|
|
|
|
+ },
|
|
// 设置/修改
|
|
// 设置/修改
|
|
handleClearRecord (row) {
|
|
handleClearRecord (row) {
|
|
this.openClearRecordModal = true
|
|
this.openClearRecordModal = true
|