From 76551e893457c638d2ee1ab757bb81c2ccf043cc Mon Sep 17 00:00:00 2001 From: mhsnet Date: Sat, 24 Feb 2024 17:27:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E8=A1=A8=E5=8D=95=E5=AE=8C?= =?UTF-8?q?=E5=96=84B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jnpf-web/src/views/scm/contractL/form.vue | 244 ++++++++++++++---- 1 file changed, 198 insertions(+), 46 deletions(-) diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue index 9988aeed..98f72c05 100644 --- a/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue +++ b/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue @@ -132,14 +132,39 @@ - - - - + + + @@ -149,6 +174,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - + - - - - + + + - - - - + + + @@ -1020,6 +1128,7 @@ import { getFormById } from '@/api/workFlow/FormDesign' import comMixin from '@/views/workFlow/workFlowForm/mixin'; import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDictionaryDataSelector } from '@/api/systemData/dictionary' +import { getDataInterfaceDataSelect } from '@/api/systemData/dataInterface' import { getDefaultCurrentValueUserId } from '@/api/permission/user' import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize' import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js' @@ -1252,7 +1361,7 @@ export default { contractTypeProps: { "label": "fullName", "value": "enCode" }, contractTemplateIdcolumnOptions: [{ "label": "合同模板", "value": "name" }, { "label": "合同类型", "value": "type_name" }, { "label": "状态", "value": "status_name" },], businessIdcolumnOptions: [{ "label": "名称", "value": "name" },], - subjectcolumnOptions: [{ "label": "类型", "value": "subject_basic_type" }, { "label": "级别", "value": "calssify" }, { "label": "主体名称", "value": "name" }, { "label": "社会统一信息代码", "value": "information_code" }, { "label": "付款方式", "value": "payment_method" }, { "label": "合作方式", "value": "collaboration_method" }, { "label": "结算方式", "value": "settlement_method" }, { "label": "预付比例", "value": "advance_ratio" }, { "label": "账期", "value": "account_period" }, { "label": "压款方式", "value": "underpayment_method" }, { "label": "保证金方式", "value": "margin_method" }, { "label": "逾期利率", "value": "overdue_interest_rate" },], + subjectcolumnOptions: [{ "label": "类型", "value": "subject_basic_type_name" }, { "label": "级别", "value": "calssify_name" }, { "label": "主体名称", "value": "name" }, { "label": "社会统一信息代码", "value": "information_code" }, { "label": "付款方式", "value": "payment_method_name" }, { "label": "合作方式", "value": "collaboration_method_name" }, { "label": "结算方式", "value": "settlement_method_name" }, { "label": "预付比例", "value": "advance_ratio_str" }, { "label": "账期", "value": "account_period_str" }, { "label": "压款方式", "value": "underpayment_method_name" }, { "label": "压款比例|金额", "value": "apply_for_underpayment_ratio" }, { "label": "压款单位", "value": "underpayment_method_unit" }, { "label": "保证金方式", "value": "margin_method_name" }, { "label": "保证金比例|金额", "value": "apply_for_margin_ratio" }, { "label": "保证金单位", "value": "margin_method_unit" }, { "label": "逾期利率方式", "value": "overdue_interest_rate_name" }, { "label": "逾期利率", "value": "apply_for_overdue_ratio_str" }], procurementModelOptions: [], procurementModelProps: { "label": "fullName", "value": "enCode" }, relatedContractIdcolumnOptions: [{ "label": "销售合同", "value": "contract_name" },], @@ -1347,6 +1456,14 @@ export default { contractlpaymentprice: [], contractlpaymentremark: [], }, + listQuery: { + keyword: '', + currentPage: 1, + pageSize: 100000 + }, + subjectList: [], + subject2List: [], + subject3List: [] } }, computed: { @@ -1354,7 +1471,18 @@ export default { return this.setting.formOperates } }, - watch: {}, + watch: { + 'dataForm.contractType': function (val, oldVal) { + this.dataForm.subject = undefined + this.dataForm.subject2 = undefined + this.dataForm.subject3 = undefined + this.dataForm.procurementModel = undefined + this.dataForm.relatedContractId = undefined + }, + 'dataForm.subject': function (val, oldVal) { + this.getSubjectInfo() + } + }, created() { this.getFormById() if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) { @@ -1364,6 +1492,30 @@ export default { }, mounted() { }, methods: { + getSubjectInfo() { + const columnOptions = this.subjectcolumnOptions.map(o => o.value) + let interfaceId = undefined + let query = { + ...this.listQuery, + interfaceId: this.dataForm.subject, + propsValue: 'id', + relationField: 'name', + columnOptions: columnOptions.join(','), + paramList: [] + } + if (this.dataForm.contractType == 1) { + interfaceId = "531020715009245189" + } else if (this.dataForm.contractType == 2) { + interfaceId = "531022805093842949" + } else { + interfaceId = "531024727578247173" + } + getDataInterfaceDataSelect(interfaceId, query).then(res => { + this.subjectList = res.data.list.filter(o1 => { + return o1.id == this.dataForm.subject + }) + }).catch(() => { }) + }, changeData(model, index) { this.isEdit = false this.childIndex = index @@ -1578,7 +1730,7 @@ export default { //初始化默认数据 initDefaultData() { if (this.userInfo.organizeIdList instanceof Array && this.userInfo.organizeIdList.length > 0) { - this.dataForm.deptId = this.userInfo.organizeIdList + this.dataForm.deptId = [this.userInfo.organizeIdList[0]] } },