|
@@ -44,12 +44,9 @@
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane label="合作方产品字段信息" name="second">
|
|
|
- <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"> </el-radio>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table :data="cooperatorField" style="width: 100%;" ref="cooperatorFields"
|
|
|
+ @select="handleSelectionChange" :row-key="rowKey" stripe>
|
|
|
+ <el-table-column type="selection" :reserve-selection=true width="55" />
|
|
|
|
|
|
<el-table-column align="center" label="字段类型" width="160">
|
|
|
<template v-slot="{row}">
|
|
@@ -77,21 +74,34 @@
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
+ <el-pagination background
|
|
|
+ @size-change="handleSizeChange1"
|
|
|
+ @current-change="handleCurrentChange1"
|
|
|
+ :current-page="currentPage1"
|
|
|
+ :page-size="pagesize1"
|
|
|
+ :page-sizes="[5,10,15]"
|
|
|
|
|
|
+ layout="total,jumper,prev, pager, next,sizes"
|
|
|
+ :total=baseTotal >
|
|
|
+ </el-pagination>
|
|
|
<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">
|
|
|
<el-form class="model_add_button" ref="form" label-width="120px">
|
|
|
- <el-form-item label="产品模型" width="100px">
|
|
|
- <select name="art-cate" v-model="modelNo">
|
|
|
- <option disabled selected style="display: block;">请选择产品模型</option>
|
|
|
- <option v-for="(item,index) in modelDefineList "
|
|
|
- :key="index"
|
|
|
- :value="item.modelNo">{{item.modelName}}</option>
|
|
|
- </select>
|
|
|
+ <el-form-item label="产品模型" width="200px">
|
|
|
+ <el-select name="art-cate" v-model="modelId" placeholder="请选择产品模型" style="height:35px" >
|
|
|
+
|
|
|
+ <el-option v-for="(item,index) in modelData "
|
|
|
+ :key="index"
|
|
|
+ :label="item.modelName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
+
|
|
|
</el-form>
|
|
|
<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>
|
|
@@ -119,7 +129,13 @@
|
|
|
|
|
|
import {
|
|
|
getList,
|
|
|
- modelDefineList, findCooperatorFieldByNum, findCooperatorProductByNum, findCooperatorProductFieldByNum, cooperatorProductApply,findCooperatorFieldsByName
|
|
|
+ modelDefineList,
|
|
|
+ findCooperatorFieldByNum,
|
|
|
+ findCooperatorProductByNum,
|
|
|
+ findCooperatorProductFieldByNum,
|
|
|
+ cooperatorProductApply,
|
|
|
+ findCooperatorFieldsByName,
|
|
|
+ cooperatorList
|
|
|
} from '@/api/index.js'
|
|
|
import store from "@/store";
|
|
|
import request from '@/utils/request.js'
|
|
@@ -135,11 +151,17 @@ export default {
|
|
|
activeKey: 0,
|
|
|
activeKey: 1,
|
|
|
activeName: "third",
|
|
|
- currentPage: 1,
|
|
|
+ currentPage1: 1,
|
|
|
+ pagesize1:10,
|
|
|
cooperatorName : this.$route.query.cooperatorName,
|
|
|
cooperatorNum : this.$route.query.cooperatorNum,
|
|
|
cooperatorId : this.$route.query.cooperatorId,
|
|
|
createTime : this.$route.query.createTime,
|
|
|
+ templateId:this.$route.query.templateId,
|
|
|
+ templateName:this.$route.query.templateName,
|
|
|
+ fieldTemplateId:this.$route.query.templateName,
|
|
|
+ corpCertificateType:this.$route.query.corpCertificateType,
|
|
|
+
|
|
|
cooperator_product_no : "",
|
|
|
cooperator_product_name : "",
|
|
|
cooperatorData : [],
|
|
@@ -157,7 +179,10 @@ export default {
|
|
|
cooperatorProductField : [],
|
|
|
modelDefineList : [],
|
|
|
modelNo : "",
|
|
|
+ modelId:"",
|
|
|
cooperatorFields : [],
|
|
|
+ fieldSelected:[],
|
|
|
+ modelData:"",
|
|
|
templateSelection: '',
|
|
|
templateRadio: null,
|
|
|
}
|
|
@@ -181,6 +206,13 @@ export default {
|
|
|
this.cooperatorProduct=res.data.cooperator_product;
|
|
|
}
|
|
|
),
|
|
|
+ modelInfo(1,100).then(res=>
|
|
|
+ {
|
|
|
+ this.modelData = res.data.modelData.list;
|
|
|
+ console.log("你是谁");
|
|
|
+
|
|
|
+ console.log(this.modelData);
|
|
|
+ })
|
|
|
this.getTableData();
|
|
|
},
|
|
|
beforeUpdate() {},
|
|
@@ -188,6 +220,21 @@ export default {
|
|
|
destroyed() {},
|
|
|
methods: {
|
|
|
request() {},
|
|
|
+ handleSelectionChange(selecteds, row) {
|
|
|
+ if (!this.fieldSelected.includes(row.id)) {
|
|
|
+ // 回显数据里没有本条,把这条加进来(选中)
|
|
|
+ this.fieldSelected.push(row.id);
|
|
|
+ console.log(this.fieldSelected)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ // 回显数据里有本条,把这条删除(取消选中)
|
|
|
+ this.fieldSelected.forEach((id, index) => {
|
|
|
+ if (id === row.id) {
|
|
|
+ this.fieldSelected.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
handleClick1(tab, event) {
|
|
|
if(tab.name=='first'){
|
|
|
this.gotolinkHome();
|
|
@@ -260,12 +307,6 @@ export default {
|
|
|
paneNext1()
|
|
|
{
|
|
|
this.activeName2 = "second"
|
|
|
- findCooperatorProductFieldByNum(this.cooperator_product_no).then(
|
|
|
- res=>
|
|
|
- {
|
|
|
- this.cooperatorProductField=res.data.cooperator_product_field;
|
|
|
- }
|
|
|
- )
|
|
|
},
|
|
|
paneNext2()
|
|
|
{
|
|
@@ -283,25 +324,29 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: '/cooperatorDetailed',
|
|
|
query: {
|
|
|
- cooperatorId : this.cooperatorId,
|
|
|
- cooperatorName: this.cooperatorName,
|
|
|
- cooperatorNum : this.cooperatorNum,
|
|
|
- createTime : this.createTime
|
|
|
+ cooperatorId : this.$route.query.cooperatorId,
|
|
|
+ cooperatorName : this.$route.query.cooperatorName,
|
|
|
+ cooperatorNum : this.$route.query.cooperatorNum,
|
|
|
+ createTime : this.$route.query.createTime,
|
|
|
+ corpCertificateType:this.$route.query.corpCertificateType,
|
|
|
+ templateId:this.$route.query.templateId,
|
|
|
}// 要传递的参数
|
|
|
})
|
|
|
},
|
|
|
submit()
|
|
|
{
|
|
|
- cooperatorProductApply(this.cooperatorNum, this.cooperatorName, this.cooperator_product_no, this.cooperator_product_name, this.modelNo).then(
|
|
|
+ cooperatorProductApply(this.cooperatorNum, this.cooperatorName, this.cooperator_product_no, this.cooperator_product_name, this.modelId,this.fieldSelected).then(
|
|
|
res=>
|
|
|
{
|
|
|
this.$router.push({
|
|
|
path: '/cooperatorDetailed',
|
|
|
query: {
|
|
|
- cooperatorId : this.cooperatorId,
|
|
|
- cooperatorName: this.cooperatorName,
|
|
|
- cooperatorNum : this.cooperatorNum,
|
|
|
- createTime : this.createTime
|
|
|
+ cooperatorId : this.$route.query.cooperatorId,
|
|
|
+ cooperatorName : this.$route.query.cooperatorName,
|
|
|
+ cooperatorNum : this.$route.query.cooperatorNum,
|
|
|
+ createTime : this.$route.query.createTime,
|
|
|
+ corpCertificateType:this.$route.query.corpCertificateType,
|
|
|
+ templateId:this.$route.query.templateId,
|
|
|
}// 要传递的参数
|
|
|
})
|
|
|
},
|