Parcourir la source

feat(合同):合同制作

sufan il y a 1 semaine
Parent
commit
8dff719ed6

+ 9 - 0
src/api/financingManage/index.js

@@ -312,3 +312,12 @@ export function getSmbRepaymentPerson(params) {
     params
   })
 }
+
+// 重新发送给资方
+export function resetSmbCapital(params) {
+  return request({
+    url: '/contractMaking/smn/sendSmbContract',
+    method: 'get',
+    params
+  })
+}

+ 15 - 9
src/views/financingManage/components/CapitalCoopertionInfo.vue

@@ -4,7 +4,7 @@
     <cy-comm-table
       ref="commTable"
       :columns="columns"
-      :data="tableData"
+      :data="smbContractInfos"
       :count="0"
     />
   </div>
@@ -12,6 +12,12 @@
 
 <script>
 export default {
+  props: {
+    smbContractInfos: {
+      type: Array,
+      default: () => []
+    }
+  },
   data() {
     return {
       tableData: [],
@@ -22,28 +28,29 @@ export default {
         },
         {
           label: '合同类型',
-          prop: 'contractType',
+          prop: 'contractTypeName',
           showTooltip: true
         },
         {
           label: '合同编号',
-          prop: 'contractType',
+          prop: 'contractNumber',
           showTooltip: true
         },
         {
           label: '名称',
-          prop: 'contractType',
+          prop: 'name',
           showTooltip: true
         },
         {
           label: '证件号',
-          prop: 'contractType',
+          prop: 'socialCode',
           showTooltip: true
         },
         {
           label: '金额',
-          prop: 'contractType',
-          showTooltip: true
+          prop: 'amount',
+          showTooltip: true,
+          type: 'num'
         },
         {
           label: '文件',
@@ -51,9 +58,8 @@ export default {
           showTooltip: true,
           render: (h, row, index) => {
             return <cy-upload
-              ref={`fileStorage${index}`}
               uploadParams={{}}
-              fileData={row.fileStorage}
+              fileData={row.fileStorage ? [row.fileStorage] : []}
               disabled={true}
               limit={1}
               defaultDesc='请上传文件'

+ 83 - 3
src/views/financingManage/components/ContractApprovalContent.vue

@@ -15,8 +15,22 @@
         <!-- <div class="download-box" @click="downloadFile">
           <i class="iconfont icon-xiazai"></i>
         </div> -->
-
       </el-form-item>
+      <template v-if="detailsInfo.smbContractInfos.length">
+        <!-- 苏商银行 -->
+        <cy-info-title style="margin-bottom: 20px; margin-top: 10px;">
+          资方电子签合同
+          <div slot="right">
+            <el-button v-if="!disabled && !isResetCapital" type="text" @click="resetCapital">重新发送给资方</el-button>
+          </div>
+        </cy-info-title>
+        <cy-comm-table
+          ref="commTable"
+          :columns="columns"
+          :data="detailsInfo.smbContractInfos"
+          :count="0"
+        />
+      </template>
       <cy-info-title>审批结论</cy-info-title>
       <el-form-item label="审批结论" prop="conclusion">
         <el-radio-group v-model="ruleForm.conclusion" :disabled="disabled">
@@ -40,7 +54,8 @@
 </template>
 
 <script>
-import { contractApprovalDownload } from '@/api/financingManage'
+import { contractApprovalDownload, resetSmbCapital } from '@/api/financingManage'
+import { getFilePerview } from '@/api/dictionary'
 import { exportFile } from '@/utils'
 export default {
   props: {
@@ -61,7 +76,57 @@ export default {
       },
       rules: {
         conclusion: [{ required: true, message: '请选择签署结论', trigger: 'change' }]
-      }
+      },
+      columns: [
+        {
+          label: '合同类型',
+          prop: 'contractTypeName',
+          showTooltip: true
+        },
+        {
+          label: '合同文件',
+          prop: 'contractType',
+          showTooltip: true,
+          render: (h, row, index) => {
+            return <cy-upload
+              uploadParams={{}}
+              fileData={row.fileStorage ? [row.fileStorage] : []}
+              disabled={true}
+              limit={1}
+              defaultDesc='请上传文件'
+            />
+          }
+        },
+        {
+          label: '失败原因',
+          prop: 'failReason',
+          showTooltip: true
+        },
+        {
+          label: '资方签署状态',
+          prop: 'signStatus',
+          showTooltip: true,
+          render: (h, row, index) => {
+            return row.signStatus ? '签署成功' : '签署失败'
+          }
+        },
+        {
+          label: '操作',
+          prop: 'amount',
+          render: (h, row, index) => {
+            return <div>
+              { row.signStatus && <el-button type='text' onClick={() => this.downloadCapitalFile(row) }>下载</el-button> }
+
+            </div>
+          }
+        }
+
+      ]
+    }
+  },
+  computed: {
+    isResetCapital() {
+      return this.detailsInfo.smbContractInfos.every(item => item.signStatus)
     }
   },
   watch: {
@@ -87,6 +152,21 @@ export default {
       contractApprovalDownload({ contractInfoId }).then((data) => {
         exportFile(data)
       })
+    },
+    downloadCapitalFile(row) {
+      getFilePerview({ absolutePath: row.fileStorage.absolutePath }).then((data) => {
+        exportFile(data)
+      })
+    },
+    resetCapital() {
+      const params = {
+        Loading: true,
+        smbMasterContractInfoId: this.detailsInfo.smbContractInfos.find(item => item.contractType === 1).id,
+        smbguaContractContractInfoId: this.detailsInfo.smbContractInfos.find(item => item.contractType === 2).id
+      }
+      resetSmbCapital(params).then(() => {
+        this.$message.success('重新发送给资方')
+      })
     }
   }
 }

+ 7 - 5
src/views/financingManage/components/ContractConclusion.vue

@@ -18,7 +18,7 @@
         <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" name="type">{{ item.name }}</el-checkbox>
+              <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>
@@ -46,8 +46,8 @@
           />
         </el-form-item>
       </template>
-      <template v-if="ruleForm.conclusion === 'pass'">
-        <capital-coopertion-info style="width: 100%;"></capital-coopertion-info>
+      <template v-if="ruleForm.conclusion === 'pass' && ruleForm.smbContractInfos.length">
+        <capital-coopertion-info style="width: 100%;" :smb-contract-infos="ruleForm.smbContractInfos"></capital-coopertion-info>
       </template>
 
     </el-form>
@@ -183,13 +183,15 @@ export default {
     detailsInfo: {
       handler(newV) {
         if (newV === undefined) return
-        const { conclusion, doUpload, suggestion, electronicSign, uploadContractInfoList, electronicSignNameList } = JSON.parse(JSON.stringify(newV))
+        const { conclusion, doUpload, suggestion, electronicSign, uploadContractInfoList, electronicSignNameList, smbContractInfos } = JSON.parse(JSON.stringify(newV))
         this.ruleForm = {
           conclusion,
           contractSignMethod: 1,
           doUpload,
           suggestion,
-          electronicSign
+          // 苏商银行默认两个文件
+          electronicSign: [...electronicSign, 'sushangFirstContrat', 'sushangGuaranteeContrat'],
+          smbContractInfos
         }
         this.electronicSignNameList = electronicSignNameList?.length ? electronicSignNameList.join(',') : ''
         if (uploadContractInfoList && uploadContractInfoList.length) {

+ 22 - 12
src/views/financingManage/components/PaymentApproveContent.vue

@@ -113,33 +113,31 @@
         </el-form-item>
       </template>
       <!-- 苏商银行的操作 -->
-      <template>
+
+      <template v-if="smbManagement">
         <cy-info-title style="margin-top: 20px">资方所需合同文件</cy-info-title>
-        <el-form-item label="应收账款合同" class="form-required">
+        <el-form-item label="应收账款合同">
           <cy-upload
-            ref="ownershipFiles"
             :upload-params="{}"
-            :file-data="ruleFormFile.ownershipFiles"
+            :file-data="receivableFileList"
             :disabled="true"
             :upload-from-orange-status="true"
             placeholder="请上传应收账款合同"
           />
         </el-form-item>
-        <el-form-item label="应收账款产值单" class="form-required">
+        <el-form-item label="应收账款产值单">
           <cy-upload
-            ref="ownershipFiles"
             :upload-params="{}"
-            :file-data="ruleFormFile.ownershipFiles"
+            :file-data="acceptanceFileList"
             :disabled="true"
             :upload-from-orange-status="true"
             placeholder="请上传应收账款产值单"
           />
         </el-form-item>
-        <el-form-item label="代偿承诺函" class="form-required">
+        <el-form-item label="代偿承诺函">
           <cy-upload
-            ref="ownershipFiles"
             :upload-params="{}"
-            :file-data="ruleFormFile.ownershipFiles"
+            :file-data="compensationFileList"
             :disabled="true"
             :upload-from-orange-status="true"
             placeholder="请上传代偿承诺函"
@@ -210,14 +208,22 @@ export default {
           { required: true, message: '请输入所有权保留登记到期日', trigger: 'blur' }
         ]
       },
-      paymentConditionList: []
+      paymentConditionList: [],
+      // 是否是苏商银行
+      smbManagement: null,
+      // 应收账款合同
+      receivableFileList: [],
+      // 验收单合同
+      acceptanceFileList: [],
+      // 代偿承诺函
+      compensationFileList: []
     }
   },
   watch: {
     detailsInfo: {
       handler(newV) {
         if (newV === undefined) return
-        const { approvalConclusion, approvalComments, receivablesRegisterInfo, paymentConditionList, hasCollateralInfo } = JSON.parse(JSON.stringify(newV))
+        const { approvalConclusion, approvalComments, receivablesRegisterInfo, paymentConditionList, hasCollateralInfo, smbManagement, purchContractFileList, salesContractFileList, acceptanceFileList, commitmentFileList } = JSON.parse(JSON.stringify(newV))
         this.ruleForm.approvalConclusion = approvalConclusion
         this.ruleForm.approvalComments = approvalComments
         const { fileStorage } = receivablesRegisterInfo
@@ -227,6 +233,10 @@ export default {
         }
         this.paymentConditionList = paymentConditionList
         this.hasCollateralInfo = hasCollateralInfo
+        this.smbManagement = smbManagement
+        this.receivableFileList = [...purchContractFileList, ...salesContractFileList]
+        this.acceptanceFileList = acceptanceFileList
+        this.compensationFileList = commitmentFileList
         this.key += 1
       },
       immediate: true,