소스 검색

Merge branch 'refs/heads/master' into ScrmStore

chenguo 1 개월 전
부모
커밋
3a36a613fc

+ 39 - 0
.env.prod-zkzh

@@ -0,0 +1,39 @@
+# 页面标题
+VUE_APP_TITLE = 中康SCRM管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX = 陕西中康智慧
+# 公司名称
+VUE_APP_COMPANY_NAME = 陕西中康智慧药房有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD = 陕ICP备2024048690号-2
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/zkzh_logo.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = zkzh-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = zkzh-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://zkzhtcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://zkzhobs.ylrztop.com
+# 生产环境配置
+ENV = 'production'
+
+#FS管理系统/生产环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 2 - 2
src/api/his/storeOrder.js

@@ -159,7 +159,7 @@ export function updateOrder(data) {
 // 修改订单
 export function updateStoreOrder(data) {
   return request({
-    url: '/his/storeOrder/updateStoreOrder',
+    url: '/his/storeOrder',
     method: 'put',
     data: data
   })
@@ -296,4 +296,4 @@ export function getErpAccount() {
     url: '/his/storeOrder/getErpAccount',
     method: 'get'
   })
-}
+}

BIN
src/assets/logo/zkzh_logo.png


+ 123 - 32
src/views/components/his/storeOrderDetails.vue

@@ -302,7 +302,8 @@
                          <el-option key="STO"  label="申通" value="ZTO" />
                          <el-option key="JD"  label="京东" value="JD" />
                          <el-option key="DBL"  label="德邦" value="DBL" />
-						 <el-option key="YD"  label="韵达" value="YD" />
+						              <el-option key="YD"  label="韵达" value="YD" />
+						              <el-option key="STO"  label="申通" value="STO" />
                        </el-select>
                      </el-form-item>
                     <el-form-item label="物流单号" prop="deliverySn"  >
@@ -342,6 +343,7 @@
                           :key="dict.dictValue"
                           :label="dict.dictLabel"
                           :value="dict.dictValue"
+                          :disabled="dict.dictLabel == '待推送'"
                         />
                       </el-select>
                    </el-form-item>
@@ -356,7 +358,7 @@
                       </el-select>
                    </el-form-item>
                    <el-form-item label="物流跟踪状态" prop="deliveryType" >
-                   <el-select v-model="editForm.deliveryType" placeholder="请选择状态" clearable size="small" filterable>
+                    <el-select v-model="editForm.deliveryType" placeholder="请选择状态" clearable size="small" filterable>
                         <el-option
                           v-for="dict in deliveryTypeOptions "
                           :key="dict.dictValue"
@@ -366,7 +368,14 @@
                       </el-select>
                    </el-form-item>
                    <el-form-item label="详情地址" prop="userAddress"  >
-                    <el-input v-model="editForm.userAddress" placeholder="请输入" />
+                    <el-cascader
+                      ref="citySelect"
+                      v-model="cityIds"
+                      :options="citys"
+                      @change="handleCityChange"
+                      clearable>
+                    </el-cascader>
+                    <el-input v-model="editForm.userAddress" placeholder="请输入详细地址(不含省/市/区)" />
                    </el-form-item>
                    <el-form-item label="收货人电话" prop="userPhone"  >
                     <el-input v-model="editForm.userPhone" placeholder="请输入" />
@@ -428,6 +437,7 @@ import packageOrderDetails from '../his/packageOrderDetails2.vue';
 import prescribeDetails from '../his/prescribeDetails.vue';
 import msgDetails from '../../components/his/followMsgDetails.vue';
 import { getTcmScheduleList } from "@/api/company/schedule";
+import {getCitys} from "@/api/store/city";
   export default {
     name: "orderDe",
     props:["data"],
@@ -544,8 +554,12 @@ import { getTcmScheduleList } from "@/api/company/schedule";
           deliveryName:null,
           deliverySn:null,
           orderId:null,
-        }
+        },
+        cityIds:[],
+        citys:[],
+        userAddress:null,
       }
