Jelajahi Sumber

优惠券管理新增查看小程序码按钮,修改bug

hzj18279462576@163.com 9 bulan lalu
induk
melakukan
26dbbf8ccb

+ 1 - 1
src/utils/httpRequest.js

@@ -46,7 +46,7 @@ http.interceptors.response.use(
     }
     // console.log(
     //   decrypt(
-    //     urlSafeBase64Decode("VoOvrGkObjpwTxh9fnFHWLZa4RM1RG34gaxRoGoPmoG2fl8iJmTFqAYeA8_KoWVfwy94Je0aw_uTqgBxRgbs6Q==")
+    //     urlSafeBase64Decode("nhUrbnqOHepMHbB7tPBn_oOaLdbWPDlhp_SyK75Q_F8Mr_Px-jDaRuofsndXokxjArrhMVMsW7ZftyVcoahqTn25Q0uH-URoPr2F_xucqb_XK8mVoeMXkiJRaBqj8pnw")
     //   ),
     //   "11111111111111111111111111"
     // );

File diff ditekan karena terlalu besar
+ 1867 - 0
src/views/coupon/coupon copy 2.vue


+ 65 - 10
src/views/coupon/coupon copy.vue

@@ -71,6 +71,27 @@
               <span v-if="scope.row.state == 2">已撤销</span>
             </template>
           </el-table-column>
+          <el-table-column prop="state" label="查看小程序码">
+            <template slot-scope="scope">
+              <el-popover
+                placement="top"
+                width="200"
+                v-if="scope.row.state == 1"
+              >
+                <div style="width: 180px; height: 180px;">
+                  <img style="width: 180px;" :src="couponImg" alt="" />
+                </div>
+                <el-button
+                  size="mini"
+                  type="primary"
+                  icon="document"
+                  slot="reference"
+                  @click="lookCoupon(scope.row)"
+                  >查看
+                </el-button>
+              </el-popover>
+            </template>
+          </el-table-column>
           <el-table-column label="操作" width="250">
             <template slot-scope="scope">
               <el-button
@@ -178,6 +199,23 @@
           <el-table-column prop="endDate" label="有效天数"> </el-table-column>
           <!-- <el-table-column prop="needIntegral" label="兑换积分">
 					</el-table-column> -->
+          <el-table-column prop="state" label="查看小程序码">
+            <template slot-scope="scope">
+              <el-popover placement="top" width="200">
+                <div style="width: 180px; height: 180px;">
+                  <img style="width: 180px;" :src="couponImg" alt="" />
+                </div>
+                <el-button
+                  size="mini"
+                  type="primary"
+                  icon="document"
+                  slot="reference"
+                  @click="lookCoupon(scope.row)"
+                  >查看
+                </el-button>
+              </el-popover>
+            </template>
+          </el-table-column>
           <el-table-column label="操作" width="250">
             <template slot-scope="scope">
               <el-button
