Преглед изворни кода

feat(商品上线):字段变更

snow пре 1 година
родитељ
комит
5f90d7fbca

+ 16 - 14
src/views/goodStore/goodsCost/components/addEdit.vue

@@ -73,30 +73,31 @@
           >
             <el-row style="padding-bottom">
               <el-col :span="8">
-                <el-form-item label="对接平台" prop="platform_type">
-                  <el-select
-                    placeholder="对接平台"
-                    style="width:100%"
-                    v-model="ruleForm.platform_type"
-                    @change="ruleForm.platform = ''"
-                  >
-                    <el-option label="有赞平台" value="1" />
-                    <el-option label="无对接" value="0" />
-                  </el-select>
-                </el-form-item>
-
                 <el-form-item label="所属平台" prop="platform">
                   <search-terrace
-                    :value="ruleForm.platform"
                     :is_show="'1'"
-                    :disabled="!ruleForm.platform_type"
                     :is-detail="false"
                     :placeholder="'所属平台'"
+                    :value="ruleForm.platform"
                     :platformType="ruleForm.platform_type"
                     @searchChange="platform_codesearchChange"
                   />
                 </el-form-item>
 
+                <el-form-item label="对接平台" prop="platform_type">
+                  <el-select
+                    :disabled="!ruleForm.platform_type"
+                    v-model="ruleForm.platform_type"
+                    @change="ruleForm.platform = ''"
+                    disabled
+                    placeholder="对接平台"
+                    style="width:100%"
+                  >
+                    <el-option label="有赞平台" value="1" />
+                    <el-option label="无对接" value="0" />
+                  </el-select>
+                </el-form-item>
+
                 <el-form-item label="定价模式" prop="is_fixed">
                   <el-select v-model="ruleForm.is_fixed" style="width:100%">
                     <el-option
@@ -267,6 +268,7 @@ export default {
       const { id, code, label, platform_type } = e;
       this.ruleForm.platform = id || "";
       this.isYZPlatform = platform_type === "1";
+      this.ruleForm.platform_type = platform_type
       this.$refs.ruleForm.validateField("platform");
     },
     async submitForm() {

+ 26 - 15
src/views/goodStore/goodsOnline/add.vue

@@ -13,31 +13,32 @@
       >
         <el-row>
           <el-col :span="8">
-            <el-form-item label="对接平台" prop="platform_type">
-              <el-select
-                placeholder="对接平台"
-                style="width:100%"
-                v-model="ruleForm.platform_type"
-                @change="ruleForm.platform = ''"
-              >
-                <el-option label="有赞平台" value="1" />
-                <el-option label="无对接" value="0" />
-              </el-select>
-            </el-form-item>
+            <!-- :platformType="ruleForm.platform_type" -->
 
             <el-form-item label="所属平台" prop="platform">
               <search-terrace
                 :value="ruleForm.platform"
-                :disabled="!ruleForm.platform_type"
                 :size="'mini'"
                 :is_show="'1'"
                 :isDetail="false"
                 :placeholder="'所属平台'"
-                :platformType="ruleForm.platform_type"
                 @searchChange="platform_codesearchChange"
               />
             </el-form-item>
 
+            <el-form-item label="对接平台" prop="platform_type">
+              <el-select
+                placeholder="对接平台"
+                style="width:100%"
+                v-model="ruleForm.platform_type"
+                @change="handleTypeChange"
+                disabled
+              >
+                <el-option label="有赞平台" value="1" />
+                <el-option label="无对接" value="0" />
+              </el-select>
+            </el-form-item>
+
             <el-form-item label="定价模式" prop="is_fixed">
               <el-select v-model="ruleForm.is_fixed" style="width:100%" placeholder="定价模式">
                 <el-option
@@ -169,7 +170,12 @@ import { replaceTextWrapAndSpace } from "@/utils";
 export default {
   name: "goodsOnlineAdd",
   mixins: [resToken],
-  props: ["showModel", "id", "type", "sitem"],
+  props: [
+      "showModel", 
+      "sitem",
+      "type", 
+      "id"
+    ],
   components: {
     searchGoodModal
   },
@@ -241,6 +247,9 @@ export default {
     this.initForm();
   },
   methods: {
+    handleTypeChange(){
+      this.ruleForm.platform = ''
+    },
     async initForm() {
       this.loading = true;
       this.resetFormData();
@@ -379,9 +388,11 @@ export default {
     },
 
     platform_codesearchChange(e) {
-      const { id, code, label, platform_type } = e;
+      const { id,platform_type } = e;
       this.ruleForm.platform = id || "";
       this.isYzPlatform = String(platform_type) === "1";
+
+      this.ruleForm.platform_type = platform_type
       this.$refs.ruleForm.validateField("platform");
     }
   }

+ 1 - 1
src/views/sellOut/project/components/costFormAddEdit.vue

@@ -11,7 +11,7 @@
     element-loading-text="拼命加载中"
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModel = false"
+    @close="showModelThis = false"
   >
     <el-card style="margin: -20px 0 0 0">
       <el-row :gutter="10">

+ 1 - 1
src/views/sellOut/project/components/setPlan.vue

@@ -126,8 +126,8 @@
             icon="el-icon-circle-plus-outline"
             :size="'mini'"
           >添加方案</el-button>
-          <!-- v-if=" (plan_show.status + '' === '1' && ppowers.some((i) => i == '5') && status == '5') && !isSupertube" -->
           <el-button
+            v-if=" (plan_show.status + '' === '1' && ppowers.some((i) => i == '5') && status == '5') && !isSupertube"
             type="primary"
             class="fr"
             @click="place_order"