diff --git a/fuintAdmin_zt/src/views/Service/index.vue b/fuintAdmin_zt/src/views/Service/index.vue index 2b37e6226..47df0a5f3 100644 --- a/fuintAdmin_zt/src/views/Service/index.vue +++ b/fuintAdmin_zt/src/views/Service/index.vue @@ -251,23 +251,7 @@ export default { label: '北京烤鸭' }], value: '', - tableData: [{ - date: '2016-05-02', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }, { - date: '2016-05-04', - name: '王小虎', - address: '上海市普陀区金沙江路 1517 弄' - }, { - date: '2016-05-01', - name: '王小虎', - address: '上海市普陀区金沙江路 1519 弄' - }, { - date: '2016-05-03', - name: '王小虎', - address: '上海市普陀区金沙江路 1516 弄' - }], + tableData: [], form: { name: '', region: '', diff --git a/fuintAdmin_zt/src/views/Site/add.vue b/fuintAdmin_zt/src/views/Site/add.vue index 4968524c3..6aa56c9aa 100644 --- a/fuintAdmin_zt/src/views/Site/add.vue +++ b/fuintAdmin_zt/src/views/Site/add.vue @@ -33,51 +33,7 @@ export default { ], }, dutyId:'', - tableData: [{ - id: 1, - label: '系统首页', - list: [{show: true, name: '选中'},] - }, { - id: 2, - label: '机构管理', - childrens: [ - { - id: 3, - label: '组织架构', - name: '王小虎', - address: '上海市普陀区金沙江路 1519 弄', - - childrens: [{ - id: 31, - label: '用户信息', - - list: [{show: true, name: '新增'}, {show: true, name: '修改'}, {show: true, name: '重置密码'},] - }, { - id: 32, - label: '机构信息', - - list: [{show: true, name: '保存'},] - }] - }, - ] - // list:[{show:true,name:'选项一'},{show:true,name:'选项二'},{show:true,name:'选项三'},] - - }, { - id: 4, - label: '财务报表', - childrens: [{ - id: 33, - label: '交易对账', - - list: [{show: true, name: '导出订单'}] - }, { - id: 34, - label: '流水分析', - - list: [{show: true, name: '导出订单'},] - }], - - }], + tableData: [], deptListSelect: [], }; }, diff --git a/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paym.vue b/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paym.vue index cf6232f62..bc8def229 100644 --- a/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paym.vue +++ b/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paym.vue @@ -3,104 +3,80 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
+ {{ item }} +
+ v-model="value2" + type="datetimerange" + range-separator="至" + value-format="yyyy-MM-dd HH:mm:ss" + start-placeholder="开始日期" + end-placeholder="结束日期" @click="handleQuery"> - 至 - - - - - 搜索 - 重置 - +
+ + + + + + + + 搜索 + 重置 + +
+
-
交易金额汇总数(万元)/交易笔数
-
{{orderStatistics.payMoney}}/{{orderStatistics.count}}
+
交易金额汇总数(万元)/交易笔数
+
{{ orderStatistics.payMoney }}/{{ orderStatistics.count }}
-
-
{{item.paymentChannel}}交易金额(万元)
-
{{item.payMoneyChannel}}
+
+
{{ item.paymentChannel }}交易金额(万元)
+
{{ item.payMoneyChannel }}
- - + +
- + - + @@ -127,136 +103,183 @@ import { getTradingPageApi } from "@/api/allOrder"; import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialStatement/yunyingfenxi"; +import {parseTime} from "@/utils/fuint"; - export default { - name: "dai_yunyingfenxi-paym", - data(){ - return{ - radio1:"油号选错", - loading:false, - dialogVisible:false, - // 员工列表 - staffList:[], - ordersInfo:{}, - // 日期范围 - dateRange: [], - beginTime:"", - endTime:"", - // 是否为当天时间 - isSysDate:false, - // 收银台订单列表 - orderList:[], - deptList:[], - - // 查询参数 - queryParams: { - page: 1, - pageSize: 10, - beginTime:"", - endTime:"", - orderNo:"", - status:"", - payType:"", - payChannel:"", - deptType:"3", - storeId:"", - deptId:"", - }, - orderStatistics:{ - count:'0', - - payMoney:'0', - fenxiByDaili2ByData: [] - }, - total:0, - } - }, - created() { - let start = new Date(); - start.setHours(0) - start.setMinutes(0) - start.setSeconds(0) - start.setMilliseconds(0) - this.dateRange = [start,new Date()]; - this.beginTime = start - this.endTime = new Date() - this.isSysDate = true - this.getList(); - this.getDeptList(); - - }, - methods:{ - getDeptList() { - getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then( response => { - this.deptList = response.data.records; - }) - }, - exportExcelCashier() { - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ - const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); - this.$download.saveAs(blob,'交易明细统计.xLsx') - }) - }, - // 获取订单统计信息 - - getOrderStatistics() { - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenxiByDailiByDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ - this.orderStatistics = res.data - console.log("res.data1111",res.data) - }) - }, +export default { + name: "dai_yunyingfenxi-paym", + data() { + return { + radio1: "油号选错", + loading: false, + dialogVisible: false, + // 员工列表 + staffList: [], + ordersInfo: {}, + // 日期范围 + dateRange: [], + beginTime: "", + endTime: "", + // 是否为当天时间 + isSysDate: false, + // 收银台订单列表 + orderList: [], + deptList: [], - // 获取列表信息 - getList(val){ - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenxiByDailiApi(this.addDateRange(this.queryParams,dateRange)).then( response => { - this.orderList = response.data.records; - this.total = response.data.total; - this.isSysDate = false - }) - this.getOrderStatistics() + timeList: [ + "今日", + "近一周", + "近一月", + "近一年", + ], + timeIndex: 0, + value2: [], + // 查询参数 + queryParams: { + page: 1, + pageSize: 10, + beginTime: "", + endTime: "", + orderNo: "", + status: "", + payType: "", + payChannel: "", + deptType: "3", + storeId: "", + deptId: "", }, - getOrdersInfo(data) { - this.dialogVisible = true; - this.ordersInfo = data - }, - // 搜索按钮操作 - handleQuery() { - this.queryParams.page = 1; - this.getList(); - }, - // 重置按钮操作 - resetQuery() { - this.dateRange = []; - this.queryParams = { - page: 1, - pageSize: 10, - } - this.beginTime = "" - this.endTime = "" - this.handleQuery(); + orderStatistics: { + count: '0', + + payMoney: '0', + fenxiByDaili2ByData: [] }, + total: 0, } + }, + created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start, new Date()]; + this.beginTime = start + this.endTime = new Date() + this.isSysDate = true + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1), parseTime(new Date())]; + this.getList(); + this.getDeptList(); + + }, + methods: { + editColor(index) { + this.timeIndex = index + if (this.timeList[index] == '今日') { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.value2 = [start, new Date()]; + } else if (this.timeList[index] == '近一周') { + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (this.timeList[index] == '近一月') { + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (this.timeList[index] == '近一年') { + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } + this.handleQuery() + }, + getDeptList() { + getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => { + this.deptList = response.data.records; + }) + }, + exportExcelCashier() { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res => { + const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}); + this.$download.saveAs(blob, '交易明细统计.xLsx') + }) + }, + // 获取订单统计信息 + + getOrderStatistics() { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + getFenxiByDailiByDataApi(this.addDateRange(this.queryParams, this.value2)).then(res => { + this.orderStatistics = res.data + console.log("res.data1111", res.data) + }) + }, + + + // 获取列表信息 + getList(val) { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + getFenxiByDailiApi(this.addDateRange(this.queryParams, this.value2)).then(response => { + this.orderList = response.data.records; + this.total = response.data.total; + this.isSysDate = false + }) + this.getOrderStatistics() + }, + getOrdersInfo(data) { + this.dialogVisible = true; + this.ordersInfo = data + }, + // 搜索按钮操作 + handleQuery() { + this.queryParams.page = 1; + this.getList(); + }, + // 重置按钮操作 + resetQuery() { + this.dateRange = []; + this.queryParams = { + page: 1, + pageSize: 10, + } + this.beginTime = "" + this.endTime = "" + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1), parseTime(new Date())]; + this.timeIndex = 0 + this.handleQuery(); + }, } +} diff --git a/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paytype.vue b/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paytype.vue index c6a3727a7..5a0856fc5 100644 --- a/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paytype.vue +++ b/fuintAdmin_zt/src/views/financialStatement/dai_yunyingfenxi/tab/paytype.vue @@ -3,63 +3,79 @@
- - - - - - +
+
+ {{ item }} +
+ + +
+ + + + + + + + 搜索 + 重置 + +
+
- - - -
- - + +
活跃油站汇总总数/合作油站汇总总数
-
{{orderStatistics.sumnum}}/0
+
{{ orderStatistics.sumnum }}/0
-
交易金额汇总数(万元)/交易笔数
-
{{orderStatistics.tongjMoney}}
+
交易金额汇总数(万元)/交易笔数
+
{{ orderStatistics.tongjMoney }}
退款金额(元)/退款笔数
-
{{orderStatistics.tongjXfMoney}}
+
{{ orderStatistics.tongjXfMoney }}
新增油站数(万元)
0
-
- + +
- - + + - - - - - + + + + + - - + +
{ - this.deptList = response.data.records; - }) + // 查询参数 + queryParams: { + page: 1, + pageSize: 10, + beginTime: "", + endTime: "", + orderNo: "", + status: "", + payType: "", + payChannel: "", + deptType: "3", + storeId: "", + deptId: "", }, - exportExcelCashier() { - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ - const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); - this.$download.saveAs(blob,'交易明细统计.xLsx') - }) - }, - // 获取订单统计信息 - - getOrderStatistics() { - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenXiUserbalanceDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ - this.orderStatistics = res.data - console.log("res.data1111",res.data) - }) - }, - - // 获取列表信息 - getList(val){ - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenxiByDailiTypeApi(this.addDateRange(this.queryParams,dateRange)).then( response => { - this.orderList = response.data.records; - this.total = response.data.total; - this.isSysDate = false - }) - this.getOrderStatistics() - }, - getOrdersInfo(data) { - this.dialogVisible = true; - this.ordersInfo = data - }, - // 搜索按钮操作 - handleQuery() { - this.queryParams.page = 1; - this.getList(); - }, - // 重置按钮操作 - resetQuery() { - this.dateRange = []; - this.queryParams = { - page: 1, - pageSize: 10, - } - this.beginTime = "" - this.endTime = "" - this.handleQuery(); + orderStatistics: { + sumnum: '', // 会员总数 + balanceSum: '', // 会员余额 + tongjMoney: '', // 累计冲纸 + tongjXfMoney: '', // 总消费 }, + total: 0, } + }, + created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start, new Date()]; + this.beginTime = start + this.endTime = new Date() + this.isSysDate = true + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1), parseTime(new Date())]; + this.getList(); + this.getDeptList(); + + }, + methods: { + editColor(index) { + this.timeIndex = index + if (this.timeList[index] == '今日') { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.value2 = [start, new Date()]; + } else if (this.timeList[index] == '近一周') { + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (this.timeList[index] == '近一月') { + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } else if (this.timeList[index] == '近一年') { + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.value2 = [parseTime(oneWeekAgo), parseTime(nowDate)] + } + this.handleQuery() + }, + getDeptList() { + getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => { + this.deptList = response.data.records; + }) + }, + exportExcelCashier() { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res => { + const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}); + this.$download.saveAs(blob, '交易明细统计.xLsx') + }) + }, + // 获取订单统计信息 + + getOrderStatistics() { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + getFenXiUserbalanceDataApi(this.addDateRange(this.queryParams, this.value2)).then(res => { + this.orderStatistics = res.data + console.log("res.data1111", res.data) + }) + }, + + // 获取列表信息 + getList(val) { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + getFenxiByDailiTypeApi(this.addDateRange(this.queryParams, this.value2)).then(response => { + this.orderList = response.data.records; + this.total = response.data.total; + this.isSysDate = false + }) + this.getOrderStatistics() + }, + getOrdersInfo(data) { + this.dialogVisible = true; + this.ordersInfo = data + }, + // 搜索按钮操作 + handleQuery() { + this.queryParams.page = 1; + this.getList(); + }, + // 重置按钮操作 + resetQuery() { + this.dateRange = []; + this.queryParams = { + page: 1, + pageSize: 10, + } + this.beginTime = "" + this.endTime = "" + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1), parseTime(new Date())]; + this.timeIndex = 0 + this.handleQuery(); + }, } +} diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue index 7cc68a5f7..aff33cb00 100644 --- a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue @@ -3,41 +3,57 @@
- - - - - - - - 搜索 - 重置 - +
+
+ {{ item }} +
+ + +
+ + + + + + + + 搜索 + 重置 + +
+
累计交易金额(万元)
-
{{orderStatistics.paidInfo}}
+
{{ orderStatistics.paidInfo || 0 }}
累计交易笔数
-
{{orderStatistics.count}}
+
{{ orderStatistics.count || 0 }}
累计兑换商品数量
-
{{orderStatistics.exchangeQuantity}}
+
{{ orderStatistics.exchangeQuantity || 0 }}
累计消耗积分
-
{{orderStatistics.integrals}}
+
{{ orderStatistics.integrals || 0 }}
-
- + +
- - - - + + + + @@ -80,134 +97,181 @@ import { getTradingPageApi } from "@/api/allOrder"; import {getFenXiIntegralDataApi, getFenXiIntegralListApi} from "@/api/financialStatement/yunyingfenxi"; +import {parseTime} from "@/utils/fuint"; - export default { - name: "yunyingfenxi-int", - data(){ - return{ - radio1:"油号选错", - loading:false, - dialogVisible:false, - // 员工列表 - staffList:[], - ordersInfo:{}, - // 日期范围 - dateRange: [], - beginTime:"", - endTime:"", - // 是否为当天时间 - isSysDate:false, - // 收银台订单列表 - orderList:[], - deptList:[], +export default { + name: "yunyingfenxi-int", + data() { + return { + radio1: "油号选错", + loading: false, + dialogVisible: false, + // 员工列表 + staffList: [], + ordersInfo: {}, - // 查询参数 - queryParams: { - page: 1, - pageSize: 10, - beginTime:"", - endTime:"", - orderNo:"", - status:"", - payType:"", - payChannel:"", - deptType:"3", - storeId:"", - deptId:"", - }, - orderStatistics:{ - paidInfo:'0', - count:'0', - exchangeQuantity:'0', - integrals:'0', - }, - total:0, - } - }, - created() { - let start = new Date(); - start.setHours(0) - start.setMinutes(0) - start.setSeconds(0) - start.setMilliseconds(0) - this.dateRange = [start,new Date()]; - this.beginTime = start - this.endTime = new Date() - this.isSysDate = true - this.getList(); - this.getDeptList(); + timeList: [ + "今日", + "近一周", + "近一月", + "近一年", + ], + timeIndex: 0, + value2: [], + // 日期范围 + dateRange: [], + beginTime: "", + endTime: "", + // 是否为当天时间 + isSysDate: false, + // 收银台订单列表 + orderList: [], + deptList: [], - }, - methods:{ - getDeptList() { - getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then( response => { - this.deptList = response.data.records; - }) + // 查询参数 + queryParams: { + page: 1, + pageSize: 10, + beginTime: "", + endTime: "", + orderNo: "", + status: "", + payType: "", + payChannel: "", + deptType: "3", + storeId: "", + deptId: "", }, - exportExcelCashier() { - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ - const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); - this.$download.saveAs(blob,'交易明细统计.xLsx') - }) - }, - // 获取订单统计信息 - getOrderStatistics() { - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenXiIntegralDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ - this.orderStatistics = res.data - console.log("res.data1111",res.data) - }) - }, - - // 获取列表信息 - getList(val){ - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenXiIntegralListApi(this.addDateRange(this.queryParams,dateRange)).then( response => { - this.orderList = response.data.records; - this.total = response.data.total; - this.isSysDate = false - }) - this.getOrderStatistics() - }, - getOrdersInfo(data) { - this.dialogVisible = true; - this.ordersInfo = data - }, - // 搜索按钮操作 - handleQuery() { - this.queryParams.page = 1; - this.getList(); - }, - // 重置按钮操作 - resetQuery() { - this.dateRange = []; - this.queryParams = { - page: 1, - pageSize: 10, - } - this.beginTime = "" - this.endTime = "" - this.handleQuery(); + orderStatistics: { + paidInfo: '0', + count: '0', + exchangeQuantity: '0', + integrals: '0', }, + total: 0, } + }, + created() { + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.dateRange = [start, new Date()]; + this.beginTime = start + this.endTime = new Date() + this.isSysDate = true + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1), parseTime(new Date())]; + this.getList(); + this.getDeptList(); + + }, + methods: { + editColor(index){ + this.timeIndex = index + if (this.timeList[index]=='今日'){ + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.value2 = [start,new Date()]; + } else if (this.timeList[index]=='近一周'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (this.timeList[index]=='近一月'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (this.timeList[index]=='近一年'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } + this.handleQuery() + }, + getDeptList() { + getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => { + this.deptList = response.data.records; + }) + }, + exportExcelCashier() { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res => { + const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}); + this.$download.saveAs(blob, '交易明细统计.xLsx') + }) + }, + // 获取订单统计信息 + getOrderStatistics() { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + getFenXiIntegralDataApi(this.addDateRange(this.queryParams, this.value2)).then(res => { + this.orderStatistics = res.data + console.log("res.data1111", res.data) + }) + }, + + // 获取列表信息 + getList(val) { + let dateRange = [] + if (this.beginTime && this.endTime) { + dateRange.push(this.beginTime.toLocaleDateString()) + dateRange.push(this.endTime.toLocaleDateString()) + } + getFenXiIntegralListApi(this.addDateRange(this.queryParams, this.value2)).then(response => { + this.orderList = response.data.records; + this.total = response.data.total; + this.isSysDate = false + }) + this.getOrderStatistics() + }, + getOrdersInfo(data) { + this.dialogVisible = true; + this.ordersInfo = data + }, + // 搜索按钮操作 + handleQuery() { + this.queryParams.page = 1; + this.getList(); + }, + // 重置按钮操作 + resetQuery() { + this.dateRange = []; + this.queryParams = { + page: 1, + pageSize: 10, + } + this.beginTime = "" + this.endTime = "" + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1), parseTime(new Date())]; + this.timeIndex = 0 + this.handleQuery(); + }, } +} diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue index 4739b0014..402918b36 100644 --- a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue @@ -3,47 +3,62 @@
- - - - - - +
+
+ {{item}} +
+ + +
+ + + + + + + + 搜索 + 重置 + +
+
- - 搜索 - 重置 -
累计交易金额(万元)
-
{{orderStatistics.amount}}
+
{{orderStatistics.amount || 0}}
累计交易升数
-
{{orderStatistics.num}}
+
{{orderStatistics.num || 0}}
92#汽油交易金额(万元)
-
{{orderStatistics.amount92}}
+
{{orderStatistics.amount92 || 0}}
95#汽油交易金额(万元)
-
{{orderStatistics.amount95}}
+
{{orderStatistics.amount95 || 0}}
98#汽油交易金额(万元)
-
{{orderStatistics.amount98}}
+
{{orderStatistics.amount98 || 0}}
0#柴油交易金额(万元)
-
{{orderStatistics.amount0}}
+
{{orderStatistics.amount0 || 0}}
@@ -108,6 +123,7 @@ import { getTradingPageApi } from "@/api/allOrder"; import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialStatement/yunyingfenxi"; +import {parseTime} from "@/utils/fuint"; export default { name: "yunyingfenxi-oil", @@ -129,6 +145,14 @@ import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialS orderList:[], deptList:[], + timeList:[ + "今日", + "近一周", + "近一月", + "近一年", + ], + timeIndex:0, + value2: [], // 查询参数 queryParams: { page: 1, @@ -164,11 +188,41 @@ import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialS this.beginTime = start this.endTime = new Date() this.isSysDate = true + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1),parseTime(new Date())]; this.getList(); this.getDeptList(); }, methods:{ + editColor(index){ + this.timeIndex = index + if (this.timeList[index]=='今日'){ + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.value2 = [start,new Date()]; + } else if (this.timeList[index]=='近一周'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (this.timeList[index]=='近一月'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (this.timeList[index]=='近一年'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } + this.handleQuery() + }, getDeptList() { getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then( response => { this.deptList = response.data.records; @@ -193,7 +247,7 @@ import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialS dateRange.push(this.beginTime.toLocaleDateString()) dateRange.push(this.endTime.toLocaleDateString()) } - getFenXiOilOrderDataApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ + getFenXiOilOrderDataApi(this.addDateRange(this.queryParams, this.value2)).then(res=>{ this.orderStatistics = res.data console.log("res.data1111",res.data) }) @@ -201,12 +255,12 @@ import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialS // 获取列表信息 getList(val){ - let dateRange = [] - if (this.beginTime && this.endTime) { - dateRange.push(this.beginTime.toLocaleDateString()) - dateRange.push(this.endTime.toLocaleDateString()) - } - getFenXiOilOrderListApi(this.addDateRange(this.queryParams,dateRange)).then( response => { + // let dateRange = [] + // if (this.beginTime && this.endTime) { + // dateRange.push(this.beginTime.toLocaleDateString()) + // dateRange.push(this.endTime.toLocaleDateString()) + // } + getFenXiOilOrderListApi(this.addDateRange(this.queryParams,this.value2)).then( response => { this.orderList = response.data.records; this.total = response.data.total; this.isSysDate = false @@ -231,6 +285,13 @@ import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialS } this.beginTime = "" this.endTime = "" + let start1 = new Date(); + start1.setHours(0) + start1.setMinutes(0) + start1.setSeconds(0) + start1.setMilliseconds(0) + this.value2 = [parseTime(start1),parseTime(new Date())]; + this.timeIndex = 0 this.handleQuery(); }, } @@ -311,4 +372,26 @@ import {getFenXiOilOrderDataApi, getFenXiOilOrderListApi} from "@/api/financialS background-repeat: no-repeat; /* 禁止背景图片重复 */ } +.d-s{ + display: flex; + align-items: center; +} +.anniu-h{ + width: 80px; + height: 26px; + background: #FAFAFA; + border-radius: 4px 4px 4px 4px; + border: 1px solid #DDDDDD; + display: flex; + align-items: center; + justify-content: center; + color: #777777; + margin-right: 20px; +} +.anniu-act{ + background: #FF9655 !important; + border: 1px solid #FF9655 !important; + color: #fff; + +} diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue index 605ff607e..20d0ae79f 100644 --- a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue @@ -2,39 +2,55 @@