合同优化A1

jg-waiwang-pro
mhsnet 8 months ago
parent ab92a8c8f8
commit b303fbb3fd

@ -360,6 +360,9 @@ public class ContractLController {
case "tableField177-fundRate":
tableField177List.add(new ExcelExportEntity("资金利率" ,"fundRate"));
break;
case "tableField135-productId":
tableField135List.add(new ExcelExportEntity("商品ID" ,"productId"));
break;
case "tableField135-commodityCode":
tableField135List.add(new ExcelExportEntity("商品编码" ,"commodityCode"));
break;
@ -369,8 +372,8 @@ public class ContractLController {
case "tableField135-specifications":
tableField135List.add(new ExcelExportEntity("商品规格" ,"specifications"));
break;
case "tableField135-inventoryUnit":
tableField135List.add(new ExcelExportEntity("库存单位" ,"inventoryUnit"));
case "tableField135-inventoryUnitId":
tableField135List.add(new ExcelExportEntity("库存单位" ,"inventoryUnitId"));
break;
case "tableField135-procureUnit":
tableField135List.add(new ExcelExportEntity("采购单位" ,"procureUnit"));

@ -22,6 +22,8 @@ public class ContractLCommodityEntity {
private String id;
@TableField("CONTRACT_ID")
private String contractId;
@TableField(value = "PRODUCT_ID" , updateStrategy = FieldStrategy.IGNORED)
private String productId;
@TableField(value = "COMMODITY_NAME" , updateStrategy = FieldStrategy.IGNORED)
private String commodityName;
@TableField(value = "COMMODITY_CODE" , updateStrategy = FieldStrategy.IGNORED)
@ -30,7 +32,7 @@ public class ContractLCommodityEntity {
private String commodityPhone;
@TableField(value = "SPECIFICATIONS" , updateStrategy = FieldStrategy.IGNORED)
private String specifications;
@TableField("INVENTORY_UNIT_ID")
@TableField(value = "INVENTORY_UNIT_ID" , updateStrategy = FieldStrategy.IGNORED)
private String inventoryUnitId;
@TableField(value = "PROCURE_UNIT" , updateStrategy = FieldStrategy.IGNORED)
private String procureUnit;

@ -5,7 +5,6 @@ import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
/**
*
*

@ -18,6 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*/
@Data
public class ContractLCommodityModel {
/** 商品ID **/
@JSONField(name = "productId")
private String productId;
/** 商品编码 **/
@JSONField(name = "commodityCode")
private String commodityCode;
@ -28,8 +31,8 @@ public class ContractLCommodityModel {
@JSONField(name = "specifications")
private String specifications;
/** 库存单位 **/
@JSONField(name = "inventoryUnit")
private String inventoryUnit;
@JSONField(name = "inventoryUnitId")
private String inventoryUnitId;
/** 采购单位 **/
@JSONField(name = "procureUnit")
private Object procureUnit;

@ -165,14 +165,6 @@
</JnpfPopupSelect>
</jnpf-form-tip-item>
</template>
<!-- <jnpf-form-tip-item label="乙方主体" v-if="judgeShow('subject')" prop="subject">
<JnpfPopupSelect v-model="dataForm.subject" @change="changeData('subject', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.subject" placeholder="请选择"
:disabled="judgeWrite('subject')" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' field='subject' interfaceId="523869248829799685"
:pageSize="20" :columnOptions="subjectcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item> -->
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
@ -257,12 +249,6 @@
</template>
<template v-else>
</template>
<!-- <jnpf-form-tip-item label="采购模式" v-if="judgeShow('procurementModel')" prop="procurementModel">
<JnpfSelect v-model="dataForm.procurementModel" @change="changeData('procurementModel', -1)"
placeholder="请选择" :disabled="judgeWrite('procurementModel')" clearable
:style='{ "width": "100%" }' :options="procurementModelOptions" :props="procurementModelProps">
</JnpfSelect>
</jnpf-form-tip-item> -->
</el-col>
<el-col :span="8" v-if="judgeShow('relatedContractId')">
<template v-if="dataForm.procurementModel == 1">
@ -278,16 +264,6 @@
</JnpfPopupSelect>
</jnpf-form-tip-item>
</template>
<!-- <jnpf-form-tip-item label="关联销售合同" v-if="judgeShow('relatedContractId')" prop="relatedContractId">
<JnpfPopupSelect v-model="dataForm.relatedContractId"
@change="changeData('relatedContractId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.relatedContractId" placeholder="请选择"
:disabled="judgeWrite('relatedContractId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='contract_name' field='relatedContractId'
interfaceId="529270998021701701" :pageSize="20"
:columnOptions="relatedContractIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item> -->
</el-col>
<el-col :span="8" v-if="judgeShow('subject2')">
<template v-if="dataForm.contractType == 1">
@ -314,15 +290,6 @@
</template>
<template v-else>
</template>
<!-- <jnpf-form-tip-item label="乙方主体二级" v-if="judgeShow('subject2')" prop="subject2">
<JnpfPopupSelect v-model="dataForm.subject2" @change="changeData('subject2', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.subject2"
placeholder="请选择" :disabled="judgeWrite('subject2')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='subject2'
interfaceId="523869248829799685" :pageSize="20" :columnOptions="subject2columnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item> -->
</el-col>
<el-col :span="8" v-if="judgeShow('subject3')">
<template v-if="dataForm.contractType == 1">
@ -340,15 +307,6 @@
</template>
<template v-else>
</template>
<!-- <jnpf-form-tip-item label="乙方主体三级" v-if="judgeShow('subject3')" prop="subject3">
<JnpfPopupSelect v-model="dataForm.subject3" @change="changeData('subject3', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.subject3"
placeholder="请选择" :disabled="judgeWrite('subject3')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='subject3'
interfaceId="523869248829799685" :pageSize="20" :columnOptions="subject3columnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item> -->
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
@ -742,6 +700,26 @@
<jnpf-form-tip-item label-width="0">
<el-table :data="dataForm.contractLCommodityList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品ID" v-if="judgeShow('contractlcommodity-productId')"
prop="productId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlcommodityList-productId')">*</span>商品ID
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('contractlcommodity-productId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.contractlcommodityproductId" placeholder="请选择"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='id' :field="'productId' + scope.$index"
interfaceId="530288111456878597" :pageSize="20"
:columnOptions="contractlcommodityproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="商品编码" v-if="judgeShow('contractlcommodity-commodityCode')"
prop="commodityCode">
<template slot="header">
@ -749,17 +727,13 @@
v-if="judgeRequired('contractlcommodityList-commodityCode')">*</span>商品编码
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.commodityCode"
{{ scope.row.commodityCode }}
<!-- <JnpfInput v-model="scope.row.commodityCode"
@change="changeData('contractlcommodity-commodityCode', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.contractlcommoditycommodityCode" placeholder="请选择"
placeholder="请输入"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-commodityCode')"
propsValue="code" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='code' :field="'commodityCode' + scope.$index"
interfaceId="530288111456878597" :pageSize="20"
:columnOptions="contractlcommoditycommodityCodecolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
readonly clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="judgeShow('contractlcommodity-commodityName')"
@ -769,12 +743,13 @@
v-if="judgeRequired('contractlcommodityList-commodityName')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.commodityName"
{{ scope.row.commodityName }}
<!-- <JnpfInput v-model="scope.row.commodityName"
@change="changeData('contractlcommodity-commodityName', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-commodityName')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
readonly clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
</template>
</el-table-column>
<el-table-column label="商品规格" v-if="judgeShow('contractlcommodity-specifications')"
@ -784,35 +759,29 @@
v-if="judgeRequired('contractlcommodityList-specifications')">*</span>商品规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.specifications"
{{ scope.row.specifications }}
<!-- <JnpfInput v-model="scope.row.specifications"
@change="changeData('contractlcommodity-specifications', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-specifications')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
readonly clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('contractlcommodity-inventoryUnit')"
prop="inventoryUnit">
<el-table-column label="库存单位" v-if="judgeShow('contractlcommodity-inventoryUnitId')"
prop="inventoryUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlcommodityList-inventoryUnit')">*</span>库存单位
v-if="judgeRequired('contractlcommodityList-inventoryUnitId')">*</span>库存单位
</template>
<template slot-scope="scope">
<!-- <JnpfInput v-model="scope.row.inventoryUnit"
@change="changeData('contractlcommodity-inventoryUnit', scope.$index)"
{{ scope.row.inventoryUnitId }}
<!-- <JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('contractlcommodity-inventoryUnitId', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-inventoryUnit')"
clearable :style='{ "width": "100%" }'>
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-inventoryUnitId')"
readonly clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
<JnpfSelect v-model="scope.row.inventoryUnit"
@change="changeData('contractlcommodity-inventoryUnit', scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-inventoryUnit')"
clearable :style='{ "width": "100%" }'
:options="contractlcommodityinventoryUnitOptions"
:props="contractlcommodityinventoryUnitProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="采购单位" v-if="judgeShow('contractlcommodity-procureUnit')"
@ -826,7 +795,7 @@
@change="changeData('contractlcommodity-procureUnit', scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('contractlcommodityList') || judgeWrite('contractlcommodityList-procureUnit')"
:style='{ "width": "100%" }'
clearable :style='{ "width": "100%" }'
:options="contractlcommodityprocureUnitOptions"
:props="contractlcommodityprocureUnitProps">
</JnpfSelect>
@ -1275,14 +1244,16 @@ export default {
enabledmark: undefined
},
contractLCommodityList: {
productId: '',
productIdOptions: [],
commodityCode: '',
commodityCodeOptions: [],
commodityName: '',
commodityNameOptions: [],
specifications: '',
specificationsOptions: [],
inventoryUnit: '',
inventoryUnitOptions: [],
inventoryUnitId: '',
inventoryUnitIdOptions: [],
procureUnitOptions: [],
number: '',
numberOptions: [],
@ -1327,7 +1298,7 @@ export default {
contractPeriodTime: undefined,
contractPeriodTimeEnd: undefined,
deptId: [],
subject: undefined,
subject: "522407918746741061",
procurementModel: undefined,
relatedContractId: undefined,
subject2: undefined,
@ -1428,7 +1399,7 @@ export default {
totalAmount: [
{
required: true,
message: '请至少选择一个',
message: '数字文本',
trigger: ["blur", "change"]
},
],
@ -1462,11 +1433,9 @@ export default {
contractLabelProps: { "label": "fullName", "value": "enCode" },
contractlpriceformulapriceFormulaTypeOptions: [],
contractlpriceformulapriceFormulaTypeProps: { "label": "fullName", "value": "enCode" },
contractlcommoditycommodityCodecolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "商品规格", "value": "spec" }, { "label": "库存单位", "value": "inventory_unit_name" }, { "label": "采购单位", "value": "order_main_unit_name" }, { "label": "销售单位", "value": "sales_main_unit_name" },],
contractlcommodityprocureUnitOptions: [],
contractlcommodityproductIdcolumnOptions: [{ "label": "商品ID", "value": "id" }, { "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "商品规格", "value": "spec" }, { "label": "库存单位", "value": "inventory_unit_name" }, { "label": "采购单位", "value": "order_main_unit_name" }, { "label": "销售单位", "value": "sales_main_unit_name" },],
contractlcommodityprocureUnitOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
contractlcommodityprocureUnitProps: { "label": "fullName", "value": "id" },
contractlcommodityinventoryUnitOptions: [],
contractlcommodityinventoryUnitProps: { "label": "fullName", "value": "id" },
contractlfeeclausefeeTypeOptions: [],
contractlfeeclausefeeTypeProps: { "label": "fullName", "value": "enCode" },
contractlpaymentpaymentNodeOptions: [],
@ -1525,10 +1494,11 @@ export default {
contractlpriceformulataxRateYellowBull: [],
contractlpriceformulataxRateInvoicingCompany: [],
contractlpriceformulafundRate: [],
contractlcommodityproductId: [],
contractlcommoditycommodityCode: [],
contractlcommoditycommodityName: [],
contractlcommodityspecifications: [],
contractlcommodityinventoryUnit: [],
contractlcommodityinventoryUnitId: [],
contractlcommodityprocureUnit: [],
contractlcommoditynumber: [],
contractlcommoditytaxRate: [],
@ -1569,10 +1539,6 @@ export default {
'dataForm.subject': function (val, oldVal) {
this.getSubjectInfo()
},
'dataForm.commodityCode': function (val, oldVal) {
console.log(val)
console.log(oldVal)
}
},
created() {
this.getFormById()
@ -1616,11 +1582,15 @@ export default {
getDataInterfaceDataSelect(interfaceId, query).then(res => {
if (res.code == 200) {
let productInfo = res.data.list.filter(o1 => {
return o1.code == this.dataForm.contractLCommodityList[index]['commodityCode']
return o1.id == this.dataForm.contractLCommodityList[index]['productId']
})[0]
console.log(this.dataForm.contractLCommodityList[index])
console.log(productInfo)
this.dataForm.contractLCommodityList[index]['commodityCode'] = productInfo.code
this.dataForm.contractLCommodityList[index]['commodityName'] = productInfo.name
this.dataForm.contractLCommodityList[index]['specifications'] = productInfo.spec
this.dataForm.contractLCommodityList[index]['inventoryUnit'] = productInfo.inventory_unit_id
this.dataForm.contractLCommodityList[index]['inventoryUnitId'] = productInfo.inventory_unit_id
this.dataForm.contractLCommodityList[index]['inventoryUnitName'] = productInfo.inventory_unit_name
this.contractlcommodityinventoryUnitOptions = [{ "fullName": productInfo.inventory_unit_name, "id": productInfo.inventory_unit_id }]
let procureUnitOptionsArr = []
for (let i = 0; i < JSON.parse(productInfo.order_main_unit_id).length; i++) {
@ -1632,7 +1602,7 @@ export default {
}
},
changeData(model, index) {
if (model == 'contractlcommodity-commodityCode') {
if (model == 'contractlcommodity-productId') {
this.getProductInfoChg(index)
}
this.isEdit = false
@ -1896,10 +1866,11 @@ export default {
},
addcontractLCommodityList() {
let item = {
commodityCode: '',
productId: '',
commodityCode: undefined,
commodityName: undefined,
specifications: undefined,
inventoryUnit: undefined,
inventoryUnitId: undefined,
procureUnit: '',
number: undefined,
taxRate: undefined,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save