|
@@ -135,7 +135,9 @@
|
|
|
:rules="[
|
|
|
{required: true, message:'电话不能为空', trigger:'blur'},{required: true, message:'电话不能为空', trigger:'change'}
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.telPhone" placeholder="请填写电话"clearable></el-input>
|
|
|
+ <el-input v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="openBillingChoose()"></el-button>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-if="inputForm.billingType === '1'" :span="12">
|
|
@@ -181,7 +183,9 @@
|
|
|
<el-form-item label="电话" prop="telPhone"
|
|
|
:rules="[
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.telPhone"placeholder="请填写电话"clearable></el-input>
|
|
|
+ <el-input v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="openBillingChoose()"></el-button>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-if="inputForm.billingType === '1'" :span="12">
|
|
@@ -260,7 +264,7 @@
|
|
|
:rules="[
|
|
|
{required: true, message:'是否多张开票不能为空', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-radio v-model="inputForm.isMultiple" v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" size="small" style="margin-right: 20px">
|
|
|
+ <el-radio v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" size="small" style="margin-right: 20px">
|
|
|
{{item.label}}
|
|
|
</el-radio>
|
|
|
</el-form-item>
|
|
@@ -614,6 +618,8 @@
|
|
|
<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
|
|
|
<ContractForm ref="contractForm" @getContract="getContract"></ContractForm>
|
|
|
<WorkClientForm ref="workClientForm" @getWorkClientRadioChoose="getWorkClient"></WorkClientForm>
|
|
|
+ <WorkClientBillingChooseRadio ref="billingChoose" @getBilling="getBilling"></WorkClientBillingChooseRadio>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -626,6 +632,8 @@
|
|
|
import WorkClientForm from '../workClientInfo/WorkClientChooseRadio'
|
|
|
import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
|
import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
|
+ import WorkClientBillingChooseRadio from '@/views/modules/cw/workClientInfo/WorkClientBillingChooseRadio'
|
|
|
+
|
|
|
export default {
|
|
|
props: {
|
|
|
businessId: {
|
|
@@ -685,13 +693,15 @@
|
|
|
financeInvoiceDetailDTOList: [],
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
financeInvoiceInvalidDTO: {},
|
|
|
- isMultiple: ''
|
|
|
+ isMultiple: '',
|
|
|
+ billingId: ''
|
|
|
},
|
|
|
programRow: '',
|
|
|
bankList: [],
|
|
|
err: '',
|
|
|
keyWatch: '',
|
|
|
- importVisible: false
|
|
|
+ importVisible: false,
|
|
|
+ yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}]
|
|
|
}
|
|
|
},
|
|
|
financeInvoiceService: null,
|
|
@@ -708,7 +718,8 @@
|
|
|
WorkClientForm,
|
|
|
SelectUserTree,
|
|
|
SelectTree,
|
|
|
- UpLoadComponent
|
|
|
+ UpLoadComponent,
|
|
|
+ WorkClientBillingChooseRadio
|
|
|
},
|
|
|
computed: {
|
|
|
bus: {
|
|
@@ -724,10 +735,8 @@
|
|
|
watch: {
|
|
|
'keyWatch': {
|
|
|
handler (newVal) {
|
|
|
- if (this.bus) {
|
|
|
- if (this.bus !== 'false') {
|
|
|
- this.init('', this.bus)
|
|
|
- }
|
|
|
+ if (this.commonJS.isNotEmpty(this.bus)) {
|
|
|
+ this.init('', this.bus)
|
|
|
} else {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inputForm.resetFields()
|
|
@@ -792,7 +801,8 @@
|
|
|
invoiceId: '',
|
|
|
remarks: ''
|
|
|
},
|
|
|
- isMultiple: ''
|
|
|
+ isMultiple: '',
|
|
|
+ billingId: ''
|
|
|
}
|
|
|
// if (method === 'add') {
|
|
|
// this.title = `新建发票`
|
|
@@ -807,8 +817,8 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.loading = true
|
|
|
- this.financeInvoiceService.queryById(this.inputForm.id).then(async ({data}) => {
|
|
|
- await this.$refs.uploadComponent.clearUpload()
|
|
|
+ this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ this.$refs.uploadComponent.clearUpload()
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
if (!this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
|
|
@@ -824,6 +834,26 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.type)) {
|
|
|
+ this.inputForm.type = '1'
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.billingType)) {
|
|
|
+ this.inputForm.billingType = '1'
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.receivablesType)) {
|
|
|
+ this.inputForm.receivablesType = '2'
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.billingPeople)) {
|
|
|
+ this.inputForm.billingPeople = JSON.parse(localStorage.getItem('user')).name
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.billingPeopleId)) {
|
|
|
+ this.inputForm.billingPeopleId = JSON.parse(localStorage.getItem('user')).id
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.billingPeopleReal)) {
|
|
|
+ this.inputForm.billingPeopleReal = JSON.parse(localStorage.getItem('user')).id
|
|
|
+ }
|
|
|
+
|
|
|
if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList) || this.inputForm.workAttachmentDtoList.length === 0) {
|
|
|
this.inputForm.workAttachmentDtoList = []
|
|
|
}
|
|
@@ -1073,7 +1103,8 @@
|
|
|
financeInvoiceDetailDTOList: [],
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
financeInvoiceInvalidDTO: {},
|
|
|
- isMultiple: ''
|
|
|
+ isMultiple: '',
|
|
|
+ billingId: ''
|
|
|
}
|
|
|
this.bankList = []
|
|
|
this.visible = false
|
|
@@ -1175,6 +1206,7 @@
|
|
|
changeRadio () {
|
|
|
this.inputForm.address = ''
|
|
|
this.inputForm.telPhone = ''
|
|
|
+ this.inputForm.billingId = ''
|
|
|
this.inputForm.billingWorkplaceReal = ''
|
|
|
this.inputForm.billingWorkplaceRealId = ''
|
|
|
this.inputForm.taxpayerIdentificationNo = ''
|
|
@@ -1193,7 +1225,9 @@
|
|
|
this.inputForm.billingWorkplaceRealId = row.id // 实际开票单位id ‘客户id’
|
|
|
this.inputForm.taxpayerIdentificationNo = this.commonJS.isEmpty(row.uscCode) ? '' : row.uscCode // 纳税人识别号 ‘统一社会信用代码’
|
|
|
this.inputForm.address = this.commonJS.isEmpty(row.address) ? '' : row.address // 地址
|
|
|
- this.inputForm.telPhone = this.commonJS.isEmpty(row.mobile) ? '' : row.mobile // 电话
|
|
|
+ // this.inputForm.telPhone = this.commonJS.isEmpty(row.mobile) ? '' : row.mobile // 电话
|
|
|
+ this.inputForm.billingId = '' // 实际开票单位的开票信息id
|
|
|
+ this.inputForm.telPhone = '' // 电话
|
|
|
row.cwWorkClientBillingDTOList.forEach(item => {
|
|
|
item.ourBank = item.accountHolder
|
|
|
this.bankList.push(item)
|
|
@@ -1424,6 +1458,24 @@
|
|
|
})
|
|
|
}
|
|
|
this.$message.success('导入完成')
|
|
|
+ },
|
|
|
+ // 打开开票信息选择组件 选择电话号
|
|
|
+ openBillingChoose () {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
|
|
|
+ this.$message.error('获取不到“实际开票单位”,请重新填写')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.billingChoose.init(this.inputForm.billingWorkplaceRealId)
|
|
|
+ },
|
|
|
+ // 开票信息选择组件 选择后回调
|
|
|
+ getBilling (row) {
|
|
|
+ if (this.commonJS.isNotEmpty(row.phone)) {
|
|
|
+ this.inputForm.telPhone = row.phone
|
|
|
+ this.inputForm.billingId = row.id
|
|
|
+ } else {
|
|
|
+ this.inputForm.telPhone = ''
|
|
|
+ this.inputForm.billingId = ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|