+
     },
 
     created() {
@@ -600,6 +614,35 @@ import { getTcmScheduleList } from "@/api/company/schedule";
 
     },
     methods: {
+      getCitys() {
+        return getCitys().then(res => {
+          this.citys = res.data || [];
+          return this.citys;
+        });
+      },
+      // 新增:切换省市区
+      handleCityChange(val) {
+        this.cityIds = Array.isArray(val) ? val : [];
+      },
+
+      // 新增:根据已选的 cityIds 从 citys 中获取对应的 label 数组 [省, 市, 区]
+      getCityLabelsByIds() {
+        if (!this.cityIds || this.cityIds.length === 0) return [];
+        const [pVal, cVal, aVal] = this.cityIds;
+        const p = this.citys.find(p => p.value === pVal);
+        const c = p?.children?.find(c => c.value === cVal);
+        const a = c?.children?.find(a => a.value === aVal);
+        return [p?.label, c?.label, a?.label].filter(Boolean);
+      },
+
+      // 新增:拼装完整地址 = 省 市 区 + 详细地址
+      buildFullAddress() {
+        const region = this.getCityLabelsByIds().join(' ');
+        const detail = (this.editForm.userAddress || '').trim();
+        console.log(region)
+        console.log(detail)
+        return region && detail ? `${region} ${detail}` : (region || detail || '');
+      },
 
       followMsg(row){
          const userId = this.item.userId;
@@ -630,8 +673,11 @@ import { getTcmScheduleList } from "@/api/company/schedule";
       },
       editDelivery(){
         this.editDy.open = true;
+        console.log(this.item)
         this.editDyForm.orderId = this.item.orderId;
-
+        this.editDyForm.deliveryId = this.item.deliveryId;
+        this.editDyForm.deliveryCode = this.item.deliveryCode;
+        this.editDyForm.deliverySn = this.item.deliverySn;
       },
       showListD(){
         if(this.showList){
@@ -707,34 +753,74 @@ import { getTcmScheduleList } from "@/api/company/schedule";
       });
     },
 
-    //修改订单状态
-    submitEditForm(){
-        this.$refs["editForm"].validate(valid => {
-        if (valid) {
-          updateStoreOrder(this.editForm).then(response => {
-            if (response.code === 200) {
-              this.msgSuccess("操作成功");
-               this.edit.open = false;
-              getOrder(this.item.orderId).then(response => {
-                this.item=response.data
-                that.getlogList(this.item.orderId);
-                that.$parent.$parent.getList();
-              });
-            }
-          });
-        }
-      });
+    // 修改订单状态
+    submitEditForm() {
+      this.$refs["editForm"].validate(valid => {
+        if (!valid) return;
+
+        // 提交前拼接完整地址
+        const payload = {
+          ...this.editForm,
+          userAddress: this.buildFullAddress(),
+        };
+
+        updateStoreOrder(payload).then(response => {
+          if (response.code === 200) {
+            this.msgSuccess("操作成功");
+            this.edit.open = false;
+            getOrder(this.item.orderId).then(response => {
+              this.item = response.data;
+              this.getlogList(this.item.orderId);
+              this.$parent.$parent.getList();
+            });
+          }
+        }).finally(()=>{
+          this.editDyForm.deliveryCode = null;
+          this.editDyForm.orderId = null;
+          this.editDyForm.deliveryId = null;
+        });
+        });
     },
-    editOrder(){
-        this.edit.open=true;
-        this.editForm.orderId=this.item.orderId;
-        this.editForm.remark=this.item.remark;
-        this.editForm.userAddress = this.item.userAddress.toString();
-        this.editForm.userPhone = this.item.userPhone.toString();
-        this.editForm.status = this.item.status.toString();
-        this.editForm.deliveryType = this.item.deliveryType.toString();
-        this.editForm.deliveryStatus = this.item.deliveryStatus.toString();
+    editOrder() {
+      this.edit.open = true;
+      this.editForm.orderId = this.item.orderId;
+      this.editForm.remark = this.item.remark;
+
+      // 先设置其他同步的字段
+      this.editForm.userPhone = this.item.userPhone != null ? this.item.userPhone.toString() : "";
+      this.editForm.status = this.item.status != null ? this.item.status.toString() : "";
+      this.editForm.deliveryType = this.item.deliveryType;
+      this.editForm.deliveryStatus = this.item.deliveryStatus;
+
+      // 等城市数据加载后再解析地址
+      const currentAddress = (this.item.userAddress || "").toString().trim();
+      this.getCitys().then(() => {
+        if (!currentAddress) {
+          this.cityIds = [];
+          this.editForm.userAddress = "";
+          return;
+        }
+
+        // 假设格式为:省 市 区 详细地址(空格分隔)
+        const parts = currentAddress.split(/\s+/);
+        const detail = parts.pop() || ""; // 最后一段作为详细地址
+        const provLabel = parts[0];
+        const cityLabel = parts[1];
+        const areaLabel = parts[2];
 
+        const province = this.citys.find(p => p.label === provLabel);
+        const city = province?.children?.find(c => c.label === cityLabel);
+        const area = city?.children?.find(a => a.label === areaLabel);
+
+        if (province && city && area) {
+          this.cityIds = [province.value, city.value, area.value];
+        } else {
+          console.warn("未匹配到完整省市区:", { provLabel, cityLabel, areaLabel });
+          this.cityIds = [];
+        }
+        // 把详细地址写回到输入框(只保留详细地址,不含省市区)
+        this.editForm.userAddress = detail;
+      });
     },
     updateExpress(){
       var that=this;
@@ -1012,7 +1098,12 @@ import { getTcmScheduleList } from "@/api/company/schedule";
                       this.$parent.$parent.getList();
                   });
               }
