Browse Source

合作产品洁面泥

shixr 1 year ago
parent
commit
1bf0b0cf3e

+ 2 - 2
src/views/system/cooperatorEdit.vue

@@ -48,8 +48,8 @@
 
               </el-form>
              
-              <el-button class="model_add_button " round type="primary" @click="submit()">完成</el-button>
-              <el-button class="model_add_button " round type="danger" @click="return_page()">返回</el-button>
+              <el-button class="model_add_button " size="small" round type="primary" @click="submit()">完成</el-button>
+              <el-button class="model_add_button " size="small" round type="danger" @click="return_page()">返回</el-button>
 
             </div>
           </el-main>

+ 55 - 31
src/views/system/cooperatorProductApply.vue

@@ -42,41 +42,48 @@
                   <el-input v-model="cooperator_product_name" style="width:200px"></el-input>
                 </el-form-item>
               </el-form>
-              <el-button class="model_add_button " round type="primary"  @click="paneNext1()">下一步</el-button>
-              <el-button class="model_add_button " round type="danger" style="margin-left: 50px" @click="paneClose1()">关闭</el-button>
+              <el-button class="model_add_button " size="small" round type="primary"  @click="paneNext1()">下一步</el-button>
+              <el-button class="model_add_button " size="small" round type="danger" style="margin-left: 50px" @click="paneClose1()">关闭</el-button>
             </div>
             </el-tab-pane>
 
             <el-tab-pane label="合作方产品字段信息" name="second">
-              <el-table :data="cooperatorProductField" style="width: 100%;">
-              <el-table-column align="center" label="字段类型" width="150">
-                <template v-slot="{row}">
-                  <span>{{ row.type}}</span>
-                </template>
-              </el-table-column>
+              <el-table :data="cooperatorFields" style="width: 100%;" ref="cooperatorFields" @row-click="singleElection" highlight-current-row>
+                    <el-table-column label="" width="65">
+                        <template slot-scope="scope">
+                            <el-radio class="radio" v-model="templateSelection" :label="scope.$index">&nbsp;</el-radio>
+                        </template>
+                    </el-table-column>
 
-              <el-table-column align="center" label="字段编号" width="150">
-                <template v-slot="{row}">
-                  <span>{{ row.fieldNo}}</span>
-                </template>
-              </el-table-column>
+                    <el-table-column align="center" label="字段类型" width="160">
+                    <template v-slot="{row}">
+                        <span>{{ row.type}}</span>
+                    </template>
+                    </el-table-column>
 
-              <el-table-column align="center" label="字段名称(中文)" width="150">
-                <template v-slot="{row}">
-                  <span>{{ row.nameZH}}</span>
-                </template>
-              </el-table-column>
+                    <el-table-column align="center" label="字段编号" width="160">
+                    <template v-slot="{row}">
+                        <span>{{ row.fieldNo}}</span>
+                    </template>
+                    </el-table-column>
 
-              <el-table-column align="center" label="字段名称(英文)" width="150">
-                <template v-slot="{row}">
-                  <span>{{ row.name}}</span>
-                </template>
-              </el-table-column>
+                    <el-table-column align="center" label="字段名称(中文)" width="160">
+                    <template v-slot="{row}">
+                        <span>{{ row.name}}</span>
+                    </template>
+                    </el-table-column>
 
-            </el-table>
+                    <el-table-column align="center" label="字段名称(英文)" width="160">
+                    <template v-slot="{row}">
+                        <span>{{ row.nameZH}}</span>
+                    </template>
+                    </el-table-column>
+                
+                
+                </el-table>
 
-              <el-button class="model_add_button " round type="primary" @click="paneNext2()">下一步</el-button>
-              <el-button class="model_add_button " round type="danger" style="margin-left: 50px" @click="paneClose1()">关闭</el-button>
+              <el-button class="model_add_button " size="small" round type="primary" @click="paneNext2()">下一步</el-button>
+              <el-button class="model_add_button " size="small" round type="danger" style="margin-left: 50px" @click="paneClose1()">关闭</el-button>
 
             </el-tab-pane>
             <el-tab-pane label="合作方产品模型信息" name="third">
@@ -90,8 +97,8 @@
                   </select>
                 </el-form-item>
               </el-form>
-              <el-button class="model_add_button " round type="primary" @click="submit()">完成</el-button>
-              <el-button class="model_add_button " round type="danger" style="margin-left: 50px" @click="paneClose1()">关闭</el-button>
+              <el-button class="model_add_button " size="small" round type="primary" @click="submit()">完成</el-button>
+              <el-button class="model_add_button " size="small" round type="danger" style="margin-left: 50px" @click="paneClose1()">关闭</el-button>
             
             </el-tab-pane>
             
@@ -112,7 +119,7 @@
 
 import {
   getList,
-  modelDefineList, findCooperatorFieldByNum, findCooperatorProductByNum, findCooperatorProductFieldByNum, cooperatorProductApply
+  modelDefineList, findCooperatorFieldByNum, findCooperatorProductByNum, findCooperatorProductFieldByNum, cooperatorProductApply,findCooperatorFieldsByName
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -150,7 +157,10 @@ export default {
       activeName2 : "first",
       cooperatorProductField : [],
       modelDefineList : [],
-      modelNo : ""
+      modelNo : "",
+      cooperatorFields : [],
+      templateSelection: '',
+        templateRadio: null,
     }
   },
   watch: {},
