+
挂账人
- {{record.personCredit}}
+ {{ record.personCredit }}
-
+
联系电话
- {{record.contactMobile}}
+ {{ record.contactMobile }}
@@ -205,11 +200,11 @@
归还
-
-
+
+
- {{ getPayMeth(payList,scope.row.status) }}
+ {{ getPayMeth(payList, scope.row.status) }}
@@ -219,7 +214,7 @@
支付失败
-
+
{{ parseTime(scope.row.payTime) }}
@@ -254,48 +249,51 @@ import {
import {getDicts} from "@/api/order/data";
import {listReturnRecord} from "@/api/order/returnrecord";
import {exportExcelHangBillApi} from "@/api/order/exportExcel";
+import {queryStaffs} from "@/api/order/staff";
export default {
name: "order_Cashier",
- data(){
- return{
+ data() {
+ return {
queryParams1: {
page: 1,
pageSize: 10,
- hangBillId:"",
+ hangBillId: "",
},
- hangBillList:[],
- total:0,
- total2:0,
- loading:false,
- queryParams:{
- page:1,
- pageSize:10,
- returnType:"",
- status:"",
- unitName:"",
- personCredit:"",
- contactMobile:"",
- mobile:"",
+ hangBillList: [],
+ total: 0,
+ total2: 0,
+ loading: false,
+ queryParams: {
+ page: 1,
+ pageSize: 10,
+ returnType: "",
+ status: "",
+ unitName: "",
+ personCredit: "",
+ contactMobile: "",
+ mobile: "",
},
- dateRange:[],
- beginTime:"",
- endTime:"",
- returnRecordList:[],
- payList:[],
+ dateRange: [],
+ beginTime: "",
+ endTime: "",
+ returnRecordList: [],
+ payList: [],
+ // 员工列表
+ staffList: [],
// 归还账单总数
- returnTotal:0,
+ returnTotal: 0,
// 挂账总额
- allAmount:0,
+ allAmount: 0,
// 归还总额
- returnAllAmount:0,
+ returnAllAmount: 0,
// 未归还总额
- noReturnAllAmount:0,
- drawer:false,
+ noReturnAllAmount: 0,
+ drawer: false,
// 挂账信息
- record:{},
+ record: {},
// 是否为当天时间
- isSysDate:false,
+ isSysDate: false,
}
},
created() {
@@ -304,7 +302,7 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.dateRange = [start,new Date()];
+ this.dateRange = [start, new Date()];
this.beginTime = start
this.endTime = new Date()
this.isSysDate = true
@@ -316,30 +314,37 @@ export default {
exportExcelCashier() {
// this.dateRange.push(this.beginTime)
// this.dateRange.push(this.endTime)
- let dateRange = []
- if (this.beginTime && this.endTime) {
- dateRange.push(this.beginTime.toLocaleDateString())
- dateRange.push(this.endTime.toLocaleDateString())
- }
- exportExcelHangBillApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
- const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
- this.$download.saveAs(blob,'挂账订单统计.xLsx')
- })
+ this.$confirm('是否导出列表中的数据!', '提示', {
+ confirmButtonText: '导出',
+ cancelButtonText: '取消'
+ }).then(() => {
+ let dateRange = []
+ if (this.beginTime && this.endTime) {
+ dateRange.push(this.beginTime.toLocaleDateString())
+ dateRange.push(this.endTime.toLocaleDateString())
+ }
+ exportExcelHangBillApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
+ const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
+ this.$download.saveAs(blob, '挂账订单统计.xLsx')
+ })
+ }).catch(() => {
+
+ });
},
// 归还记录详情弹框
- returnRecord(id){
+ returnRecord(id) {
this.record = {}
this.drawer = true
hangBillInfo(id).then(response => {
this.record = response.data
})
- this.getRecordList(id,1);
+ this.getRecordList(id, 1);
},
- getRecordList(id,val){
- if (val!=1){
+ getRecordList(id, val) {
+ if (val != 1) {
this.queryParams1.page = id
this.queryParams1.hangBillId = this.record.id
- }else {
+ } else {
this.queryParams1.hangBillId = id
}
listReturnRecord(this.queryParams1).then(response => {
@@ -352,12 +357,15 @@ export default {
getDicts("payment_type").then(response => {
this.payList = response.data;
})
+ queryStaffs().then(response => {
+ this.staffList = response.data;
+ })
},
- getPayMeth(list,val){
+ getPayMeth(list, val) {
let name = "";
- if (list!=null && list!=""){
+ if (list != null && list != "") {
list.forEach(item => {
- if (item.dictValue == val){
+ if (item.dictValue == val) {
name = item.dictLabel
}
})
@@ -368,8 +376,8 @@ export default {
handleClose(done) {
done();
},
- getList(val){
- if (val!=undefined){
+ getList(val) {
+ if (val != undefined) {
this.queryParams.page = val
}
@@ -387,7 +395,7 @@ export default {
dateRange.push(this.endTime.toLocaleDateString())
}
- listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
+ listHangBill(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.hangBillList = response.data.records
this.total = response.data.total;
this.isSysDate = false
@@ -395,7 +403,7 @@ export default {
this.getStatistic();
},
// 获取挂账统计信息
- getStatistic(){
+ getStatistic() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
@@ -406,17 +414,17 @@ export default {
})
hangBillAllAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
// if (res.data) {
- this.allAmount = res.data
+ this.allAmount = res.data
// }
})
hangBillAllReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
// if (res.data) {
- this.returnAllAmount = res.data
+ this.returnAllAmount = res.data
// }
})
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
// if (res.data) {
- this.noReturnAllAmount = res.data
+ this.noReturnAllAmount = res.data
// }
})
},
@@ -439,27 +447,31 @@ export default {