ソースを参照

Merge remote-tracking branch 'origin/develop' into develop

Danj0rr 1 年間 前
コミット
ab743c4221

+ 52 - 12
src/api/index.js

@@ -100,6 +100,9 @@ export function fieldTemplateLists() {
     return request.get('/fieldtemplate/fieldTemplateList');
 
 }
+export function getTemplateById(templateId){
+    return request.get('/fieldtemplate/getTemplateById?id=' +  templateId);
+}
 export function cooperatorProductList(pageNum,pageSize){
     return request.post('/cooperator_product/cooperatorProductList',
         {
@@ -145,18 +148,54 @@ export function findCooperatorFieldsByName(cooperatorName){
     })
 }
 
-export function businessToDoList(){
-    return request.get('/business/businessToDoList');
+export function businessToDoList(pageNum,pageSize){
+    return request.post('/business/businessToDoList',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+        });
 }
 
-export function businessAnalysisList(){
-    return request.get('/business/businessAnalysisList');
+export function selectBusinessToDo(pageNum,pageSize,customerName){
+    return request.post('/business/selectBusinessToDo',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            customerName:customerName,
+
+        });
 }
 
-export function businessFailList(){
-    return request.get('/business/businessFailList');
+export function businessAnalysisList(pageNum,pageSize){
+    return request.post('/business/businessAnalysisList',        {
+        pageNum:pageNum,
+        pageSize:pageSize,
+    });
 }
+export function selectBusinessAnalysis(pageNum,pageSize,customerName){
+    return request.post('/business/selectBusinessAnalysis',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            customerName:customerName,
 
+        });
+}
+export function businessFailList(pageNum,pageSize) {
+    return request.post('/business/businessFailList', {
+        pageNum: pageNum,
+        pageSize: pageSize,
+    });
+}
+export function selectBusinessFail(pageNum,pageSize,customerName){
+    return request.post('/business/selectBusinessFail',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            customerName:customerName,
+
+        });
+}
 export function modelDefineList(){
     return request.get('/model_define/modelDefineList');
 }
@@ -353,21 +392,22 @@ export function fieldTemplateSave(templateData) {
     });
 }
 
