浏览代码

Merge branch 'master' of http://192.168.101.10:13000/gogs/zhaoshangyinzi

yrik 4 年之前
父节点
当前提交
a5fa37aa7f
共有 1 个文件被更改,包括 174 次插入90 次删除
  1. 174 90
      ruoyi-ui/src/components/ProjectDec/SignContract.vue

+ 174 - 90
ruoyi-ui/src/components/ProjectDec/SignContract.vue

@@ -3,13 +3,13 @@
     <el-form label-position="right" ref="form" :rules="rules" :model="form" label-width="80px">
       <el-row :gutter="10" class="mb8 roiyy">
         <el-col :span="1.5" v-if="setrd % 2 == 1">
-          <el-button type="primary" v-hasPermi="['system:config:add']" @click="upBtn">提交</el-button>
+          <el-button type="primary" v-hasPermi="['bmProject:project:examine']" @click="upBtn">提交</el-button>
         </el-col>
         <el-col :span="1.5" v-if="setrd % 2 == 1">
-          <el-button type="primary" v-hasPermi="['system:config:edit']" @click="submitForm">暂存</el-button>
+          <el-button type="primary" v-hasPermi="['bmProject:project:add']" @click="submitForm">暂存</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button type="primary" v-hasPermi="['system:config:edit']" @click="goBtn">取消</el-button>
+          <el-button type="primary" @click="goBtn">取消</el-button>
         </el-col>
         <el-col :span="1.5" :offset="18" v-if="setrd % 2 == 0">
           <el-button type="danger" @click="applyBtn" v-hasPermi="['bmProject:project:pass']">审核</el-button>
@@ -98,7 +98,7 @@
         </el-col>
       </el-row>
       <el-row>
-        <el-col :span="5">
+        <el-col :span="6">
           <el-form-item label-width="121px" label="是否独立供地:" class="elItem" prop="isIndependentLan">
             <el-select v-model="form.isIndependentLan" placeholder="请选择">
               <el-option label="是" value="Y"></el-option>
@@ -107,21 +107,21 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label-width="93px" label="供地面积:" class="elItem" prop="landArea">
+          <el-form-item label-width="111px" label="供地面积:" class="elItem" prop="landArea">
             <el-col :span="20">
               <el-input placeholder="请输入供地面积" v-model="form.landArea"></el-input>
             </el-col>
             <div class="dw_name">亩</div>
           </el-form-item>
         </el-col>
-        <el-col :span="9">
+        <el-col :span="6">
           <el-form-item label-width="93px" label="供地位置:" class="elItem" prop="landAddress">
             <el-input placeholder="请输入供地位置" v-model="form.landAddress"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
-          <el-form-item label-width="82px" label="土地证:" class="elItem" prop="landPhoto">
-            <el-upload class="upload-demo" list-type="picture" :limit="1" :file-list="fileListTdz" :on-remove="resetPhoto" :on-success="upl_fn" :action="defaultSettings.urls + process + '/common/upload'">
+        <el-col :span="6">
+          <el-form-item label-width="119px" label="土地证:" class="elItem" prop="landPhoto">
+            <el-upload class="upload-demo" list-type="picture" :file-list="fileListTdz" :on-remove="resetPhoto" :on-success="upl_fn" :action="defaultSettings.urls + process + '/common/upload'">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
           </el-form-item>
@@ -136,28 +136,28 @@
             <div class="dw_name">亩</div>
           </el-form-item>
         </el-col>
-        <el-col :span="10">
+        <el-col :span="12">
           <el-form-item label-width="111px" label="流转土地位置:" class="elItem" prop="circulationAddres">
             <el-input placeholder="请输入流转土地位置" v-model="form.circulationAddres"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="3">
           <el-form-item label-width="119px" label="土地流转合同:" class="elItem" prop="circulationDoc">
-            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto1" :file-list="fileListTdls" :limit="1" :on-success="upl_fn_lzht" :action="defaultSettings.urls+process+'/common/upload'">
+            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto1" :file-list="fileListTdls" :on-success="upl_fn_lzht" :action="defaultSettings.urls+process+'/common/upload'">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="3">
           <el-form-item label-width="94px" label="产权证:" class="elItem" prop="circulationPhoto">
