Browse Source

Merge branch 'dev1.0' of http://192.168.0.200:3000/suf/factoring-trade-front-end-v2 into chang

changjiaming 7 months ago
parent
commit
4b2a2715f7

+ 1 - 1
.env.development

@@ -11,5 +11,5 @@ VUE_APP_BASE_API = 'http://192.168.2.12:8888'
 # VUE_APP_BASE_API = 'http://192.168.2.13:8888'
  VUE_APP_BASE_API = 'http://192.168.3.6:8888'
 # VUE_APP_BASE_API = 'http://192.168.2.12:8888'
-# VUE_APP_BASE_API = 'http://192.168.2.13:8888'
+# VUE_APP_BASE_API = 'http://192.168.2.77:8888'
 # VUE_APP_BASE_API = 'http://citp.changan-inkasso.com/tradeV4-backend'

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "axios": "0.18.1",
     "core-js": "^3.33.2",
     "docx-preview": "^0.3.0",
-    "element-ui": "2.13.2",
+    "element-ui": "2.15.14",
     "exceljs": "^4.4.0",
     "handsontable": "^14.1.0",
     "jquery": "^3.7.1",

+ 9 - 1
src/api/financialManagement/financialManagement.js

@@ -98,10 +98,18 @@ export function onSubmit(data) {
   })
 }
 
-// 修改获取详情
+// 修改获取详情 -- 获取入账详情
 export function cashFlowGetEntryDetail(params) {
   return request({
     url: '/cashFlow/getEntryDetail/' + params,
     method: 'get'
   })
 }
+
+// 获取出账详情
+export function cashFlowGetExitDetail(params) {
+  return request({
+    url: '/cashFlow/getOutDetail/' + params,
+    method: 'get'
+  })
+}

+ 7 - 0
src/router/moudules/financialManagement.js

@@ -19,6 +19,13 @@ export default {
       component: () => import('@/views/financialManagement/addAccounts'),
       hidden: true,
       meta: { title: '新增出入账' }
+    },
+    {
+      path: '/financialManagement/view/:id',
+      name: 'FinancialManagementView',
+      component: () => import('@/views/financialManagement/addAccounts'),
+      hidden: true,
+      meta: { title: '财务管理查看' }
     }
   ]
 }

+ 3 - 1
src/store/modules/constant.js

