支出合同新增企业、联系人修改为input
This commit is contained in:
+24
-23
@@ -28,17 +28,18 @@
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select placeholder="请选择签订单位"
|
||||
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
||||
@change="handleSignedCompanyChange"></company-select>
|
||||
<a-input placeholder="请输入签订单位"
|
||||
v-decorator="['signedCompanyTemporaryName',validatorRules.signedCompanyTemporaryName]"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: 0">
|
||||
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts placeholder="请选择签订联系人"
|
||||
:selected-company="selectedCompany"
|
||||
:init-contacts="selectedContact"
|
||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||
<a-input placeholder="请输入签订联系人"
|
||||
v-decorator="['signedContactsTemporaryName',validatorRules.signedContactsTemporaryName]"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
@@ -287,12 +288,12 @@ export default {
|
||||
rules: [{ required: true, message: '请输入合同名称' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
signedCompany: {
|
||||
rules: [{ required: true, message: '请选择签订单位' }],
|
||||
validateTrigger: 'change'
|
||||
signedCompanyTemporaryName: {
|
||||
rules: [{ required: true, message: '请输入签订单位' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
signedContactsId: {
|
||||
rules: [{ required: true, message: '请选择签订联系人' }],
|
||||
signedContactsTemporaryName: {
|
||||
rules: [{ required: true, message: '请输入签订联系人' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
principalId: {
|
||||
@@ -364,17 +365,17 @@ export default {
|
||||
let record
|
||||
record = res.result
|
||||
// 回显企业
|
||||
record.signedCompany = {
|
||||
id: record.signedCompanyTemporaryId,
|
||||
companyName: record.signedCompanyTemporaryName
|
||||
}
|
||||
// record.signedCompany = {
|
||||
// id: record.signedCompanyTemporaryId,
|
||||
// companyName: record.signedCompanyTemporaryName
|
||||
// }
|
||||
// 回显联系人
|
||||
this.selectedCompany = record.signedCompany
|
||||
record.signedContactsId = record.signedContactsTemporaryId
|
||||
this.selectedContact = {
|
||||
id: record.signedContactsTemporaryId,
|
||||
name: record.signedContactsTemporaryName
|
||||
}
|
||||
// this.selectedCompany = record.signedCompany
|
||||
// record.signedContactsId = record.signedContactsTemporaryId
|
||||
// this.selectedContact = {
|
||||
// id: record.signedContactsTemporaryId,
|
||||
// name: record.signedContactsTemporaryName
|
||||
// }
|
||||
this.model = Object.assign({}, record)
|
||||
// 回显负责人部门
|
||||
this.principalChange(this.model.principalId)
|
||||
@@ -383,7 +384,7 @@ export default {
|
||||
// 回显打包年份
|
||||
this.isPackage = this.model.pack === 1
|
||||
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
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user