-            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto2" :limit="1" :file-list="fileListCqz" :on-success="upl_fn_cqz" :action="defaultSettings.urls + process + '/common/upload'">
+            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto2" :file-list="fileListCqz" :on-success="upl_fn_cqz" :action="defaultSettings.urls + process + '/common/upload'">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
-        <el-col :span="7">
+        <el-col :span="6">
           <el-form-item label-width="121px" label="租赁厂房面积:" class="elItem" prop="leasePlantArea">
             <el-col :span="16">
               <el-input placeholder="请输入" v-model="form.leasePlantArea"></el-input>
@@ -165,21 +165,21 @@
             <div class="dw_name">平方米</div>
           </el-form-item>
         </el-col>
-        <el-col :span="10">
+        <el-col :span="12">
           <el-form-item label-width="111px" label="租赁厂房位置:" class="elItem" prop="leasePlantAddress">
             <el-input placeholder="请输入租赁厂房位置" v-model="form.leasePlantAddress"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="3">
-          <el-form-item label-width="94px" label="租赁合同:" class="elItem" prop="leasePlantDoc">
-            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto3" :limit="1" :file-list="fileListZht" :on-success="upl_fn_zlht" :action="defaultSettings.urls + process + '/common/upload'">
+          <el-form-item label-width="119px" label="租赁合同:" class="elItem" prop="leasePlantDoc">
+            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto3" :file-list="fileListZht" :on-success="upl_fn_zlht" :action="defaultSettings.urls + process + '/common/upload'">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="3">
           <el-form-item label-width="94px" label="产权证:" class="elItem" prop="leasePlantPhoto">
-            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto4" :limit="1" :file-list="fileListZcq" :on-success="upl_fn_zlcqz" :action="defaultSettings.urls + process + '/common/upload'">
+            <el-upload class="upload-demo" list-type="picture" :on-remove="resetPhoto4" :file-list="fileListZcq" :on-success="upl_fn_zlcqz" :action="defaultSettings.urls + process + '/common/upload'">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
           </el-form-item>
@@ -195,7 +195,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label-width="121px" label="合同约定税收:" class="elItem" prop="agreementTax">
+          <el-form-item label-width="131px" label="合同约定税收:" class="elItem" prop="agreementTax">
             <el-col :span="18">
               <el-input placeholder="请输入" v-model="form.agreementTax"></el-input>
             </el-col>
@@ -308,7 +308,7 @@
         </el-col>
         <el-col :span="8">
           <el-form-item label-width="173px" label="营业执照复印件:" class="elItem" prop="bussinessUrl">
-            <el-upload class="upload-demo" :limit="1" :on-remove='resetPhoto5'  list-type="picture" :file-list="flieListYzz" :on-success="upl_fn_zzfyj" :action="defaultSettings.urls + process + '/common/upload'">
+            <el-upload class="upload-demo" :on-remove='resetPhoto5'  list-type="picture" :file-list="flieListYzz" :on-success="upl_fn_zzfyj" :action="defaultSettings.urls + process + '/common/upload'">
               <el-button size="small" type="primary">点击上传</el-button>
             </el-upload>
           </el-form-item>
@@ -715,7 +715,7 @@
           landPhoto: "", //土地证ur
           circulationLand: "", //流转土地面积
           circulationAddres: "", //流转土地位置
-          circulationDoc: "", //土地流转合同
+          circulationDoc: [], //土地流转合同
           circulationPhoto: "", //产权证
           leasePlantArea: "", //租赁厂房面积
           leasePlantAddress: "", //租赁厂房位置
@@ -737,7 +737,7 @@
           totMoney: "", //注册资本金
           address: "", //注册地址
           code: "", //统一社会信用代码
-          bussinessUrl: "", //营业执照图片url
+          bussinessUrl: [], //营业执照图片url
           recordName: "", //备案单位
           recordCode: "", //备案文号
           recordTot: "", //备案总投资额
@@ -825,7 +825,13 @@
             let data = JSON.parse(JSON.stringify(this.form));
             data.isOutInvestment = Number(data.isOutInvestment)
             data.agreementUrl = data.agreementUrl.join(",");
+            data.landPhoto = data.landPhoto.join(",");
             data.recordUrl = data.recordUrl.join(",");