@@ -171,7 +181,8 @@ export default {
       {
         this.cooperatorProduct=res.data.cooperator_product;
       }
-    )
+    ),
+    this.getTableData();
   },
   beforeUpdate() {},
   updated() {},
@@ -181,6 +192,19 @@ export default {
     handleClick() {},
     handleCurrentChange() {},
     handleSizeChange() {},
+    async getTableData(){
+        try {
+          
+          const { data } = await findCooperatorFieldsByName(this.$route.query.cooperatorName);
+          this.cooperatorFields = data.cooperator_fields_by_name;
+        } catch (error) {
+          console.error(error);
+        }
+      },
+      singleElection(row) {
+        this.templateSelection = this.cooperatorFields.indexOf(row);
+        this.templateRadio = row.fieldNo;
+      },
     gotolink1()
     {
       this.$router.replace('/cooperatorInfo');

+ 3 - 3
src/views/system/cooperatorProductFieldInfo.vue

@@ -187,7 +187,7 @@
       gotolink4()
       {
         //指定跳转地址
-        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId,cooperatorName:this.$route.query.cooperatorName}});
+        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelName:this.$route.query.modelName,cooperatorName:this.$route.query.cooperatorName}});
         this.selected1 = true;
         this.selected2 = false;
         this.selected3 = true;
@@ -198,7 +198,7 @@
       gotolink5()
       {
         //指定跳转地址
-        this.$router.push({path:'/cooperatorProductFieldInfo',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId,cooperatorName:this.$route.query.cooperatorName}});
+        this.$router.push({path:'/cooperatorProductFieldInfo',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelName:this.$route.query.modelName,cooperatorName:this.$route.query.cooperatorName}});
         this.selected1 = true;
         this.selected2 = false;
         this.selected3 = true;
@@ -207,7 +207,7 @@
         this.selected6 = true;
       },
       gotolink6(){
-        this.$router.push({path:'/cooperatorProductFieldModify',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId,cooperatorName:this.$route.query.cooperatorName}});
+        this.$router.push({path:'/cooperatorProductFieldModify',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelName:this.$route.query.modelName,cooperatorName:this.$route.query.cooperatorName}});
         this.selected1 = true;
         this.selected2 = false;
         this.selected3 = true;

+ 4 - 17
src/views/system/cooperatorProductFieldModify.vue

@@ -104,20 +104,7 @@
         activeName: "second",
         activeName2: "second",
         currentPage: 1,
-        cooperatorFields : [
-            // {
-            //     type:'1',
-            //     fieldNo:'01',
-            //     name:'xxxx',
-            //     nameZH:'XXXX',
-            // },
-            // {
-            //     type:'2',
-            //     fieldNo:'02',
-            //     name:'xxxy',
-            //     nameZH:'XXXY',
-            // }
-        ],
+        cooperatorFields : [],
         selected1: true,
         selected2: false,
         selected3: true,
@@ -203,7 +190,7 @@
       gotolink4()
       {
         //指定跳转地址
-        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId,cooperatorName:this.$route.query.cooperatorName}});
+        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelName:this.$route.query.modelName,cooperatorName:this.$route.query.cooperatorName}});
         this.selected1 = true;
         this.selected2 = false;
         this.selected3 = true;
@@ -214,7 +201,7 @@
       gotolink5()
       {
         //指定跳转地址
-        this.$router.push({path:'/cooperatorProductFieldInfo',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId,cooperatorName:this.$route.query.cooperatorName}});
+        this.$router.push({path:'/cooperatorProductFieldInfo',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelName:this.$route.query.modelName,cooperatorName:this.$route.query.cooperatorName}});
         this.selected1 = true;
         this.selected2 = false;
         this.selected3 = true;
@@ -224,7 +211,7 @@
       },
       async gotolink6(){
         const { data } = await updateProductFieldNo(this.$route.query.productNum,this.templateRadio);
-        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelId:this.$route.query.modelId,fieldNo:this.templateRadio}});
+        this.$router.push({path:'/cooperatorProductInfoBase',query:{productNum:this.$route.query.productNum,productName:this.$route.query.productName,modelName:this.$route.query.modelName,fieldNo:this.templateRadio}});
         this.selected1 = true;
         this.selected2 = false;
         this.selected3 = true;

+ 6 - 6
src/views/system/cooperatorProductInfo.vue

@@ -35,37 +35,37 @@
 
         
             <el-table :data="cooperatorProductData" style="width: 100%;" @row-click="gotolink4">
-              <el-table-column align="center" label="产品编号" width="160">
+              <el-table-column align="center" label="产品编号" width="135">
                 <template v-slot="{row}">
                   <span>{{ row.productNum}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="产品名称" width="160">
+              <el-table-column align="center" label="产品名称" width="135">
                 <template v-slot="{row}">
                   <span>{{ row.productName}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="产品状态" width="80">
+              <el-table-column align="center" label="产品状态" width="135">
                 <template v-slot="{row}">
                   <span>{{ row.productStatus}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="合作方名称" width="160">
+              <el-table-column align="center" label="合作方名称" width="135">
                 <template v-slot="{row}">
                   <span>{{ row.cooperatorName}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="对应模型" width="80">
+              <el-table-column align="center" label="对应模型" width="135">
                 <template v-slot="{row}">
                   <span>{{ row.modelName}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="创建日期" width="160">
+              <el-table-column align="center" label="创建日期" width="135">
                 <template v-slot="{row}">
                   <span>{{ row.createTime}}</span>
                 </template>