|
@@ -3,13 +3,51 @@
|
|
|
<el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
|
label-width="150px">
|
|
|
|
|
|
+ <el-divider content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
|
|
|
<el-row :gutter="0">
|
|
|
-
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="合同编号" prop="contractNo">
|
|
|
- <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
|
|
|
+ <el-form-item label="委托方联系人" prop="clientContacts"
|
|
|
+ :rules="[
|
|
|
+ // {required: true, message: '委托方联系人', trigger: 'blur'}
|
|
|
+ ]">
|
|
|
+ <el-input maxlength="100" :disabled="true" @focus="openWorkClient2()" v-model="inputForm.clientContacts" placeholder="请选择委托方联系人">
|
|
|
+ <el-button slot="append" :disabled="true" icon="el-icon-search" @click="openWorkClient2()"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="客户编号" prop="customerNo"
|
|
|
+ :rules="[
|
|
|
+ ]">
|
|
|
+ <el-input :disabled="true" v-model="inputForm.customerNo" placeholder="请填写客户编号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="统一社会信用代码" prop="uscCode"
|
|
|
+ :rules="[
|
|
|
+ ]">
|
|
|
+ <el-input :disabled="true" v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="委托方联系人电话" prop="clientContactsPhone"
|
|
|
+ :rules="[
|
|
|
+ // {required: true, message: '委托方联系人电话', trigger: 'blur'}
|
|
|
+ ]">
|
|
|
+ <el-input maxlength="15" :disabled="true" v-model="inputForm.clientContactsPhone" placeholder="请输入委托方联系人电话"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="地址" prop="address"
|
|
|
+ :rules="[
|
|
|
+ ]">
|
|
|
+ <el-input :disabled="true" v-model="inputForm.address" placeholder="地址" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-divider content-position="left"><i class="el-icon-document"></i> 基本信息</el-divider>
|
|
|
+ <el-row :gutter="0">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合同名称" prop="contractName"
|
|
|
:rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
|
|
@@ -17,11 +55,16 @@
|
|
|
<el-input v-model="inputForm.contractName" :disabled="true" placeholder="请输入合同名称" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :span="12">-->
|
|
|
-<!-- <el-form-item label="合同状态" prop="contractStatus">-->
|
|
|
-<!-- <el-input maxlength="64" :disabled="true" v-model="inputForm.contractStatus" placeholder="请输入合同状态"></el-input>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- </el-col>-->
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="合同编号" prop="contractNo">
|
|
|
+ <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="12">-->
|
|
|
+ <!-- <el-form-item label="合同状态" prop="contractStatus">-->
|
|
|
+ <!-- <el-input maxlength="64" v-model="inputForm.contractStatus" :disabled="true" placeholder="请输入合同状态"></el-input>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="付款主体" prop="payerSubject"
|
|
|
:rules="[{required: true, message: '付款主体不能为空', trigger: 'blur'}
|
|
@@ -57,9 +100,9 @@
|
|
|
{required: true, message:'请输入签约日期', trigger:'blur'}
|
|
|
]">
|
|
|
<el-date-picker
|
|
|
+ :disabled="true"
|
|
|
placement="bottom-start"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- :disabled="true"
|
|
|
v-model="inputForm.signingDate"
|
|
|
style="width: 100%"
|
|
|
placeholder="选择日期">
|
|
@@ -91,12 +134,9 @@
|
|
|
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合同实际金额" prop="actualContractAmount"
|
|
|
- :rules="[
|
|
|
- {required: true, message:'请输入合同实际金额(元)', trigger:'blur'}
|
|
|
- ]">
|
|
|
- <el-input maxlength="10" v-model="inputForm.actualContractAmount" placeholder="请输入合同实际金额(元)"
|
|
|
- @keyup.native="inputForm.actualContractAmount = twoDecimalPlaces(inputForm.actualContractAmount)"
|
|
|
- ></el-input>
|
|
|
+ :rules="[{required: true, message: '请填写合同实际金额', trigger: 'blur'}
|
|
|
+ ]">
|
|
|
+ <el-input maxlength="64" v-model="inputForm.actualContractAmount" ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -110,14 +150,14 @@
|
|
|
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="对方合同编号" prop="contractOpposite">
|
|
|
- <el-input :disabled="true" maxlength="64" v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
|
|
|
+ <el-input maxlength="64" :disabled="true" v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="收费标准" prop="contractFees">
|
|
|
<el-checkbox-group v-model="inputForm.contractFees">
|
|
|
- <el-checkbox :disabled="true" @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee')" :label="item.value">
|
|
|
+ <el-checkbox @change="changeContractFee" :disabled="true" v-for="item in $dictUtils.getDictList('contract_fee')" :label="item.value">
|
|
|
{{item.label}}
|
|
|
</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
@@ -126,7 +166,7 @@
|
|
|
|
|
|
<el-col :span="24">
|
|
|
<el-form-item prop="contractFee">
|
|
|
- <el-input style="width: 100%" placeholder="请选择收费标准" :disabled="true" v-model="inputForm.contractFee"></el-input>
|
|
|
+ <el-input style="width: 100%" :disabled="true" placeholder="请选择收费标准" v-model="inputForm.contractFee"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -139,57 +179,20 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="所属部门" prop="department"
|
|
|
- :rules="[
|
|
|
- ]">
|
|
|
+ <el-form-item prop="department" label="所属部门">
|
|
|
<SelectTree
|
|
|
ref="officeTree"
|
|
|
- :disabled="true"
|
|
|
:props="{
|
|
|
value: 'id', // ID字段名
|
|
|
label: 'name', // 显示名称
|
|
|
children: 'children' // 子级字段名
|
|
|
}"
|
|
|
-
|
|
|
+ :disabled="true"
|
|
|
:url="`/sys/office/treeData?type=1`"
|
|
|
:value="inputForm.department"
|
|
|
:accordion="true"
|
|
|
size="medium"
|
|
|
@getValue="(value) => {inputForm.department=value}"/>
|
|
|
-<!-- <el-input maxlength="64" :disabled="true" v-model="inputForm.department" placeholder="请输入所属部门"></el-input>-->
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="委托方联系人" prop="clientContacts"
|
|
|
- :rules="[{required: true, message: '委托方联系人', trigger: 'blur'}
|
|
|
- ]">
|
|
|
- <el-input maxlength="100" :disabled="true" v-model="inputForm.clientContacts" placeholder="请输入委托方联系人"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="委托方联系人电话" prop="clientContactsPhone"
|
|
|
- :rules="[{required: true, message: '委托方联系人电话', trigger: 'blur'}
|
|
|
- ]">
|
|
|
- <el-input maxlength="15" :disabled="true" v-model="inputForm.clientContactsPhone" placeholder="请输入委托方联系人电话"
|
|
|
- @keyup.native="inputForm.clientContactsPhone = twoDecimalPlaces(inputForm.clientContactsPhone)"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="合同归档审批类型" hidden prop="contractApprovalType"
|
|
|
- :rules="[
|
|
|
- ]">
|
|
|
- <el-select v-model="inputForm.contractApprovalType" placeholder="请选择" style="width:100%;">
|
|
|
- <el-option
|
|
|
- v-for="item in $dictUtils.getDictList('contract_type')"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -231,9 +234,10 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="付款约定" prop="paymentAgreement">
|
|
|
- <el-input maxlength="64" type="textarea" :disabled="true" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
|
|
|
+ <el-input maxlength="64" :disabled="true" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -300,6 +304,7 @@
|
|
|
:url-list="[url]"
|
|
|
zIndex="9999"/>
|
|
|
<WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>
|
|
|
+ <WorkClientChooseRadio ref="workClientChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></WorkClientChooseRadio>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -309,6 +314,7 @@
|
|
|
import UpLoadComponent from '@/views/common/UpLoadComponent'
|
|
|
import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
|
|
|
import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
|
+ import WorkClientChooseRadio from '../workClientInfo/WorkClientChooseRadio'
|
|
|
import OSSSerive, {
|
|
|
httpRequest,
|
|
|
toHref,
|
|
@@ -333,6 +339,8 @@
|
|
|
visible: false,
|
|
|
loading: false,
|
|
|
returnForm: {
|
|
|
+ customerId: '', // 客户id
|
|
|
+ uscCode: '',
|
|
|
filedNo: '',
|
|
|
confirmFiledNo: '',
|
|
|
clientId: '',
|
|
@@ -358,6 +366,9 @@
|
|
|
contractFees: []
|
|
|
},
|
|
|
inputForm: {
|
|
|
+ customerId: '', // 客户id
|
|
|
+ uscCode: '',
|
|
|
+ customerNo: '',
|
|
|
contractFee: '',
|
|
|
contractFees: [],
|
|
|
contractOpposite: '',
|
|
@@ -421,7 +432,8 @@
|
|
|
ElImageViewer,
|
|
|
UpLoadComponent,
|
|
|
WorkClientChooseForm,
|
|
|
- SelectTree
|
|
|
+ SelectTree,
|
|
|
+ WorkClientChooseRadio
|
|
|
},
|
|
|
ossService: null,
|
|
|
// workContractService: null,
|
|
@@ -503,6 +515,9 @@
|
|
|
this.dataListNew = []
|
|
|
this.method = method
|
|
|
this.inputForm = {
|
|
|
+ customerId: '', // 客户id
|
|
|
+ uscCode: '',
|
|
|
+ customerNo: '',
|
|
|
contractFee: '',
|
|
|
contractFees: [],
|
|
|
contractOpposite: '',
|
|
@@ -544,96 +559,124 @@
|
|
|
this.visible = true
|
|
|
this.loading = false
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.inputForm.resetFields()
|
|
|
- // if (method === 'edit' || method === 'view') { // 修改或者查看
|
|
|
this.loading = true
|
|
|
- this.contractInfoService.findById(this.inputForm.id).then(data1 => {
|
|
|
- this.$refs.archiveFile.clearUpload()
|
|
|
- this.$refs.uploadFile.clearUpload()
|
|
|
- this.inputForm.contractProperList = data1.data.contractProperList
|
|
|
- // console.log('data1.id', data1.data.id)
|
|
|
- // console.log('data1.data.filedType', data1.data.filedType)
|
|
|
- if ((data1.data.filedType !== '0' & data1.data.filedType !== undefined) || data1.data.id === undefined) {
|
|
|
- // console.log('data1.22222')
|
|
|
- // console.log('data1.data.contractProperList', data1.data.contractProperList)
|
|
|
- this.$refs.uploadFile.clearUpload()
|
|
|
- this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- this.contractFileService.findById(this.inputForm.id).then(data2 => {
|
|
|
- this.inputForm.contractProperList = data2.data.contractProperList
|
|
|
- this.inputForm.contractInfoList = data2.data.contractInfoList
|
|
|
- console.log('data2', data2)
|
|
|
- this.contractInfoService.findById(data2.data.contractInfoId).then(async (data3) => {
|
|
|
- data3.data.contractProperList = this.inputForm.contractProperList
|
|
|
- data3.data.contractInfoList = this.inputForm.contractInfoList
|
|
|
- this.inputForm.contractNo = data3.data.contractNo
|
|
|
- this.inputForm.filedNo = data3.data.filedNo
|
|
|
- this.inputForm.contractName = data3.data.contractName
|
|
|
- this.inputForm.payerSubject = data3.data.payerSubject
|
|
|
- this.inputForm.paymentMethod = data3.data.paymentMethod
|
|
|
- this.inputForm.signingDate = data3.data.signingDate
|
|
|
- this.inputForm.contractAmountType = data3.data.contractAmountType
|
|
|
- this.inputForm.contractAmount = data3.data.contractAmount
|
|
|
- this.inputForm.actualContractAmount = data3.data.actualContractAmount
|
|
|
- this.inputForm.contractNum = data3.data.contractNum
|
|
|
- this.inputForm.contractOpposite = data3.data.contractOpposite
|
|
|
- this.inputForm.confirmFiledNo = data3.data.confirmFiledNo
|
|
|
- this.inputForm.contractFee = data3.data.contractFee
|
|
|
- this.inputForm.fees = data3.data.fees
|
|
|
- this.inputForm.changeNum = data3.data.changeNum
|
|
|
- this.inputForm.department = data3.data.department
|
|
|
- console.log('data3.data.department', data3.data.department)
|
|
|
- this.inputForm.clientContacts = data3.data.clientContacts
|
|
|
- this.inputForm.clientContactsPhone = data3.data.clientContactsPhone
|
|
|
- this.inputForm.createBy = data3.data.createBy
|
|
|
- this.inputForm.createDate = data3.data.createDate
|
|
|
- this.inputForm.paymentAgreement = data3.data.paymentAgreement
|
|
|
- if (data3.data.filedType === '2' || data3.data.filedType === '5') {
|
|
|
- // this.$refs.uploadFile.clearUpload()
|
|
|
- // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- await this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- // console.log('this.$refs.getDataList', this.$refs.archiveFile.getDataList())
|
|
|
- console.log('this.$refs.uploadFile', this.commonJS.isNotEmpty(this.$refs.uploadFile.getDataList()))
|
|
|
- } else {
|
|
|
- // this.$refs.uploadFile.clearUpload()
|
|
|
- // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- }
|
|
|
- if ((data3.data.filedType === '2' || data3.data.filedType === '5') && this.commonJS.isEmpty(this.$refs.uploadFile.getDataList())) {
|
|
|
- await this.$refs.uploadFile.clearUpload()
|
|
|
- this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- }
|
|
|
- const f = []
|
|
|
- if (data3.data.fees !== null && data3.data.fees !== undefined && data3.data.fees !== '') {
|
|
|
- data3.data.fees.split(',').forEach(item => {
|
|
|
- if (item !== null && item !== undefined && item !== '') {
|
|
|
- f.push(item)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- this.inputForm.contractFees = f
|
|
|
-
|
|
|
- // console.log('data3', data3)
|
|
|
- // console.log('this.inputForm', this.inputForm)
|
|
|
- // console.log('this.$refs.archiveFile', this.$refs.archiveFile.dataList)
|
|
|
- // console.log('this.$refs.uploadFile', this.$refs.uploadFile.dataList.length)
|
|
|
- this.saveData(data3.data, method)
|
|
|
- if (this.formReadOnly) {
|
|
|
- method = 'view'
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs.uploadFile.clearUpload()
|
|
|
+ this.$refs.archiveFile.clearUpload()
|
|
|
+ // 查询合同登记数据
|
|
|
+ console.log('this.inputForm.id', this.inputForm.id)
|
|
|
+ this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
|
|
|
+ this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ const f = []
|
|
|
+ if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
|
|
|
+ data.fees.split(',').forEach(item => {
|
|
|
+ if (item !== null && item !== undefined && item !== '') {
|
|
|
+ f.push(item)
|
|
|
+ }
|
|
|
})
|
|
|
- } else {
|
|
|
- // console.log('进来了22')
|
|
|
- this.$refs.uploadFile.clearUpload()
|
|
|
- this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
- this.saveData(data1.data, method)
|
|
|
- if (this.formReadOnly) {
|
|
|
- method = 'view'
|
|
|
- }
|
|
|
}
|
|
|
+ this.inputForm.contractFees = f
|
|
|
+ if (this.formReadOnly) {
|
|
|
+ method = 'view'
|
|
|
+ }
|
|
|
+ console.log('data', data)
|
|
|
+ console.log('this.inputForm.contractProperList', this.inputForm.contractProperList)
|
|
|
+ console.log('this.inputForm.contractInfoList', this.inputForm.contractInfoList)
|
|
|
+ this.$refs.uploadFile.newUpload('view', this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ this.$refs.archiveFile.newUpload(method, this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
this.loading = false
|
|
|
})
|
|
|
}
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.inputForm.resetFields()
|
|
|
+ // // if (method === 'edit' || method === 'view') { // 修改或者查看
|
|
|
+ // this.loading = true
|
|
|
+ // this.contractInfoService.findById(this.inputForm.id).then(data1 => {
|
|
|
+ // this.$refs.archiveFile.clearUpload()
|
|
|
+ // this.$refs.uploadFile.clearUpload()
|
|
|
+ // this.inputForm.contractProperList = data1.data.contractProperList
|
|
|
+ // // console.log('data1.id', data1.data.id)
|
|
|
+ // // console.log('data1.data.filedType', data1.data.filedType)
|
|
|
+ // if ((data1.data.filedType !== '0' & data1.data.filedType !== undefined) || data1.data.id === undefined) {
|
|
|
+ // // console.log('data1.22222')
|
|
|
+ // // console.log('data1.data.contractProperList', data1.data.contractProperList)
|
|
|
+ // this.$refs.uploadFile.clearUpload()
|
|
|
+ // this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // this.contractFileService.findById(this.inputForm.id).then(data2 => {
|
|
|
+ // this.inputForm.contractProperList = data2.data.contractProperList
|
|
|
+ // this.inputForm.contractInfoList = data2.data.contractInfoList
|
|
|
+ // console.log('data2', data2)
|
|
|
+ // this.contractInfoService.findById(data2.data.contractInfoId).then(async (data3) => {
|
|
|
+ // data3.data.contractProperList = this.inputForm.contractProperList
|
|
|
+ // data3.data.contractInfoList = this.inputForm.contractInfoList
|
|
|
+ // this.inputForm.contractNo = data3.data.contractNo
|
|
|
+ // this.inputForm.filedNo = data3.data.filedNo
|
|
|
+ // this.inputForm.contractName = data3.data.contractName
|
|
|
+ // this.inputForm.payerSubject = data3.data.payerSubject
|
|
|
+ // this.inputForm.paymentMethod = data3.data.paymentMethod
|
|
|
+ // this.inputForm.signingDate = data3.data.signingDate
|
|
|
+ // this.inputForm.contractAmountType = data3.data.contractAmountType
|
|
|
+ // this.inputForm.contractAmount = data3.data.contractAmount
|
|
|
+ // this.inputForm.actualContractAmount = data3.data.actualContractAmount
|
|
|
+ // this.inputForm.contractNum = data3.data.contractNum
|
|
|
+ // this.inputForm.contractOpposite = data3.data.contractOpposite
|
|
|
+ // this.inputForm.confirmFiledNo = data3.data.confirmFiledNo
|
|
|
+ // this.inputForm.contractFee = data3.data.contractFee
|
|
|
+ // this.inputForm.fees = data3.data.fees
|
|
|
+ // this.inputForm.changeNum = data3.data.changeNum
|
|
|
+ // this.inputForm.department = data3.data.department
|
|
|
+ // console.log('data3.data.department', data3.data.department)
|
|
|
+ // this.inputForm.clientContacts = data3.data.clientContacts
|
|
|
+ // this.inputForm.clientContactsPhone = data3.data.clientContactsPhone
|
|
|
+ // this.inputForm.createBy = data3.data.createBy
|
|
|
+ // this.inputForm.createDate = data3.data.createDate
|
|
|
+ // this.inputForm.paymentAgreement = data3.data.paymentAgreement
|
|
|
+ // if (data3.data.filedType === '2' || data3.data.filedType === '5') {
|
|
|
+ // // this.$refs.uploadFile.clearUpload()
|
|
|
+ // // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // await this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // // console.log('this.$refs.getDataList', this.$refs.archiveFile.getDataList())
|
|
|
+ // console.log('this.$refs.uploadFile', this.commonJS.isNotEmpty(this.$refs.uploadFile.getDataList()))
|
|
|
+ // } else {
|
|
|
+ // // this.$refs.uploadFile.clearUpload()
|
|
|
+ // // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // }
|
|
|
+ // if ((data3.data.filedType === '2' || data3.data.filedType === '5') && this.commonJS.isEmpty(this.$refs.uploadFile.getDataList())) {
|
|
|
+ // await this.$refs.uploadFile.clearUpload()
|
|
|
+ // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // }
|
|
|
+ // const f = []
|
|
|
+ // if (data3.data.fees !== null && data3.data.fees !== undefined && data3.data.fees !== '') {
|
|
|
+ // data3.data.fees.split(',').forEach(item => {
|
|
|
+ // if (item !== null && item !== undefined && item !== '') {
|
|
|
+ // f.push(item)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // this.inputForm.contractFees = f
|
|
|
+ //
|
|
|
+ // // console.log('data3', data3)
|
|
|
+ // // console.log('this.inputForm', this.inputForm)
|
|
|
+ // // console.log('this.$refs.archiveFile', this.$refs.archiveFile.dataList)
|
|
|
+ // // console.log('this.$refs.uploadFile', this.$refs.uploadFile.dataList.length)
|
|
|
+ // this.saveData(data3.data, method)
|
|
|
+ // if (this.formReadOnly) {
|
|
|
+ // method = 'view'
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // // console.log('进来了22')
|
|
|
+ // this.$refs.uploadFile.clearUpload()
|
|
|
+ // this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
|
|
|
+ // this.saveData(data1.data, method)
|
|
|
+ // if (this.formReadOnly) {
|
|
|
+ // method = 'view'
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.loading = false
|
|
|
+ // })
|
|
|
+ // }
|
|
|
)
|
|
|
},
|
|
|
tabHandleClick (event) {
|
|
@@ -653,6 +696,9 @@
|
|
|
openWorkClient () {
|
|
|
this.$refs.workClientChooseForm.init()
|
|
|
},
|
|
|
+ openWorkClient2 () {
|
|
|
+ this.$refs.workClientChooseRadio.init()
|
|
|
+ },
|
|
|
getWorkClientChoose (list) {
|
|
|
// console.log('list', list)
|
|
|
if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
|
|
@@ -681,6 +727,40 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getWorkClientChoose2 (list) {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
|
|
|
+ this.inputForm.cwWorkClientContactDTOList = []
|
|
|
+ }
|
|
|
+ console.log('list', list)
|
|
|
+ let _this = this
|
|
|
+ let _list = list
|
|
|
+ const waitForEach = function () {
|
|
|
+ return new Promise(function (resolve, reject) {
|
|
|
+ _this.inputForm.cwWorkClientContactDTOList.forEach(client => {
|
|
|
+ if (_list.no === client.no) {
|
|
|
+ _this.$message.error('已存在客户 “' + client.name + '”,请重新选择')
|
|
|
+ throw new Error('已存在客户 “' + client.name + '”,请重新选择')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ resolve()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ waitForEach().then(() => {
|
|
|
+ // eslint-disable-next-line no-unused-vars
|
|
|
+ let item = {
|
|
|
+ no: list.no,
|
|
|
+ name: list.name
|
|
|
+ }
|
|
|
+ console.log('list', list)
|
|
|
+ this.inputForm.customerNo = list.no
|
|
|
+ this.inputForm.uscCode = list.uscCode
|
|
|
+ this.inputForm.address = list.address
|
|
|
+ this.inputForm.customerId = list.id
|
|
|
+ this.inputForm.cwWorkClientContactDTOList.push(item)
|
|
|
+ this.inputForm.clientContacts = list.name
|
|
|
+ this.inputForm.clientContactsPhone = list.mobile
|
|
|
+ })
|
|
|
+ },
|
|
|
// 表单提交
|
|
|
// 暂存
|
|
|
saveForm (callback) {
|