|
|
@ -7,7 +7,7 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<!--start 添加修改按钮--> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="add()">新增 |
|
|
|
<el-button type="primary" size="small" v-show="btnVisible" :disabled="submitdisabled" @click="add()">新增 |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|
|
|
</el-button> |
|
|
@ -42,12 +42,24 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="print == '1'"> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>开票类型</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="formobj.openTickTypeKey" style="width: 30%" filterable placeholder="" @change="changeOpenTickType"> |
|
|
|
<el-option v-for="item in openTickType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>开票名称</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="name"><el-input v-model="formobj.name" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
<el-form-item><el-input v-model="formobj.name" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
@ -55,41 +67,41 @@ |
|
|
|
<span><span class="icon">*</span>纳税人识别号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="taxpayerNo"><el-input v-model="formobj.taxpayerNo" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
<el-form-item><el-input v-model="formobj.taxpayerNo" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>电话</span> |
|
|
|
<span><span v-show="formobj.openTickTypeKey == '02' || print == '0'" class="icon">*</span>电话</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="phone"><el-input v-model="formobj.phone" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
<el-form-item><el-input v-model="formobj.phone" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="print == '1'"> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>地址</span> |
|
|
|
<span><span v-show="formobj.openTickTypeKey == '02'" class="icon">*</span>地址</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="address"><el-input v-model="formobj.address" clearable placeholder="" class="addinputw"></el-input></el-form-item> |
|
|
|
<el-form-item><el-input v-model="formobj.address" clearable placeholder="" class="addinputw"></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="print == '1'"> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>开户行</span> |
|
|
|
<span><span v-show="formobj.openTickTypeKey == '02'" class="icon">*</span>开户行</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="bankName"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.bankName" clearable placeholder="" style="width: 30%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-if="print == '1'"> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>银行账号</span> |
|
|
|
<span><span v-show="formobj.openTickTypeKey == '02'" class="icon">*</span>银行账号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="bankAccount"><el-input v-model="formobj.bankAccount" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
<el-form-item><el-input v-model="formobj.bankAccount" clearable placeholder="" style="width: 30%"></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
@ -100,17 +112,18 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { saveQiYe, saveGeren } from '@/api/chukuguanli/chukubanli' |
|
|
|
import { selectAllDisList, typeValues, fetchBySid } from '@/api/dictcommons/dictcommons' |
|
|
|
import { save, saveGeren } from '@/api/anruifinmanagement/finwaitinvoiceapply' |
|
|
|
import { typeValues, fetchBySid } from '@/api/jichuxinxi/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'WeiHuKaiPiaoXinXi', |
|
|
|
name: 'weihukaipiaoxinxi', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
viewTitle: '', |
|
|
|
index: 0, |
|
|
|
tableKey: 0, |
|
|
|
bank_list: [], |
|
|
|
openTickType_list: [], |
|
|
|
openTick_list: [], |
|
|
|
print: '', |
|
|
|
nameAndPhone: '', |
|
|
@ -127,16 +140,12 @@ export default { |
|
|
|
useOrgSid: '', |
|
|
|
orgSidPath: '', |
|
|
|
staffSid: '', |
|
|
|
createBySid: '' |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
name: [{ required: true, message: '开票名称不能为空', trigger: 'blur' }], |
|
|
|
taxpayerNo: [{ required: true, message: '纳税人识别号不能为空', trigger: 'blur' }], |
|
|
|
phone: [{ required: true, message: '电话不能为空', trigger: 'blur' }], |
|
|
|
address: [{ required: true, message: '地址不能为空', trigger: 'blur' }], |
|
|
|
bankName: [{ required: true, message: '开户行不能为空', trigger: 'blur' }], |
|
|
|
bankAccount: [{ required: true, message: '银行账号不能为空', trigger: 'blur' }] |
|
|
|
createBySid: '', |
|
|
|
openTickTypeKey: '', |
|
|
|
openTickTypeValue: '' |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
btnVisible: false, |
|
|
|
submitdisabled: false |
|
|
|
} |
|
|
|
}, |
|
|
@ -147,26 +156,30 @@ export default { |
|
|
|
this.bank_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
typeValues({ type: 'invoiceType' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.openTickType_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showEdit(name, useOrgSid) { |
|
|
|
showEdit(name, useOrgSid, list, source) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
this.init() |
|
|
|
}) |
|
|
|
this.viewTitle = '维护开票信息' |
|
|
|
selectAllDisList({ orgSid: useOrgSid, staffSid: window.sessionStorage.getItem('staffSid') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.openTick_list = resp.data |
|
|
|
if (name !== null && name !== '' && name !== undefined) { |
|
|
|
this.changeOpenTick(name) |
|
|
|
if (this.formobj.bankAccount !== '') { |
|
|
|
this.print = '1' |
|
|
|
} else { |
|
|
|
this.print = '0' |
|
|
|
} |
|
|
|
} |
|
|
|
this.openTick_list = list |
|
|
|
if (source === '开票申请') { |
|
|
|
this.btnVisible = true |
|
|
|
} |
|
|
|
if (name !== null && name !== '' && name !== undefined) { |
|
|
|
this.changeOpenTick(name) |
|
|
|
if (this.formobj.bankAccount !== '') { |
|
|
|
this.print = '1' |
|
|
|
} else { |
|
|
|
this.print = '0' |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
this.formobj.orgSidPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
this.formobj.createBySid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.staffSid = window.sessionStorage.getItem('staffSid') |
|
|
@ -187,12 +200,22 @@ export default { |
|
|
|
this.formobj.bankAccount = choose[0].invoBankNum |
|
|
|
this.formobj.sid = choose[0].sid |
|
|
|
this.nameAndPhone = choose[0].name |
|
|
|
this.formobj.openTickTypeKey = choose[0].openTickTypeKey |
|
|
|
this.formobj.openTickTypeValue = choose[0].openTickTypeValue |
|
|
|
if (this.formobj.bankAccount !== '') { |
|
|
|
this.print = '1' |
|
|
|
} else { |
|
|
|
this.print = '0' |
|
|
|
} |
|
|
|
}, |
|
|
|
changeOpenTickType(value) { |
|
|
|
const choose = this.openTickType_list.filter((item) => item.dictKey === value) |
|
|
|
if (choose != null && choose.length > 0) { |
|
|
|
this.formobj.openTickTypeValue = choose[0].dictValue |
|
|
|
} else { |
|
|
|
this.formobj.openTickTypeValue = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
add() { |
|
|
|
this.formobj.sid = '' |
|
|
|
this.formobj.address = '' |
|
|
@ -203,6 +226,8 @@ export default { |
|
|
|
this.formobj.taxpayerNo = '' |
|
|
|
this.print = '' |
|
|
|
this.nameAndPhone = '' |
|
|
|
this.formobj.openTickTypeKey = '' |
|
|
|
this.formobj.openTickTypeValue = '' |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
@ -211,9 +236,39 @@ export default { |
|
|
|
this.$message({ showClose: true, message: '请选择企业或个人', type: 'error' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.submitdisabled = true |
|
|
|
if (this.print === '1') { |
|
|
|
saveQiYe(this.formobj).then((resp) => { |
|
|
|
if (this.formobj.openTickTypeKey === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '开票类型不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.name === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '开票名称不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.taxpayerNo === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '纳税人识别号不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.openTickTypeKey === '02') { |
|
|
|
if (this.formobj.address === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '地址不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.phone === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '电话不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.bankName === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '开户行不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.bankAccount === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '银行账号不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.submitdisabled = true |
|
|
|
save(this.formobj).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
|
this.handleReturn('true') |
|
|
@ -224,6 +279,11 @@ export default { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} else if (this.print === '0') { |
|
|
|
if (this.formobj.phone === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '电话不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.submitdisabled = true |
|
|
|
saveGeren(this.formobj).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
@ -256,9 +316,15 @@ export default { |
|
|
|
useOrgSid: '', |
|
|
|
orgSidPath: '', |
|
|
|
staffSid: '', |
|
|
|
createBySid: '' |
|
|
|
createBySid: '', |
|
|
|
openTickTypeKey: '', |
|
|
|
openTickTypeValue: '' |
|
|
|
} |
|
|
|
this.print = '' |
|
|
|
this.nameAndPhone = '' |
|
|
|
this.submitdisabled = false |
|
|
|
this.btnVisible = false |
|
|
|
this.openTick_list = [] |
|
|
|
this.$refs['form_obj'].resetFields() |
|
|
|
this.$emit('doback') |
|
|
|
} |
|
|
@ -268,3 +334,4 @@ export default { |
|
|
|
<style scoped> |
|
|
|
</style> |
|
|
|
|
|
|
|
· |
|
|
|