
9 changed files with 616 additions and 42 deletions
@ -0,0 +1,252 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="add()">新增 |
|||
</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="6" class="tleftb"> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item> |
|||
<el-radio-group :disabled="print != ''" v-model="print"> |
|||
<el-radio label="1">企业</el-radio> |
|||
<el-radio label="0">个人</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"></el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item> |
|||
<el-select v-model="nameAndPhone" placeholder="请选择" @change="changeOpenTick" filterable clearable class="addinputInfo"> |
|||
<el-option v-for="item in openTick_list" :key="item.sid" :label="item.nameAndPhone" :value="item.name"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>开票名称</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>纳税人识别号</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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-show="print == '1'"> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>地址</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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-show="print == '1'"> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>开户行</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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-show="print == '1'"> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>银行账号</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { save, saveGeren } from '@/api/anruifinmanagement/finwaitinvoiceapply' |
|||
import { selectAllDisList, typeValues, fetchBySid } from '@/api/jichuxinxi/dictcommons' |
|||
|
|||
export default { |
|||
name: 'weihukaipiaoxinxi', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
bank_list: [], |
|||
openTick_list: [], |
|||
print: '', |
|||
nameAndPhone: '', |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
address: '', |
|||
bankAccount: '', |
|||
bankName: '', |
|||
name: '', |
|||
phone: '', |
|||
taxpayerNo: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
orgSidPath: '', |
|||
staffSid: '', |
|||
createBySid: '' |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
init() { |
|||
typeValues({ type: 'bank' }).then((res) => { |
|||
if (res.success) { |
|||
this.bank_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
showEdit(name, useOrgSid) { |
|||
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 !== '') { |
|||
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') |
|||
this.formobj.useOrgSid = useOrgSid |
|||
fetchBySid(useOrgSid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.useOrgName = resp.data.name |
|||
} |
|||
}) |
|||
}, |
|||
changeOpenTick(value) { |
|||
const choose = this.openTick_list.filter((item) => item.name === value) |
|||
this.formobj.name = choose[0].name |
|||
this.formobj.taxpayerNo = choose[0].registNum |
|||
this.formobj.phone = choose[0].invoPhone |
|||
this.formobj.address = choose[0].registDetailAddress |
|||
this.formobj.bankName = choose[0].invoBank |
|||
this.formobj.bankAccount = choose[0].invoBankNum |
|||
this.formobj.sid = choose[0].sid |
|||
this.nameAndPhone = choose[0].name |
|||
}, |
|||
add() { |
|||
this.formobj.sid = '' |
|||
this.formobj.address = '' |
|||
this.formobj.bankAccount = '' |
|||
this.formobj.bankName = '' |
|||
this.formobj.name = '' |
|||
this.formobj.phone = '' |
|||
this.formobj.taxpayerNo = '' |
|||
this.print = '' |
|||
this.nameAndPhone = '' |
|||
}, |
|||
save() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
if (this.print === '1') { |
|||
save(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else if (this.print === '0') { |
|||
saveGeren(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
sid: '', // 一条数据的sid |
|||
address: '', |
|||
bankAccount: '', |
|||
bankName: '', |
|||
name: '', |
|||
phone: '', |
|||
taxpayerNo: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
orgSidPath: '', |
|||
staffSid: '', |
|||
createBySid: '' |
|||
} |
|||
this.submitdisabled = false |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,249 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="add()">新增 |
|||
</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class=""> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="6" class="tleftb"> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item> |
|||
<el-radio-group :disabled="print != ''" v-model="print"> |
|||
<el-radio label="1">企业</el-radio> |
|||
<el-radio label="0">个人</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6"></el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item> |
|||
<el-select v-model="nameAndPhone" placeholder="请选择" @change="changeOpenTick" filterable clearable class="addinputInfo"> |
|||
<el-option v-for="item in openTick_list" :key="item.sid" :label="item.nameAndPhone" :value="item.name"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>开票名称</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>纳税人识别号</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>地址</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item><el-input v-model="formobj.address" clearable placeholder="" class="addinputw"></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>开户行</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
<el-col :span="6" class="tleftb"> |
|||
<span>银行账号</span> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<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> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { save, saveGeren } from '@/api/anruifinmanagement/finwaitinvoiceapply' |
|||
import { selectAllDisList, typeValues, fetchBySid } from '@/api/jichuxinxi/dictcommons' |
|||
|
|||
export default { |
|||
name: 'weihukaipiaoxinxi', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
bank_list: [], |
|||
openTick_list: [], |
|||
print: '', |
|||
nameAndPhone: '', |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
address: '', |
|||
bankAccount: '', |
|||
bankName: '', |
|||
name: '', |
|||
phone: '', |
|||
taxpayerNo: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
orgSidPath: '', |
|||
createBySid: '' |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
init() { |
|||
typeValues({ type: 'bank' }).then((res) => { |
|||
if (res.success) { |
|||
this.bank_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
showEdit(name, useOrgSid) { |
|||
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 !== '') { |
|||
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.useOrgSid = useOrgSid |
|||
fetchBySid(useOrgSid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.useOrgName = resp.data.name |
|||
} |
|||
}) |
|||
}, |
|||
changeOpenTick(value) { |
|||
const choose = this.openTick_list.filter((item) => item.name === value) |
|||
this.formobj.name = choose[0].name |
|||
this.formobj.taxpayerNo = choose[0].registNum |
|||
this.formobj.phone = choose[0].invoPhone |
|||
this.formobj.address = choose[0].registDetailAddress |
|||
this.formobj.bankName = choose[0].invoBank |
|||
this.formobj.bankAccount = choose[0].invoBankNum |
|||
this.formobj.sid = choose[0].sid |
|||
this.nameAndPhone = choose[0].name |
|||
}, |
|||
add() { |
|||
this.formobj.sid = '' |
|||
this.formobj.address = '' |
|||
this.formobj.bankAccount = '' |
|||
this.formobj.bankName = '' |
|||
this.formobj.name = '' |
|||
this.formobj.phone = '' |
|||
this.formobj.taxpayerNo = '' |
|||
this.print = '' |
|||
this.nameAndPhone = '' |
|||
}, |
|||
save() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
if (this.print === '1') { |
|||
save(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else if (this.print === '0') { |
|||
saveGeren(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
sid: '', // 一条数据的sid |
|||
address: '', |
|||
bankAccount: '', |
|||
bankName: '', |
|||
name: '', |
|||
phone: '', |
|||
taxpayerNo: '', |
|||
useOrgName: '', |
|||
useOrgSid: '', |
|||
orgSidPath: '', |
|||
createBySid: '' |
|||
} |
|||
this.submitdisabled = false |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
Loading…
Reference in new issue