-export function cooperatorAdd(cooperator_name, cooperatorNum, corp_certificate_type, field_template_no) {
+export function cooperatorAdd(cooperator_name, corpCertificateNum, corp_certificate_type, field_template_id) {
     return request.post('/cooperator/add', {
         cooperator_name : cooperator_name,
-        cooperatorNum : cooperatorNum,
-        corp_certificate_type : corp_certificate_type, 
-        field_template_no : field_template_no
+        corpCertificateNum : corpCertificateNum,
+        corp_certificate_type : corp_certificate_type,
+        field_template_id : field_template_id
     });
 }
 
-export function cooperatorEdit(cooperator_id, cooperator_name, cooperatorNum, corp_certificate_type) {
+export function cooperatorEdit(cooperator_id, cooperator_name, cooperatorNum, corp_certificate_type,fieldTemplateId) {
     return request.post('/cooperator/edit', {
         cooperator_id : cooperator_id, 
         cooperator_name : cooperator_name,
         cooperatorNum : cooperatorNum,
-        corp_certificate_type : corp_certificate_type, 
+        corp_certificate_type : corp_certificate_type,
+        fieldTemplateId:fieldTemplateId
     });
 }
 

+ 67 - 16
src/views/system/businessAnalysis.vue

@@ -31,7 +31,7 @@
 
         <div class="line-between-divs"></div>
 
-        <el-table :data="businessShowData.slice((currentPage-1)*pagesize,currentPage*pagesize)" style="width: 100%;" @row-click="onButtonClick" stripe>
+        <el-table :data="businessShowData" style="width: 100%;" @row-click="onButtonClick" stripe>
           <el-table-column align="center" label="申请编号" >
             <template v-slot="{row}">
               <span>{{ row.businessNum}}</span>
@@ -90,7 +90,7 @@
                         :page-sizes="[5,10,15]"
                         :page-size="pagesize"
                         layout="total,jumper,prev, pager, next,sizes"
-                        :total="businessShowData.length" >
+                        :total=showSize >
         </el-pagination>
       </el-main>
 
@@ -101,7 +101,7 @@
 <script>
 
 import {
-  businessAnalysisList
+  businessAnalysisList, selectBusinessAnalysis,
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -119,8 +119,10 @@ export default {
       activeKey: 0,
       activeName: "second",
       currentPage: 1,
-      pagesize:5,
+      pagesize:10,
       businessData : [],
+      selectBusinessData : [],
+
       businessShowData : [],
 
       selected1: true,
@@ -130,6 +132,8 @@ export default {
       selected5: true,
       selected6: false,
       input:'',
+      showSize:'',
+      totalSize:''
     }
   },
   watch: {},
@@ -139,11 +143,14 @@ export default {
   beforeMount() {},
   mounted() 
   {
-    businessAnalysisList().then(
+    businessAnalysisList(this.currentPage,this.pagesize).then(
         res=>
         {
-          this.businessData=res.data.business_todo_list;
+          this.businessData=res.data.business_analysis_list.list;
           this.businessShowData = this.businessData
+          var j = parseInt(res.data.business_analysis_list.total)
+          this.totalSize = j
+          this.showSize = this.totalSize
         }
     )
   },
@@ -185,9 +192,45 @@ export default {
     },
     handleCurrentChange:function(currentPage){
       this.currentPage=currentPage;
+      if(!this.input){
+        businessAnalysisList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_analysis_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
+      else {
+        selectBusinessAnalysis(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectBusinessData=res.data.select_business_analysis.list;
+              this.businessShowData = this.selectBusinessData
+            }
+        )
+      }
     },
     handleSizeChange:function(size){
       this.pagesize=size;
+      if(!this.input){
+        businessAnalysisList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_analysis_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
+      else {
+        selectBusinessAnalysis(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectBusinessData=res.data.select_business_analysis.list;
+              this.businessShowData = this.selectBusinessData
+            }
+        )
+      }
     },
     async getTableData(){
       try {
@@ -254,19 +297,27 @@ export default {
     filterTable(){
 
       if (this.input.trim() === '') {
-        this.businessShowData = this.businessData
+        businessAnalysisList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_analysis_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+        this.showSize = this.totalSize
         // 如果输入框为空,显示所有数据
       } else {
         // 否则,只显示与输入文本匹配的数据
-
-
-        this.businessShowData = this.businessData.filter(item =>
-        {
-          const values = Object.values(item);
-          const str = values.join(' ').toLowerCase();
-          return str.includes(this.input.toLowerCase());
-        });
-
+        selectBusinessAnalysis(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectBusinessData=res.data.select_business_analysis.list;
+              this.businessShowData = this.selectBusinessData
+              var j = parseInt(res.data.select_business_analysis.total)
+              this.totalSize = j
+              this.showSize = this.totalSize
+            }
+        )
       }
     },
     

+ 67 - 16
src/views/system/businessFail.vue

@@ -31,7 +31,7 @@
 
         <div class="line-between-divs"></div>
 
-        <el-table :data="businessShowData.slice((currentPage-1)*pagesize,currentPage*pagesize)" style="width: 100%;" @row-click="onButtonClick" stripe>
+        <el-table :data="businessShowData" style="width: 100%;" @row-click="onButtonClick" stripe>
           <el-table-column align="center" label="申请编号">
             <template v-slot="{row}">
               <span>{{ row.businessNum}}</span>
@@ -90,7 +90,7 @@
                         :page-sizes="[5,10,15]"
                         :page-size="pagesize"
                         layout="total,jumper,prev, pager, next,sizes"
-                        :total="businessShowData.length" >
+                        :total=showSize >
         </el-pagination>
       </el-main>
 
@@ -101,7 +101,7 @@
 <script>
 
 import {
-  businessFailList
+  businessFailList,selectBusinessFail
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -119,8 +119,10 @@ export default {
       activeKey: 0,
       activeName: "second",
       currentPage: 1,
-      pagesize:5,
+      pagesize:10,
       businessData : [],
+      selectBusinessData : [],
+
       businessShowData : [],
 
       selected1: true,
@@ -130,6 +132,8 @@ export default {
       selected5: false,
       selected6: true,
       input:'',
+      showSize:'',
+      totalSize:''
     }
   },
   watch: {},
@@ -139,11 +143,14 @@ export default {
   beforeMount() {},
   mounted() 
   {
-    businessFailList().then(
+    businessFailList(this.currentPage,this.pagesize).then(
         res=>
         {
-          this.businessData=res.data.business_todo_list;
+          this.businessData=res.data.business_fail_list.list;
           this.businessShowData = this.businessData
+          var j = parseInt(res.data.business_fail_list.total)
+          this.totalSize = j
+          this.showSize = this.totalSize
         }
     )
   },
@@ -187,9 +194,45 @@ export default {
 
     handleCurrentChange:function(currentPage){
       this.currentPage=currentPage;
+      if(!this.input){
+        businessFailList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_fail_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
+      else {
+        selectBusinessFail(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.businessData=res.data.select_business_fail.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
     },
     handleSizeChange:function(size){
       this.pagesize=size;
+      if(!this.input){
+        businessFailList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_fail_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
+      else {
+        selectBusinessFail(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.businessData=res.data.select_business_fail.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
     },
     async getTableData(){
       try {
@@ -256,19 +299,27 @@ export default {
     filterTable(){
 
       if (this.input.trim() === '') {
-        this.businessShowData = this.businessData
+        businessFailList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_fail_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+        this.showSize = this.totalSize
         // 如果输入框为空,显示所有数据
       } else {
         // 否则,只显示与输入文本匹配的数据
-
-
-        this.businessShowData = this.businessData.filter(item =>
-        {
-          const values = Object.values(item);
-          const str = values.join(' ').toLowerCase();
-          return str.includes(this.input.toLowerCase());
-        });
-
+        selectBusinessFail(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.businessData=res.data.select_business_fail.list;
+              this.businessShowData = this.businessData
+              var j = parseInt(res.data.select_business_fail.total)
+              this.totalSize = j
+              this.showSize = this.totalSize
+            }
+        )
       }
     },
 

+ 66 - 15
src/views/system/businesstodo.vue

@@ -35,7 +35,7 @@
 
         <div class="line-between-divs"></div>
 
-        <el-table :data="businessShowData.slice((currentPage-1)*pagesize,currentPage*pagesize)" style="width: 100%;" @row-click="onButtonClick" stripe>
+        <el-table :data="businessShowData" style="width: 100%;" @row-click="onButtonClick" stripe>
           <el-table-column align="center" label="申请编号" >
             <template v-slot="{row}">
               <span>{{ row.businessNum}}</span>
@@ -94,7 +94,7 @@
                         :page-sizes="[5,10,15]"
                         :page-size="pagesize"
                         layout="total,jumper,prev, pager, next,sizes"
-                        :total="businessShowData.length" >
+                        :total=showSize >
         </el-pagination>
       </el-main>
 
@@ -107,7 +107,7 @@
 <script>
 
 import {
-  businessToDoList
+  businessToDoList,selectBusinessToDo
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -127,6 +127,7 @@ export default {
       currentPage: 1,
       pagesize:10,
       businessData : [],
+      selectBusinessData : [],
       businessShowData : [],
       isCollapse: false,
       status:"",
@@ -137,6 +138,8 @@ export default {
       selected5: true,
       selected6: false,
       input:'',
+      showSize:'',
+      totalSize:''
     }
   },
   watch: {},
@@ -146,12 +149,14 @@ export default {
   beforeMount() {},
   mounted()
   {
-    businessToDoList().then(
+    businessToDoList(this.currentPage,this.pagesize).then(
         res=>
         {
-          this.businessData=res.data.business_todo_list;
+          this.businessData=res.data.business_todo_list.list;
           this.businessShowData = this.businessData
-
+          var j = parseInt(res.data.business_todo_list.total)
+          this.totalSize = j
+          this.showSize = this.totalSize
 
         }
     )
@@ -197,9 +202,45 @@ export default {
     },
     handleCurrentChange:function(currentPage){
       this.currentPage=currentPage;
+      if(!this.input){
+        businessToDoList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_todo_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
+      else {
+        selectBusinessToDo(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectBusinessData=res.data.business_todo_list.list;
+              this.businessShowData = this.selectBusinessData
+            }
+        )
+      }
     },
     handleSizeChange:function(size){
       this.pagesize=size;
+      if(!this.input){
+        businessToDoList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_todo_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+      }
+      else {
+        selectBusinessToDo(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectBusinessData=res.data.business_todo_list.list;
+              this.businessShowData = this.selectBusinessData
+            }
+        )
+      }
     },
     async getTableData(){
       try {
@@ -266,18 +307,28 @@ export default {
     filterTable(){
 
       if (this.input.trim() === '') {
-        this.businessShowData = this.businessData
+        businessToDoList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.businessData=res.data.business_todo_list.list;
+              this.businessShowData = this.businessData
+            }
+        )
+        this.showSize = this.totalSize
         // 如果输入框为空,显示所有数据
       } else {
         // 否则,只显示与输入文本匹配的数据
-
-
-        this.businessShowData = this.businessData.filter(item =>
-        {
-            const values = Object.values(item);
-            const str = values.join(' ').toLowerCase();
-            return str.includes(this.input.toLowerCase());
-        });
+        selectBusinessToDo(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectBusinessData=res.data.select_business_todo.list;
+              this.businessShowData = this.selectBusinessData
+              var j = parseInt(res.data.select_business_todo.total)
+              this.totalSize = j
+              this.showSize = this.totalSize
+
+            }
+        )
 
       }
     },

+ 27 - 18
src/views/system/cooperatorAdd.vue

@@ -32,24 +32,23 @@
                 <el-input v-model="cooperator_name" style="width:215px"></el-input>
               </el-form-item>
               <el-form-item label="证件号码" width="200px">
-                <el-input v-model="cooperatorNum" style="width:215px"></el-input>
+                <el-input v-model="corpCertificateNum" style="width:215px"></el-input>
               </el-form-item>
               <el-form-item label="证件类型" width="200px">
-                <el-select name="art-cate" v-model="corp_certificate_type_name" style="height:35px">
-                    <option disabled selected style="display: block;" >请选择证件类型</option>
-                    <option v-for="item in arr "
-                            :key="item" :label="item"
-                            :value="item"></option>
-
+                <el-select name="art-cate" v-model="corp_certificate_type_name" placeholder="选择证件类型" style="height:35px">
+                    <el-option v-for='item in type_list' :key="item.key" :label="item.label"
+                               :value="item.key"
+                    />
                 </el-select>
               </el-form-item>
 
               <el-form-item label="所属字段表" width="200px">
-                <el-select name="art-cate" v-model="fieldTemplateNo" style="height:35px" >
-                    <option disabled selected style="display: block;">请选择字段表</option>
-                    <option v-for="(item,index) in fieldTemplateList " 
-                            :key="index" 
-                            :value="item.templateNo">{{item.templateName}}</option>
+                <el-select name="art-cate" v-model="fieldTemplateId" placeholder="请选择字段表" style="height:35px" >
+                    <el-option v-for="(item,index) in fieldTemplateList "
+                            :key="index"
+                          :label="item.templateName"
+                            :value="item.id"
+                  />
 
                 </el-select>
               </el-form-item>
@@ -93,7 +92,7 @@ export default {
       currentPage: 1,
       // cooperatorName : this.$route.query.cooperatorName,
       cooperatorName : "",
-      cooperatorNum : "",
+      corpCertificateNum : "",
       fieldCount : "",
       modelCount : "",
       createTime : "",
@@ -109,12 +108,22 @@ export default {
       cooperatorProduct : [],
       productStatus : "",
       arr: ["统一社会信用代码", "组织机构代码" ],
+      type_list: [
+        {
+          key: 1,
+          label: "统一社会信用代码"
+        },
+        {
+          key: 2,
+          label: "组织机构代码"
+        }
+      ],
       cooperator_name : "",
       corp_certificate_num : "",
       corp_certificate_type_name : "",
       corp_certificate_type : "",
       fieldTemplateList : "",
-      fieldTemplateNo : ""
+      fieldTemplateId : ""
     }
   },
   watch: {},
@@ -219,14 +228,14 @@ export default {
           this.corp_certificate_type = "0"
         else
           this.corp_certificate_type =  "1"
-      console.log(this.fieldTemplateNo)
+      console.log(this.fieldTemplateId)
 
       if(this.cooperator_name=="")
       {
         this.$alert("请输入合作方名称");
         return;
       }
-      if(this.cooperatorNum=="")
+      if(this.corpCertificateNum=="")
       {
         this.$alert("请输入证件号码");
         return;
@@ -236,7 +245,7 @@ export default {
         this.$alert("请选择证件类WW型");
         return;
       }
-      if(this.fieldTemplateNo=="")
+      if(this.fieldTemplateId=="")
       {
         this.$alert("请选择所属字段表");
         return;
@@ -246,7 +255,7 @@ export default {
         type: 'success'
       });
 
-        cooperatorAdd(this.cooperator_name, this.cooperatorNum, this.corp_certificate_type, this.fieldTemplateNo).then(
+        cooperatorAdd(this.cooperator_name, this.corpCertificateNum, this.corp_certificate_type, this.fieldTemplateId).then(
           res=>
           {
 

+ 28 - 89
src/views/system/cooperatorDetailed.vue

@@ -73,92 +73,9 @@
               </el-col>
 
             </el-row>
-            <!-- <el-row>
-                  <el-col span="8" :offset="2">
-                  
-                      <el-button type="primary" round @click="onButtonClickApply()" size="medium" >合作方产品申请</el-button>
-                    
-                  </el-col>
-
-                  <el-col span="8" :offset="4" >
-                    
-                      <el-button type="primary" round @click="onButtonClickEdit()" size="medium" >编辑合作方信息</el-button>
-                    
-                  </el-col>
-            </el-row> -->
+
           </el-form>
-          <!-- <el-row>
-            <el-col >
-              <el-form  label-position="labelPosition" class="model_add_button" label-width="150px">
-
-                <el-row>
-                  <el-col span="10" offset="0">
-                    <el-form-item label="合作方名称" width="100px">
-                    <span>{{cooperatorName}}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col span="10"  :offset="4">
-                    <el-form-item label="合作方编号" width="100px">
-                    <span>{{cooperatorId}}</span>
-                    </el-form-item>
-                  </el-col>
-
-                </el-row>
-              </el-form>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col >
-              <el-form  label-position="labelPosition" class="model_add_button" label-width="150px">
-
-                <el-row>
-                  <el-col span="10" offset="0">
-                    <el-form-item label="合作方证件类型" width="100px">
-                    <span>{{corpCertificateType}}</span>
-                    </el-form-item>
-                  </el-col>
-                  <el-col span="10"  :offset="4">
-                    <el-form-item label="合作方证件编号" width="100px">
-                    <span>{{corpCertificateNum}}</span>
-                    </el-form-item>
-                  </el-col>
-
-                </el-row>
-              </el-form>
-            </el-col>
-          </el-row>
-
-          <el-row>
-            <el-col>
-              <el-form  label-position="labelPosition" class="model_add_button" label-width="180px">
-
-                <el-row>
-                  <el-col span="4">
-                  
-                      <el-button type="primary" round @click="onButtonClickApply()" size="mini" >合作方产品申请</el-button>
-                    
-                  </el-col>
-
-                  <el-col span="5" :offset="0">
-                    
-                      <el-button type="primary" round @click="onButtonClickEdit()" size="mini" >编辑合作方信息</el-button>
-                    
-                  </el-col>
-                  <el-col span="10" :offset="1">
-                    <el-form-item label="模板名称" width="100px">
-                      <span>{{templateName}}</span>
-                    </el-form-item>
-                  </el-col>
-
-                  <el-col span="10" :offset="4">
-                    <el-form-item label="创建时间" width="100px">
-                      <span>{{createTime}}</span>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-            </el-col>
-          </el-row> -->
+
         </div>
 
         <el-divider></el-divider>
@@ -276,7 +193,13 @@
 
 import {
   getList,
-  userInfo, partnerList, roleDel,findCooperatorListByName, findCooperatorFieldByNum, findCooperatorProductByNum
+  userInfo,
+  partnerList,
+  roleDel,
+  findCooperatorListByName,
+  findCooperatorFieldByNum,
+  findCooperatorProductByNum,
+  getTemplateById
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -304,7 +227,8 @@ export default {
       corpCertificateType:this.$route.query.corpCertificateType,
       corpCertificateNum:this.$route.query.corpCertificateNum,
       createTime : this.$route.query.createTime,
-      templateName : this.$route.query.templateName,
+      templateId : this.$route.query.templateId,
+      templateName:'',
       cooperatorData : [],
       selected1: true,
       selected2: false,
@@ -325,6 +249,17 @@ export default {
   beforeMount() {},
   mounted() 
   {
+    if(this.templateId){
+    getTemplateById(this.templateId).then(
+      res=>
+      {
+        this.templateName=res.data.templateName;
+      }
+    )
+    }
+    if (this.cooperatorNum==""){
+      this.cooperatorNum=null
+    }
     findCooperatorFieldByNum(this.cooperatorNum).then(
       res=>
       {
@@ -437,7 +372,7 @@ export default {
           modelName:row.modelName,
           cooperatorName:this.$route.query.cooperatorName,
 
-        }// 要传递的参数
+    }// 要传递的参数
       })
     },
     onButtonClickEdit() {
@@ -448,7 +383,11 @@ export default {
           'cooperatorId' : this.cooperatorId,
           'cooperatorNum' : this.cooperatorNum,
           'cooperatorName' : this.cooperatorName,
-          'createTime' : this.createTime
+          'createTime' : this.createTime,
+          'templateName':this.templateName,
+          'templateId':this.templateId,
+
+
         }
       })
     },

+ 43 - 17
src/views/system/cooperatorEdit.vue

@@ -35,14 +35,22 @@
                   <el-input v-model="corp_certificate_num" style="width:400px"></el-input>
                 </el-form-item>
                 <el-form-item label="证件类型" width="100px">
-                  <select name="art-cate" v-model="corp_certificate_type_name" style="height:35px">
-                      <option disabled selected style="display: block;">请选择证件类型</option>
-                      <option v-for="(item,index) in arr " 
-                              :key="index" 
-                              :value="item.name">{{item.name}}</option>
-                  </select>
+                  <el-select name="art-cate" v-model="corp_certificate_type_name" placeholder="选择证件类型" style="height:35px">
+                    <el-option v-for='item in type_list' :key="item.key" :label="item.label"
+                               :value="item.key"
+                    />
+                  </el-select>
                 </el-form-item>
+                <el-form-item label="所属字段表模板" width="200px">
+                  <el-select name="art-cate" v-model="fieldTemplateId" placeholder="请选择字段表模板" style="height:35px" >
+                    <el-option v-for="(item,index) in fieldTemplateList "
+                               :key="index"
+                               :label="item.templateName"
+                               :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>
@@ -87,22 +95,36 @@ export default {
       selected5: true,
       selected6: false,
       input:'',
+
+
       cooperatorField : [],
       cooperatorProduct : [],
       productStatus : "",
       arr: [{ name: '统一社会信用代码' }, { name: '组织机构代码' }, ],
-
+      type_list: [
+        {
+          key: 1,
+          label: "统一社会信用代码"
+        },
+        {
+          key: 2,
+          label: "组织机构代码"
+        }
+      ],
       cooperator_name : this.$route.query.cooperatorName,
       corp_certificate_num : this.$route.query.cooperatorNum,
       corp_certificate_type_name : "",
       corp_certificate_type : "",
       fieldTemplateList : "",
-      fieldTemplateNo : "",
+      fieldTemplateNa : "",
       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,
+      templateName:this.$route.query.templateName,
+      fieldTemplateId:this.$route.query.templateName
 
     }
   },
@@ -117,13 +139,13 @@ export default {
       this.corp_certificate_type_name = "统一社会信用代码"
     else
       this.corp_certificate_type_name =  "组织机构代码"
-    // fieldTemplateLists().then(
-    //   res=>
-    //   {
-    //     this.fieldTemplateList=res.data.field_template_list;
-    //     console.log(this.fieldTemplateList)
-    //   }
-    // )
+    fieldTemplateLists().then(
+      res=>
+      {
+        this.fieldTemplateList=res.data.field_template_list;
+        console.log(this.fieldTemplateList)
+      }
+    )
   },
   beforeUpdate() {},
   updated() {},
@@ -203,10 +225,14 @@ export default {
       this.$router.push({
         path: '/cooperatorDetailed',
         query: {
+
+          corpCertificateType:this.corpCertificateType,
           cooperatorId : this.cooperatorId,
           cooperatorName: this.cooperatorName,
           cooperatorNum : this.cooperatorNum,
-          createTime : this.createTime
+          createTime : this.createTime,
+          templateId : this.templateId,
+
         }// 要传递的参数
       })
     },
@@ -239,7 +265,7 @@ export default {
         message: '编辑成功',
         type: 'success'
       });
-        cooperatorEdit(this.cooperatorId, this.cooperator_name, this.corp_certificate_num, this.corp_certificate_type).then(
+        cooperatorEdit(this.cooperatorId, this.cooperator_name, this.corp_certificate_num, this.corp_certificate_type,this.fieldTemplateId).then(
           res=>
           {
             this.$router.push({

+ 2 - 1
src/views/system/cooperatorInfo.vue

@@ -269,7 +269,8 @@ export default {
           corpCertificateType:row.corpCertificateType,
           corpCertificateNum:row.corpCertificateNum,
           createTime : row.createTime,
-          templateName : row.templateName,
+          templateId : row.templateId,
+
         }// 要传递的参数
       })
     },