Просмотр исходного кода

feat(合同制作):合同制作字段修改

sufan дней назад: 3
Родитель
Сommit
e89d274dab
1 измененных файлов с 42 добавлено и 35 удалено
  1. 42 35
      src/views/financingManage/components/ContractConclusion.vue

+ 42 - 35
src/views/financingManage/components/ContractConclusion.vue

@@ -13,41 +13,43 @@
         <el-form-item label="合同签署方式" prop="contractSignMethod" class="one-form-item">
           <el-radio-group v-model="ruleForm.contractSignMethod" :disabled="disabled">
             <el-radio :label="1">线上电子签</el-radio>
+            <el-radio :label="0">线下合同</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="线上签署文件" prop="electronicSign" style="width: 100%">
-          <template v-if="!disabled">
-            <el-checkbox-group v-model="ruleForm.electronicSign" :disabled="disabled">
-              <el-checkbox v-for="(item, index) in signWayList" :key="index" :label="item.code" :disabled="item.code === 'sushangGuaranteeContrat' || item.code === 'sushangFirstContrat' " name="type">{{ item.name }}</el-checkbox>
-            </el-checkbox-group>
-          </template>
-          <template v-else>
-            <span v-for="(item, key) in electronicSignNameList" :key="key">{{ item }}</span>
-          </template>
-
-        </el-form-item>
-        <el-form-item label="上传合同文件" prop="doUpload" class="one-form-item">
-          <el-radio-group v-model="ruleForm.doUpload" :disabled="disabled">
-            <el-radio :label="true">是</el-radio>
-            <el-radio :label="false">否</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="合同制作意见" prop="suggestion" class="one-form-item">
-          <el-input v-model="ruleForm.suggestion" :disabled="disabled" placeholder="请输入合同制作意见" clearable />
-        </el-form-item>
-      </template>
-      <template v-if="ruleForm.conclusion === 'pass' && ruleForm.doUpload">
-        <el-form-item style="width: 100%">
-          <cy-comm-table
-            ref="commTable"
-            :columns="columns"
-            :data="tableData"
-            :count="0"
-          />
-        </el-form-item>
-      </template>
-      <template v-if="ruleForm.conclusion === 'pass' && ruleForm.smbContractInfos.length">
-        <capital-coopertion-info style="width: 100%;" :smb-contract-infos="ruleForm.smbContractInfos"></capital-coopertion-info>
+        <template v-if="ruleForm.contractSignMethod">
+          <el-form-item label="线上签署文件" prop="electronicSign" style="width: 100%">
+            <template v-if="!disabled">
+              <el-checkbox-group v-model="ruleForm.electronicSign" :disabled="disabled">
+                <el-checkbox v-for="(item, index) in signWayList" :key="index" :label="item.code" :disabled="item.code === 'sushangGuaranteeContrat' || item.code === 'sushangFirstContrat' " name="type">{{ item.name }}</el-checkbox>
+              </el-checkbox-group>
+            </template>
+            <template v-else>
+              <span v-for="(item, key) in electronicSignNameList" :key="key">{{ item }}</span>
+            </template>
+          </el-form-item>
+          <el-form-item label="上传合同文件" prop="doUpload" class="one-form-item">
+            <el-radio-group v-model="ruleForm.doUpload" :disabled="disabled">
+              <el-radio :label="true">是</el-radio>
+              <el-radio :label="false">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="合同制作意见" prop="suggestion" class="one-form-item">
+            <el-input v-model="ruleForm.suggestion" :disabled="disabled" placeholder="请输入合同制作意见" clearable />
+          </el-form-item>
+        </template>
+        <template v-if="ruleForm.conclusion === 'pass' && ruleForm.doUpload">
+          <el-form-item style="width: 100%">
+            <cy-comm-table
+              ref="commTable"
+              :columns="columns"
+              :data="tableData"
+              :count="0"
+            />
+          </el-form-item>
+        </template>
+        <template v-if="ruleForm.conclusion === 'pass' && ruleForm.smbContractInfos.length">
+          <capital-coopertion-info style="width: 100%;" :smb-contract-infos="ruleForm.smbContractInfos"></capital-coopertion-info>
+        </template>
       </template>
 
     </el-form>
@@ -145,6 +147,7 @@ export default {
             />
           }
         },
+
         {
           label: '操作',
           show: !this.disabled,
@@ -245,9 +248,9 @@ export default {
       this.tableData[index].signatoryNameList = []
     },
     async getParameter(type) {
-      const { doUpload, conclusion } = this.ruleForm
+      const { doUpload, conclusion, contractSignMethod } = this.ruleForm
       var uploadContractInfoList = []
-      if (conclusion === 'pass' && doUpload) {
+      if (conclusion === 'pass' && doUpload && contractSignMethod) {
         uploadContractInfoList = this.tableData.map((item, index) => {
           const { contractName, contractType, signatoryNameList } = item
           const uploadContractSignatories = this.signList.filter(item => item.contractType === contractType && signatoryNameList.includes(item.name))
@@ -268,6 +271,10 @@ export default {
           ...this.ruleForm,
           uploadContractInfoList
         }
+        if (!contractSignMethod) {
+          params.electronicSign = []
+          params.suggestion = ''
+        }
       }
 
       return params