@@ -33,7 +33,9 @@ export default {
       invoiceType: [], // 发票类型
       amountKind: [], // 金额种类
       salesContractSettleCycleMethod: [], // 结算周期方式
-      oaBillPaymentType: [] // 退款管理-付款类型
+      oaBillPaymentType: [], // 退款管理-付款类型
+      principalPaymentMethod: [], // 授信决议 - 本金支付方式
+      projectInitiationStatus: [], // 融资管理 - 业务状态
     }
   },
   mutations: {

+ 1 - 1
src/views/creditManage/projectCredit/dueReview/components/CorporateGoodwill/EquityFreezed.vue

@@ -76,7 +76,7 @@ export default {
           prop: 'freezeEndDate'
         },
         {
-          label: '股权冻结',
+          label: '是否股权冻结',
           prop: 'privateLending',
           ruleRequired: this.type === 'projectOwner',
           render: (h, row) => {

+ 1 - 1
src/views/creditManage/projectCredit/dueReview/components/CorporateGoodwill/MajorAnomalie.vue

@@ -75,7 +75,7 @@ export default {
           prop: 'personName'
         },
         {
-          label: '重大异常诉讼',
+          label: '是否重大异常诉讼',
           prop: 'privateLending',
           ruleRequired: this.type === 'projectOwner',
           render: (h, row) => {

+ 39 - 19
src/views/creditManage/resolutionManage/components/CreditInfo.vue

@@ -126,7 +126,15 @@
         </el-input>
       </el-form-item>
       <el-form-item label="本金支付方式" prop="principalPaymentMethod" style="width: 100%;">
-        <el-input v-model="ruleForm.principalPaymentMethod" placeholder="请输入本金支付方式" :disabled="isView" />
+        <el-select v-model="ruleForm.principalPaymentMethod" :disabled="isView" placeholder="请选择本金支付方式">
+          <el-option
+            v-for="item in constant.principalPaymentMethod"
+            :key="item.code"
+            :label="item.name"
+            :value="item.code">
+          </el-option>
+        </el-select>
+        <!-- <el-input v-model="ruleForm.principalPaymentMethod" placeholder="请输入本金支付方式" :disabled="isView" /> -->
       </el-form-item>
       <el-form-item label="利息管理费支付方式" :prop="ruleForm.paymentMethodForInterestManagementFee != 'paymentMethodForInterestManagementFee_D' ? 'paymentMethodForInterestManagementFee' : 'paymentMethodForInterestManagementFeeDetail'" class="select-input-item">
         <el-select v-model="ruleForm.paymentMethodForInterestManagementFee" placeholder="请选择利息管理费支付方式" style="width: 100%;" @change="setResultInfo" :disabled="isView">
@@ -214,6 +222,7 @@
 
 <script>
 import request from '@/utils/request'
+import { mapGetters } from 'vuex';
 export default {
   data() {
     const validateEmpty1 = (rule, value, callback) => {
@@ -460,30 +469,41 @@ export default {
     }
   },
   props: ["info", "isView"],
+  computed: {
+    ...mapGetters(['constant'])
+  },
+  created() {
+    this.$store.dispatch('getConstant', ['principalPaymentMethod'])
+  },
   mounted() {
     this.getTypeList()
   },
   methods: {
-    confirm() {
+    confirm(type) {
+      let info = { ...this.ruleForm }
+      if(info.paymentMethodForInterestManagementFee != 'paymentMethodForInterestManagementFee_D') {
+        info.paymentMethodForInterestManagementFeeDetail = ''
+      }
+      info.creditEnhancementMeasuresOne = info.type.includes('creditEnhancementMeasuresOne') ? 1 : 0
+      info.creditEnhancementMeasuresTwo = info.type.includes('creditEnhancementMeasuresTwo') ? 1 : 0
+      info.creditEnhancementMeasuresThree = info.type.includes('creditEnhancementMeasuresThree') ? 1 : 0
+      info.creditEnhancementMeasuresFore = info.type.includes('creditEnhancementMeasuresFore') ? 1 : 0
+      info.creditEnhancementMeasuresIllustrate = info.creditEnhancementMeasuresIllustrateList.map(item => {
+        return item.msg + (item.code || '')
+      }).join('。')
       return new Promise((resolve, reject) => {
-        this.$refs.creditForm.validate(flag => {
-          if(flag) {
-            let info = { ...this.ruleForm }
-            if(info.paymentMethodForInterestManagementFee != 'paymentMethodForInterestManagementFee_D') {
-              info.paymentMethodForInterestManagementFeeDetail = ''
+        if(type === 'submit') {
+          this.$refs.creditForm.validate(flag => {
+            if(flag) {
+              resolve(info)
+            } else {
+              reject()
             }
-            info.creditEnhancementMeasuresOne = info.type.includes('creditEnhancementMeasuresOne') ? 1 : 0
-            info.creditEnhancementMeasuresTwo = info.type.includes('creditEnhancementMeasuresTwo') ? 1 : 0
-            info.creditEnhancementMeasuresThree = info.type.includes('creditEnhancementMeasuresThree') ? 1 : 0
-            info.creditEnhancementMeasuresFore = info.type.includes('creditEnhancementMeasuresFore') ? 1 : 0
-            info.creditEnhancementMeasuresIllustrate = info.creditEnhancementMeasuresIllustrateList.map(item => {
-              return item.msg + (item.code || '')
-            }).join('。')
-            resolve(info)
-          } else {
-            reject()
-          }
-        })
+          })
+        }else {
+          resolve(info)
+        }
+
       })
     },
     getTypeList() {

+ 13 - 8
src/views/creditManage/resolutionManage/components/PayCondition.vue

@@ -47,15 +47,20 @@ export default {
     deleteCondition(index) {
       this.ruleForm.loanConditionsList.splice(index, 1)
     },
-    confirm() {
+    confirm(type) {
       return new Promise((res, rej) => {
-        this.$refs.payForm.validate(flag => {
-          if(flag) {
-            res({ loanConditionsList: this.ruleForm.loanConditionsList })
-          } else {
-            rej()
-          }
-        })
+        if(type === 'submit') {
+          this.$refs.payForm.validate(flag => {
+            if(flag) {
+              res({ loanConditionsList: this.ruleForm.loanConditionsList })
+            } else {
+              rej()
+            }
+          })
+        }else {
+          res({ loanConditionsList: this.ruleForm.loanConditionsList })
+        }
+
       })
     }
   },

+ 19 - 14
src/views/creditManage/resolutionManage/components/ResolutionResult.vue

@@ -51,21 +51,26 @@ export default {
     deleteCondition(index) {
       this.ruleForm.creditConclusionList.splice(index, 1)
     },
-    confirm() {
+    confirm(type) {
+      let arr = [...this.ruleForm.creditConclusionList]
+      arr[6] = {
+        content: this.ruleForm.creditConclusionList[6].content.map(item => {
+          return item.content
+        }).join('。')
+      }
       return new Promise((res, rej) => {
-        this.$refs.resultForm.validate(flag => {
-          if(flag) {
-            let arr = [...this.ruleForm.creditConclusionList]
-            arr[6] = {
-              content: this.ruleForm.creditConclusionList[6].content.map(item => {
-                return item.content
-              }).join('。')
+        if(type === 'submit') {
+          this.$refs.resultForm.validate(flag => {
+            if(flag) {
+              res({ creditConclusionList: arr })
+            } else {
+              rej()
             }
-            res({ creditConclusionList: arr })
-          } else {
-            rej()
-          }
-        })
+          })
+        }else {
+          res({ creditConclusionList: arr })
+        }
+
       })
     }
   },
@@ -79,7 +84,7 @@ export default {
             let list = arr[6].content.split('。').map(item => {
               return { content: item }
             })
-            arr.splice(6, 1, ...list) 
+            arr.splice(6, 1, ...list)
             this.ruleForm.creditConclusionList = arr
           } else {
             if(this.isFirst && this.info.creditConclusionList.length > 6) {

+ 20 - 12
src/views/creditManage/resolutionManage/resolution.vue

@@ -9,8 +9,9 @@
     <cy-info-title>授信结论</cy-info-title>
     <resolution-result :info="infoDetail" ref="ref3" />
     <div class="submit-btn">
-      <el-button type="primary" @click="confirm">提交</el-button>
-      <el-button @click="$router.go(-1)">关闭</el-button>
+      <el-button @click="$router.go(-1)">取消</el-button>
+      <el-button type="primary" @click="confirm('temp')">暂存</el-button>
+      <el-button type="primary" @click="confirm('submit')">提交</el-button>
     </div>
   </div>
 </template>
@@ -62,32 +63,39 @@ export default {
         this.infoDetail.randomId = Math.random()
       }
     },
-    confirm() {
-      let p1 = this.$refs.ref1.confirm()
-      let p2 = this.$refs.ref2.confirm()
-      let p3 = this.$refs.ref3.confirm()
+    confirm(type) {
+      let p1 = this.$refs.ref1.confirm(type)
+      let p2 = this.$refs.ref2.confirm(type)
+      let p3 = this.$refs.ref3.confirm(type)
       Promise.all([p1, p2, p3]).then(res => {
         let data = { ...res[0], ...res[1], ...res[2]}
         data.cProjectInformationId = this.infoDetail.cProjectInformationId
         data.taskId = this.$route.params.taskId
         data.id = this.$route.params.infoId
-        this.submit(data)
+        data.Loading = true
+        if(type === 'temp') {
+          data.visible = 0
+        }else {
+          data.visible = 1
+        }
+        this.submit(type, data)
       }, () => {
         this.$message.error('必填项不能为空')
       })
     },
-    submit(data) {
-      this.isLoading = true
+    submit(type, data) {
       request({
         url: '/creditResolution/add',
         data,
         method: 'post'
       }).then(() => {
-        this.$message.success('提交成功')
-        this.isLoading = false
+        if(type === 'temp') {
+          this.$message.success('暂存成功')
+        }else {
+          this.$message.success('提交成功')
+        }
         this.$router.go(-1)
       }, () => {
-        this.isLoading = false
       })
     }
   }

+ 33 - 25
src/views/divideAccountsManage/edit.vue

@@ -80,7 +80,8 @@
     </el-form>
     <div v-if="!disabled" class="submit-btn">
       <el-button @click="() => { this.$router.go(-1) }">取消</el-button>
-      <el-button type="primary" @click="submit">提交</el-button>
+      <el-button type="primary" @click="submit('temp')">暂存</el-button>
+      <el-button type="primary" @click="submit('submit')">提交</el-button>
     </div>
     <cy-dialog ref="financingGoodsRef" title="选择融资货物" width="70%">
       <financing-goods ref="financingGoods" :select-data="loanTableData" :table-data="financingGoodsList"></financing-goods>
@@ -249,7 +250,7 @@ export default {
           }
         },
         {
-          label: '是否计提',
+          label: '是否计提(履约保证金)',
           prop: 'accrual',
           showTooltip: true,
           width: '80',
@@ -338,7 +339,7 @@ export default {
           }
         },
         {
-          label: '计提金额',
+          label: '履约保证金',
           prop: 'accrualAmount',
           showTooltip: true,
           show: this.oneCalcStatus,
@@ -566,29 +567,36 @@ export default {
         this.accountTableData = data
       })
     },
-    submit() {
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
-          this.oneCalc('click').then(() => {
-            const params = {
-              Loading: true,
-              ledgerAccountBasicInfo: {
-                ...this.ledgerAccountBasicInfo,
-                goodsAmount: this.goodsMoney
-              },
-              goodsAssignList: this.loanTableData,
-              supplierBankCardInfoList: this.accountTableData,
-              submit: true
-            }
-            accountSubmit(params).then(() => {
-              this.$message.success('提交成功')
-              this.$router.go(-1)
+    submit(type) {
+      const params = {
+        Loading: true,
+        ledgerAccountBasicInfo: {
+          ...this.ledgerAccountBasicInfo,
+          goodsAmount: this.goodsMoney
+        },
+        goodsAssignList: this.loanTableData,
+        supplierBankCardInfoList: this.accountTableData,
+        submit: type === 'submit'
+      }
+      if (type === 'submit') {
+        this.$refs.ruleForm.validate((valid) => {
+          if (valid) {
+            this.oneCalc('click').then(() => {
+              accountSubmit(params).then(() => {
+                this.$message.success('提交成功')
+                this.$router.go(-1)
+              })
             })
-          })
-        } else {
-          return false
-        }
-      })
+          } else {
+            return false
+          }
+        })
+      } else {
+        accountSubmit(params).then(() => {
+          this.$message.success('暂存成功')
+          this.$router.go(-1)
+        })
+      }
     }
   }
 }

+ 50 - 2
src/views/financialManagement/components/AddAccountsContent.vue

@@ -179,6 +179,7 @@
 <script>
 import { mapGetters } from 'vuex'
 import { getEnterprises, getAttributionOfAccount, getCompanyOwnership, getInstitutionName, getNocapitalBankName, getBankCardNo, getBusinessType, getCpitalBankName, cashFlowGetEntryDetail } from '@/api/financialManagement/financialManagement'
+// cashFlowGetExitDetail
 import { codeChangeName, filterListData } from '@/utils/index'
 export default {
   components: {
@@ -292,7 +293,14 @@ export default {
     this.getAttributionOfAccount()
     this.getCompanyOwnership()
     this.getInstitutionName()
-    this.cashFlowGetEntryDetail()
+
+    // 这里增加一个判断,根据出入帐类型,来查看不同的详情
+    if (this.$route.query && this.$route.query.entryOutType === '1') {
+      this.cashFlowGetEntryDetail()
+    }
+    if (this.$route.query && this.$route.query.entryOutType === '2') {
+      this.getCashFlowGetExitDetail()
+    }
     // const { id } = this.$route.query
     // if (id) {
     // }
@@ -337,6 +345,46 @@ export default {
         })
       }
     },
+    // 获取出账详情
+    getCashFlowGetExitDetail() {
+      // const { id } = this.$route.query
+      // if (id) {
+      //   cashFlowGetExitDetail(id).then(data => {
+      //     const { cashFlowManageBaseVo } = data.data
+      //     this.ruleForm = {
+      //       id: cashFlowManageEntryInfo.id,
+      //       billType: 1,
+      //       companyId: cashFlowManageEntryInfo.companyId,
+      //       attributionOfAccountId: cashFlowManageEntryInfo.accountBelong,
+      //       companyOwnershipId: cashFlowManageEntryInfo.companyBelong,
+      //       refinancingManagementId: cashFlowManageEntryInfo.companyBelong,
+      //       bankCardNo: cashFlowManageEntryInfo.companyBelong,
+      //       bankCardNoId: cashFlowManageEntryInfo.companyBelong,
+      //       type: cashFlowManageEntryInfo.type,
+      //       incomeDate: cashFlowManageEntryInfo.incomeDate,
+      //       incomeAmount: cashFlowManageEntryInfo.incomeAmount,
+      //       invoiceAmount: cashFlowManageEntryInfo.invoiceAmount,
+      //       realAmount: cashFlowManageEntryInfo.realAmount,
+      //       remark: cashFlowManageEntryInfo.remark
+      //     }
+      //     const attributionOfAccountCode = codeChangeName(this.attributionOfAccountList, this.ruleForm.attributionOfAccountId, 'id', 'code')
+      //     if (attributionOfAccountCode === 'capital') {
+      //       this.refinancingManagementChange(this.ruleForm.companyOwnershipId)
+      //       this.ruleForm.businessTypeId = cashFlowManageEntryInfo.businessType
+      //       this.ruleForm.businessNumberId = cashFlowManageEntryInfo.businessTypeNumber
+      //       setTimeout(() => {
+      //         this.businessTypeChange()
+      //         this.ruleForm.bankName = cashFlowManageEntryInfo.bankName
+      //         this.bankChange()
+      //       }, 200)
+      //     } else {
+      //       this.companyOwnershipChange(this.ruleForm.companyOwnershipId)
+      //       this.ruleForm.bankName = cashFlowManageEntryInfo.bankName
+      //       this.bankChange()
+      //     }
+      //   })
+      // }
+    },
     getEnterprises() {
       getEnterprises().then(response => {
         this.corporateNameList = response.data
@@ -457,7 +505,7 @@ export default {
         // 当类型为现金时校验入账金额
         if (type === 'entryType_cash') {
           if (!incomeAmount) {
-            this.$message.warning('请输入账金额据金额')
+            this.$message.warning('请输入账金额')
             return
           }
         }

+ 13 - 1
src/views/financialManagement/index.vue

@@ -126,7 +126,8 @@ export default {
             taskName: row.taskName,
             type,
             id: row.id,
-            msg
+            msg,
+            entryOutType: row.entryOutType
           }
         })
       } else if (row.taskName === '财务审核') {
@@ -134,6 +135,17 @@ export default {
           name: 'InvoicesManagementFinancialReview',
           params: { id: 'children' }
         })
+      } else {
+        // this.$router.push({
+        //   name: 'FinancialManagementView',
+        //   params: { id: 'children' },
+        //   query: {
+        //     taskName: row.taskName,
+        //     type,
+        //     id: row.id,
+        //     entryOutType: row.entryOutType // 出入账类型 1--入账 2--出账
+        //   }
+        // })
       }
     }
   }

+ 9 - 8
src/views/financingManage/index.vue

@@ -20,10 +20,10 @@
                   style="width: 100%"
                 >
                   <el-option
-                    v-for="item in getStatusList"
-                    :key="item.id"
+                    v-for="item in constant.projectInitiationStatus"
+                    :key="item.code"
                     :label="item.name"
-                    :value="item.id"
+                    :value="item.code"
                   >
                   </el-option>
                 </el-select>
@@ -43,6 +43,7 @@
           :columns="columns"
           :data="tableData"
           :count="total"
+          parentComponent="FinancingManage"
         />
       </el-tabs>
     </template>
@@ -57,7 +58,7 @@ import { mapGetters } from 'vuex'
 import { getList, getAllList } from '@/api/financingManage'
 
 export default {
-  name: 'Demo',
+  name: 'FinancingManage',
   data() {
     return {
       total: 0,
@@ -180,9 +181,7 @@ export default {
     }
   },
   computed: {
-    ...mapGetters([
-      'name'
-    ]),
+    ...mapGetters(['constant']),
     tablePower() {
       return ({ item, tab, row }) => {
         const { tabPower, rowPower } = item
@@ -199,6 +198,7 @@ export default {
     }
   },
   mounted() {
+    this.$store.dispatch('getConstant', ['projectInitiationStatus'])
     this.fetchData()
   },
   methods: {
@@ -215,8 +215,9 @@ export default {
         ...this.search
       }
       if (this.activeName === 'all') {
-        getAllList(params).then(({ rows }) => {
+        getAllList(params).then(({ rows, records }) => {
           this.tableData = rows
+          this.total = records
         })
       } else {
         getList(params).then(({ rows }) => {

+ 8 - 6
src/views/salesContractManagement/components/SalesContractReviewContent.vue

@@ -40,10 +40,10 @@
           {{ ruleForm.settleCycleMethod == 'salesContractSettleCycleMethod_fixed' ? '天' : '个自然月' }}
         </el-form-item>
         <el-form-item label="付款节点" prop="paymentNode">
-          <el-input v-model="ruleForm.paymentNode" :disabled="disabled" style="width: 100px;" />
+          <el-input v-model="ruleForm.paymentNode" :disabled="disabled" style="width: 180px;" />
         </el-form-item>
         <el-form-item label="付款期限" prop="paymentTerm">
-          <el-input v-model="ruleForm.paymentTerm" :disabled="disabled" style="width: 100px;" />
+          <el-input v-model="ruleForm.paymentTerm" :disabled="disabled" style="width: 210px;" />
         </el-form-item>
         <cy-info-title style="margin: 10px 0">质保金</cy-info-title>
         <el-form-item label="是否有质保金" prop="isRetention">
@@ -53,7 +53,9 @@
           </el-radio-group>
         </el-form-item>
         <el-form-item v-if="ruleForm.isRetention" label="质保金比例" prop="retentionPercent" class="two-form-item">
-          <el-input v-model="ruleForm.retentionPercent" class="two-form-item" disabled />
+          <el-input v-model="ruleForm.retentionPercent" class="two-form-item" disabled>
+            <template slot="append">%</template>
+          </el-input>
         </el-form-item>
         <el-form-item label="质保金是否有上限" prop="top">
           <el-radio-group v-model="ruleForm.top" :disabled="disabled">
@@ -61,17 +63,17 @@
             <el-radio :label="0">否</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item v-if="ruleForm.top" label="质保金上限" prop="retentionLimit" class="two-form-item">
+        <el-form-item v-if="ruleForm.top" label="质保金上限(元)" prop="retentionLimit" class="two-form-item">
           <el-input v-model="ruleForm.retentionLimit" class="two-form-item" :disabled="disabled" />
         </el-form-item>
         <el-form-item label="质保金释放规则" prop="releaseMethod" class="one-form-item">
           <el-input v-model="ruleForm.releaseMethod" class="one-form-item" :disabled="disabled" />
         </el-form-item>
-        <el-form-item label="质保期限" prop="retentionPeriod" class="one-form-item">
+        <el-form-item label="质保期限(天)" prop="retentionPeriod" class="one-form-item">
           <el-input v-model="ruleForm.retentionPeriod" class="one-form-item" :disabled="disabled" />
         </el-form-item>
         <cy-info-title style="margin: 10px 0">履约保证金</cy-info-title>
-        <el-form-item label="履约保证金上限" prop="performanceBondLimit" style="width: 100%">
+        <el-form-item label="履约保证金上限(元)" prop="performanceBondLimit" style="width: 100%">
           <el-input v-model="ruleForm.performanceBondLimit" :disabled="disabled" />
         </el-form-item>
       </template>

File diff suppressed because it is too large
+ 11624 - 8615
yarn.lock