diff --git a/src/api/discount-coupon/management.js b/src/api/discount-coupon/management.js
index 065724c..f9c6386 100644
--- a/src/api/discount-coupon/management.js
+++ b/src/api/discount-coupon/management.js
@@ -10,3 +10,26 @@ export function getList(params) {
params
});
}
+// 编辑
+export function doEdit(data) {
+ return service({
+ url: "/platformCoupon/update",
+ method: "put",
+ data
+ });
+}
+// 删除
+export function doDelete(id) {
+ return service({
+ url: "/platformCoupon/" + id,
+ method: "delete",
+ });
+}
+// 审核
+export function doAudit(data) {
+ return service({
+ url: "/platformCoupon/shopCheck",
+ method: "post",
+ data
+ });
+}
diff --git a/src/components/mulProject/index.vue b/src/components/mulProject/index.vue
new file mode 100644
index 0000000..2ab92c8
--- /dev/null
+++ b/src/components/mulProject/index.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/mulProject/单选多选项目 b/src/components/mulProject/单选多选项目
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/components/mulProject/单选多选项目
@@ -0,0 +1 @@
+
diff --git a/src/components/mulStore/index.vue b/src/components/mulStore/index.vue
index 37195f9..3149620 100644
--- a/src/components/mulStore/index.vue
+++ b/src/components/mulStore/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -24,12 +24,9 @@ export default {
elementLoadingText: '正在加载...',
// 其它
mulSelect: [],
- dialogVisible: true,
+ dialogVisible: false,
};
},
- created() {
- this.fetchData()
- },
methods: {
// ======================== 弹窗 ======================== //
// 打开
@@ -44,17 +41,35 @@ export default {
},
// ======================== 查询 ======================== //
async fetchData() {
- organizations().then((res) => {
- console.log('res', res);
- })
+ let { code, rows, message } = await organizations({ storeRequest: null })
+ if (code == '000000') {
+ this.list = Array.from(rows);
+ }
+ if (code == '010000') {
+ this.$message({
+ message: message,
+ type: 'error'
+ });
+ }
},
// ======================== 其它 ======================== //
- handleSelect(row) {
- console.log('row', row);
+ handleSelect(data) {
+ this.mulSelect = Array.from(data);
+ },
+ handleRowClick(row) {
+ this.$refs.list.toggleRowSelection(row)
},
// 确定
- confirm() {
-
+ confirm(row) {
+ if (row.id) {
+ this.$emit('call-back-store', [{ storeId: row.id, storeNum: row.storeNum, storeName: row.storeName }]);
+ } else {
+ let list = this.mulSelect.map((item) => {
+ return { storeId: item.id, storeNum: item.storeNum, storeName: item.storeName }
+ })
+ this.$emit('call-back-store', list);
+ }
+ this.close()
}
},
};
diff --git a/src/pages/discount-coupon/issue/components/complete.vue b/src/pages/discount-coupon/issue/components/complete.vue
index 117d49d..0e4a038 100644
--- a/src/pages/discount-coupon/issue/components/complete.vue
+++ b/src/pages/discount-coupon/issue/components/complete.vue
@@ -5,17 +5,16 @@
优惠券发布成功
- 继续发布
- 完成
+ 完成
+
+
diff --git a/src/pages/discount-coupon/issue/components/template.vue b/src/pages/discount-coupon/issue/components/template.vue
index 66e4d62..b90b309 100644
--- a/src/pages/discount-coupon/issue/components/template.vue
+++ b/src/pages/discount-coupon/issue/components/template.vue
@@ -5,17 +5,28 @@
@@ -53,9 +64,12 @@ export default {
},
// 提交
async handleSubmit() {
+ let form = Object.assign({}, this.form);
+ form.useStoreList = form.useStoreList.map(item => item.storeNum);
+ form.projectList = form.projectList.map(item => item.projectId);
let format = new FormData()
- Object.keys(this.form).map(key => {
- format.append(key, this.form[key])
+ Object.keys(form).map(key => {
+ format.append(key, form[key])
})
let { code } = await doAdd(format)
if (code == '000000') {
@@ -65,11 +79,22 @@ export default {
});
this.$emit('next', 3)
}
+ if (code == '010000') {
+ this.$message({
+ message: '发布失败',
+ type: 'error'
+ });
+ }
},
},
}