|
|
@@ -304,6 +304,36 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="开票抬头" name="invoiceHeader">
|
|
|
+ <vab-query-form>
|
|
|
+ <vab-query-form-left-panel :span="12">
|
|
|
+ <el-input
|
|
|
+ v-model="invoiceHeaderSearchText"
|
|
|
+ placeholder="客户名称/公司名称/纳税人识别号"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ style="width: 50%"
|
|
|
+ @blur="handleClick({ name: 'invoiceHeader' })"
|
|
|
+ @keyup.enter.native="handleClick({ name: 'invoiceHeader' })" />
|
|
|
+ </vab-query-form-left-panel>
|
|
|
+ <vab-query-form-right-panel :span="12">
|
|
|
+ <el-button icon="el-icon-plus" @click="addInvoiceHeader">新建开票抬头</el-button>
|
|
|
+ </vab-query-form-right-panel>
|
|
|
+ </vab-query-form>
|
|
|
+ <el-table border :data="invoiceHeaderList" height="calc(100% - 42px)">
|
|
|
+ <el-table-column align="center" label="客户名称" prop="cuctName" width="120px" />
|
|
|
+ <el-table-column align="center" label="公司名称" prop="companyName" width="120px" />
|
|
|
+ <el-table-column align="center" label="纳税人识别号" prop="taxNo" width="120px" />
|
|
|
+ <el-table-column align="center" label="地址" prop="address" width="120px" />
|
|
|
+ <el-table-column align="center" label="开户行及账号" prop="bankNo" width="120px" />
|
|
|
+ <el-table-column align="center" label="备注" prop="remark" width="120px" />
|
|
|
+ <el-table-column align="center" fixed="right" label="操作" width="90px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="invoiceHeaderEdit(scope.row)">编辑</el-button>
|
|
|
+ <el-button type="text" @click="invoiceHeaderDel(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<div class="info-side">
|
|
|
@@ -360,6 +390,7 @@
|
|
|
<!-- 领取客户 -->
|
|
|
<Pick ref="pick" />
|
|
|
<Bid ref="bid" @bidSave="bidSave" />
|
|
|
+ <InvoiceHeader ref="invoiceHeader" @save="invoiceHeaderSave" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -372,6 +403,7 @@
|
|
|
import businessApi from '@/api/proj/business'
|
|
|
import contractApi from '@/api/contract'
|
|
|
import bidApi from '@/api/customer/bid'
|
|
|
+ import invoiceHeaderApi from '@/api/customer/invoiceHeader'
|
|
|
import Contact from './components/Contact'
|
|
|
import Edit from './components/Edit'
|
|
|
import Allocate from './components/Allocate'
|
|
|
@@ -381,6 +413,7 @@
|
|
|
import Businessedit from '../proj/business/components/BusinessEdit'
|
|
|
import Pick from './components/Pick'
|
|
|
import Bid from './components/Bid'
|
|
|
+ import InvoiceHeader from './components/InvoiceHeader'
|
|
|
|
|
|
export default {
|
|
|
name: 'CustomerDetail',
|
|
|
@@ -391,6 +424,7 @@
|
|
|
Shift,
|
|
|
Pick,
|
|
|
Bid,
|
|
|
+ InvoiceHeader,
|
|
|
ToOpen,
|
|
|
FollowDetail,
|
|
|
Businessedit,
|
|
|
@@ -420,12 +454,14 @@
|
|
|
activeName: 'detail',
|
|
|
cuctName: '',
|
|
|
bidSearchText: '',
|
|
|
+ invoiceHeaderSearchText: '',
|
|
|
contactList: [],
|
|
|
selectRows: [],
|
|
|
records: [], //操作记录
|
|
|
followList: [], //跟进记录
|
|
|
belongs: [],
|
|
|
bidlist: [],
|
|
|
+ invoiceHeaderList: [],
|
|
|
items: [], //项目
|
|
|
contracts: [], //合同
|
|
|
appro: [],
|
|
|
@@ -529,6 +565,11 @@
|
|
|
} else if (tab.name == 'bid') {
|
|
|
;[err, res] = await to(api.bidList({ custId: parseInt(this.id), searchText: this.bidSearchText }))
|
|
|
this.bidlist = res.data.list || []
|
|
|
+ } else if (tab.name == 'invoiceHeader') {
|
|
|
+ ;[err, res] = await to(
|
|
|
+ invoiceHeaderApi.list({ custId: parseInt(this.id), searchText: this.invoiceHeaderSearchText })
|
|
|
+ )
|
|
|
+ this.invoiceHeaderList = res.data.list || []
|
|
|
}
|
|
|
},
|
|
|
// 添加联系人
|
|
|
@@ -541,9 +582,35 @@
|
|
|
this.$refs.bid.form.custId = this.detail.id
|
|
|
this.$refs.bid.init()
|
|
|
},
|
|
|
+ addInvoiceHeader() {
|
|
|
+ this.$refs.invoiceHeader.form.custId = this.detail.id
|
|
|
+ this.$refs.invoiceHeader.init()
|
|
|
+ },
|
|
|
bidEdit(row) {
|
|
|
this.$refs.bid.init(row.id)
|
|
|
},
|
|
|
+ invoiceHeaderEdit(row) {
|
|
|
+ this.$refs.invoiceHeader.init(row.id)
|
|
|
+ },
|
|
|
+ invoiceHeaderDel(row) {
|
|
|
+ this.$confirm('确认删除?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const [err, res] = await to(invoiceHeaderApi.delete({ id: [row.id] }))
|
|
|
+ if (err) return
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!',
|
|
|
+ })
|
|
|
+ this.handleClick({ name: 'invoiceHeader' })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => console.log(err))
|
|
|
+ },
|
|
|
// 删除联系人
|
|
|
bidDel(row) {
|
|
|
this.$confirm('确认删除?', '提示', {
|
|
|
@@ -572,6 +639,9 @@
|
|
|
bidSave() {
|
|
|
this.handleClick({ name: 'bid' })
|
|
|
},
|
|
|
+ invoiceHeaderSave() {
|
|
|
+ this.handleClick({ name: 'invoiceHeader' })
|
|
|
+ },
|
|
|
// 编辑客户
|
|
|
handleEdit() {
|
|
|
this.$refs.edit.title = '编辑客户'
|