Browse Source

Merge remote-tracking branch 'origin/ecp' into ecp

纪新园 1 month ago
parent
commit
381df1c46e

+ 1 - 1
README.md

@@ -96,7 +96,7 @@ npm install --registry=https://registry.npmmirror.com
   - 中
     - [x] 库存不足可提交订单,仅提示不限制(中)
     - [x] 订单主表显示行数;查询页可见每单行数(中)
-    - [ ] 支持模糊搜索物料,弹窗多选添加(中) -- 什么ui结构?
+    - [x] 支持模糊搜索物料,弹窗多选添加(中) -- 什么ui结构?
     - [ ] 搜索新增“物料”条件,可查含某物料的订单(中)
       - 需要接口: 根据物料id搜索包含该物料的主订单
     - [ ] 工厂端新增“订单查询/审核”功能,用于批准发货(急) -- 待确认 备注:原括号标注为“急”,为保持原文未调整优先级归类。

+ 24 - 7
src/components/announcement/announcement-form-mixin.js

@@ -378,14 +378,20 @@ export default {
     'formData.categoryId': {
       handler(newVal) {
         const key = newVal != null ? String(newVal) : '';
-        if (key && this.categoryOptions && this.categoryOptions.length > 0) {
-          const category = this.categoryOptions.find(item => item.id === key || item.value === key);
-          if (category) {
-            this.formData.categoryName = category.name;
-            return;
-          }
+        // 当未选择分类时,清空名称
+        if (!key) {
+          this.formData.categoryName = '';
+          return;
+        }
+        // 当分类选项尚未加载完成时,不覆盖已有的名称,避免被清空
+        if (!this.categoryOptions || this.categoryOptions.length === 0) {
+          return;
+        }
+        // 分类选项已就绪时,按选项同步名称;若未命中则保留现有名称
+        const category = this.categoryOptions.find(item => item.id === key || item.value === key);
+        if (category && category.name != null) {
+          this.formData.categoryName = String(category.name);
         }
-        this.formData.categoryName = '';
       },
       immediate: true
     },
@@ -696,6 +702,17 @@ export default {
           // 选项加载后,标准化当前categoryId为字符串以保证回显
           if (this.formData && this.formData.categoryId != null && this.formData.categoryId !== '') {
             this.formData.categoryId = String(this.formData.categoryId);
+            // 分类选项加载完成后,尝试回填分类名称
+            const key = String(this.formData.categoryId);
+            const matched = this.categoryOptions.find(item => item.id === key || item.value === key);
+            if (matched && matched.name != null) {
+              this.formData.categoryName = String(matched.name);
+            } else {
+              // 找不到匹配项时,保留现有分类名称并给予轻提示
+              if (this.formData.categoryName) {
+                this.$message && this.$message.warning && this.$message.warning('当前分类已不可选,保留原分类名称');
+              }
+            }
           }
           // 修复首次加载下拉无数据:同步更新表单配置中分类列的dicData,触发Avue响应式渲染
           if (this.formOption && Array.isArray(this.formOption.column)) {

+ 2 - 2
src/views/claimSettlement/detailsPage.vue

@@ -132,11 +132,11 @@ export default {
             disabled: true,
           },
           {
-            label: "消费者姓名",
+            label: "联系人",
             prop: "consumerName",
           },
           {
-            label: "消费者电话",
+            label: "电话",
             prop: "consumerPhone",
           },
           {

+ 2 - 2
src/views/claimSettlement/index.vue

@@ -105,14 +105,14 @@ export default {
             overHidden: true
           },
           {
-            label: "消费者姓名",
+            label: "联系人",
             prop: "consumerName",
             width: 90,
             search: true,
             overHidden: true
           },
           {
-            label: "消费者电话",
+            label: "电话",
             prop: "consumerPhone",
             width: 90,
             overHidden: true

+ 11 - 9
src/views/store/detailsPage.vue

@@ -45,13 +45,13 @@
       <trade-card title="基础资料" style="margin-top: 60px" v-loading="loadingBtn">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpsTypeIdLabel">
-            <span style="color: #409eff; cursor: pointer" @click="corpTypeVisible = true"> 客户分类 </span>
+            <span style="color: #409eff; cursor: pointer" @click="corpTypeVisible = true"> 店面分类 </span>
           </template>
           <template slot="corpsTypeId">
             <avue-input-tree
               v-model="form.corpsTypeId"
               :disabled="option.disabled"
-              placeholder="请选择客户分类"
+              placeholder="请选择店面分类"
               :dic="corpTypeList"
               :props="props"
             >
@@ -211,7 +211,7 @@
           </template>
         </avue-crud>
       </trade-card>
-      <containerTitle title="上传附件"></containerTitle>
+      <containerTitle title="店面照片"></containerTitle>
       <c-upload
         v-loading="loadingBtn"
         typeUpload="CD"
@@ -223,7 +223,7 @@
         :mainImageType="true"
       ></c-upload>
       <el-dialog
-        title="设置客户分类"
+        title="设置店面分类"
         v-dialogDrag
         :visible.sync="corpTypeVisible"
         class="avue-dialog"
@@ -387,7 +387,7 @@ export default {
         span: 6,
         column: [
           {
-            label: "客户名称",
+            label: "店铺名称",
             prop: "cname",
             rules: [
               {
@@ -398,7 +398,7 @@ export default {
             ],
           },
           {
-            label: "客户分类",
+            label: "店面分类",
             prop: "corpsTypeId",
             rules: [
               {
@@ -589,7 +589,7 @@ export default {
             ],
           },
           {
-            label: "地址",
+            label: "所属地区",
             prop: "belongtoarea",
             dicData: [],
             dataType: "string",
@@ -826,8 +826,10 @@ export default {
     },
     // 启用或禁用
     editEnable() {
-      if (this.form.checkStatus != "审核通过") {
-        return this.$message.error("审核通过以后可以启用");
+      if (this.form.enableOrNot == 0) {
+        if (this.form.checkStatus != "审核通过") {
+          return this.$message.error("审核通过以后可以启用");
+        }
       }
       let data = this.form;
       editenable({ id: data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then((res) => {