Sfoglia il codice sorgente

叮当国医bug修复

peicj 6 giorni fa
parent
commit
ed80e926f3

+ 7 - 6
src/views/course/userCourse/index.vue

@@ -828,6 +828,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.queryParams.companyIdsList = [];
       this.queryParams.isShow = this.activeName
       this.handleQuery();
     },
@@ -1103,24 +1104,24 @@ export default {
     handleAmountInput(rule, field) {
       let value = rule[field];
       if (value === null || value === undefined) return;
-      
+
       // 转换为字符串处理
       let str = value.toString();
-      
+
       // 移除除数字和小数点外的所有字符
       str = str.replace(/[^0-9.]/g, '');
-      
+
       // 只保留一个小数点
       const dotIndex = str.indexOf('.');
       if (dotIndex !== -1) {
         str = str.substring(0, dotIndex + 1) + str.substring(dotIndex + 1).replace(/\./g, '');
       }
-      
+
       // 限制小数点后最多两位
       if (dotIndex !== -1 && str.length > dotIndex + 3) {
         str = str.substring(0, dotIndex + 3);
       }
-      
+
       // 转换回数字并更新
       rule[field] = parseFloat(str) || 0;
     },
@@ -1149,7 +1150,7 @@ export default {
     validateMinAmount(rule, value, callback) {
       // debugger;
       // const maxAmount = this.form29.rules[].maxAmount
-      
+
       const index = rule.index;
       const maxAmount = this.openRedPage.rules[index].maxAmount;
 

+ 21 - 0
src/views/hisStore/adv/index.vue

@@ -392,6 +392,27 @@ export default {
         this.form.status = response.data.status.toString();
         this.form.advType = response.data.advType.toString();
         this.form.showType = response.data.showType ? response.data.showType.toString() : "";
+        // 根据 imageUrl 判断 urlType
+        if (this.form.imageUrl) {
+          // 可以根据文件扩展名判断是图片还是视频
+          const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp'];
+          const videoExtensions = ['.mp4', '.avi', '.mov', '.wmv', '.flv', '.mkv'];
+
+          const lowerImageUrl = this.form.imageUrl.toLowerCase();
+          let isImage = imageExtensions.some(ext => lowerImageUrl.includes(ext));
+          let isVideo = videoExtensions.some(ext => lowerImageUrl.includes(ext));
+
+          if (isImage) {
+            this.form.urlType = 1; // 图片
+          } else if (isVideo) {
+            this.form.urlType = 2; // 视频
+          } else {
+            this.form.urlType = 1; // 默认图片
+          }
+        } else {
+          this.form.urlType = 1; // 默认图片
+        }
+        console.log('urlType:', this.form.urlType, typeof this.form.urlType);
         this.open = true;
         this.title = "修改广告";
         setTimeout(() => {

+ 4 - 0
src/views/hisStore/store/index.vue

@@ -903,6 +903,10 @@ export default {
         this.form = response.data;
         this.open = true;
         this.title = "修改店铺";
+        // 移除 phone 字段的验证规则
+        const newRules = Object.assign({}, this.rules);
+        delete newRules.phone;
+        this.rules = newRules;
         let str = this.form.shippingType
         this.form.shippingType = str.split(",")
         this.form.cityIds = ((this.form.cityIds).split(",")).map(Number)

+ 1 - 0
src/views/hisStore/storeCouponIssue/index.vue

@@ -234,6 +234,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.dateRange = [];
       this.resetForm("queryForm");
       this.handleQuery();
     },

+ 10 - 5
src/views/hisStore/storeProduct/index.vue

@@ -985,7 +985,7 @@ export default {
         // 设置上传的请求头部
         headers: { Authorization: "Bearer " + getToken() },
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/store/storeProduct/importData"
+        url: process.env.VUE_APP_BASE_API + "/store/store/storeProduct/importData"
       },
       // 添加药品相关字段
       isDrugOptions: [
@@ -1177,9 +1177,9 @@ export default {
         precautions: [
           { required: true, message: "注意事项不能为空", trigger: "blur" }
         ],
-        // storeId :[
-        //   { required: true, message: "所属店铺不能为空", trigger: "blur"}
-        // ],
+        storeId :[
+          { required: true, message: "所属店铺不能为空", trigger: "blur"}
+        ],
       }
     };
   },
@@ -1684,7 +1684,12 @@ export default {
           }
           addOrEdit(this.form).then(response => {
             if (response.code === 200) {
-              this.msgSuccess("修改成功");
+              // 根据是否有productId判断是新增还是修改
+              if (this.form.productId) {
+                this.msgSuccess("修改成功");
+              } else {
+                this.msgSuccess("新增成功");
+              }
               this.open = false;
               this.getList();
             }

+ 13 - 14
src/views/qw/externalContact/index.vue

@@ -181,8 +181,8 @@
             @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="添加时间" prop="createTime">
-        <el-date-picker v-model="queryParams.createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
+      <el-form-item label="添加时间">
+        <el-date-picker v-model="daterange" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
       </el-form-item>
 
 
@@ -427,6 +427,7 @@ export default {
   components: { PaginationMore },
   data() {
     return {
+      daterange: [],
       // 遮罩层
       loading: false,
       // 导出遮罩层
@@ -516,6 +517,8 @@ export default {
         isRepeat: null,
         commentStatus: null,
         isBindMini:null,
+        sTime:null,
+        eTime:null
       },
       //标签
       changeTagDialog:{
@@ -609,6 +612,13 @@ export default {
     /** 查询企业微信客户列表 */
     getList() {
       this.loading = true;
+      if(this.daterange!=null){
+        this.queryParams.sTime=this.daterange[0];
+        this.queryParams.eTime=this.daterange[1];
+      }else{
+        this.queryParams.sTime=null;
+        this.queryParams.eTime=null;
+      }
       listExternalContact(this.queryParams).then(response => {
         this.externalContactList = response.rows;
         this.total = response.total;
@@ -646,7 +656,6 @@ export default {
         status: 0,
         stageStatus: "0",
         createBy: null,
-        createTime: null,
         updateBy: null,
         updateTime: null,
         transferTime: null,
@@ -672,16 +681,6 @@ export default {
       };
       this.resetForm("form");
     },
-    change(){
-      if(this.createTime!=null){
-        this.queryParams.sTime=this.createTime[0];
-        this.queryParams.eTime=this.createTime[1];
-      }else{
-        this.queryParams.sTime=null;
-        this.queryParams.eTime=null;
-      }
-
-    },
     /** 搜索按钮操作 */
     handleQuery() {
       //验证是否选择企业
@@ -720,10 +719,10 @@ export default {
       this.queryParams.corpId= this.qwCompanyList[0].dictValue;
       this.selectTags=[];
       this.queryParams.qwUserId = null;
-      this.createTime=null;
       this.queryParams.sTime=null;
       this.queryParams.eTime=null;
       this.externalContactList=[];
+      this.daterange=[];
       if(this.qwCompanyList!=null){
         this.queryParams.companyId=this.qwCompanyList[0].companyId;
         this.getAllUserlist(this.queryParams.companyId);

+ 4 - 0
src/views/system/keyword/index.vue

@@ -196,6 +196,9 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        keyword: [
+          { required: true, message: "关键字不能为空", trigger: "blur" }
+        ],
       }
     };
   },
@@ -252,6 +255,7 @@ export default {
       this.reset();
       this.open = true;
       this.title = "添加关键字";
+      this.keywordId = null;
     },
     /** 修改按钮操作 */
     handleUpdate(row) {