[update] 收入合同普通项目工作组项目新增带出合同号

This commit is contained in:
zhaoxiao
2021-09-09 09:28:41 +08:00
parent fb8f109405
commit edaa60ca9c
6 changed files with 87 additions and 6 deletions
@@ -121,6 +121,7 @@
<a-input placeholder="请输入合同号"
v-decorator="['contractNum',validatorRules.contractNum]"
:maxLength='50'
:disabled="isContractNumDisabled"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
@@ -190,11 +191,23 @@ export default {
required: false,
default: false
},
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
// 默认来款方式(收入合同新增项目,来款方式默认为2--合同)
defaultChargeWay: {
type: Number,
required: false,
default: null
},
// 收入合同新增项目时带入合同号且不可修改
defaultContractNum: {
type: String,
requirde: false,
default: null
},
// 合同号是否可编辑
isContractNumDisabled: {
type: Boolean,
required: false,
default: false
}
},
data() {
@@ -286,6 +299,12 @@ export default {
if (this.defaultChargeWay === 2) {
this.chargeWayType = 2
}
if (this.defaultContractNum && this.defaultContractNum !== '') {
this.model.contractNum = this.defaultContractNum
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'contractNum'))
})
}
},
edit(record) {
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {