From dd472c0dcecff9a2768ec48c09601f8f7d042342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B7=9D=E8=99=8E?= Date: Thu, 1 Aug 2024 17:22:08 +0800 Subject: [PATCH] =?UTF-8?q?8.1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/scm/form/cwsettlement/index.vue | 995 ++++++++++-------- .../scm/form/paymentApplication/index.vue | 264 ++++- jnpf-app/utils/define.js | 12 +- .../impl/PaymentApplicationServiceImpl.java | 117 ++ .../PaymentApplicationController.java | 64 +- .../PaymentApplicationForm.java | 2 + .../yunguan/BFSPaymentApprovalModel.java | 18 + jnpf-java-boot/jnpf-web/src/utils/apiUrl.js | 2 + .../views/extend/paymentapplication/index.vue | 4 +- .../scm/purchaseCenter/purchaseOrder/Bill.vue | 14 +- .../service/impl/FlowTaskNewServiceImpl.java | 1 + .../jnpf-workflow-engine-controller/pom.xml | 6 + .../controller/FlowBeforeController.java | 39 +- 13 files changed, 1039 insertions(+), 499 deletions(-) create mode 100644 jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/yunguan/BFSPaymentApprovalModel.java diff --git a/jnpf-app/pages/scm/form/cwsettlement/index.vue b/jnpf-app/pages/scm/form/cwsettlement/index.vue index 8d6624c4..4933905a 100644 --- a/jnpf-app/pages/scm/form/cwsettlement/index.vue +++ b/jnpf-app/pages/scm/form/cwsettlement/index.vue @@ -31,12 +31,12 @@ - + - + @@ -45,25 +45,22 @@ - + - + @@ -76,8 +73,8 @@ + @change="changeData('settlementAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -112,8 +109,8 @@ + @change="changeData('prepaidDeductionAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -130,8 +127,8 @@ + @change="changeData('marginAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -139,8 +136,8 @@ + @change="changeData('underpaymentAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -148,8 +145,8 @@ + @change="changeData('overdueAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -157,8 +154,8 @@ + @change="changeData('payableAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -194,11 +191,89 @@ + @change="changeData('settlableAmount',-1)" addonAfter="元" clearable placeholder="请输入" + :style='{"width":"100%"}'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - {{dataForm.cwsettlementsummaryList.length==0?"添加结算汇总":"添加"}} + + + + + - - + + + {{dataForm.cwsettlementsummaryList.length==0?"添加结算汇总":"添加"}} + + + + @@ -390,13 +462,10 @@ :required="requiredList['cwsettlementsubjectList-subjectId']" label="客户/供应商名称"> @@ -452,8 +521,8 @@ :required="requiredList['cwsettlementsubjectList-advanceRatio']" label="预付比例"> + @change="changeData('cwsettlementsubject-advanceRatio',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -462,8 +531,8 @@ :required="requiredList['cwsettlementsubjectList-accountPeriod']" label="账期"> + @change="changeData('cwsettlementsubject-accountPeriod',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -472,8 +541,8 @@ :required="requiredList['cwsettlementsubjectList-underpaymentMethod']" label="压款方式"> + @change="changeData('cwsettlementsubject-underpaymentMethod',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -482,8 +551,8 @@ :required="requiredList['cwsettlementsubjectList-marginMethod']" label="保证金方式"> + @change="changeData('cwsettlementsubject-marginMethod',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -492,8 +561,8 @@ :required="requiredList['cwsettlementsubjectList-overdueInterestRate']" label="逾期利率"> + @change="changeData('cwsettlementsubject-overdueInterestRate',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -529,20 +598,20 @@ --> + @change="changeData('cwsettlementcontract-contractNamee',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> - - + + - + + @change="changeData('cwsettlementcontract-contractPeriodTime',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -551,8 +620,8 @@ :required="requiredList['cwsettlementcontractList-contractPeriodTimeEnd']" label="合同期限结束 "> + @change="changeData('cwsettlementcontract-contractPeriodTimeEnd',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -585,8 +654,8 @@ :required="requiredList['cwsettlementcontractList-relatedContractId']" label="关联合同"> + @change="changeData('cwsettlementcontract-relatedContractId',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -595,8 +664,8 @@ :required="requiredList['cwsettlementcontractList-pricingModel']" label="定价模式"> + @change="changeData('cwsettlementcontract-pricingModel',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> - - - + + + - + - - + + @@ -639,8 +707,8 @@ :required="requiredList['cwsettlementcontractList-subject2']" label="乙方主体二级"> + @change="changeData('cwsettlementcontract-subject2',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -649,8 +717,8 @@ :required="requiredList['cwsettlementcontractList-deliveryTime']" label="交货时间开始"> + @change="changeData('cwsettlementcontract-deliveryTime',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -659,8 +727,8 @@ :required="requiredList['cwsettlementcontractList-deliveryTimeEnd']" label="交货时间结束"> + @change="changeData('cwsettlementcontract-deliveryTimeEnd',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -697,7 +765,7 @@ + :props="modeTransportProps" :options="modeTransportOptions" :style='{"width":"100%"}'> @@ -707,16 +775,17 @@ :required="requiredList['cwsettlementcontractList-costBearingMian']" label="费用承担主体"> + @change="changeData('cwsettlementcontract-costBearingMian',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> - + + @change="changeData('cwsettlementcontract-costBearingMian',i)" clearable + placeholder="请选择" :options="costBearingMianOptions" :props="costBearingMianProps" + :style='{"width":"100%"}'> - + @@ -749,8 +818,8 @@ :required="requiredList['cwsettlementaccountList-code']" label="单据编号"> + @change="changeData('cwsettlementaccount-code',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -759,8 +828,8 @@ :required="requiredList['cwsettlementaccountList-accountSubjectName']" label="对账主体名称"> + @change="changeData('cwsettlementaccount-accountSubjectName',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -769,8 +838,8 @@ :required="requiredList['cwsettlementaccountList-contractCode']" label="合同编码"> + @change="changeData('cwsettlementaccount-contractCode',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -779,8 +848,8 @@ :required="requiredList['cwsettlementaccountList-docmentNum']" label="单据数(出入库单数量)"> + @change="changeData('cwsettlementaccount-docmentNum',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -800,8 +869,8 @@ :required="requiredList['cwsettlementaccountList-poundlistNum']" label="凭证数"> + @change="changeData('cwsettlementaccount-poundlistNum',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -810,8 +879,8 @@ :required="requiredList['cwsettlementaccountList-productNum']" label="商品数"> + @change="changeData('cwsettlementaccount-productNum',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -820,8 +889,8 @@ :required="requiredList['cwsettlementaccountList-accountAmount']" label="对账合计(含税)"> + @change="changeData('cwsettlementaccount-accountAmount',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -845,8 +914,8 @@ :required="requiredList['cwsettlementcostList-costId']" label="费用单"> + @change="changeData('cwsettlementcost-costId',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -855,8 +924,8 @@ :required="requiredList['cwsettlementcostList-code']" label="单据编号"> + @change="changeData('cwsettlementcost-code',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -865,8 +934,8 @@ :required="requiredList['cwsettlementcostList-costProject']" label="费用项目"> + @change="changeData('cwsettlementcost-costProject',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -875,8 +944,8 @@ :required="requiredList['cwsettlementcostList-institutionId']" label="费用归属"> + @change="changeData('cwsettlementcost-institutionId',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -885,8 +954,8 @@ :required="requiredList['cwsettlementcostList-subjectId']" label="往来单位(一级)"> + @change="changeData('cwsettlementcost-subjectId',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -895,8 +964,8 @@ :required="requiredList['cwsettlementcostList-costPrice']" label="费用金额"> + @change="changeData('cwsettlementcost-costPrice',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -913,8 +982,7 @@ + :required="requiredList['cwsettlementcostList-wayType']" label="付款方式"> + @change="changeData('cwsettlementpaymentreceipt-name',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -976,8 +1044,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-accountName']" label="账户名称"> + @change="changeData('cwsettlementpaymentreceipt-accountName',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -986,8 +1054,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-bankAccount']" label="银行账号"> + @change="changeData('cwsettlementpaymentreceipt-bankAccount',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -996,8 +1064,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-depositBank']" label="开户银行"> + @change="changeData('cwsettlementpaymentreceipt-depositBank',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -1016,8 +1084,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-bankBranchName']" label="支行名称"> + @change="changeData('cwsettlementpaymentreceipt-bankBranchName',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -1026,8 +1094,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-companyTaxNumber']" label="公司税号"> + @change="changeData('cwsettlementpaymentreceipt-companyTaxNumber',i)" clearable + placeholder="请输入" :style='{"width":"100%"}'> @@ -1036,8 +1104,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-address']" label="详细地址"> + @change="changeData('cwsettlementpaymentreceipt-address',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -1046,8 +1114,8 @@ :required="requiredList['cwsettlementpaymentreceiptList-phone']" label="公司电话"> + @change="changeData('cwsettlementpaymentreceipt-phone',i)" clearable placeholder="请输入" + :style='{"width":"100%"}'> @@ -1225,19 +1293,19 @@ "label": "名称", "value": "name" }, ], - cwsettlementcontractcontractIdcolumnOptions: [{ - "label": "合同编码", - "value": "contract_number" - }, { - "label": "合同名称", - "value": "contract_name" - }, { - "label": "类型", - "value": "contractTypeName" - }, { - "label": "名称", - "value": "subjectName" - }, ], + cwsettlementcontractcontractIdcolumnOptions: [{ + "label": "合同编码", + "value": "contract_number" + }, { + "label": "合同名称", + "value": "contract_name" + }, { + "label": "类型", + "value": "contractTypeName" + }, { + "label": "名称", + "value": "subjectName" + }, ], cwsettlementaccounttypeOptions: [{ "fullName": "采购对账", "id": "1" @@ -1279,7 +1347,7 @@ }, { "fullName": "微信", "id": "6" - },{ + }, { "fullName": "无", "id": "7" }], @@ -1358,26 +1426,35 @@ "label": "fullName", "value": "id" }, - - costBearingMianOptions: [{ - "fullName": "甲方", - "id": "1" - }, { - "fullName": "乙方", - "id": "2" - }], - costBearingMianProps: { - "label": "fullName", - "value": "id" - }, - - voucherproductproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },], + + costBearingMianOptions: [{ + "fullName": "甲方", + "id": "1" + }, { + "fullName": "乙方", + "id": "2" + }], + costBearingMianProps: { + "label": "fullName", + "value": "id" + }, + + voucherproductproductIdcolumnOptions: [{ + "label": "商品编码", + "value": "code" + }, { + "label": "商品名称", + "value": "name" + }, { + "label": "规格", + "value": "spec" + }, ], - cwsettlementcontractsubjectcolumnOptions: [{ - "label": "主体名称", - "value": "name" - },], + cwsettlementcontractsubjectcolumnOptions: [{ + "label": "主体名称", + "value": "name" + }, ], settlementMethodOptions: [{ @@ -1417,6 +1494,19 @@ "multiple": false, "children": "" }, + invoiceTypeOptions: [{ + "fullName": "红冲发票", + "id": "1" + }, { + "fullName": "标准发票", + "id": "2" + }], + invoiceTypeProps: { + "label": "fullName", + "value": "id", + "multiple": false, + "children": "" + }, cwsettlementcostwayStatusOptions: [{ "fullName": "未收款", "id": "1" @@ -1521,8 +1611,27 @@ // relationField: "creatorTime", // }, // ], - cwsettlementcontractcontractId: [{"fieldName":"","field":"subjectId","defaultValue":"","jnpfKey":"subjectId","dataType":"varchar","id":"HmoSU22","relationField":"subjectId","required":"1"}, - {"fieldName":"","field":"contractType","defaultValue":"","jnpfKey":"contractType","dataType":"varchar","id":"QnvSU22","relationField":"contractType","required":"1"}], + cwsettlementcontractcontractId: [{ + "fieldName": "", + "field": "subjectId", + "defaultValue": "", + "jnpfKey": "subjectId", + "dataType": "varchar", + "id": "HmoSU22", + "relationField": "subjectId", + "required": "1" + }, + { + "fieldName": "", + "field": "contractType", + "defaultValue": "", + "jnpfKey": "contractType", + "dataType": "varchar", + "id": "QnvSU22", + "relationField": "contractType", + "required": "1" + } + ], cwsettlementcontractcontractPeriodTime: [], @@ -1874,153 +1983,161 @@ return title[0] } }, - - contractChangeData(model, row){ - this.dataForm.cwsettlementcontractList[0].contractName = row.contract_name - this.dataForm.cwsettlementcontractList[0].contractPeriodTime = row.contract_period_time ? row.contract_period_time.substring(0, 10) : ''; - this.dataForm.cwsettlementcontractList[0].contractPeriodTimeEnd = row.contract_period_time_end ? row.contract_period_time_end.substring(0, 10) : ''; - //this.dataForm.cwsettlementcontractList[0].currency = row.currency; - this.dataForm.cwsettlementcontractList[0].procurementModel = row.procurement_model; - this.dataForm.cwsettlementcontractList[0].pricingModel = row.pricing_model; - this.dataForm.cwsettlementcontractList[0].relatedContractId = row.related_contract_id; - this.dataForm.cwsettlementcontractList[0].subject = row.subject; - this.dataForm.cwsettlementcontractList[0].subject2 = row.subject2; - this.dataForm.cwsettlementcontractList[0].deliveryTime = row.delivery_time ? row.delivery_time.substring(0, 10) : ''; - this.dataForm.cwsettlementcontractList[0].deliveryTimeEnd = row.delivery_time_end ? row.delivery_time_end.substring(0, 10) : ''; - this.dataForm.cwsettlementcontractList[0].deliveryModel = row.delivery_model; - this.dataForm.cwsettlementcontractList[0].deliveryMethod = row.delivery_method; - this.dataForm.cwsettlementcontractList[0].modeTransport = row.mode_transport; - this.dataForm.cwsettlementcontractList[0].costBearingMian = row.cost_bearing_mian; - }, - subjectChangeData(model, row){ - let aaa = {}; - let companyName = ''; - this.dataForm.cwsettlementsubjectList[0].subjectName = row.name; - request({ - url: `/api/permission/Organize/currentOrg/getCurrentOrg`, - method: 'get', - data: {} - }).then(res => { - aaa = JSON.parse(res.data.propertyJson) - companyName = res.data.fullName - if('供应商' == row.subjectBasicTypes || '服务商' == row.subjectBasicTypes){ - this.dataForm.cwsettlementpaymentreceiptList[0].name = companyName - this.dataForm.cwsettlementpaymentreceiptList[0].accountName = aaa.accountName - this.dataForm.cwsettlementpaymentreceiptList[0].bankAccount = aaa.bankAccount - this.dataForm.cwsettlementpaymentreceiptList[0].depositBank = aaa.bankName - //this.dataForm.cwsettlementpaymentreceiptList[0].depositArea = aaa.depositArea - this.dataForm.cwsettlementpaymentreceiptList[0].bankBranchName = aaa.bankBranchName - this.dataForm.cwsettlementpaymentreceiptList[0].companyTaxNumber = aaa.enyerpriseTaxNum - this.dataForm.cwsettlementpaymentreceiptList[0].address = aaa.address - this.dataForm.cwsettlementpaymentreceiptList[0].phone = aaa.telePhone - - this.dataForm.cwsettlementpaymentreceiptList[1].name = row.name - this.dataForm.cwsettlementpaymentreceiptList[1].accountName = row.account_name - this.dataForm.cwsettlementpaymentreceiptList[1].bankAccount = row.bank_account - this.dataForm.cwsettlementpaymentreceiptList[1].depositBank = row.deposit_bank - //this.dataForm.cwsettlementpaymentreceiptList[1].depositArea = JSON.parse(row.deposit_area) - this.dataForm.cwsettlementpaymentreceiptList[1].bankBranchName = row.bank_branch_name - this.dataForm.cwsettlementpaymentreceiptList[1].companyTaxNumber = row.company_tax_number - this.dataForm.cwsettlementpaymentreceiptList[1].address = row.address - this.dataForm.cwsettlementpaymentreceiptList[1].phone = row.phone - }else if('客户' == row.subjectBasicTypes){ - this.dataForm.cwsettlementpaymentreceiptList[0].name = row.name - this.dataForm.cwsettlementpaymentreceiptList[0].accountName = row.account_name - this.dataForm.cwsettlementpaymentreceiptList[0].bankAccount = row.bank_account - this.dataForm.cwsettlementpaymentreceiptList[0].depositBank = row.deposit_bank - //this.dataForm.cwsettlementpaymentreceiptList[0].depositArea = JSON.parse(row.deposit_area) - this.dataForm.cwsettlementpaymentreceiptList[0].bankBranchName = row.bank_branch_name - this.dataForm.cwsettlementpaymentreceiptList[0].companyTaxNumber = row.company_tax_number - this.dataForm.cwsettlementpaymentreceiptList[0].address = row.address - this.dataForm.cwsettlementpaymentreceiptList[0].phone = row.phone - - this.dataForm.cwsettlementpaymentreceiptList[1].name = companyName - this.dataForm.cwsettlementpaymentreceiptList[1].accountName = aaa.accountName - this.dataForm.cwsettlementpaymentreceiptList[1].bankAccount = aaa.bankAccount - this.dataForm.cwsettlementpaymentreceiptList[1].depositBank = aaa.bankName - //this.dataForm.cwsettlementpaymentreceiptList[1].depositArea = aaa.depositArea - this.dataForm.cwsettlementpaymentreceiptList[1].bankBranchName = aaa.bankBranchName - this.dataForm.cwsettlementpaymentreceiptList[1].companyTaxNumber = aaa.enyerpriseTaxNum - this.dataForm.cwsettlementpaymentreceiptList[1].address = aaa.address - this.dataForm.cwsettlementpaymentreceiptList[1].phone = aaa.telePhone - } - }) - this.dataForm.subjectId = row.id; - if(this.dataForm.type == '1'){ - this.dataForm.contractType = '1'; - }else if(this.dataForm.type == '2'){ - this.dataForm.contractType = '2'; - }else if(this.dataForm.type == '3'){ - this.dataForm.contractType = '5'; - } - this.dataForm.settlementSubjectName = row.name; - this.dataForm.cwsettlementsubjectList[0].paymentMethod = row.payment_method; - this.dataForm.cwsettlementsubjectList[0].collaborationMethod = row.collaboration_method; - this.dataForm.cwsettlementsubjectList[0].settlementMethod = row.settlement_method; - this.dataForm.cwsettlementsubjectList[0].advanceRatio = row.advance_ratio; - this.dataForm.cwsettlementsubjectList[0].accountPeriod = row.account_period; - if(row.underpayment_method == 0){ - this.dataForm.cwsettlementsubjectList[0].underpaymentMethod = '无'; - }else if(row.underpayment_method == 1){ - this.dataForm.cwsettlementsubjectList[0].underpaymentMethod = '按金额(' + row.apply_for_underpayment_ratio + '元)'; - }else if(row.underpayment_method == 2){ - this.dataForm.cwsettlementsubjectList[0].underpaymentMethod = '按比例(' + row.apply_for_underpayment_ratio + '%)'; - } - if(row.margin_method == 0){ - this.dataForm.cwsettlementsubjectList[0].marginMethod = '无'; - }else if(row.margin_method == 1){ - this.dataForm.cwsettlementsubjectList[0].marginMethod = '按金额(' + row.apply_for_margin_ratio + '元)'; - }else if(row.margin_method == 2){ - this.dataForm.cwsettlementsubjectList[0].marginMethod = '按比例(' + row.apply_for_margin_ratio + '%)'; - } - if(row.overdue_interest_rate == 0){ - this.dataForm.cwsettlementsubjectList[0].overdueInterestRate = '无'; - }else if(row.overdue_interest_rate == 1){ - this.dataForm.cwsettlementsubjectList[0].overdueInterestRate = '按年化(' + row.apply_for_overdue_ratio + '%)'; - }else if(row.overdue_interest_rate == 2){ - this.dataForm.cwsettlementsubjectList[0].overdueInterestRate = '按月化(' + row.apply_for_overdue_ratio + '%)'; - } - }, - - typeChangeData(){ - this.dataForm.cwsettlementsubjectList = []; - this.dataForm.cwsettlementcontractList = []; - this.dataForm.cwsettlementaccountList = []; - this.dataForm.cwsettlementcostList = []; - this.dataForm.cwsettlementpaymentreceiptList = [{ - type: '1', - name: undefined, - accountName: undefined, - bankAccount: undefined, - depositBank: undefined, - depositArea: undefined, - bankBranchName: undefined, - companyTaxNumber: undefined, - address: undefined, - phone: undefined, - },{ - type: '2', - name: undefined, - accountName: undefined, - bankAccount: undefined, - depositBank: undefined, - depositArea: undefined, - bankBranchName: undefined, - companyTaxNumber: undefined, - address: undefined, - phone: undefined, - }]; - this.dataForm.cwsettlementsummaryList = []; - this.dataForm.subjectId = ''; - this.dataForm.contractType = ''; - if(this.dataForm.type == '1'){ - this.dataForm.businessType = '1' - }else{ - this.dataForm.businessType = '3' - } - }, - - + + contractChangeData(model, row) { + this.dataForm.cwsettlementcontractList[0].contractName = row.contract_name + this.dataForm.cwsettlementcontractList[0].contractPeriodTime = row.contract_period_time ? row + .contract_period_time.substring(0, 10) : ''; + this.dataForm.cwsettlementcontractList[0].contractPeriodTimeEnd = row.contract_period_time_end ? row + .contract_period_time_end.substring(0, 10) : ''; + //this.dataForm.cwsettlementcontractList[0].currency = row.currency; + this.dataForm.cwsettlementcontractList[0].procurementModel = row.procurement_model; + this.dataForm.cwsettlementcontractList[0].pricingModel = row.pricing_model; + this.dataForm.cwsettlementcontractList[0].relatedContractId = row.related_contract_id; + this.dataForm.cwsettlementcontractList[0].subject = row.subject; + this.dataForm.cwsettlementcontractList[0].subject2 = row.subject2; + this.dataForm.cwsettlementcontractList[0].deliveryTime = row.delivery_time ? row.delivery_time.substring(0, + 10) : ''; + this.dataForm.cwsettlementcontractList[0].deliveryTimeEnd = row.delivery_time_end ? row.delivery_time_end + .substring(0, 10) : ''; + this.dataForm.cwsettlementcontractList[0].deliveryModel = row.delivery_model; + this.dataForm.cwsettlementcontractList[0].deliveryMethod = row.delivery_method; + this.dataForm.cwsettlementcontractList[0].modeTransport = row.mode_transport; + this.dataForm.cwsettlementcontractList[0].costBearingMian = row.cost_bearing_mian; + }, + subjectChangeData(model, row) { + let aaa = {}; + let companyName = ''; + this.dataForm.cwsettlementsubjectList[0].subjectName = row.name; + request({ + url: `/api/permission/Organize/currentOrg/getCurrentOrg`, + method: 'get', + data: {} + }).then(res => { + aaa = JSON.parse(res.data.propertyJson) + companyName = res.data.fullName + if ('供应商' == row.subjectBasicTypes || '服务商' == row.subjectBasicTypes) { + this.dataForm.cwsettlementpaymentreceiptList[0].name = companyName + this.dataForm.cwsettlementpaymentreceiptList[0].accountName = aaa.accountName + this.dataForm.cwsettlementpaymentreceiptList[0].bankAccount = aaa.bankAccount + this.dataForm.cwsettlementpaymentreceiptList[0].depositBank = aaa.bankName + //this.dataForm.cwsettlementpaymentreceiptList[0].depositArea = aaa.depositArea + this.dataForm.cwsettlementpaymentreceiptList[0].bankBranchName = aaa.bankBranchName + this.dataForm.cwsettlementpaymentreceiptList[0].companyTaxNumber = aaa.enyerpriseTaxNum + this.dataForm.cwsettlementpaymentreceiptList[0].address = aaa.address + this.dataForm.cwsettlementpaymentreceiptList[0].phone = aaa.telePhone + + this.dataForm.cwsettlementpaymentreceiptList[1].name = row.name + this.dataForm.cwsettlementpaymentreceiptList[1].accountName = row.account_name + this.dataForm.cwsettlementpaymentreceiptList[1].bankAccount = row.bank_account + this.dataForm.cwsettlementpaymentreceiptList[1].depositBank = row.deposit_bank + //this.dataForm.cwsettlementpaymentreceiptList[1].depositArea = JSON.parse(row.deposit_area) + this.dataForm.cwsettlementpaymentreceiptList[1].bankBranchName = row.bank_branch_name + this.dataForm.cwsettlementpaymentreceiptList[1].companyTaxNumber = row.company_tax_number + this.dataForm.cwsettlementpaymentreceiptList[1].address = row.address + this.dataForm.cwsettlementpaymentreceiptList[1].phone = row.phone + } else if ('客户' == row.subjectBasicTypes) { + this.dataForm.cwsettlementpaymentreceiptList[0].name = row.name + this.dataForm.cwsettlementpaymentreceiptList[0].accountName = row.account_name + this.dataForm.cwsettlementpaymentreceiptList[0].bankAccount = row.bank_account + this.dataForm.cwsettlementpaymentreceiptList[0].depositBank = row.deposit_bank + //this.dataForm.cwsettlementpaymentreceiptList[0].depositArea = JSON.parse(row.deposit_area) + this.dataForm.cwsettlementpaymentreceiptList[0].bankBranchName = row.bank_branch_name + this.dataForm.cwsettlementpaymentreceiptList[0].companyTaxNumber = row.company_tax_number + this.dataForm.cwsettlementpaymentreceiptList[0].address = row.address + this.dataForm.cwsettlementpaymentreceiptList[0].phone = row.phone + + this.dataForm.cwsettlementpaymentreceiptList[1].name = companyName + this.dataForm.cwsettlementpaymentreceiptList[1].accountName = aaa.accountName + this.dataForm.cwsettlementpaymentreceiptList[1].bankAccount = aaa.bankAccount + this.dataForm.cwsettlementpaymentreceiptList[1].depositBank = aaa.bankName + //this.dataForm.cwsettlementpaymentreceiptList[1].depositArea = aaa.depositArea + this.dataForm.cwsettlementpaymentreceiptList[1].bankBranchName = aaa.bankBranchName + this.dataForm.cwsettlementpaymentreceiptList[1].companyTaxNumber = aaa.enyerpriseTaxNum + this.dataForm.cwsettlementpaymentreceiptList[1].address = aaa.address + this.dataForm.cwsettlementpaymentreceiptList[1].phone = aaa.telePhone + } + }) + this.dataForm.subjectId = row.id; + if (this.dataForm.type == '1') { + this.dataForm.contractType = '1'; + } else if (this.dataForm.type == '2') { + this.dataForm.contractType = '2'; + } else if (this.dataForm.type == '3') { + this.dataForm.contractType = '5'; + } + this.dataForm.settlementSubjectName = row.name; + this.dataForm.cwsettlementsubjectList[0].paymentMethod = row.payment_method; + this.dataForm.cwsettlementsubjectList[0].collaborationMethod = row.collaboration_method; + this.dataForm.cwsettlementsubjectList[0].settlementMethod = row.settlement_method; + this.dataForm.cwsettlementsubjectList[0].advanceRatio = row.advance_ratio; + this.dataForm.cwsettlementsubjectList[0].accountPeriod = row.account_period; + if (row.underpayment_method == 0) { + this.dataForm.cwsettlementsubjectList[0].underpaymentMethod = '无'; + } else if (row.underpayment_method == 1) { + this.dataForm.cwsettlementsubjectList[0].underpaymentMethod = '按金额(' + row + .apply_for_underpayment_ratio + '元)'; + } else if (row.underpayment_method == 2) { + this.dataForm.cwsettlementsubjectList[0].underpaymentMethod = '按比例(' + row + .apply_for_underpayment_ratio + '%)'; + } + if (row.margin_method == 0) { + this.dataForm.cwsettlementsubjectList[0].marginMethod = '无'; + } else if (row.margin_method == 1) { + this.dataForm.cwsettlementsubjectList[0].marginMethod = '按金额(' + row.apply_for_margin_ratio + '元)'; + } else if (row.margin_method == 2) { + this.dataForm.cwsettlementsubjectList[0].marginMethod = '按比例(' + row.apply_for_margin_ratio + '%)'; + } + if (row.overdue_interest_rate == 0) { + this.dataForm.cwsettlementsubjectList[0].overdueInterestRate = '无'; + } else if (row.overdue_interest_rate == 1) { + this.dataForm.cwsettlementsubjectList[0].overdueInterestRate = '按年化(' + row.apply_for_overdue_ratio + + '%)'; + } else if (row.overdue_interest_rate == 2) { + this.dataForm.cwsettlementsubjectList[0].overdueInterestRate = '按月化(' + row.apply_for_overdue_ratio + + '%)'; + } + }, + + typeChangeData() { + this.dataForm.cwsettlementsubjectList = []; + this.dataForm.cwsettlementcontractList = []; + this.dataForm.cwsettlementaccountList = []; + this.dataForm.cwsettlementcostList = []; + this.dataForm.cwsettlementpaymentreceiptList = [{ + type: '1', + name: undefined, + accountName: undefined, + bankAccount: undefined, + depositBank: undefined, + depositArea: undefined, + bankBranchName: undefined, + companyTaxNumber: undefined, + address: undefined, + phone: undefined, + }, { + type: '2', + name: undefined, + accountName: undefined, + bankAccount: undefined, + depositBank: undefined, + depositArea: undefined, + bankBranchName: undefined, + companyTaxNumber: undefined, + address: undefined, + phone: undefined, + }]; + this.dataForm.cwsettlementsummaryList = []; + this.dataForm.subjectId = ''; + this.dataForm.contractType = ''; + if (this.dataForm.type == '1') { + this.dataForm.businessType = '1' + } else { + this.dataForm.businessType = '3' + } + }, + + resetForm() { uni.navigateBack() }, diff --git a/jnpf-app/pages/scm/form/paymentApplication/index.vue b/jnpf-app/pages/scm/form/paymentApplication/index.vue index 8d250cc8..8097d175 100644 --- a/jnpf-app/pages/scm/form/paymentApplication/index.vue +++ b/jnpf-app/pages/scm/form/paymentApplication/index.vue @@ -47,6 +47,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -71,10 +134,10 @@ - - @@ -96,6 +159,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -199,10 +397,18 @@ payee: '', payer: '', payer2: '', + payeeAccount: '', applyAmount: 0, + settlementAmount: 0, + applyWeight: 0, caseStatus: "1", + currency: "1", + paymentType: undefined, + paymentMethod: undefined, + transactionType: undefined, remark: '', closeCaseRemark: '', + paymentDate: undefined, annex: [], paymentapplicationsettlementList: [], }, @@ -266,6 +472,58 @@ "multiple": false, "children": "" }, + currencyOptions: [{ + "fullName": "人民币", + "id": "1" + }], + currencyProps: { + "label": "fullName", + "value": "id", + "multiple": false, + "children": "" + }, + paymentMethodOptions: [{ + "fullName": "现金", + "id": "1" + }, { + "fullName": "承兑", + "id": "2" + }], + paymentMethodProps: { + "label": "fullName", + "value": "id", + "multiple": false, + "children": "" + }, + paymentTypeOptions: [{ + "fullName": "预付款", + "id": "A" + }, { + "fullName": "结算款", + "id": "B" + }, { + "fullName": "进度款", + "id": "D" + }], + transactionTypeOptions: [{ + "fullName": "网银", + "id": "34" + }, { + "fullName": "票据", + "id": "50" + }], + transactionTypeProps: { + "label": "fullName", + "value": "id", + "multiple": false, + "children": "" + }, + paymentTypeProps: { + "label": "fullName", + "value": "id", + "multiple": false, + "children": "" + }, labelwidth: 100 * 1.5, menuId: '', jurisdictionType: '', diff --git a/jnpf-app/utils/define.js b/jnpf-app/utils/define.js index 47831078..ee8d574c 100644 --- a/jnpf-app/utils/define.js +++ b/jnpf-app/utils/define.js @@ -1,14 +1,16 @@ /* process.env.NODE_ENV设置生产环境模式 */ /*JAVA app.java.jnpfsoft.com NET dotnet.jnpfsoft.com*/ +//生产内网 jgckzhgj.natapp1.cc +//生产外网 221.214.32.166:40000 // #ifndef MP const baseURL = process.env.NODE_ENV === "production" ? - "http://127.0.0.1:50000" : "http://127.0.0.1:50000" // 接口前缀 + "http://jgckzhgj.natapp1.cc" : "http://jgckzhgj.natapp1.cc" // 接口前缀 const define = { copyright: "Copyright @ 2024 上海长江云息数字科技有限公司版权所有", sysVersion: "V3.5", baseURL: baseURL, - webSocketUrl: process.env.NODE_ENV === "production" ? "wss://127.0.0.1:50000/websocket" : - "ws://127.0.0.1:50000/api/message/websocket", + webSocketUrl: process.env.NODE_ENV === "production" ? "wss://jgckzhgj.natapp1.cc/websocket" : + "ws://jgckzhgj.natapp1.cc/api/message/websocket", comUploadUrl: baseURL + '/api/file/Uploader/', comUploadUrlPound: baseURL + '/api/scm/Voucher/Uploader/', timeout: process.env.NODE_ENV === 'production' ? 1000000 : 1000000, @@ -17,13 +19,13 @@ const define = { // #endif // #ifdef MP -const baseURL = "http://127.0.0.1:50000" // "https://app.java.jnpfsoft.com" +const baseURL = "http://jgckzhgj.natapp1.cc" // "https://app.java.jnpfsoft.com" const define = { copyright: "Copyright @ 2024 上海长江云息数字科技有限公司版权所有", sysVersion: "V3.5", baseURL: baseURL, comUploadUrlPound: baseURL + '/api/scm/Voucher/Uploader/', - webSocketUrl: "ws://127.0.0.1:50000/api/message/websocket", //"wss://app.java.jnpfsoft.com/api/message/websocket" + webSocketUrl: "ws://jgckzhgj.natapp1.cc/api/message/websocket", //"wss://app.java.jnpfsoft.com/api/message/websocket" comUploadUrl: baseURL + '/api/file/Uploader/', timeout: process.env.NODE_ENV === 'production' ? 1000000 : 1000000, report: baseURL + '/Report' diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/PaymentApplicationServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/PaymentApplicationServiceImpl.java index c97c9eef..dc9a01d4 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/PaymentApplicationServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/PaymentApplicationServiceImpl.java @@ -2,16 +2,23 @@ package jnpf.service.impl; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import jnpf.base.ActionResult; import jnpf.engine.controller.FlowBeforeController; +import jnpf.engine.entity.FlowTaskEntity; +import jnpf.engine.entity.FlowTaskNodeEntity; import jnpf.engine.model.flowbefore.FlowBeforeInfoVO; import jnpf.engine.model.flowbefore.FlowTaskOperatorRecordModel; import jnpf.engine.model.flowengine.FlowModel; +import jnpf.engine.service.FlowTaskNodeService; +import jnpf.engine.service.FlowTaskService; import jnpf.entity.*; import jnpf.exception.WorkFlowException; import jnpf.mapper.CwpaymentreceiptMapper; import jnpf.mapper.PaymentApplicationMapper; import jnpf.model.cwpaymentreceipt.PaymentdocMessage; +import jnpf.model.yunguan.BFSPaymentApprovalModel; +import jnpf.model.yunguan.BFSPaymentOccupationModel; import jnpf.permission.entity.OrganizeEntity; import jnpf.permission.service.OrganizeService; import jnpf.permission.service.UserService; @@ -39,6 +46,7 @@ import jnpf.model.QueryModel; import java.util.stream.Collectors; import jnpf.base.model.ColumnDataModel; import jnpf.util.context.SpringContext; +import jnpf.util.wxutil.HttpUtil; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.metadata.IPage; import jnpf.database.model.superQuery.SuperJsonModel; @@ -81,6 +89,11 @@ public class PaymentApplicationServiceImpl extends ServiceImpl getList(PaymentApplicationPagination paymentApplicationPagination){ return getTypeList(paymentApplicationPagination,paymentApplicationPagination.getDataType()); @@ -495,6 +508,110 @@ public class PaymentApplicationServiceImpl extends ServiceImpl list = new ArrayList<>(); + BFSPaymentOccupationModel bfsPaymentOccupationModel = new BFSPaymentOccupationModel(); + bfsPaymentOccupationModel.setSerialNoErp(entity.getId());//流水号 + bfsPaymentOccupationModel.setBillNo(entity.getCode()); + bfsPaymentOccupationModel.setApplyDate(simpleDateFormat.format(entity.getCreatorTime())); + bfsPaymentOccupationModel.setAmt(String.format("%.2f", entity.getApplyAmount().doubleValue())); + bfsPaymentOccupationModel.setCur("CNY"); + bfsPaymentOccupationModel.setAbs("");//摘要 + bfsPaymentOccupationModel.setPayeeAccNo(entity.getPayeeAccount()); + bfsPaymentOccupationModel.setPayeeAccName(entity.getPayee());//收款方户名 + String[] payer = entity.getPayer().split("/"); + if(payer.length == 1){ + bfsPaymentOccupationModel.setPayerAccName(payer[0]); + }else if(payer.length == 2){ + bfsPaymentOccupationModel.setPayerAccName(payer[1]); + }else if(payer.length == 3){ + bfsPaymentOccupationModel.setPayerAccName(payer[1]); + } + bfsPaymentOccupationModel.setPayeeBank(entity.getBankName());//收款方开户行 + bfsPaymentOccupationModel.setPayeeCode(entity.getInterbankNumber()); + bfsPaymentOccupationModel.setPayeeProv(entity.getProvince()); + bfsPaymentOccupationModel.setPayeeCity(entity.getCity()); + bfsPaymentOccupationModel.setCorpName(entity.getUnitName()); + if(StringUtil.isNotEmpty(entity.getUnitName())){ + List o = organizeService.getListByFullName(entity.getUnitName()); + if(o != null && o.size() > 0){ + bfsPaymentOccupationModel.setCorpCode(o.get(0).getEnCode()); + } + } + bfsPaymentOccupationModel.setPurpose(entity.getPurpose()); + bfsPaymentOccupationModel.setWishPayDay(simpleDateFormat2.format(entity.getExpectPaymentDate()) + ".0"); + bfsPaymentOccupationModel.setItemCode(entity.getPlanSubjectCode()); + bfsPaymentOccupationModel.setItemName(entity.getPlanSubjectName()); + bfsPaymentOccupationModel.setBudgetDetailId(entity.getFundingPlanDetailCode()); + bfsPaymentOccupationModel.setUrgencyFlag("0");//加急标志 + bfsPaymentOccupationModel.setVoucherType(entity.getTransactionType());//交易类型34:网银(外付网银)、50:票据(应收票据) + bfsPaymentOccupationModel.setIsforindividual("0");//对公对私字段 + bfsPaymentOccupationModel.setRmk(""); + bfsPaymentOccupationModel.setDataSource("CK");//数据来源 + list.add(bfsPaymentOccupationModel); + String result = HttpUtil.sendHttpPost("http://172.16.173.160:8081/t2/rest/JgPaymentOccupationRestful", JsonUtil.getObjectToString(list)); + if (ObjectUtil.isNotEmpty(result)){ + String status = JSONArray.parseArray(result, Map.class).get(0).get("status").toString(); + String message = JSONArray.parseArray(result, Map.class).get(0).get("message").toString(); + //String serialNoErp = JSONArray.parseArray(code, Map.class).get(0).get("serialNoErp").toString(); + if ("2".equals(status)) { + entity.setBfsFlag("2"); + entity.setBfsMessage(message); + this.updateById(entity); + }else{ + entity.setBfsFlag("1"); + entity.setBfsMessage(message); + this.updateById(entity); + } + }else{ + entity.setBfsFlag("1"); + entity.setBfsMessage("资金系统接口调用失败"); + this.updateById(entity); + } + } + FlowTaskEntity flowTaskEntity = flowTaskService.getById(id); + if (flowTaskEntity!=null) { + QueryWrapper flowTaskNodeEntityQueryWrapper = new QueryWrapper<>(); + //flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getState, flowTaskEntity.getThisStepId()); + flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getNodeCode, flowTaskEntity.getThisStepId()); + flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId()); + List flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper); + if (flowTaskNodeEntityList != null && flowTaskNodeEntityList.size() > 0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) { + //审批通过 + SubjectbasicEntity subjectbasicEntity = subjectbasicService.getById(entity.getSubjectId()); + if("2".equals(subjectbasicEntity.getSettlementMethod()) || "3".equals(subjectbasicEntity.getSettlementMethod())){ + List list2 = new ArrayList<>(); + BFSPaymentApprovalModel bFSPaymentApprovalModel = new BFSPaymentApprovalModel(); + bFSPaymentApprovalModel.setDataSource("CK"); + bFSPaymentApprovalModel.setStatus("2"); + bFSPaymentApprovalModel.setSerialNoErp(id); + list2.add(bFSPaymentApprovalModel); + //先款后货 先款后票 + String result = HttpUtil.sendHttpPost("http://172.16.173.160:8081/t2/rest/JgYGPaymentApprovalResultRestful", JsonUtil.getObjectToString(list2)); + if (ObjectUtil.isNotEmpty(result)){ + String status = JSONArray.parseArray(result, Map.class).get(0).get("status").toString(); + String message = JSONArray.parseArray(result, Map.class).get(0).get("message").toString(); + //String serialNoErp = JSONArray.parseArray(code, Map.class).get(0).get("serialNoErp").toString(); + if ("2".equals(status)) { + entity.setBfsFlag("4"); + entity.setBfsMessage(message); + this.updateById(entity); + }else{ + entity.setBfsFlag("3"); + entity.setBfsMessage(message); + this.updateById(entity); + } + }else{ + entity.setBfsFlag("3"); + entity.setBfsMessage("资金系统审批接口调用失败"); + this.updateById(entity); + } + } + } + } } @Override diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/PaymentApplicationController.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/PaymentApplicationController.java index f0bb30bf..e6808960 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/PaymentApplicationController.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/PaymentApplicationController.java @@ -1,6 +1,7 @@ package jnpf.controller; import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.v3.oas.annotations.Operation; @@ -8,6 +9,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jnpf.base.ActionResult; import jnpf.base.UserInfo; import jnpf.exception.DataException; +import jnpf.model.yunguan.BFSPaymentApprovalModel; import jnpf.model.yunguan.BFSPaymentOccupationModel; import jnpf.permission.entity.OrganizeEntity; import jnpf.permission.entity.UserEntity; @@ -266,53 +268,31 @@ public class PaymentApplicationController { @GetMapping("uploadBFS/{id}") @Transactional public ActionResult closeCase(@PathVariable("id") String id){ - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - PaymentApplicationEntity entity= paymentApplicationService.getInfo(id); - BFSPaymentOccupationModel bfsPaymentOccupationModel = new BFSPaymentOccupationModel(); - bfsPaymentOccupationModel.setSerialNoErp(entity.getId());//流水号 - bfsPaymentOccupationModel.setBillNo(entity.getCode()); - bfsPaymentOccupationModel.setApplyDate(simpleDateFormat.format(entity.getCreatorTime())); - bfsPaymentOccupationModel.setAmt(entity.getApplyAmount().toString()); - bfsPaymentOccupationModel.setCur("CYN"); - bfsPaymentOccupationModel.setAbs("");//摘要 - bfsPaymentOccupationModel.setPayerAccName(entity.getPayer()); - bfsPaymentOccupationModel.setPayeeAccNo(entity.getPayeeAccount()); - bfsPaymentOccupationModel.setPayeeAccName(entity.getPayee());//收款方户名 - bfsPaymentOccupationModel.setPayeeBank(entity.getBankName());//收款方开户行 - bfsPaymentOccupationModel.setPayeeCode(entity.getInterbankNumber()); - bfsPaymentOccupationModel.setPayeeProv(entity.getProvince()); - bfsPaymentOccupationModel.setPayeeCity(entity.getCity()); - bfsPaymentOccupationModel.setCorpName(entity.getUnitName()); - if(StringUtil.isNotEmpty(entity.getUnitName())){ - List o = organizeService.getListByFullName(entity.getUnitName()); - if(o != null && o.size() > 0){ - bfsPaymentOccupationModel.setCorpCode(o.get(0).getEnCode()); - } - } - bfsPaymentOccupationModel.setPurpose(entity.getPurpose()); - bfsPaymentOccupationModel.setWishPayDay(simpleDateFormat.format(entity.getExpectPaymentDate())); - bfsPaymentOccupationModel.setItemCode(entity.getPlanSubjectCode()); - bfsPaymentOccupationModel.setItemName(entity.getPlanSubjectName()); - bfsPaymentOccupationModel.setBudgetDetailId(entity.getFundingPlanDetailCode()); - bfsPaymentOccupationModel.setUrgencyFlag("0");//加急标志 - bfsPaymentOccupationModel.setVoucherType(entity.getTransactionType());//交易类型34:网银(外付网银)、50:票据(应收票据) - bfsPaymentOccupationModel.setIsforindividual("0");//对公对私字段 - bfsPaymentOccupationModel.setRmk(""); - bfsPaymentOccupationModel.setDataSource("");//数据来源 - JSONObject code = HttpUtil.httpRequest("http://172.16.173.160:8081/t2/rest/JgPaymentOccupationRestful", "POST", JsonUtil.getObjectToString(bfsPaymentOccupationModel)); - if (ObjectUtil.isNotEmpty(code)){ - if (code.get("status").equals("1")) { - entity.setBfsFlag("2"); - entity.setBfsMessage(code.get("message").toString()); + PaymentApplicationEntity entity = paymentApplicationService.getById(id); + List list2 = new ArrayList<>(); + BFSPaymentApprovalModel bFSPaymentApprovalModel = new BFSPaymentApprovalModel(); + bFSPaymentApprovalModel.setDataSource("CK"); + bFSPaymentApprovalModel.setStatus("2"); + bFSPaymentApprovalModel.setSerialNoErp(id); + list2.add(bFSPaymentApprovalModel); + //先款后货 先款后票 + String result = HttpUtil.sendHttpPost("http://172.16.173.160:8081/t2/rest/JgYGPaymentApprovalResultRestful", JsonUtil.getObjectToString(list2)); + if (ObjectUtil.isNotEmpty(result)){ + String status = JSONArray.parseArray(result, Map.class).get(0).get("status").toString(); + String message = JSONArray.parseArray(result, Map.class).get(0).get("message").toString(); + //String serialNoErp = JSONArray.parseArray(code, Map.class).get(0).get("serialNoErp").toString(); + if ("2".equals(status)) { + entity.setBfsFlag("4"); + entity.setBfsMessage(message); paymentApplicationService.updateById(entity); }else{ - entity.setBfsFlag("1"); - entity.setBfsMessage(code.get("message").toString()); + entity.setBfsFlag("3"); + entity.setBfsMessage(message); paymentApplicationService.updateById(entity); } }else{ - entity.setBfsFlag("1"); - entity.setBfsMessage("资金系统接口调用失败"); + entity.setBfsFlag("3"); + entity.setBfsMessage("资金系统审批接口调用失败"); paymentApplicationService.updateById(entity); } return ActionResult.success("上传BFS成功"); diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/paymentapplication/PaymentApplicationForm.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/paymentapplication/PaymentApplicationForm.java index 87b709d1..00907504 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/paymentapplication/PaymentApplicationForm.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/paymentapplication/PaymentApplicationForm.java @@ -98,5 +98,7 @@ public class PaymentApplicationForm { private BigDecimal processMoney; private String fundingPlanDetailCode; + @JsonProperty("isSubmit") + private String isSubmit; } diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/yunguan/BFSPaymentApprovalModel.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/yunguan/BFSPaymentApprovalModel.java new file mode 100644 index 00000000..c450d5cd --- /dev/null +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/yunguan/BFSPaymentApprovalModel.java @@ -0,0 +1,18 @@ +package jnpf.model.yunguan; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +@Data +public class BFSPaymentApprovalModel { + /** 流水号 **/ + @JSONField(name = "serialNoErp") + private String serialNoErp; + /** 状态(1.不通过2.通过) **/ + @JSONField(name = "status") + private String status; + /** 来源 **/ + @JSONField(name = "dataSource") + private String dataSource; + +} diff --git a/jnpf-java-boot/jnpf-web/src/utils/apiUrl.js b/jnpf-java-boot/jnpf-web/src/utils/apiUrl.js index c89651a1..f2099d29 100644 --- a/jnpf-java-boot/jnpf-web/src/utils/apiUrl.js +++ b/jnpf-java-boot/jnpf-web/src/utils/apiUrl.js @@ -7,4 +7,6 @@ module.exports = { // APIURl: 'http://221.214.32.166:40000' // 演示环境接口配置 // APIURl: 'http://222.71.165.188:50000' + // 生产内网环境接口配置 + //APIURl: 'http://127.0.0.1:30000' } diff --git a/jnpf-java-boot/jnpf-web/src/views/extend/paymentapplication/index.vue b/jnpf-java-boot/jnpf-web/src/views/extend/paymentapplication/index.vue index 7611d267..14fbf0fc 100644 --- a/jnpf-java-boot/jnpf-web/src/views/extend/paymentapplication/index.vue +++ b/jnpf-java-boot/jnpf-web/src/views/extend/paymentapplication/index.vue @@ -159,9 +159,9 @@ 下载 - 上传BFS + 上传BFS - 关联结算单 + 关联结算单 diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/Bill.vue b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/Bill.vue index 9cb73cf1..3f60d404 100644 --- a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/Bill.vue +++ b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/Bill.vue @@ -5,7 +5,7 @@

{{bill.title}}

业务部门:{{bill.name}}

- + @@ -15,14 +15,14 @@ - + - + - + @@ -42,7 +42,7 @@ - + @@ -153,7 +153,7 @@ table { text-align: center; border-collapse: collapse; td { - padding: 10px 0; + padding: 5px 0; border: 1px solid #333; } } @@ -229,7 +229,7 @@ table { border-collapse: collapse; margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */ td { - padding: 10px 0; + padding: 5px 0; border: 1px solid #333; } } diff --git a/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-biz/src/main/java/jnpf/engine/service/impl/FlowTaskNewServiceImpl.java b/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-biz/src/main/java/jnpf/engine/service/impl/FlowTaskNewServiceImpl.java index 29f8b560..f30c8201 100644 --- a/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-biz/src/main/java/jnpf/engine/service/impl/FlowTaskNewServiceImpl.java +++ b/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-biz/src/main/java/jnpf/engine/service/impl/FlowTaskNewServiceImpl.java @@ -379,6 +379,7 @@ public class FlowTaskNewServiceImpl implements FlowTaskNewService { for (String idAll : childAllData.keySet()) { String[] idList = idAll.split("_jnpf_"); Map formData = childAllData.get(idAll); + formData.put("isSubmit", 1); serviceUtil.createOrUpdate(idList[1], idList[0], formData); } } finally { diff --git a/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/pom.xml b/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/pom.xml index d6842427..da49fa8e 100644 --- a/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/pom.xml +++ b/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/pom.xml @@ -17,6 +17,12 @@ jnpf-workflow-engine-biz ${project.version} + + com.jnpf + jnpf-scm-biz + 3.5.0-RELEASE + compile + \ No newline at end of file diff --git a/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/src/main/java/jnpf/engine/controller/FlowBeforeController.java b/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/src/main/java/jnpf/engine/controller/FlowBeforeController.java index 22e16b54..9ccfbb21 100644 --- a/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/src/main/java/jnpf/engine/controller/FlowBeforeController.java +++ b/jnpf-java-boot/jnpf-workflow/jnpf-workflow-engine/jnpf-workflow-engine-controller/src/main/java/jnpf/engine/controller/FlowBeforeController.java @@ -1,5 +1,7 @@ package jnpf.engine.controller; +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Parameter; @@ -31,11 +33,15 @@ import jnpf.engine.util.FlowJsonUtil; import jnpf.engine.util.FlowNature; import jnpf.engine.util.FlowTaskUtil; import jnpf.entity.BusinessOrderEntity; +import jnpf.entity.PaymentApplicationEntity; import jnpf.exception.WorkFlowException; +import jnpf.model.yunguan.BFSPaymentApprovalModel; import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserRelationEntity; +import jnpf.service.PaymentApplicationService; import jnpf.util.*; import jnpf.util.visiual.JnpfKeyConsts; +import jnpf.util.wxutil.HttpUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -77,7 +83,8 @@ public class FlowBeforeController { private FlowTaskNodeService flowTaskNodeService; @Autowired private FlowTaskNewService flowTaskNewService; - + @Autowired + private PaymentApplicationService paymentApplicationService; /** * 获取待我审核列表 * @@ -254,6 +261,36 @@ public class FlowBeforeController { } redisUtil.insert(rejecttKey, id, 10); flowTaskNewService.rejectAll(flowTask, operator, flowModel); + if(flowModel.getFlowId().equals("569062075217740037")){ + //采购付款申请退回 + PaymentApplicationEntity paymentApplicationEntity = paymentApplicationService.getById(flowModel.getId()); + List list2 = new ArrayList<>(); + BFSPaymentApprovalModel bFSPaymentApprovalModel = new BFSPaymentApprovalModel(); + bFSPaymentApprovalModel.setDataSource("CK"); + bFSPaymentApprovalModel.setStatus("1"); + bFSPaymentApprovalModel.setSerialNoErp(paymentApplicationEntity.getId()); + list2.add(bFSPaymentApprovalModel); + //先款后货 先款后票 + String result = HttpUtil.sendHttpPost("http://172.16.173.160:8081/t2/rest/JgYGPaymentApprovalResultRestful", JsonUtil.getObjectToString(list2)); + if (ObjectUtil.isNotEmpty(result)){ + String status = JSONArray.parseArray(result, Map.class).get(0).get("status").toString(); + String message = JSONArray.parseArray(result, Map.class).get(0).get("message").toString(); + //String serialNoErp = JSONArray.parseArray(code, Map.class).get(0).get("serialNoErp").toString(); + if ("2".equals(status)) { + paymentApplicationEntity.setBfsFlag("2"); + paymentApplicationEntity.setBfsMessage(message); + paymentApplicationService.updateById(paymentApplicationEntity); + }else{ + paymentApplicationEntity.setBfsFlag("1"); + paymentApplicationEntity.setBfsMessage(message); + paymentApplicationService.updateById(paymentApplicationEntity); + } + }else{ + paymentApplicationEntity.setBfsFlag("1"); + paymentApplicationEntity.setBfsMessage("资金系统审批接口调用失败"); + paymentApplicationService.updateById(paymentApplicationEntity); + } + } return ActionResult.success("退回成功"); } else { return ActionResult.fail("已审核完成");
订单日期 {{bill.creatorTime}} 对方合同编号
供货单位{{bill.supplierName}}{{bill.supplierName}}
订单号 行号 物料名称、规格型号{{item.amount}} {{item.rate}}
合计