@@ -943,7 +981,9 @@ export default {
       couponLogTable: [],
       couponLogLimit: 10,
       couponLogPage: 1,
-      couponLogTotal: 1
+      couponLogTotal: 1,
+
+      couponImg: ""
     };
   },
   methods: {
@@ -1298,6 +1338,21 @@ export default {
       this.shopIds = rows.shopId;
       this.dialogFormVisible1 = true;
     },
+    // 查看小程序码
+    async lookCoupon(row) {
+      this.couponImg = "";
+      let arr = this.$http.adornParams({
+        couponId: row.couponId,
+        shopId: row.shopId
+      });
+      this.couponImg =
+        this.$http.adornUrl("invite/couponQr") +
+        "?shopId=" +
+        arr.shopId +
+        "&couponId=" +
+        arr.couponId;
+      console.log(this.couponImg);
+    },
     compileClose() {
       if (this.shopId == 0 && this.someMerchant) {
         this.$nextTick(() => {
@@ -1359,15 +1414,15 @@ export default {
         return;
       }
       if (this.shopId == 0) {
-         if (!this.allMerchant && !this.someMerchant) {
-        this.$notify({
-          title: "提示",
-          duration: 1800,
-          message: "商家不能为空",
-          type: "warning"
-        });
-        return;
-      }
+        if (!this.allMerchant && !this.someMerchant) {
+          this.$notify({
+            title: "提示",
+            duration: 1800,
+            message: "商家不能为空",
+            type: "warning"
+          });
+          return;
+        }
       }
 
       if (this.shopId === 0) {

+ 61 - 2
src/views/coupon/coupon.vue

@@ -71,6 +71,27 @@
               <span v-if="scope.row.state == 2">已撤销</span>
             </template>
           </el-table-column>
+          <el-table-column prop="state" label="查看小程序码">
+            <template slot-scope="scope">
+              <el-popover
+                placement="top"
+                width="200"
+                v-if="scope.row.state == 1"
+              >
+                <div style="width: 180px; height: 180px;">
+                  <img style="width: 180px;" :src="couponImg" alt="" />
+                </div>
+                <el-button
+                  size="mini"
+                  type="primary"
+                  icon="document"
+                  slot="reference"
+                  @click="lookCoupon(scope.row)"
+                  >查看
+                </el-button>
+              </el-popover>
+            </template>
+          </el-table-column>
           <el-table-column label="操作" width="250">
             <template slot-scope="scope">
               <el-button
@@ -178,6 +199,26 @@
           <el-table-column prop="endDate" label="有效天数"> </el-table-column>
           <!-- <el-table-column prop="needIntegral" label="兑换积分">
 					</el-table-column> -->
+          <el-table-column prop="state" label="查看小程序码">
+            <template slot-scope="scope">
+              <el-popover
+                placement="top"
+                width="200"
+              >
+                <div style="width: 180px; height: 180px;">
+                  <img style="width: 180px;" :src="couponImg" alt="" />
+                </div>
+                <el-button
+                  size="mini"
+                  type="primary"
+                  icon="document"
+                  slot="reference"
+                  @click="lookCoupon(scope.row)"
+                  >查看
+                </el-button>
+              </el-popover>
+            </template>
+          </el-table-column>
           <el-table-column label="操作" width="250">
             <template slot-scope="scope">
               <el-button
@@ -819,7 +860,9 @@ export default {
       couponLogTable: [],
       couponLogLimit: 10,
       couponLogPage: 1,
-      couponLogTotal: 1
+      couponLogTotal: 1,
+
+      couponImg: ""
     };
   },
   methods: {
@@ -1221,7 +1264,7 @@ export default {
           money: this.form.money,
           needIntegral: this.form.needIntegral,
           shopId: this.shopIds,
-          sysUserId: this.userId,
+          sysUserId: this.userId
         })
       }).then(({ data }) => {
         if (data.code == 0) {
@@ -1295,6 +1338,22 @@ export default {
         .catch(() => {});
     },
 
+    // 查看小程序码
+    async lookCoupon(row) {
+      this.couponImg = "";
+      let arr = this.$http.adornParams({
+        couponId: row.couponId,
+        shopId: row.shopId
+      });
+      this.couponImg =
+        this.$http.adornUrl("invite/couponQr") +
+        "?shopId=" +
+        arr.shopId +
+        "&couponId=" +
+        arr.couponId;
+      console.log(this.couponImg);
+    },
+
     // 删除
     deleteStair(row) {
       this.$confirm(`确定删除此条信息?`, "提示", {

+ 30 - 9
src/views/deliveryAddress/deliveryAddress.vue

@@ -80,7 +80,7 @@
         >导入
       </el-button>
       <el-button
-      :disabled="!isAuth('deliveryAddress:export')"
+        :disabled="!isAuth('deliveryAddress:export')"
         style="margin-left:15px;"
         size="mini"
         type="warning"
@@ -90,7 +90,7 @@
         导出Excel
       </el-button>
       <el-button
-      :disabled="!isAuth('deliveryAddress:add')"
+        :disabled="!isAuth('deliveryAddress:add')"
         style="margin-left:15px;"
         size="mini"
         type="primary"
@@ -126,7 +126,7 @@
       <el-table-column prop="enableFlag" label="是否启用" width="80">
         <template slot-scope="scope">
           <el-switch
-          :disabled="!isAuth('deliveryAddress:update')"
+            :disabled="!isAuth('deliveryAddress:update')"
             v-model="scope.row.status"
             @change="changeType($event, scope.row)"
             active-value="1"
@@ -172,12 +172,7 @@
       </el-pagination>
     </div>
 
-    <el-dialog
-      title="新增收货地址"
-      :visible.sync="addDialog"
-      center
-      width="600px"
-    >
+    <el-dialog :title="addTitle" :visible.sync="addDialog" center width="600px">
       <el-form :model="addForm">
         <el-form-item label="骑手站点:" :label-width="formLabelWidth">
           <el-select
@@ -386,6 +381,7 @@ export default {
 
       formLabelWidth: "100px",
       addDialog: false,
+      addTitle: "新增收货地址",
       options: regionData,
       componentKey: 0,
 
@@ -567,6 +563,7 @@ export default {
     },
     // 新增收货地址
     addAddress() {
+      this.addTitle = "新增收货地址";
       this.storeAddreStr = "请选择省市区";
       this.storeAddre = [];
       this.addForm = {
@@ -588,6 +585,7 @@ export default {
     // 编辑
     updates(row) {
       console.log(row);
+      this.addTitle = "编辑收货地址";
       this.storeAddre = [];
       this.addForm = {
         id: row.id,
@@ -602,6 +600,9 @@ export default {
         status: row.status, //启用状态;1启用、0禁用
         sort: row.sort //排序不能为空, //排序不能为空
       };
+      this.province = row.province;
+      this.city = row.city;
+      this.district = row.district;
       this.addDialog = true;
       this.storeAddreStr = `${row.province}/${row.city}/${row.district}`;
     },
@@ -682,6 +683,16 @@ export default {
                 this.dataSelect();
               }
             });
+          } else {
+            this.$message({
+              message: data.msg,
+              type: "error",
+              duration: 1500,
+              onClose: () => {
+                this.addDialog = false;
+                this.dataSelect();
+              }
+            });
           }
         });
       } else {
@@ -712,6 +723,16 @@ export default {
                 this.dataSelect();
               }
             });
+          } else {
+            this.$message({
+              message: data.msg,
+              type: "error",
+              duration: 1500,
+              onClose: () => {
+                this.addDialog = false;
+                this.dataSelect();
+              }
+            });
           }
         });
       }

+ 7 - 0
src/views/mission/mission.vue

@@ -513,6 +513,13 @@
             </div>
           </template>
         </el-table-column>
+        <el-table-column prop="insideDeliveryFee" label="特殊地址跑腿费(元)" width="100">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.insideDeliveryFee?scope.row.insideDeliveryFee:0 }}元
+            </div>
+          </template>
+        </el-table-column>
         <el-table-column prop="payMoney" label="支付金额(元)" width="100">
         </el-table-column>
         <el-table-column

+ 16 - 16
src/views/recharge/recharge.vue

@@ -266,13 +266,13 @@ export default {
         console.log(data, "修改备注");
         if (data && data.code === 0) {
           this.$message({
-          message: "修改成功",
-          type: "success",
-          duration: 1500,
-          onClose: () => {
-            this.dataSelect();
-          }
-            });
+            message: "修改成功",
+            type: "success",
+            duration: 1500,
+            onClose: () => {
+              // this.dataSelect();
+            }
+          });
           this.dialogFormVisible = false;
           this.dataSelect();
         }