+            data.circulationDoc = data.circulationDoc.join(",");
+            data.bussinessUrl = data.bussinessUrl.join(",");
+            data.leasePlantPhoto = data.leasePlantPhoto.join(",");
+            data.leasePlantDoc = data.leasePlantDoc.join(",");
+            data.circulationPhoto = data.circulationPhoto.join(",");
             if (this.form.id) {
               // 修改
               setOrderinfo(JSON.stringify(data)).then((res) => {
@@ -898,38 +904,98 @@
         this.idcardBackFlie = [];
         this.resetForm("forms");
       },
-      resetPhoto() {
-        this.form.landPhoto = ''
+      resetPhoto(file, fileList) {
+        let urls = ""
+        if(file.response){
+          urls = file.response.url
+        }else{
+          urls = file.url
+        }
+        for (let i = this.form.landPhoto.length - 1; i >= 0; i--) {
+          if (this.form.landPhoto[i] == urls) {
+            this.form.landPhoto.splice(i, 1);
+          }
+        }
       },
-      resetPhoto1() {
-        this.form.circulationDoc = ''
+      resetPhoto1(file, fileList) {
+        let urls = ""
+        if(file.response){
+          urls = file.response.url
+        }else{
+          urls = file.url
+        }
+        for (let i = this.form.circulationDoc.length - 1; i >= 0; i--) {
+          if (this.form.circulationDoc[i] == urls) {
+            this.form.circulationDoc.splice(i, 1);
+          }
+        }
       },
-      resetPhoto2() {
-        this.form.circulationPhoto = ''
+      resetPhoto2(file, fileList) {
+        let urls = ""
+        if(file.response){
+          urls = file.response.url
+        }else{
+          urls = file.url
+        }
+        for (let i = this.form.circulationPhoto.length - 1; i >= 0; i--) {
+          if (this.form.circulationPhoto[i] == urls) {
+            this.form.circulationPhoto.splice(i, 1);
+          }
+        }
       },
-      resetPhoto3() {
-        this.form.leasePlantDoc = ''
+      resetPhoto3(file, fileList) {
+        let urls = ""
+        if(file.response){
+          urls = file.response.url
+        }else{
+          urls = file.url
+        }
+        for (let i = this.form.leasePlantDoc.length - 1; i >= 0; i--) {
+          if (this.form.leasePlantDoc[i] == urls) {
+            this.form.leasePlantDoc.splice(i, 1);
+          }
+        }
       },
-      resetPhoto4() {
-        this.form.leasePlantPhoto = ''
+      resetPhoto4(file, fileList) {
+        let urls = ""
+        if(file.response){
+          urls = file.response.url
+        }else{
+          urls = file.url
+        }
+        for (let i = this.form.leasePlantPhoto.length - 1; i >= 0; i--) {
+          if (this.form.leasePlantPhoto[i] == urls) {
+            this.form.leasePlantPhoto.splice(i, 1);
+          }
+        }
       },
-      resetPhoto5() {
-        this.form.bussinessUrl = ''
+      resetPhoto5(file, fileList) {
+        let urls = ""
+        if(file.response){
+          urls = file.response.url
+        }else{
+          urls = file.url
+        }
+        for (let i = this.form.bussinessUrl.length - 1; i >= 0; i--) {
+          if (this.form.bussinessUrl[i] == urls) {
+            this.form.bussinessUrl.splice(i, 1);
+          }
+        }
       },
       upl_fn(res, file) {
-        this.form.landPhoto = res.url;
+        this.form.landPhoto.push(res.url);
       },
       upl_fn_lzht(res, file) {
-        this.form.circulationDoc = res.url;
+        this.form.circulationDoc.push(res.url);
       },
       upl_fn_cqz(res, file) {
-        this.form.circulationPhoto = res.url;
+        this.form.circulationPhoto.push(res.url);
       },
       upl_fn_zlht(res, file) {
-        this.form.leasePlantDoc = res.url;
+        this.form.leasePlantDoc.push(res.url);
       },
       upl_fn_zlcqz(res, file) {
-        this.form.leasePlantPhoto = res.url;
+        this.form.leasePlantPhoto.push(res.url);
       },
       up_loat_htwb(res, file) {
         this.form.agreementUrl.push(res.url);
@@ -938,7 +1004,7 @@
         this.form.recordUrl.push(res.url);
       },
       upl_fn_zzfyj(res, file) {
-        this.form.bussinessUrl = res.url;
+        this.form.bussinessUrl.push(res.url);
       },
       upl_fn_sfzzm(res, file) {
         this.idcardFrontFlie = [];
@@ -1006,7 +1072,15 @@
             let data = JSON.parse(JSON.stringify(this.form));
             data.isOutInvestment = Number(data.isOutInvestment)
             data.agreementUrl = data.agreementUrl.join(",");
+            data.landPhoto = data.landPhoto.join(",");
             data.recordUrl = data.recordUrl.join(",");
+            data.circulationDoc = data.circulationDoc.join(",");
+            data.bussinessUrl = data.bussinessUrl.join(",");
+            data.leasePlantPhoto = data.leasePlantPhoto.join(",");
+            data.leasePlantDoc = data.leasePlantDoc.join(",");
+            data.circulationPhoto = data.circulationPhoto.join(",");
+
+
             if (this.form.id!=-1) {
               // 修改
               setOrderinfo(JSON.stringify(data)).then((res) => {
@@ -1032,67 +1106,77 @@
           console.log(res);
           if (res.data) {
             let data = res.data
-            let arr = []
-            for(let item of data.agreementUrl.split(',')){
-              arr.push({
-                name: item,
-                url: item,
-              })
+            this.flieListHt = this.gshFn(data.agreementUrl)
+            this.fileListTdls = this.gshFn(data.circulationDoc)
+            this.flieListBa = this.gshFn(data.recordUrl)
+            this.fileListTdz = this.gshFn(data.landPhoto)
+
+            this.flieListYzz = this.gshFn(data.bussinessUrl)
+            this.fileListZcq = this.gshFn(data.leasePlantPhoto)
+            this.fileListZht = this.gshFn(data.leasePlantDoc)
+            this.fileListCqz = this.gshFn(data.circulationPhoto)
+
+            if(data.circulationPhoto.length){
+              data.circulationPhoto = data.circulationPhoto.split(',')
+            }else{
+              data.circulationPhoto = []
             }
-            this.flieListHt = arr
 
-            let arrs = []
-            for(let item of data.recordUrl.split(',')){
-              arrs.push({
-                name: item,
-                url: item,
-              })
+            if(data.leasePlantDoc.length){
+              data.leasePlantDoc = data.leasePlantDoc.split(',')
+            }else{
+              data.leasePlantDoc = []
             }
-            this.flieListBa = arrs
-            if(data.bussinessUrl){
-              this.flieListYzz = [{
-                name: data.bussinessUrl,
-                url: data.bussinessUrl,
-              }]
+
+            if(data.bussinessUrl.length){
+              data.bussinessUrl = data.bussinessUrl.split(',')
+            }else{
+              data.bussinessUrl = []
             }
-            if(data.leasePlantPhoto){
-              this.fileListZcq = [{
-                name: data.leasePlantPhoto,
-                url: data.leasePlantPhoto,
-              }]
+            if(data.leasePlantPhoto.length){
+              data.leasePlantPhoto = data.leasePlantPhoto.split(',')
+            }else{
+              data.leasePlantPhoto = []
             }
-            if(data.leasePlantDoc){
-              this.fileListZht = [{
-                name: data.leasePlantDoc,
-                url: data.leasePlantDoc,
-              }]
+
+            if(data.landPhoto.length){
+              data.landPhoto = data.landPhoto.split(',')
+            }else{
+              data.landPhoto = []
             }
-            if(data.circulationPhoto){
-              this.fileListCqz = [{
-                name: data.circulationPhoto,
-                url: data.circulationPhoto,
-              }]
+
+            if(data.agreementUrl.length){
+              data.agreementUrl = data.agreementUrl.split(',')
+            }else{
+              data.agreementUrl = []
             }
-            if(data.circulationDoc){
-              this.fileListTdls = [{
-                name: data.circulationDoc,
-                url: data.circulationDoc,
-              }]
+            if(data.recordUrl.length){
+              data.recordUrl = data.recordUrl.split(',')
+            }else{
+              data.recordUrl = []
+            }
+            if(data.circulationDoc.length){
+              data.circulationDoc = data.circulationDoc.split(',')
+            }else{
+              data.circulationDoc = []
             }
-           if(data.landPhoto){
-             this.fileListTdz = [{
-               name: data.landPhoto,
-               url: data.landPhoto,
-             }]
-           }
-
             data.isOutInvestment = Boolean(data.isOutInvestment - 0)
-            data.agreementUrl = data.agreementUrl.split(',')
-            data.recordUrl = data.recordUrl.split(',')
             this.form = data;
           }
         });
       },
+      gshFn(arr){
+        let arrs = []
+        if(arr){
+          for(let item of arr.split(',')){
+            arrs.push({
+              name: item,
+              url: item,
+            })
+          }
+        }
+        return arrs
+      },
       submitUpload_bab() {
         this.$refs.bAupload.submit();
       },