|
|
@@ -262,6 +262,42 @@
|
|
|
<el-table-column align="center" label="备注" prop="remark" />
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="招标记录" name="bid">
|
|
|
+ <vab-query-form>
|
|
|
+ <vab-query-form-left-panel :span="12">
|
|
|
+ <el-input
|
|
|
+ v-model="bidSearchText"
|
|
|
+ placeholder="招标产品名称/招标信息标题/中标单位"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ style="width: 50%"
|
|
|
+ @blur="handleClick({ name: 'bid' })"
|
|
|
+ @keyup.enter.native="handleClick({ name: 'bid' })" />
|
|
|
+ </vab-query-form-left-panel>
|
|
|
+ <vab-query-form-right-panel :span="12">
|
|
|
+ <el-button icon="el-icon-plus" @click="addBid">新建招标记录</el-button>
|
|
|
+ </vab-query-form-right-panel>
|
|
|
+ </vab-query-form>
|
|
|
+ <el-table border :data="bidlist" height="calc(100% - 42px)">
|
|
|
+ <el-table-column align="center" label="客户名称" prop="cuctName" />
|
|
|
+ <el-table-column align="center" label="招标产品名称" prop="productName" />
|
|
|
+ <el-table-column align="center" label="发布招标日期" prop="publishedTime" />
|
|
|
+ <el-table-column align="center" label="项目预算" prop="budget" />
|
|
|
+ <el-table-column align="center" label="招标信息标题" prop="title" />
|
|
|
+ <el-table-column align="center" label="信息分类" prop="infoType">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ bidInfoTypeOptions[row.infoType] }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="中标单位" prop="bidder" />
|
|
|
+ <el-table-column align="center" label="备注" prop="remark" />
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="bidEdit(scope.row)">编辑</el-button>
|
|
|
+ <el-button type="text" @click="bidDel(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<div class="info-side">
|
|
|
@@ -316,7 +352,8 @@
|
|
|
<!-- 添加项目 -->
|
|
|
<Businessedit ref="businessedit" :cust-info="custInfo" @fetch-data="getBusiness" />
|
|
|
<!-- 领取客户 -->
|
|
|
- <Pick ref="pick" @refresh="fetchData" />
|
|
|
+ <Pick ref="pick" />
|
|
|
+ <Bid ref="bid" @bidSave="bidSave" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -328,6 +365,7 @@
|
|
|
import to from 'await-to-js'
|
|
|
import businessApi from '@/api/proj/business'
|
|
|
import contractApi from '@/api/contract'
|
|
|
+ import bidApi from '@/api/customer/bid'
|
|
|
import Contact from './components/Contact'
|
|
|
import Edit from './components/Edit'
|
|
|
import Allocate from './components/Allocate'
|
|
|
@@ -336,6 +374,7 @@
|
|
|
import FollowDetail from './components/FollowDetail'
|
|
|
import Businessedit from '../proj/business/components/BusinessEdit'
|
|
|
import Pick from './components/Pick'
|
|
|
+ import Bid from './components/Bid'
|
|
|
|
|
|
export default {
|
|
|
name: 'CustomerDetail',
|
|
|
@@ -345,6 +384,7 @@
|
|
|
Allocate,
|
|
|
Shift,
|
|
|
Pick,
|
|
|
+ Bid,
|
|
|
ToOpen,
|
|
|
FollowDetail,
|
|
|
Businessedit,
|
|
|
@@ -373,14 +413,17 @@
|
|
|
},
|
|
|
activeName: 'follow',
|
|
|
cuctName: '',
|
|
|
+ bidSearchText: '',
|
|
|
contactList: [],
|
|
|
selectRows: [],
|
|
|
records: [], //操作记录
|
|
|
followList: [], //跟进记录
|
|
|
belongs: [],
|
|
|
+ bidlist: [],
|
|
|
items: [], //项目
|
|
|
contracts: [], //合同
|
|
|
appro: [],
|
|
|
+ bidInfoTypeOptions: {},
|
|
|
custInfo: {},
|
|
|
}
|
|
|
},
|
|
|
@@ -414,6 +457,12 @@
|
|
|
if (abstract.data.list) this.abstract = abstract.data.list
|
|
|
this.appro = appro.data.values || []
|
|
|
})
|
|
|
+ this.getDicts('bid_info_type').then((response) => {
|
|
|
+ this.bidInfoTypeOptions = {}
|
|
|
+ response.data.values.filter((i) => {
|
|
|
+ this.bidInfoTypeOptions[i.key] = i.value
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
getStatus(val) {
|
|
|
const obj = this.appro.find((item) => item.key == val)
|
|
|
@@ -460,6 +509,9 @@
|
|
|
} else if (tab.name == 'contract') {
|
|
|
;[err, res] = await to(contractApi.getList({ custId: parseInt(this.id) }))
|
|
|
this.contracts = res.data.list || []
|
|
|
+ } else if (tab.name == 'bid') {
|
|
|
+ ;[err, res] = await to(api.bidList({ custId: parseInt(this.id), searchText: this.bidSearchText }))
|
|
|
+ this.bidlist = res.data.list || []
|
|
|
}
|
|
|
},
|
|
|
// 添加联系人
|
|
|
@@ -468,16 +520,47 @@
|
|
|
this.$refs.contact.contactForm.custName = this.detail.custName
|
|
|
this.$refs.contact.contactVisible = true
|
|
|
},
|
|
|
+ addBid() {
|
|
|
+ this.$refs.bid.form.custId = this.detail.id
|
|
|
+ this.$refs.bid.init()
|
|
|
+ },
|
|
|
+ bidEdit(row) {
|
|
|
+ this.$refs.bid.init(row.id)
|
|
|
+ },
|
|
|
+ // 删除联系人
|
|
|
+ bidDel(row) {
|
|
|
+ this.$confirm('确认删除?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const [err, res] = await to(bidApi.delete({ id: [row.id] }))
|
|
|
+ if (err) return
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!',
|
|
|
+ })
|
|
|
+ this.handleClick({ name: 'bid' })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
// 保存联系人
|
|
|
contactSave() {
|
|
|
this.handleClick({ name: 'contact' })
|
|
|
this.getDynamics()
|
|
|
},
|
|
|
+ bidSave() {
|
|
|
+ this.handleClick({ name: 'bid' })
|
|
|
+ },
|
|
|
// 编辑客户
|
|
|
handleEdit() {
|
|
|
this.$refs.edit.title = '编辑客户'
|
|
|
this.$refs.edit.editForm = { ...this.detail }
|
|
|
this.$refs.edit.editVisible = true
|
|
|
+ this.$refs.edit.areaEditDisable = true
|
|
|
this.$refs.edit.showLocation()
|
|
|
},
|
|
|
// 编辑联系人
|