@@ -281,7 +281,7 @@ export default {
 
     exportList() {
       this.exportVisible = true;
-      console.log(this.duanxinData.totalCount,'导出条数');
+      console.log(this.duanxinData.totalCount, "导出条数");
 
       if (this.duanxinData.totalCount >= 50000) {
         this.exportTitle = "导出错误";
@@ -290,19 +290,19 @@ export default {
         this.exportTitle = "导出";
         this.exportFlag = 2;
         this.exportVisible = true;
-        var userId = this.$cookie.get('userId')
+        var userId = this.$cookie.get("userId");
         // rechargeOrder, String acount,String userId
         this.$http({
           url: this.$http.adornUrl("admin/export/excelRecharge"),
           method: "get",
           params: this.$http.adornParams({
-            userId:userId,
+            userId: userId,
             rechargeOrder: this.orderNo,
-            acount: this.phone,
+            acount: this.phone
           })
         }).then(({ data }) => {
           console.log(data, "导出");
-          if(data.code==0){
+          if (data.code == 0) {
             this.exportTitle = "导出成功";
             this.exportFlag = 3;
           }
@@ -323,20 +323,20 @@ export default {
 .downloadList >>> .remark {
   width: 400px;
 }
-.downloadList  >>> .remark .con {
+.downloadList >>> .remark .con {
   display: flex;
   margin-bottom: 20px;
 }
-.downloadList  >>> .remark .btn {
+.downloadList >>> .remark .btn {
   display: flex;
   flex-direction: row-reverse;
 }
 
 /* 导出限制 */
-.downloadList  >>> .export {
+.downloadList >>> .export {
   width: 500px;
 }
-.downloadList  >>> .export .con {
+.downloadList >>> .export .con {
   display: flex;
   flex-direction: column;
   justify-content: center;

File diff ditekan karena terlalu besar
+ 675 - 521
src/views/selfShop/shopAdmin.vue


+ 5 - 1
src/views/selfShop/shopAmend.vue

@@ -1230,6 +1230,8 @@ export default {
 
     // 商品规格
     specifSelect() {
+      console.log(this.shopId,"商品规格请求参数");
+
       this.$http({
         url: this.$http.adornUrl("selfGoodsRule/list"),
         method: "get",
@@ -1237,6 +1239,8 @@ export default {
           shopId: this.shopId
         })
       }).then(({ data }) => {
+        console.log(data,"商品规格");
+
         let returnData = data.data;
         this.specifdata = returnData;
       });
@@ -1503,7 +1507,7 @@ export default {
   },
   mounted() {
     this.init();
-    this.specifSelect();
+    // this.specifSelect();
     window.scrollTo(0, 0);
     // this.brandSelect()
   },

+ 2 - 0
src/views/selfShop/shopPublish.vue

@@ -1401,6 +1401,8 @@ export default {
           shopId: this.shopId
         })
       }).then(({ data }) => {
+        console.log(data,'商品规格');
+
         let returnData = data.data;
         this.specifdata = returnData;
       });

+ 1 - 0
src/views/servicePackage/servicePackage.vue

@@ -509,6 +509,7 @@
                   v-model="i.shop"
                   placeholder="请选择店铺名称"
                   style="width: 280px"
+                  filterable
                   @change="shopNameChange($event, i)"
                 >
                   <el-option

+ 47 - 1
src/views/shopsList/shopsList.vue

@@ -73,7 +73,6 @@
         v-loading="tableDataLoading"
         :data="typeDatas.list"
         row-key="id"
-        height="650px"
       >
         <el-table-column label="编号" prop="shopId" width="80" fixed="left">
         </el-table-column>
@@ -1542,6 +1541,7 @@ var geocoder,
 export default {
   data() {
     return {
+      routeFlag: true,
       phone: "",
       nickName: "",
       limit: 10,
@@ -2313,6 +2313,15 @@ export default {
           isActivity: this.isActivity
         })
       }).then(({ data }) => {
+        let canshu = {
+          page: this.page,
+          limit: this.limit,
+          shopName1: this.shopName1,
+          region: this.region,
+          isActivity: this.isActivity
+        };
+        sessionStorage.setItem("shopsList", JSON.stringify(canshu));
+
         this.tableDataLoading = false;
         for (var i in data.data.list) {
           if (data.data.list[i].shopBanner) {
@@ -3496,8 +3505,45 @@ export default {
     }
   },
   mounted() {
+    let flag = sessionStorage.getItem("shopsListFlag");
+    console.log(flag, "shopsListFlag");
+
+    if (flag=='true') {
+      let parmas = JSON.parse(sessionStorage.getItem("shopsList"));
+      this.page = parmas.page;
+      this.limit = parmas.limit;
+      this.shopName1 = parmas.shopName1;
+      this.region = parmas.region;
+      this.isActivity = parmas.isActivity;
+    } else {
+      this.page = 1;
+      this.limit = 10;
+      this.shopName1 = "";
+      this.region = "";
+      this.isActivity = "";
+      sessionStorage.removeItem("shopsList")
+    }
     this.dataSelect();
     this.dataSelect2();
+  },
+  beforeRouteEnter(to, from, next) {
+    if (
+      from.name == "shopsListAdmin" ||
+      from.name == "shopsOrder" ||
+      from.name == "shopDatas" ||
+      from.name == "bondList" ||
+      from.name == "couponShop" ||
+      from.name == "shopWallet" ||
+      from.name == "pingjiaList" ||
+      from.name == "shopPrintSet"
+    ) {
+      sessionStorage.setItem("shopsListFlag", true);
+      console.log("是通过修改页面跳转过来的");
+    } else {
+      sessionStorage.setItem("shopsListFlag", false);
+      console.log("直接进入页面");
+    }
+    next(vm => {});
   }
 };
 </script>

+ 6 - 6
src/views/shopsList/shopsOrder.vue

@@ -121,12 +121,12 @@
       <div style="margin:5px;display: inline-block;">
         <span>支付开始时间:</span>
         <el-date-picker
-          style="width: 160px;margin-left: 10px;"
+          style="width: 200px;margin-left: 10px;"
           v-model="payStartTime"
           align="right"
           type="datetime"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
           placeholder="选择开始时间"
         >
         </el-date-picker
@@ -135,12 +135,12 @@
       <div style="margin:5px;display: inline-block;">
         <span>支付截止时间:</span>
         <el-date-picker
-          style="width: 160px;margin-left: 10px;"
+          style="width: 200px;margin-left: 10px;"
           v-model="payEndTime"
           align="right"
           type="datetime"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
           placeholder="选择截止时间"
         >
         </el-date-picker>