From 26492664662cf38e05f886e3c28cefa257cb455a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E5=90=8C=E5=AD=A6?= <2495967527@qq.com> Date: Tue, 24 Dec 2024 18:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.js | 24 +++ src/views/modules/bank-card/index.vue | 14 +- src/views/modules/coupon/index.vue | 38 ++-- .../modules/coupon/popup/add-or-update.vue | 134 ++++++++++--- .../modules/coupon/popup/full-reduction.vue | 172 ++++++++++++---- src/views/modules/coupon/popup/new-powder.vue | 189 ++++++++++++++---- 6 files changed, 447 insertions(+), 124 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index 31f271d..31edfcf 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -113,6 +113,30 @@ export function deepClone(obj) { return result; } +/** + * 获取时间 + * @param {*} min + * @param {*} max + */ +export function getDay(day) { + let today = new Date(); + let targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day; + today.setTime(targetday_milliseconds); //注意,这行是关键代码 + let tYear = today.getFullYear(); + let tMonth = today.getMonth(); + let tDate = today.getDate(); + tMonth = doHandleMonth(tMonth + 1); + tDate = doHandleMonth(tDate); + return tYear + "-" + tMonth + "-" + tDate; +} +function doHandleMonth(month) { + let m = month; + if (month.toString().length === 1) { + m = "0" + month; + } + return m; +} + export function isNumberStr(str) { return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str); } diff --git a/src/views/modules/bank-card/index.vue b/src/views/modules/bank-card/index.vue index 1abb680..222c471 100644 --- a/src/views/modules/bank-card/index.vue +++ b/src/views/modules/bank-card/index.vue @@ -181,11 +181,15 @@ export default { render: ({ row }) => { let defaultBank = () => { if (row.default) { - this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) + this.$confirm( + "此操作将设置该银行卡为默认银行卡, 是否继续?", + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) .then(() => { this.$api.mer_admin .defaultBank({ diff --git a/src/views/modules/coupon/index.vue b/src/views/modules/coupon/index.vue index 35a7036..a3d4bf0 100644 --- a/src/views/modules/coupon/index.vue +++ b/src/views/modules/coupon/index.vue @@ -123,7 +123,7 @@ export default { formInline: { marketId: "", shopId: "", - queryStatus: "", + queryStatus: "q", name: "", }, tableProp: { @@ -140,7 +140,7 @@ export default { created() { this.formInline = { name: "", - queryStatus: "", + queryStatus: "1", marketId: this.marketId, shopId: this.shopId, }; @@ -185,7 +185,7 @@ export default { Reset() { this.formInline = { name: "", - queryStatus: "", + queryStatus: "1", marketId: this.marketId, shopId: this.shopId, }; @@ -294,11 +294,11 @@ export default { align: "center", field: "money", }, - { - title: "折扣", - align: "center", - field: "discount", - }, + // { + // title: "折扣", + // align: "center", + // field: "discount", + // }, { title: "最低消费", align: "center", @@ -386,16 +386,18 @@ export default { }); } }; - return ( - - ); + if (row.status == 1) { + return ( + + ); + } }, }, { diff --git a/src/views/modules/coupon/popup/add-or-update.vue b/src/views/modules/coupon/popup/add-or-update.vue index 61d9872..fe48401 100644 --- a/src/views/modules/coupon/popup/add-or-update.vue +++ b/src/views/modules/coupon/popup/add-or-update.vue @@ -8,7 +8,7 @@ :modalHandles="modalHandles" >