支出合同新增企业、联系人修改为input

This commit is contained in:
zhaoxiao
2021-10-08 14:21:34 +08:00
parent d686aaefcd
commit 2d60bb2ceb
@@ -28,17 +28,18 @@
</a-col> </a-col>
<a-col :xxl="6" :xl="8" :sm="12"> <a-col :xxl="6" :xl="8" :sm="12">
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<company-select placeholder="请选择签订单位" <a-input placeholder="请输入签订单位"
v-decorator="['signedCompany',validatorRules.signedCompany]" v-decorator="['signedCompanyTemporaryName',validatorRules.signedCompanyTemporaryName]"
@change="handleSignedCompanyChange"></company-select> :maxLength='50'
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: 0"> <a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: 0">
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-contacts placeholder="请选择签订联系人" <a-input placeholder="请输入签订联系人"
:selected-company="selectedCompany" v-decorator="['signedContactsTemporaryName',validatorRules.signedContactsTemporaryName]"
:init-contacts="selectedContact" :maxLength='50'
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts> @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xxl="6" :xl="8" :sm="12"> <a-col :xxl="6" :xl="8" :sm="12">
@@ -287,12 +288,12 @@ export default {
rules: [{ required: true, message: '请输入合同名称' }], rules: [{ required: true, message: '请输入合同名称' }],
validateTrigger: 'blur' validateTrigger: 'blur'
}, },
signedCompany: { signedCompanyTemporaryName: {
rules: [{ required: true, message: '请选择签订单位' }], rules: [{ required: true, message: '请输入签订单位' }],
validateTrigger: 'change' validateTrigger: 'blur'
}, },
signedContactsId: { signedContactsTemporaryName: {
rules: [{ required: true, message: '请选择签订联系人' }], rules: [{ required: true, message: '请输入签订联系人' }],
validateTrigger: 'blur' validateTrigger: 'blur'
}, },
principalId: { principalId: {
@@ -364,17 +365,17 @@ export default {
let record let record
record = res.result record = res.result
// 回显企业 // 回显企业
record.signedCompany = { // record.signedCompany = {
id: record.signedCompanyTemporaryId, // id: record.signedCompanyTemporaryId,
companyName: record.signedCompanyTemporaryName // companyName: record.signedCompanyTemporaryName
} // }
// 回显联系人 // 回显联系人
this.selectedCompany = record.signedCompany // this.selectedCompany = record.signedCompany
record.signedContactsId = record.signedContactsTemporaryId // record.signedContactsId = record.signedContactsTemporaryId
this.selectedContact = { // this.selectedContact = {
id: record.signedContactsTemporaryId, // id: record.signedContactsTemporaryId,
name: record.signedContactsTemporaryName // name: record.signedContactsTemporaryName
} // }
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
// 回显负责人部门 // 回显负责人部门
this.principalChange(this.model.principalId) this.principalChange(this.model.principalId)
@@ -383,7 +384,7 @@ export default {
// 回显打包年份 // 回显打包年份
this.isPackage = this.model.pack === 1 this.isPackage = this.model.pack === 1
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'contractNum', 'contractName', 'signedCompany', 'signedContactsId', 'opening', 'principalId', 'departmentName', 'contractAmount', 'rate', 'noTaxAmount', 'contractDate', 'terminationDate', 'contractTimePoints', 'accountsReceivableAmount', 'amountReceived', 'outstandingAmount', 'accountStatus', 'contractPaymentTimes', 'pack', 'packYear')) this.form.setFieldsValue(pick(this.model, 'contractNum', 'contractName', 'signedCompanyTemporaryName', 'signedContactsTemporaryName', 'opening', 'principalId', 'departmentName', 'contractAmount', 'rate', 'noTaxAmount', 'contractDate', 'terminationDate', 'contractTimePoints', 'accountsReceivableAmount', 'amountReceived', 'outstandingAmount', 'accountStatus', 'contractPaymentTimes', 'pack', 'packYear'))
this.confirmLoading = false this.confirmLoading = false
}) })
} else { } else {