diff --git a/src/services/apiUrl.js b/src/services/apiUrl.js
index 1fe2eb9..9549af6 100644
--- a/src/services/apiUrl.js
+++ b/src/services/apiUrl.js
@@ -54,4 +54,12 @@ export const apiUrl = {
*C端扫B端储值卡交易流水SUM
*/
payMum:"/api/cardPay/sum",
+ /**
+ 补贴记录
+ */
+ subsidyList:"/api/subsidy/list",
+ /**
+ * 获取营销结算汇总
+ */
+ getSubsidySummary:"/api/subsidy/summary",
}
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 5899556..b085382 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -553,7 +553,7 @@ export default {
border-radius: .15rem;
margin: .3rem auto;
padding: .2rem 0 .3rem 0;
-
+ overflow: hidden;
.line-title {
height: 1rem;
line-height: 1rem;
diff --git a/src/views/navigation/accounts/marketingClose.vue b/src/views/navigation/accounts/marketingClose.vue
index 9b8f245..19dab43 100644
--- a/src/views/navigation/accounts/marketingClose.vue
+++ b/src/views/navigation/accounts/marketingClose.vue
@@ -17,22 +17,25 @@
/>
-
-
+
+
-
468663580839145472
-
2020-09-23 16:28:35
+
{{ item.orderId }}
+
+ {{ setTiem(item.createDate, "YYYY-MM-DD HH:mm:ss") }}
+
-
卡消费 自主结算
+
{{item.sourceStr+" "+item.typeStr}}
- 应收:400
+ {{`应收:${item.subsidyStr}`}}
-
已结算
+
{{item.statusStr}}
+
{{item.statusStr}}
-
+
{{ beginDateText }}
@@ -40,31 +43,80 @@
{{ endDateText }}
-
查询
+
查询
-
-
自主结算
-
微信分账
+
-
-
未结算
-
已结算
+
-
未结算
-
已结算
-
未结算
-
已结算
-
未结算
-
已结算
+
+ 未结算
+
+
+ 已结算
+
+
+ 未结算
+
+
+ 已结算
+
+
+ 未结算
+
+
+ 已结算
+
-
-
+
暂无数据!
总计应收
-
¥800.00
+
{{`¥${aggregate/100}`}}
import { formatDate } from "@/utils/cloud-utils";
import Vue from "vue";
-import { Popup, DatetimePicker } from "vant";
+import moment from "moment";
+import { Popup, DatetimePicker, Toast } from "vant";
-Vue.use(DatetimePicker, Popup);
+Vue.use(DatetimePicker, Popup, Toast);
export default {
data() {
return {
@@ -116,6 +169,8 @@ export default {
name: "来源",
},
],
+ showTiem:false,
+ noData:false,
navigationIndex: 0,
beginDateShow: false,
endDateShow: false,
@@ -123,34 +178,194 @@ export default {
maxDate: new Date(2025, 10, 1),
endminDate: new Date(2015, 0, 1),
endmaxDate: new Date(2025, 10, 1),
- beginDateText: "开始时间",
- endDateText: "结束时间",
+ beginDateText: "",
+ endDateText: "",
deyText: new Date(),
status3_index: 0,
- status4_index:0,
- status5_index:0
+ status4_index: 0,
+ status5_index: 0,
+ pageNum: 1,
+ pageSize: 10,
+ list: [],
+ aggregate: "",
+ type:"",
+ billtypes: [
+ {
+ name: "自主结算",
+ billTypeValue: 1,
+ id: 1,
+ },
+ {
+ name: "微信分账",
+ billTypeValue: 2,
+ id: 2,
+ },
+ ],
+ statustypes: [
+ {
+ name: "未结算",
+ status: 0,
+ id: 0,
+ },
+ {
+ name: "已结算",
+ status: 1,
+ id: 1,
+ },
+ ],
+ auditWayOptions: [
+ /* {
+ name: "全部",
+ value: ''
+ }, */
+ {
+ name: "补贴",
+ value: 0,
+ id: 0
+ },
+ {
+ name: "卡消费",
+ value: 1,
+ id: 1
+ },
+ {
+ name: "券核销",
+ value: 2,
+ id: 2
+ },
+ {
+ name: "砍价核销",
+ value: 3,
+ id: 3
+ },
+ {
+ name: "拼团核销",
+ value: 4,
+ id: 4
+ },
+ {
+ name: "收银分账",
+ value: 5,
+ id: 5
+ },
+ ],
};
},
methods: {
+ settleWay(value){
+ this.status3_index = value
+ this.type = value
+ this.search()
+ },
+ settleType(value){
+ status4_index=1
+ this.type = value
+ this.search()
+ },
+
+ //时间处理
+ setTiem(temp, format) {
+ //第一个参数是时间戳 第二个参数是格式 参考momentJS
+ return moment(Number(temp)).format(format);
+ },
switchover(index) {
this.navigationIndex = index;
+ this.list='';
+ switch (index) {
+ case 0:this.noData = false;this.search();this.beginDateText= "";this.endDateText="";break;
+ case 1:this.noData = false;this.showTiem=true;this.beginDateText= "开始时间";this.endDateText="结束时间";break;
+ case 2:this.noData = false;this.showTiem=true;this.beginDateText= "";this.endDateText="";break;
+ case 3:this.noData = false;this.showTiem=true;this.beginDateText= "";this.endDateText="";break;
+ case 4:this.noData = false;this.showTiem=true;this.beginDateText= "";this.endDateText="";break;
+
+ default:
+ console.log("全部")
+ break;
+ }
},
setBeginDate(value) {
this.beginDateText = formatDate(value, "yyyy-MM-dd");
this.beginDateShow = !this.beginDateShow;
- console.log(formatDate(value, "yyyy-MM-dd"));
+ console.log(this.beginDateText, "开始");
},
setEndDate(value) {
this.endDateText = formatDate(value, "yyyy-MM-dd");
this.endDateShow = !this.endDateShow;
- console.log(formatDate(value, "yyyy-MM-dd"));
+ console.log(this.endDateText, "结束");
+ },
+ getLsit() {
+ this.$http
+ .subsidyList({
+ method: "get",
+ params: {
+ pageNum: this.pageNum,
+ pageSize: this.pageSize,
+ startdate: this.beginDateText+' 00:00:00',
+ enddate: this.endDateText+' 23:59:59',
+ source: "",
+ type: this.type,
+ status: "",
+ },
+ })
+ .then((res) => {
+ const { code, data, message } = res;
+ if (code == 200) {
+ if(data.list.length==0){
+ this.noData = true
+ }
+ data.list.map(item=>{
+ item.sourceStr = this.auditWayOptions.filter(e => e.value == item.source).length > 0 ? this.auditWayOptions.filter(e => e.value == item.source)[0].name : '';
+ item.typeStr = this.billtypes.filter(e => e.id == item.type).length > 0 ? this.billtypes.filter(e => e.id == item.type)[0].name : '';
+ item.statusStr = item.status===0?'未结算' : "已结算";
+ })
+ this.list = data.list;
+ } else {
+ Toast(message);
+ }
+ })
+ .catch((res) => {
+ Toast(res);
+ });
+ },
+ getTotal() {
+ this.$http
+ .getSubsidySummary({
+ method: "get",
+ params: {
+ startdate: this.beginDateText+' 00:00:00',
+ enddate:this.endDateText+' 23:59:59',
+ source: "",
+ type: this.type,
+ status: "",
+ },
+ })
+ .then((res) => {
+ const { code, data, message } = res;
+ if (code == 200) {
+ this.aggregate = data.subsidy;
+ } else {
+ Toast(message);
+ }
+ })
+ .catch((res) => {
+ Toast(res);
+ });
},
+ search(){
+ this.showTiem = false
+ this.getLsit();
+ this.getTotal();
+ },
+ },
+ mounted() {
+ this.search()
},
};