From ef882b2154f55ec24a6f664aeffa0734be8e52f0 Mon Sep 17 00:00:00 2001
From: huangdeliang <huangdeliang@skieer.com>
Date: Sat, 17 Apr 2021 18:00:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=A2=E5=8D=95=E4=BF=AE?=
 =?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/main/filters/local/application.yml    |  5 +--
 stdiet-ui/src/components/OrderAdd/index.vue   | 32 +++++++++--------
 stdiet-ui/src/components/OrderEdit/index.vue  | 34 +++++++++++++------
 3 files changed, 44 insertions(+), 27 deletions(-)

diff --git a/stdiet-admin/src/main/filters/local/application.yml b/stdiet-admin/src/main/filters/local/application.yml
index 34330d88c..b3bead739 100644
--- a/stdiet-admin/src/main/filters/local/application.yml
+++ b/stdiet-admin/src/main/filters/local/application.yml
@@ -19,7 +19,7 @@ stdiet:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8091
+  port: 8090
   servlet:
     # 应用的访问路径
     context-path: /
@@ -186,5 +186,6 @@ aliyun:
 
 lucene:
   index:
-    nutritionQuestion: D:\develop\LuceneIndex\nutritionQuestion
+#    nutritionQuestion: D:\develop\LuceneIndex\nutritionQuestion
+    nutritionQuestion: /Users/wonder/Documents/Workspaces/java/ShengtangManage/running/uploadPath/nutritionQuestion
 
diff --git a/stdiet-ui/src/components/OrderAdd/index.vue b/stdiet-ui/src/components/OrderAdd/index.vue
index da1379a3d..62ffd7962 100644
--- a/stdiet-ui/src/components/OrderAdd/index.vue
+++ b/stdiet-ui/src/components/OrderAdd/index.vue
@@ -53,8 +53,12 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="收款账号" prop="accountId">
-            <el-select v-model="form.accountId" placeholder="请选择">
+          <el-form-item label="进粉渠道" prop="accountId">
+            <el-select
+              v-model="form.accountId"
+              placeholder="请选择"
+              @change="handleOnChanelIdChange"
+            >
               <el-option
                 v-for="dict in accountIdOptions"
                 :key="dict.dictValue"
@@ -157,10 +161,7 @@
         </el-col>
         <el-col :span="8" v-show="orderRateOptionsShow">
           <el-form-item label="拆分比例" prop="nutritionistRate">
-            <el-select
-              v-model="form.nutritionistRate"
-              placeholder="请选择"
-            >
+            <el-select v-model="form.nutritionistRate" placeholder="请选择">
               <el-option
                 v-for="dict in orderRateOptions"
                 :key="dict.dictValue"
@@ -672,12 +673,15 @@ export default {
     handleOrderTypeChange() {
       // console.log(this.form.orderTypeList);
     },
+    handleOnChanelIdChange(val) {
+      this.initPlanningAndOperation();
+    },
   },
   watch: {
     // 监听收款账号的变化
-    "form.accountId": function (newVal, oldVal) {
-      this.initPlanningAndOperation();
-    },
+    // "form.accountId": function (newVal, oldVal) {
+    //   this.initPlanningAndOperation();
+    // },
     "form.orderTypeList": function (newVal, oldVal) {
       //判断订单类型是否选择了二开
       if (newVal[1] == 1) {
@@ -697,11 +701,11 @@ export default {
       }
       //判断是否选择了体验单
       if (newVal[0] == 2) {
-         this.afterNutiShow = false;
-         this.form.onSaleId = parseInt(this.onSaleIdOptions[1].dictValue);
-         this.form.serveTimeId = 7;
-         this.form.conditioningProjectId = 12;
-      }else{
+        this.afterNutiShow = false;
+        this.form.onSaleId = parseInt(this.onSaleIdOptions[1].dictValue);
+        this.form.serveTimeId = 7;
+        this.form.conditioningProjectId = 12;
+      } else {
         this.form.onSaleId = null;
         this.form.serveTimeId = 90;
         this.afterNutiShow = true;
diff --git a/stdiet-ui/src/components/OrderEdit/index.vue b/stdiet-ui/src/components/OrderEdit/index.vue
index b4d3bb8c5..746c58d91 100644
--- a/stdiet-ui/src/components/OrderEdit/index.vue
+++ b/stdiet-ui/src/components/OrderEdit/index.vue
@@ -11,7 +11,11 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="90px">
         <el-col :span="16">
           <el-form-item label="订单类型" prop="orderTypeName">
-            <el-input v-model="form.orderTypeName" placeholder="" :disabled="true"/>
+            <el-input
+              v-model="form.orderTypeName"
+              placeholder=""
+              :disabled="true"
+            />
           </el-form-item>
         </el-col>
         <el-col :span="8">
@@ -32,8 +36,12 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="收款账号" prop="accountId">
-            <el-select v-model="form.accountId" placeholder="请选择">
+          <el-form-item label="进粉渠道" prop="accountId">
+            <el-select
+              v-model="form.accountId"
+              placeholder="请选择"
+              @change="handleOnChannelIdChange"
+            >
               <el-option
                 v-for="dict in accountIdOptions"
                 :key="dict.dictValue"
@@ -389,7 +397,7 @@ export default {
       //是否显示售后、营养师、营养师助理
       afterSaleNutriAssShow: true,
       //是否显示策划、策划助理、运营、运营助理
-      planOperatorShow: true
+      planOperatorShow: true,
     };
   },
   created() {
@@ -571,9 +579,9 @@ export default {
       this.resetForm("form");
       // console.log("--"+obj.orderType);
       this.onSaleShow = this.form.orderType == "2";
-      this.afterSaleNutriAssShow = this.form.orderType != "2" && this.form.afterSaleCommissOrder == 0;
+      this.afterSaleNutriAssShow =
+        this.form.orderType != "2" && this.form.afterSaleCommissOrder == 0;
       this.planOperatorShow = this.form.afterSaleCommissOrder == 0;
-
     },
     handleOnClosed() {
       this.reset();
@@ -609,13 +617,17 @@ export default {
         };
       }
     },
-  },
-  watch: {
-    // 监听收款账号的变化
-    "form.accountId": function (newVal, oldVal) {
-      // console.log("updte");
+    handleOnChannelIdChange(val) {
+      console.log(val);
       this.initPlanningAndOperation();
     },
   },
+  watch: {
+    // 监听收款账号的变化
+    // "form.accountId": function (newVal, oldVal) {
+    //   // console.log("updte");
+    //   this.initPlanningAndOperation();
+    // },
+  },
 };
 </script>