From ea24007eab08b22df3f46e9e0cc18d4c74fc2efa Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Sun, 27 Nov 2022 16:19:56 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90=E6=89=8B?=
=?UTF-8?q?=E6=9C=BA=E7=AB=AF=E4=BC=98=E6=83=A0=E5=88=B8=20=E6=A0=B8?=
=?UTF-8?q?=E9=94=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/coupon/coupon.js | 55 +++++++++++
constant/url.js | 8 +-
pages.json | 9 ++
pages/coupon/writeOffCoupon.vue | 158 ++++++++++++++++++++++++++++++++
4 files changed, 229 insertions(+), 1 deletion(-)
create mode 100644 api/coupon/coupon.js
create mode 100644 pages/coupon/writeOffCoupon.vue
diff --git a/api/coupon/coupon.js b/api/coupon/coupon.js
new file mode 100644
index 0000000..f52adae
--- /dev/null
+++ b/api/coupon/coupon.js
@@ -0,0 +1,55 @@
+import url from '../../constant/url.js'
+
+import dateObj from '../../lib/java110/utils/date.js'
+/**
+ * 核销订单
+ * @param {Object} _that 上下文对象
+ * @param {Object} _data 请求报文
+ */
+export function writeOffCouponPropertyUser(_that,_data){
+ return new Promise(function(reslove,reject){
+ // debugger
+ _that.context.post({
+ url: url.writeOffCouponPropertyUser,
+ data:_data,
+ success: function(res) {
+ if (res.data.code == 0){
+ reslove(res);
+ }else {
+ // debugger
+ wx.showToast({
+ title: "核销状态:" + res.data.msg,
+ icon: 'none',
+ duration: 3000
+ })
+ }
+ },
+ fail: function(e) {
+ wx.showToast({
+ title: "服务器异常了",
+ icon: 'none',
+ duration: 3000
+ })
+ }
+ })
+ });
+}
+
+export function listCouponPropertyUserDetail(_that,_data){
+ return new Promise(function(reslove,reject){
+ _that.context.get({
+ url: url.listCouponPropertyUserDetail,
+ data:_data,
+ success: function(res) {
+ if(res.data.code != 0){
+ reject(res.data.msg);
+ return ;
+ }
+ reslove(res.data);
+ },
+ fail: function(e) {
+ reject(e);
+ }
+ })
+ });
+}
\ No newline at end of file
diff --git a/constant/url.js b/constant/url.js
index bbf4f62..cac9390 100644
--- a/constant/url.js
+++ b/constant/url.js
@@ -177,6 +177,12 @@ export default {
listCommunitySpaceConfirmOrder: baseUrl + "app/communitySpace.listCommunitySpaceConfirmOrder",
// 核销订单
saveCommunitySpaceConfirmOrder: baseUrl + "app/communitySpace.saveCommunitySpaceConfirmOrder",
- queryReportStaffInspection: baseUrl+"app/inspection.queryReportStaffInspection"
+ queryReportStaffInspection: baseUrl+"app/inspection.queryReportStaffInspection",
+ listCouponPropertyUserDetail: baseUrl+"app/couponProperty.listCouponPropertyUserDetail",
+ writeOffCouponPropertyUser: baseUrl+"app/couponProperty.writeOffCouponPropertyUser"
+
+
+
+
}
diff --git a/pages.json b/pages.json
index 3c28fb6..ed3a7ce 100644
--- a/pages.json
+++ b/pages.json
@@ -560,6 +560,15 @@
}
}
+ ,{
+ "path" : "pages/coupon/writeOffCoupon",
+ "style" :
+ {
+ "navigationBarTitleText": "核销优惠券",
+ "enablePullDownRefresh": false
+ }
+
+ }
],
"globalStyle": {
"navigationBarTextStyle": "white",
diff --git a/pages/coupon/writeOffCoupon.vue b/pages/coupon/writeOffCoupon.vue
new file mode 100644
index 0000000..fc48d67
--- /dev/null
+++ b/pages/coupon/writeOffCoupon.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 单号{{item.uoId}}
+
+
+ 优惠券
+ {{item.couponName}}({{item.value}})
+
+
+ 用户
+ {{item.userName}}({{item.tel}})
+
+
+ 使用时间
+ {{item.createTime}}
+
+
+ 用途
+ {{item.remark }}
+
+
+
+
+
+
+
+
+
+
+
+