[需求变更] 资料网员新增/编辑页面合同编号输入框变成下拉选择
This commit is contained in:
@@ -61,8 +61,11 @@ export default {
|
||||
* 通过企业id获取合同号
|
||||
*/
|
||||
initRevenueContractList() {
|
||||
const param = {
|
||||
companyId: this.company.id
|
||||
let param = {}
|
||||
if (this.company && this.company.id){
|
||||
param.companyId = this.company.id
|
||||
} else {
|
||||
param.companyId = null
|
||||
}
|
||||
getAllRevenueContract(param).then(res => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -85,8 +85,14 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同编号" @change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50" v-decorator="['contractNo',validatorRules.contractNo]" disabled></a-input>
|
||||
<!-- <a-input placeholder="请输入合同编号" @change="event => event.target.value = event.target.value.trim()"-->
|
||||
<!-- :maxLength="50" v-decorator="['contractNo',validatorRules.contractNo]" disabled></a-input>-->
|
||||
<select-revenue-contract
|
||||
placeholder="请选择合同编号"
|
||||
:company="contractInfo.companyId"
|
||||
disabled
|
||||
v-decorator="['contractNo',validatorRules.contractNo]" >
|
||||
</select-revenue-contract>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -120,14 +126,15 @@ import CompanySelect from '@comp/company/CompanySelect'
|
||||
import {queryContractMemberProject} from '@api/incomeMeetingApi'
|
||||
import {money} from '@/utils/validate'
|
||||
import {addZero} from '@/utils/util'
|
||||
|
||||
import SelectRevenueContract from '../../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'AddMemberProject',
|
||||
components: {
|
||||
SelectContacts,
|
||||
JDictSelectTag,
|
||||
CompanySelect
|
||||
CompanySelect,
|
||||
SelectRevenueContract
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -132,17 +132,23 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
>
|
||||
<a-input
|
||||
placeholder="请输入合同号"
|
||||
:maxLength="50"
|
||||
<!-- <a-input-->
|
||||
<!-- placeholder="请输入合同号"-->
|
||||
<!-- :maxLength="50"-->
|
||||
<!-- v-decorator="['contractNo', validatorRules.contractNo]"-->
|
||||
<!-- :disabled="isAssociatedContract"-->
|
||||
<!-- @change="-->
|
||||
<!-- (e) => {-->
|
||||
<!-- e.target.value = (e.target.value + '').trim();-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- ></a-input>-->
|
||||
<select-revenue-contract
|
||||
:company="selectedCompany"
|
||||
placeholder="请选择合同号"
|
||||
v-decorator="['contractNo', validatorRules.contractNo]"
|
||||
:disabled="isAssociatedContract"
|
||||
@change="
|
||||
(e) => {
|
||||
e.target.value = (e.target.value + '').trim();
|
||||
}
|
||||
"
|
||||
></a-input>
|
||||
:disabled="isAssociatedContract">
|
||||
</select-revenue-contract>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -207,11 +213,11 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<!-- <contact-management-module-->
|
||||
<!-- ref="contactForm"-->
|
||||
<!-- is-company-disabled-->
|
||||
<!-- :selected-company="selectedCompany"-->
|
||||
<!-- ></contact-management-module>-->
|
||||
<!-- <contact-management-module-->
|
||||
<!-- ref="contactForm"-->
|
||||
<!-- is-company-disabled-->
|
||||
<!-- :selected-company="selectedCompany"-->
|
||||
<!-- ></contact-management-module>-->
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -222,9 +228,10 @@ import JUpload from '@comp/jero/JUpload'
|
||||
import CompanySelect from '@comp/company/CompanySelect'
|
||||
// import ContactManagementModule from '@views/businessManagement/modules/ContactManagementModule'
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
import {addZero} from '@/utils/util'
|
||||
import {money} from '@/utils/validate'
|
||||
import {checkAssociatedProject} from '@/utils/projectCheck'
|
||||
import { addZero } from '@/utils/util'
|
||||
import { money } from '@/utils/validate'
|
||||
import { checkAssociatedProject } from '@/utils/projectCheck'
|
||||
import SelectRevenueContract from '../../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'SafeguardMemberModal',
|
||||
@@ -233,6 +240,7 @@ export default {
|
||||
CompanySelect,
|
||||
// ContactManagementModule,
|
||||
SelectContacts,
|
||||
SelectRevenueContract
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -244,58 +252,58 @@ export default {
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
remarksLabelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 3 },
|
||||
sm: { span: 3 }
|
||||
},
|
||||
remarksWrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 21 },
|
||||
sm: { span: 21 }
|
||||
},
|
||||
validatorRules: {
|
||||
companyId: {
|
||||
rules: [{ required: true, message: '请选择会员单位' }],
|
||||
validateTrigger: 'blur',
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractNo: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
validateTrigger: 'blur',
|
||||
rules: [{ required: true, message: '请选择合同号' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
companyContactId: {
|
||||
rules: [{ required: true, message: '请选择企业联系人' }],
|
||||
validateTrigger: 'change',
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
postContactId: {
|
||||
rules: [{ required: true, message: '请选择邮寄联系人' }],
|
||||
validateTrigger: 'change',
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
paymentMethod: {
|
||||
rules: [{ required: true, message: '请选择来款方式' }],
|
||||
validateTrigger: ['blur', 'change'],
|
||||
initialValue: 3,
|
||||
initialValue: 3
|
||||
},
|
||||
amountReceivable: {
|
||||
rules: [
|
||||
{required: true, validator: this.validateMoney},
|
||||
{ required: true, validator: this.validateMoney }
|
||||
],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
|
||||
chargeNoticeNo: {
|
||||
rules: [{ required: true, message: '请输入收费通知号' }],
|
||||
validateTrigger: 'blur',
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
needInvoice: {
|
||||
rules: [{ required: true, message: '请选择发票类型' }],
|
||||
validateTrigger: ['change', 'blur'],
|
||||
initialValue: 0,
|
||||
},
|
||||
initialValue: 0
|
||||
}
|
||||
},
|
||||
// 来款方式
|
||||
incomePaysType: 3,
|
||||
@@ -309,10 +317,10 @@ export default {
|
||||
baseInfo: this.$store.state.currentProjetcInfo,
|
||||
url: {
|
||||
add: '/jero/memberProjectSubitem/add',
|
||||
edit: '/jero/memberProjectSubitem/edit',
|
||||
edit: '/jero/memberProjectSubitem/edit'
|
||||
},
|
||||
disabledCompany: false, // 企业是否可以编辑
|
||||
isAssociatedContract: false, // 是否已关联合同
|
||||
isAssociatedContract: false // 是否已关联合同
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -354,7 +362,7 @@ export default {
|
||||
this.timer = setTimeout(() => {
|
||||
this.form.setFieldsValue({
|
||||
chargeNoticeFileId: this.baseInfo.chargeNoticeFileId,
|
||||
chargeNoticeNo: this.baseInfo.chargeNoticeNo,
|
||||
chargeNoticeNo: this.baseInfo.chargeNoticeNo
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
@@ -363,16 +371,16 @@ export default {
|
||||
if (record.companyId) {
|
||||
this.model.companyId = {
|
||||
id: record.companyId,
|
||||
companyName: record.companyName,
|
||||
companyName: record.companyName
|
||||
}
|
||||
this.selectedCompany = Object.assign({}, this.model.companyId)
|
||||
this.selectPerson = {
|
||||
id: this.model.companyContactTemporaryId,
|
||||
name: this.model.companyContactName,
|
||||
name: this.model.companyContactName
|
||||
}
|
||||
this.selectMailPerson = {
|
||||
id: this.model.postContactTemporaryId,
|
||||
name: this.model.postContactName,
|
||||
name: this.model.postContactName
|
||||
}
|
||||
// 修改来款方式 控制dom对应显示隐藏
|
||||
this.incomePaysType = record.paymentMethod
|
||||
@@ -397,10 +405,10 @@ export default {
|
||||
})
|
||||
},
|
||||
// 选择企业联系人 带出邮寄联系人
|
||||
changetPerson(val){
|
||||
changetPerson(val) {
|
||||
// 只有邮寄联系人没有值的时候才去联动复制
|
||||
if(this.form.getFieldValue('postContactId') === undefined ){
|
||||
this.form.setFieldsValue({'postContactId':val})
|
||||
if (this.form.getFieldValue('postContactId') === undefined) {
|
||||
this.form.setFieldsValue({ 'postContactId': val })
|
||||
}
|
||||
},
|
||||
close() {
|
||||
@@ -454,7 +462,9 @@ export default {
|
||||
* 选择会员单位
|
||||
* */
|
||||
companyChange(val) {
|
||||
this.selectedCompany = Object.assign({}, val, )
|
||||
// 清除合同号
|
||||
this.form.setFieldsValue({ contractNo: undefined })
|
||||
this.selectedCompany = Object.assign({}, val)
|
||||
},
|
||||
handleCancel() {
|
||||
this.selectedCompany = null
|
||||
@@ -472,8 +482,8 @@ export default {
|
||||
addContactsOk() {
|
||||
this.$refs.selectContacts.getContactsList()
|
||||
this.$refs.selectMailContacts.getContactsList()
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user