-            });
+            }).finally(()=>{
+              this.editDyForm.deliveryCode = null;
+              this.editDyForm.orderId = null;
+              this.editDyForm.deliveryId = null;
+              this.editDyForm.deliverySn = null;
+            })
           }
         });
       },

+ 11 - 3
src/views/components/his/storeOrderDetails2.vue

@@ -300,7 +300,8 @@
                          <el-option key="ZTO"  label="中通" value="ZTO" />
                          <el-option key="JD"  label="京东" value="JD" />
                          <el-option key="DBL"  label="德邦" value="DBL" />
-						 <el-option key="YD"  label="韵达" value="YD" />
+						              <el-option key="YD"  label="韵达" value="YD" />
+						              <el-option key="STO"  label="申通" value="STO" />
                        </el-select>
                      </el-form-item>
                     <el-form-item label="物流单号" prop="deliverySn"  >
@@ -620,8 +621,10 @@ import { getTcmScheduleList } from "@/api/company/schedule";
       },
       editDelivery(){
         this.editDy.open = true;
+        console.log(this.item)
         this.editDyForm.orderId = this.item.orderId;
-
+        this.editDyForm.deliveryId = this.item.deliveryId;
+        this.editDyForm.deliveryCode = this.item.deliveryCode;
       },
       showListD(){
         if(this.showList){
@@ -1001,7 +1004,12 @@ import { getTcmScheduleList } from "@/api/company/schedule";
                       this.$parent.$parent.getList();
                   });
               }
-            });
+            }).finally(()=>{
+              this.editDyForm.deliveryCode = null;
+              this.editDyForm.orderId = null;
+              this.editDyForm.deliveryId = null;
+              this.editDyForm.deliverySn = null;
+            })
           }
         });
       },

+ 4 - 3
src/views/his/storeOrder/order1.vue

@@ -817,7 +817,7 @@ export default {
       erpAccountList: [], // ERP账户列表
       erpAccountQueryList:[], // ERP账户查询条件列表
       erpAccountForm: {
-        selectedAccount: null // 选中的账户ID
+        selectedAccount: [] // 选中的账户ID
       },
       orderSummary: null, // 订单统计信息
       erpPhoneValue:[],
@@ -1309,6 +1309,7 @@ export default {
           // 设置默认值:第一条真实账户
           if (list.length && !this.queryParams.erpAccount) {
               this.$set(this.queryParams, 'erpAccount', list[0]);
+              this.getList();
           }
         } else {
           this.$message.error(response.msg || '获取ERP账户列表失败');
@@ -1435,7 +1436,7 @@ export default {
         if (response.code === 200) {
           this.$message.success('订单ERP账号设置成功');
           this.cancelErpAccountDialog();
-          this.getList(); // 刷新列表
+          this.getErpAccountList(); // 刷新列表
         } else {
           this.$message.error(response.msg || 'ERP账号设置失败');
         }
@@ -1495,7 +1496,7 @@ export default {
         if (response.code === 200) {
           this.$message.success('ERP订单创建成功');
           this.cancelErpAccountDialog();
-          this.getList(); // 刷新列表
+          this.getErpAccountList(); // 刷新列表
         } else {
           this.$message.error(response.msg || 'ERP订单创建失败');
         }

+ 3 - 0
src/views/system/config/config.vue

@@ -175,6 +175,9 @@
             <el-form-item label="会员服务协议" prop="vipService">
               <editor v-model="form3.vipService" :min-height="292"/>
             </el-form-item>
+            <el-form-item label="会员自动续费协议" prop="vipAutomaticService">
+              <editor v-model="form3.vipAutomaticService" :min-height="292"/>
+            </el-form-item>
 
             <div class="footer">
               <el-button type="primary" @click="submitForm3">提  交</el-button>