|
@@ -104,7 +104,12 @@
|
|
|
</div>
|
|
|
<!-- alert -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div slot="message">总售价:<strong>13.00</strong>元;总单数:<strong>13.00</strong>;总款数:<strong>13.00</strong>;总数量:<strong>13.00</strong>;</div>
|
|
|
+ <div slot="message">
|
|
|
+ 总售价:<strong>{{ totalData.totalAmount }}</strong>元;
|
|
|
+ 总单数:<strong>{{ totalData.totalRecord }}</strong>;
|
|
|
+ 总款数:<strong>{{ totalData.totalCategory }}</strong>;
|
|
|
+ 总数量:<strong>{{ totalData.totalQty }}</strong>;
|
|
|
+ </div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
@@ -118,11 +123,11 @@
|
|
|
bordered>
|
|
|
<!-- 业务/审核状态 -->
|
|
|
<template slot="billStatus" slot-scope="text, record">
|
|
|
- <a-tag :color="record.state=='FINISH'?'green':'red'" >{{ record.state=='FINISH'? '待备货审核': '待单据审核' }}</a-tag>
|
|
|
+ <a-tag :color="record.state=='FINISH'?'green':'red'" >{{ record.billStatus }}</a-tag>
|
|
|
</template>
|
|
|
<!-- 财务状态 -->
|
|
|
<template slot="financialStatus" slot-scope="text, record">
|
|
|
- <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '待提交': '待单据审核' }}</a-tag>
|
|
|
+ <a-tag :color="record.state==1?'green':'red'" >{{ record.financialStatus }}</a-tag>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -143,7 +148,7 @@ import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
import { custAllList } from '@/api/customer'
|
|
|
-import { salesList, salesDel, salesWriteAudit, salesWriteStockOut } from '@/api/sales'
|
|
|
+import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount } from '@/api/sales'
|
|
|
export default {
|
|
|
name: 'TableList',
|
|
|
components: { STable, VSelect, chooseCustomModal },
|
|
@@ -165,6 +170,12 @@ export default {
|
|
|
billStatus: undefined, // 业务状态
|
|
|
financialStatus: undefined // 财务状态
|
|
|
},
|
|
|
+ totalData: {
|
|
|
+ totalAmount: 0,
|
|
|
+ totalCategory: 0,
|
|
|
+ totalQty: 0,
|
|
|
+ totalRecord: 0
|
|
|
+ },
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
@@ -178,7 +189,7 @@ export default {
|
|
|
{ title: '收款方式', dataIndex: 'settleStyle', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '急件', dataIndex: 'urgentFlag', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 110, align: 'center' },
|
|
|
+ { title: '业务状态', scopedSlots: { customRender: 'billStatus' }, width: 110, align: 'center' },
|
|
|
{ title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 300, align: 'center', fixed: 'right' }
|
|
|
],
|
|
@@ -193,6 +204,11 @@ export default {
|
|
|
this.queryParam.beginDate = undefined
|
|
|
this.queryParam.endDate = undefined
|
|
|
}
|
|
|
+ // 查询总计
|
|
|
+ salesCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.totalData = Object.assign(this.totalData, res.data || {})
|
|
|
+ })
|
|
|
return salesList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
const data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
@@ -309,7 +325,7 @@ export default {
|
|
|
this.queryParam.purchaseBillNo = ''
|
|
|
this.queryParam.payType = undefined
|
|
|
this.queryParam.settleStyle = undefined
|
|
|
- this.queryParam.auditStatus = undefined
|
|
|
+ this.queryParam.billStatus = undefined
|
|
|
this.queryParam.financialStatus = undefined
|
|
|
this.time = []
|
|
|
this.$refs.table.refresh(true)
|