Commit 0ec0eec7 authored by zhanglw's avatar zhanglw

产品详情,个人中心

parent 622a9820
...@@ -535,6 +535,34 @@ export const HttpReq = { ...@@ -535,6 +535,34 @@ export const HttpReq = {
method: 'get' method: 'get'
}) })
}, },
// 个人中心-收藏的产品
collectProduct: function(params) {
return request({
url: '/api/bsw/bigScreen/personalCenter/collectProduct?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
// 个人中心-收藏的供应商
collectSupplier: function(params) {
return request({
url: '/api/bsw/bigScreen/personalCenter/collectSupplier?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
// 个人中心-被询价记录
inquiryRecord: function(params) {
return request({
url: '/api/bsw/bigScreen/personalCenter/inquiryRecord?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
// 个人中心-主动询价记录
translateInquiryRecord: function(params) {
return request({
url: '/api/bsw/bigScreen/personalCenter/translateInquiryRecord?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
// 收藏产品-供应商 // 收藏产品-供应商
collectProductOrSupplier: function(data) { collectProductOrSupplier: function(data) {
return request({ return request({
...@@ -545,6 +573,30 @@ export const HttpReq = { ...@@ -545,6 +573,30 @@ export const HttpReq = {
return res return res
}) })
}, },
// 供应商详细信息
supplierDetails: function(params) {
return request({
url: '/api/bsw/bigScreen/index/supplierDetails?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
// 产品详细信息
productDetails: function(params) {
return request({
url: '/api/bsw/bigScreen/index/productDetails?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
// 咨询
consultationInformation: function(data) {
return request({
url: '/api/bsw/bigScreen/index/consultationInformation',
method: 'post',
data: data
}).then((res) => {
return res
})
},
id: null id: null
} }
} }
......
...@@ -77,9 +77,9 @@ ...@@ -77,9 +77,9 @@
<el-input v-model="formData.contactPersonEmail" disabled class="cell-input" /> <el-input v-model="formData.contactPersonEmail" disabled class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="联系地址:" class="form-cell" prop="contactPersonDetailAddress"> <el-form-item label="联系地址:" class="form-cell" prop="contactPersonAddress">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.contactPersonDetailAddress" disabled class="cell-input" /> <el-input v-model="formData.contactPersonAddress" disabled class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="处理状态:" class="form-cell" prop="consult_status"> <el-form-item label="处理状态:" class="form-cell" prop="consult_status">
......
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
return { return {
uploadHeaders: { 'Authorization': getToken() }, uploadHeaders: { 'Authorization': getToken() },
imgSrcStart: process.env.VUE_APP_BASE_API, imgSrcStart: process.env.VUE_APP_BASE_API,
editor: false, // 富文本对象 editor: null, // 富文本对象
dialogImageUrl: '', dialogImageUrl: '',
dialogImageVisible: false, dialogImageVisible: false,
imgList: [], imgList: [],
...@@ -286,7 +286,7 @@ export default { ...@@ -286,7 +286,7 @@ export default {
customerId: null, // 供应商id customerId: null, // 供应商id
enterpriseName: '', // 供应商名称 enterpriseName: '', // 供应商名称
productName: '', // 产品名称 productName: '', // 产品名称
productType: '1', // 产品大类 productType: '', // 产品大类
productSubType: null, // 产品小类 productSubType: null, // 产品小类
minPrice: null, // 价格区间-小 minPrice: null, // 价格区间-小
maxPrice: null, // 价格区间-大 maxPrice: null, // 价格区间-大
......
...@@ -16,18 +16,20 @@ ...@@ -16,18 +16,20 @@
</div> </div>
</template> </template>
<script> <script>
import { HttpReq } from '@/api/common'
export default { export default {
data() { data() {
return { return {
isMousedown: false, isMousedown: false,
title: '佛山英沃传感科技有限公司', title: '咨询供应商',
location: '上海', location: '',
subTitle: '我要咨询', subTitle: '我要咨询',
customerId: '',
formData: { formData: {
name: '', name: '',
phone: '', phone: '',
content: '', content: ''
id: null
} }
} }
}, },
...@@ -83,8 +85,68 @@ export default { ...@@ -83,8 +85,68 @@ export default {
}) })
}, },
methods: { methods: {
setOption(opt) {
this.customerId = opt.customerId
this.title = opt.title
this.location = opt.location || '中国大陆'
},
submitForm() { submitForm() {
console.log('提交') if (!this.formData.name) {
return this.$notify({
message: '请填写联系人',
type: 'warning',
duration: 5000
})
}
if (!this.formData.phone) {
return this.$notify({
message: '请填写联系电话',
type: 'warning',
duration: 5000
})
}
if (!this.formData.content) {
return this.$notify({
message: '请填写需求简述',
type: 'warning',
duration: 5000
})
}
HttpReq.webClientApi.consultationInformation({
contactPerson: this.formData.name,
contactPersonPhone: this.formData.phone,
consultationContent: this.formData.content,
consultType: '9',
customerId: this.customerId
}).then((res) => {
if (res.code === 200) {
this.clearFormData()
this.openTip()
}
this.$notify({
title: res.msg,
type: res.code === 200 ? 'success' : 'error',
duration: 2500
})
})
},
openTip() {
this.$alert('我们收到了您的留言讯息,稍后将与您联系。', '完成', {
confirmButtonText: '确定',
type: 'success',
showClose: false,
center: true,
callback: action => {
this.cancelView()
}
})
},
clearFormData() {
this.formData = {
name: '',
phone: '',
content: ''
}
}, },
callback() { callback() {
this.$router.go(-1) this.$router.go(-1)
...@@ -159,12 +221,12 @@ export default { ...@@ -159,12 +221,12 @@ export default {
img { img {
position: absolute; position: absolute;
top: 9px; top: 9px;
left: 236px; left: 220px;
} }
div { div {
position: absolute; position: absolute;
top: 12px; top: 12px;
left: 260px; left: 240px;
} }
} }
} }
......
...@@ -42,9 +42,11 @@ export default { ...@@ -42,9 +42,11 @@ export default {
formData: { formData: {
name: '', name: '',
phone: '', phone: '',
content: '', content: ''
id: null
}, },
customerId: null,
productId: null,
consultType: null,
rules: { rules: {
name: { required: true, message: '请填写姓名', trigger: 'blur' }, name: { required: true, message: '请填写姓名', trigger: 'blur' },
phone: { required: true, message: '请填写联系电话', trigger: 'blur' }, phone: { required: true, message: '请填写联系电话', trigger: 'blur' },
...@@ -68,35 +70,52 @@ export default { ...@@ -68,35 +70,52 @@ export default {
cancelView() { cancelView() {
this.hideView() this.hideView()
}, },
openTip() {
this.$alert('我们收到了您的留言讯息,稍后将与您联系。', '完成', {
confirmButtonText: '确定',
type: 'success',
showClose: false,
center: true,
callback: action => {
this.cancelView()
}
})
},
submitForm() { submitForm() {
this.$refs.formViewRef.validate((valid, obj) => { this.$refs.formViewRef.validate((valid, obj) => {
if (valid) { if (valid) {
this.hideView() HttpReq.webClientApi.consultationInformation({
// HttpReq.backstageApi.updateCustomerDetail(this.formData).then((res) => { contactPerson: this.formData.name,
// this.$notify({ contactPersonPhone: this.formData.phone,
// title: res.msg, consultationContent: this.formData.content,
// type: 'success', consultType: this.consultType,
// duration: 2500 customerId: this.customerId,
// }) productId: this.productId
// if (res.code === 200) { }).then((res) => {
// this.cancelView() if (res.code === 200) {
// this.$parent.loadData() this.openTip()
// } this.cancelView()
// }) }
// } else { this.$notify({
// this.$message({ title: res.msg,
// message: '表单信息有误,请核对无误后提交!', type: res.code === 200 ? 'success' : 'error',
// type: 'error' duration: 2500
// }) })
})
} }
}) })
}, },
initView(id, type) { initView(productId, customerId, type, cType) {
if (this.typeDict[type]) { if (this.typeDict[type]) {
this.title = this.typeDict[type] this.title = this.typeDict[type]
} else { } else {
this.title = '咨 询' this.title = '咨 询'
} }
if (cType) {
this.consultType = cType
}
this.productId = productId
this.customerId = customerId
this.showView() this.showView()
} }
} }
......
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="咨询日期" align="center" width="180" /> <el-table-column prop="createTime" label="咨询日期" align="center" width="180" />
<el-table-column prop="handleTime" label="处理日期" align="center" width="180" /> <el-table-column prop="handleTime" label="处理日期" align="center" width="180" />
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button type="text" @click="toView(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<el-pagination :total="total" :current-page="page" :page-size="pageSize" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChange" @current-change="pageChange" /> <el-pagination :total="total" :current-page="page" :page-size="pageSize" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChange" @current-change="pageChange" />
...@@ -40,6 +45,7 @@ ...@@ -40,6 +45,7 @@
<home-footer ref="homeFooter" /> <home-footer ref="homeFooter" />
<inquiry-view ref="inquiryView" /> <inquiry-view ref="inquiryView" />
<el-backtop /> <el-backtop />
<view-page ref="viewPage" />
</div> </div>
</template> </template>
<script> <script>
...@@ -52,9 +58,10 @@ import homeFooter from '../components/homeFooter' ...@@ -52,9 +58,10 @@ import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView' import inquiryView from '../components/inquiryView'
import userMenus from '../components/userMenus' import userMenus from '../components/userMenus'
import { HttpReq } from '@/api/common' import { HttpReq } from '@/api/common'
import viewPage from './replyView'
export default { export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, userMenus }, components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, userMenus, viewPage },
dicts: ['consult_status'], dicts: ['consult_status'],
data() { data() {
return { return {
...@@ -82,12 +89,6 @@ export default { ...@@ -82,12 +89,6 @@ export default {
indexMethod(index) { indexMethod(index) {
return 1 + index + this.page * this.pageSize - this.pageSize return 1 + index + this.page * this.pageSize - this.pageSize
}, },
tabChange(tabIndex) {
if (this.tabIndex === tabIndex) {
return
}
this.tabIndex = tabIndex
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
}, },
...@@ -96,7 +97,7 @@ export default { ...@@ -96,7 +97,7 @@ export default {
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => { Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
}) })
HttpReq.backstageApi.queryInformation({ HttpReq.webClientApi.translateInquiryRecord({
page: this.page - 1, page: this.page - 1,
pageSize: this.pageSize, pageSize: this.pageSize,
...this.query ...this.query
...@@ -123,14 +124,8 @@ export default { ...@@ -123,14 +124,8 @@ export default {
this.loadData() this.loadData()
}) })
}, },
toAdd() {
this.$refs.addPage.loadData()
},
toEdit(item) {
this.$refs.editPage.loadData(item.productId)
},
toView(item) { toView(item) {
this.$refs.viewPage.loadData(item.productId) this.$refs.viewPage.loadData(item.informationId)
}, },
toSearch() { toSearch() {
this.page = 1 this.page = 1
......
...@@ -90,96 +90,14 @@ export default { ...@@ -90,96 +90,14 @@ export default {
query: { query: {
type: 'time' type: 'time'
}, },
tableData: [ tableData: [],
{
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: true,
isStore: true,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: true,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}
],
throttle: null, // 节流器 throttle: null, // 节流器
throttleTime: 300 throttleTime: 300
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.loadData()
}) })
}, },
methods: { methods: {
...@@ -190,7 +108,7 @@ export default { ...@@ -190,7 +108,7 @@ export default {
} }
}, },
loadData() { loadData() {
HttpReq.webClientApi.productManagement({ HttpReq.webClientApi.collectProduct({
page: this.page - 1, page: this.page - 1,
pageSize: this.pageSize, pageSize: this.pageSize,
...this.query ...this.query
...@@ -201,8 +119,7 @@ export default { ...@@ -201,8 +119,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 点击收藏 // 点击收藏
storeShowcase(item, type) { storeShowcase(item, type) {
......
...@@ -54,10 +54,16 @@ ...@@ -54,10 +54,16 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div v-for="(p,i) in item.products" :key="'p_'+index+'_'+i" class="product_card"> <div v-if="item.products[0]" class="product_card">
<el-image :src="p.imgSrc?imgSrcStart+'/img'+p.imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" /> <el-image :src="item.products[0].imgSrc?imgSrcStart+'/productPic/'+item.products[0].imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" />
<div class="product_title touch ellipsis" :title="p.name" @click="goToDetails(p, '/product/details')">{{ p.name }}</div> <div class="product_title touch ellipsis" :title="item.products[0].name" @click="goToDetails(item.products[0], '/product/details')">{{ item.products[0].name }}</div>
</div> </div>
<div v-else style="width:240px;height:278px;" />
<div v-if="item.products[1]" class="product_card">
<el-image :src="item.products[1].imgSrc?imgSrcStart+'/productPic/'+item.products[1].imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" />
<div class="product_title touch ellipsis" :title="item.products[1].name" @click="goToDetails(item.products[1], '/product/details')">{{ item.products[1].name }}</div>
</div>
<div v-else style="width:240px;height:278px;" />
</div> </div>
</div> </div>
<!--分页组件--> <!--分页组件-->
...@@ -91,61 +97,14 @@ export default { ...@@ -91,61 +97,14 @@ export default {
page: 1, page: 1,
pageSize: 8, pageSize: 8,
total: 0, total: 0,
query: { tableData: [],
keyword: '',
area: undefined,
type: undefined,
sort: false
},
tableData: [
{
isGood: true,
isStore: true,
name: '佛山英沃传感器科技有限公司',
area: '江苏省淮安市',
createTime: '2023 01-01 ',
classSum: '18',
price: '15 -300元',
mainProduct: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪',
products: [
{ name: '3GDN M30百流三线防 爆电感式接近传感爆电感式接近传感爆电感式接近传感爆电感式接近传感', imgSrc: '' },
{ name: '3GDN M30百流三线防 爆电感式接近传感', imgSrc: '' }
]
}, {
isGood: false,
isStore: false,
name: '佛山英沃传感器科技有限公司',
area: '江苏省淮安市',
createTime: '2023 01-01 ',
classSum: '18',
price: '15 -300元',
mainProduct: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪',
products: [
{ name: '3GDN M30百流三线防 爆电感式接近传感爆电感式接近传感爆电感式接近传感爆电感式接近传感', imgSrc: '' },
{ name: '3GDN M30百流三线防 爆电感式接近传感', imgSrc: '' }
]
}, {
isGood: true,
isStore: false,
name: '佛山英沃传感器科技有限公司',
area: '江苏省淮安市',
createTime: '2023 01-01 ',
classSum: '18',
price: '15 -300元',
mainProduct: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪',
products: [
{ name: '3GDN M30百流三线防 爆电感式接近传感爆电感式接近传感爆电感式接近传感爆电感式接近传感', imgSrc: '' },
{ name: '3GDN M30百流三线防 爆电感式接近传感', imgSrc: '' }
]
}
],
throttle: null, // 节流器 throttle: null, // 节流器
throttleTime: 300 throttleTime: 300
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.loadData()
}) })
}, },
methods: { methods: {
...@@ -157,10 +116,19 @@ export default { ...@@ -157,10 +116,19 @@ export default {
this.query.sort = false this.query.sort = false
} }
}, },
loadData() {
HttpReq.webClientApi.collectSupplier({
page: this.page - 1,
pageSize: this.pageSize,
productNumber: 2
}).then((res) => {
this.tableData = res.data.data
this.total = res.data.total
})
},
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(null, item.customerId, type, '9')
this.$refs.inquiryView.initView(item.id, type)
}, },
// 点击收藏 // 点击收藏
storeShowcase(item, type) { storeShowcase(item, type) {
......
...@@ -77,7 +77,9 @@ export default { ...@@ -77,7 +77,9 @@ export default {
page: 1, page: 1,
pageSize: 20, pageSize: 20,
total: 0, total: 0,
query: {}, query: {
handle: false
},
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
tabIndex: '1', tabIndex: '1',
...@@ -99,16 +101,14 @@ export default { ...@@ -99,16 +101,14 @@ export default {
return return
} }
this.tabIndex = tabIndex this.tabIndex = tabIndex
this.query.handle = this.tabIndex === '2'
this.loadData()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
}, },
loadData() { loadData() {
// 清除参数无值的情况 HttpReq.webClientApi.inquiryRecord({
Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
})
HttpReq.backstageApi.queryInformation({
page: this.page - 1, page: this.page - 1,
pageSize: this.pageSize, pageSize: this.pageSize,
...this.query ...this.query
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
}) })
}, },
toView(item) { toView(item) {
this.$refs.viewPage.loadData(item.productId) this.$refs.viewPage.loadData(item.informationId)
}, },
toSearch() { toSearch() {
this.page = 1 this.page = 1
......
...@@ -77,9 +77,9 @@ ...@@ -77,9 +77,9 @@
<el-input v-model="formData.contactPersonEmail" disabled class="cell-input" /> <el-input v-model="formData.contactPersonEmail" disabled class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="联系地址:" class="form-cell" prop="contactPersonDetailAddress"> <el-form-item label="联系地址:" class="form-cell" prop="contactPersonAddress">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.contactPersonDetailAddress" disabled class="cell-input" /> <el-input v-model="formData.contactPersonAddress" disabled class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="处理状态:" class="form-cell" prop="consult_status"> <el-form-item label="处理状态:" class="form-cell" prop="consult_status">
......
...@@ -89,8 +89,7 @@ export default { ...@@ -89,8 +89,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 跳转到详情 // 跳转到详情
goToDetails(item, type) { goToDetails(item, type) {
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<div class="grid-label">联系地址</div> <div class="grid-label">联系地址</div>
</el-col> </el-col>
<el-col :span="14" class="grid-content"> <el-col :span="14" class="grid-content">
<el-input v-model="formData.contactPersonDetailAddress" placeholder="请留下联系地址" /> <el-input v-model="formData.contactPersonAddress" placeholder="请留下联系地址" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
contactPerson: '', // 联系人 contactPerson: '', // 联系人
contactPersonPhone: '', // 电话 contactPersonPhone: '', // 电话
contactPersonEmail: '', // 邮箱 contactPersonEmail: '', // 邮箱
contactPersonDetailAddress: '', // 地址 contactPersonAddress: '', // 地址
rank: '1' // 产品品级 rank: '1' // 产品品级
}, },
rules: { rules: {
...@@ -163,20 +163,18 @@ export default { ...@@ -163,20 +163,18 @@ export default {
submitForm() { submitForm() {
this.$refs.formViewRef.validate(valid => { this.$refs.formViewRef.validate(valid => {
if (valid) { if (valid) {
HttpReq.backstageApi.addProduct(this.formData).then((res) => { HttpReq.webClientApi.consultationInformation({
...this.formData
}).then((res) => {
if (res.code === 200) {
this.openTip()
this.cancelView()
}
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
type: 'success', type: res.code === 200 ? 'success' : 'error',
duration: 2500 duration: 2500
}) })
if (res.code === 200) {
alert(666)
}
})
} else {
this.$message({
message: '表单信息有误,请核对无误后提交!',
type: 'error'
}) })
} }
}) })
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<div class="grid-label">联系地址</div> <div class="grid-label">联系地址</div>
</el-col> </el-col>
<el-col :span="14" class="grid-content"> <el-col :span="14" class="grid-content">
<el-input v-model="formData.contactPersonDetailAddress" placeholder="请留下联系地址" /> <el-input v-model="formData.contactPersonAddress" placeholder="请留下联系地址" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
contactPerson: '', // 联系人 contactPerson: '', // 联系人
contactPersonPhone: '', // 电话 contactPersonPhone: '', // 电话
contactPersonEmail: '', // 邮箱 contactPersonEmail: '', // 邮箱
contactPersonDetailAddress: '', // 地址 contactPersonAddress: '', // 地址
rank: '1' // 产品品级 rank: '1' // 产品品级
}, },
rules: { rules: {
...@@ -159,15 +159,18 @@ export default { ...@@ -159,15 +159,18 @@ export default {
submitForm() { submitForm() {
this.$refs.formViewRef.validate(valid => { this.$refs.formViewRef.validate(valid => {
if (valid) { if (valid) {
HttpReq.backstageApi.addProduct(this.formData).then((res) => { HttpReq.webClientApi.consultationInformation({
...this.formData
}).then((res) => {
if (res.code === 200) {
this.openTip()
this.cancelView()
}
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
type: 'success', type: res.code === 200 ? 'success' : 'error',
duration: 2500 duration: 2500
}) })
if (res.code === 200) {
alert(666)
}
}) })
} else { } else {
this.$message({ this.$message({
......
...@@ -272,8 +272,7 @@ export default { ...@@ -272,8 +272,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 点击收藏 // 点击收藏
storeShowcase(item, type) { storeShowcase(item, type) {
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<el-carousel-item v-for="(item, index) in projectObj.productPicList" :key="'pic_'+index"> <el-carousel-item v-for="(item, index) in projectObj.productPicList" :key="'pic_'+index">
<el-image <el-image
fit="contain" fit="contain"
:src="item?imgSrcStart+'/img'+item:defaultImgProduct" :src="item?imgSrcStart+'/productPic/'+item:defaultImgProduct"
:preview-src-list="[item?imgSrcStart+'/img'+item:defaultImgProduct]" :preview-src-list="[item?imgSrcStart+'/productPic/'+item:defaultImgProduct]"
style="width: 100%;height: 100%;padding: 5px" style="width: 100%;height: 100%;padding: 5px"
/> />
</el-carousel-item> </el-carousel-item>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<el-image <el-image
class="image touch" class="image touch"
:class="carouseIndex===index?'active':''" :class="carouseIndex===index?'active':''"
:src="item?imgSrcStart+'/img'+item:defaultImgProduct" :src="item?imgSrcStart+'/productPic/'+item:defaultImgProduct"
@click="changeImage(index)" @click="changeImage(index)"
/> />
</div> </div>
...@@ -145,6 +145,7 @@ import userLogin from '../components/userLoginV2' ...@@ -145,6 +145,7 @@ import userLogin from '../components/userLoginV2'
import languageSetting from '../components/languageSettingV2' import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter' import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView' import inquiryView from '../components/inquiryView'
import { HttpReq } from '@/api/common'
export default { export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView }, components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView },
...@@ -192,7 +193,17 @@ export default { ...@@ -192,7 +193,17 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
HttpReq.webClientApi.productDetails({
productId: this.$route.params.id
}).then((res) => {
this.projectObj = res.data
if (this.projectObj.productPic) {
this.projectObj.productPicList = this.projectObj.productPic.split(';')
}
if (this.projectObj.productFeature) {
this.projectObj.productFeatureList = this.projectObj.productFeature.split(';')
}
})
}) })
}, },
methods: { methods: {
...@@ -205,8 +216,7 @@ export default { ...@@ -205,8 +216,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.productId, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 跳转到详情 // 跳转到详情
goToDetails(item, path) { goToDetails(item, path) {
......
...@@ -214,8 +214,7 @@ export default { ...@@ -214,8 +214,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 点击收藏 // 点击收藏
storeShowcase(item, type) { storeShowcase(item, type) {
......
...@@ -276,8 +276,7 @@ export default { ...@@ -276,8 +276,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 点击收藏 // 点击收藏
storeShowcase(item, type) { storeShowcase(item, type) {
......
...@@ -134,8 +134,7 @@ export default { ...@@ -134,8 +134,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 跳转到详情 // 跳转到详情
goToDetails(item, type) { goToDetails(item, type) {
......
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
</el-form-item> </el-form-item>
<el-form-item label="产品价格区间(元):" class="form-cell" style="margin: 0"> <el-form-item label="产品价格区间(元):" class="form-cell" style="margin: 0">
<div class="cell-box" style="display: flex"> <div class="cell-box" style="display: flex">
<el-form-item prop="minPrice"> <el-form-item prop="productMinPrice">
<el-input v-model.number="formData.minPrice" placeholder="价格区间下限" class="cell-input" style="width: 300px" /> <el-input v-model.number="formData.productMinPrice" placeholder="价格区间下限" class="cell-input" style="width: 300px" />
</el-form-item> </el-form-item>
<div style="width: 20px;text-align: center">~</div> <div style="width: 20px;text-align: center">~</div>
<el-form-item prop="maxPrice"> <el-form-item prop="productMaxPrice">
<el-input v-model.number="formData.maxPrice" placeholder="价格区间上限" class="cell-input" style="width: 300px" /> <el-input v-model.number="formData.productMaxPrice" placeholder="价格区间上限" class="cell-input" style="width: 300px" />
</el-form-item> </el-form-item>
</div> </div>
</el-form-item> </el-form-item>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<div class="grid-label">联系地址</div> <div class="grid-label">联系地址</div>
</el-col> </el-col>
<el-col :span="14" class="grid-content"> <el-col :span="14" class="grid-content">
<el-input v-model="formData.contactPersonDetailAddress" placeholder="请留下联系地址" /> <el-input v-model="formData.contactPersonAddress" placeholder="请留下联系地址" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -129,10 +129,10 @@ export default { ...@@ -129,10 +129,10 @@ export default {
return callback(new Error('请输入数字值')) return callback(new Error('请输入数字值'))
} }
setTimeout(() => { setTimeout(() => {
if (this.formData.minPrice && value < this.formData.minPrice) { if (this.formData.productMinPrice && value < this.formData.productMinPrice) {
return callback(new Error('区间值错误')) return callback(new Error('区间值错误'))
} }
if (this.formData.maxPrice && value > this.formData.maxPrice) { if (this.formData.productMaxPrice && value > this.formData.productMaxPrice) {
return callback(new Error('区间值错误')) return callback(new Error('区间值错误'))
} }
return callback() return callback()
...@@ -153,30 +153,31 @@ export default { ...@@ -153,30 +153,31 @@ export default {
inputValue: '', inputValue: '',
productFeature: [], // 产品特点tag列表 productFeature: [], // 产品特点tag列表
formData: { formData: {
consultType: '11', // 留言类型
productId: null, productId: null,
customerId: null, // 供应商id customerId: null, // 供应商id
enterpriseName: '', // 供应商名称 enterpriseName: '', // 供应商名称
productName: '', // 产品名称 productName: '', // 产品名称
productType: '', // 产品大类 productType: '', // 产品大类
productSubType: null, // 产品小类 productSubType: null, // 产品小类
minPrice: null, // 价格区间-小 productMinPrice: null, // 价格区间-小
maxPrice: null, // 价格区间-大 productMaxPrice: null, // 价格区间-大
productFeature: null, // 产品特点 productFeature: null, // 产品特点
consultationContent: '', // 需求说明 consultationContent: '', // 需求说明
contactPerson: '', // 联系人 contactPerson: '', // 联系人
contactPersonPhone: '', // 电话 contactPersonPhone: '', // 电话
contactPersonEmail: '', // 邮箱 contactPersonEmail: '', // 邮箱
contactPersonDetailAddress: '', // 地址 contactPersonAddress: '', // 地址
rank: '1' // 产品品级 rank: '1' // 产品品级
}, },
rules: { rules: {
productType: { required: true, message: '请选择产品分类', trigger: 'blur' }, productType: { required: true, message: '请选择产品分类', trigger: 'blur' },
contactPerson: { required: true, message: '请留下姓名', trigger: 'blur' }, contactPerson: { required: true, message: '请留下姓名', trigger: 'blur' },
contactPersonPhone: { required: true, message: '请留下联系电话', trigger: 'blur' }, contactPersonPhone: { required: true, message: '请留下联系电话', trigger: 'blur' },
minPrice: [ productMinPrice: [
{ validator: checkPrice, trigger: 'blur' } { validator: checkPrice, trigger: 'blur' }
], ],
maxPrice: [ productMaxPrice: [
{ validator: checkPrice, trigger: 'blur' } { validator: checkPrice, trigger: 'blur' }
] ]
} }
...@@ -204,18 +205,32 @@ export default { ...@@ -204,18 +205,32 @@ export default {
cancelView() { cancelView() {
this.$router.push({ path: `/publish` }) this.$router.push({ path: `/publish` })
}, },
openTip() {
this.$alert('我们收到了您的留言讯息,稍后将与您联系。', '完成', {
confirmButtonText: '确定',
type: 'success',
showClose: false,
center: true,
callback: action => {
this.cancelView()
}
})
},
submitForm() { submitForm() {
this.$refs.formViewRef.validate(valid => { this.$refs.formViewRef.validate(valid => {
if (valid) { if (valid) {
HttpReq.backstageApi.addProduct(this.formData).then((res) => { HttpReq.webClientApi.consultationInformation({
...this.formData
}).then((res) => {
if (res.code === 200) {
this.openTip()
this.cancelView()
}
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
type: 'success', type: res.code === 200 ? 'success' : 'error',
duration: 2500 duration: 2500
}) })
if (res.code === 200) {
alert(666)
}
}) })
} else { } else {
this.$message({ this.$message({
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<div class="grid-label">联系地址</div> <div class="grid-label">联系地址</div>
</el-col> </el-col>
<el-col :span="14" class="grid-content"> <el-col :span="14" class="grid-content">
<el-input v-model="formData.contactPersonDetailAddress" placeholder="请留下联系地址" /> <el-input v-model="formData.contactPersonAddress" placeholder="请留下联系地址" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -125,8 +125,7 @@ export default { ...@@ -125,8 +125,7 @@ export default {
contactPerson: '', // 联系人 contactPerson: '', // 联系人
contactPersonPhone: '', // 电话 contactPersonPhone: '', // 电话
contactPersonEmail: '', // 邮箱 contactPersonEmail: '', // 邮箱
contactPersonDetailAddress: '', // 地址 contactPersonAddress: '' // 地址
rank: '1' // 产品品级
}, },
rules: { rules: {
consultType: { required: true, message: '请选择留言类型', trigger: 'blur' }, consultType: { required: true, message: '请选择留言类型', trigger: 'blur' },
...@@ -145,29 +144,36 @@ export default { ...@@ -145,29 +144,36 @@ export default {
methods: { methods: {
onDictReady(dict) { onDictReady(dict) {
},
openTip() {
this.$alert('我们收到了您的留言讯息,稍后将与您联系。', '完成', {
confirmButtonText: '确定',
type: 'success',
showClose: false,
center: true,
callback: action => {
this.cancelView()
}
})
}, },
cancelView() { cancelView() {
this.$router.push({ path: `/home` }) this.$router.push({ path: `/home` })
}, },
submitForm() { submitForm() {
this.$refs.formViewRef.validate(valid => { this.$refs.formViewRef.validate(valid => {
if (valid) { HttpReq.webClientApi.consultationInformation({
HttpReq.backstageApi.addProduct(this.formData).then((res) => { ...this.formData
}).then((res) => {
if (res.code === 200) {
this.openTip()
this.cancelView()
}
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
type: 'success', type: res.code === 200 ? 'success' : 'error',
duration: 2500 duration: 2500
}) })
if (res.code === 200) {
alert(666)
}
}) })
} else {
this.$message({
message: '表单信息有误,请核对无误后提交!',
type: 'error'
})
}
}) })
}, },
loadData() { loadData() {
......
...@@ -410,14 +410,14 @@ export default { ...@@ -410,14 +410,14 @@ export default {
this.$refs.formViewRef.validate(valid => { this.$refs.formViewRef.validate(valid => {
if (valid) { if (valid) {
HttpReq.backstageApi.addProduct(this.formData).then((res) => { HttpReq.backstageApi.addProduct(this.formData).then((res) => {
if (res.code === 200) {
this.cancelView()
}
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
type: 'success', type: res.code === 200 ? 'success' : 'error',
duration: 2500 duration: 2500
}) })
if (res.code === 200) {
alert(666)
}
}) })
} else { } else {
this.$message({ this.$message({
......
...@@ -88,8 +88,7 @@ export default { ...@@ -88,8 +88,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(item.id, item.customerId, type)
this.$refs.inquiryView.initView(item.id, type)
}, },
// 跳转到详情 // 跳转到详情
goToDetails(item, type) { goToDetails(item, type) {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<p>&#12288;&#12288;{{ supplierObj.enterpriseIntroduction }}</p> <p>&#12288;&#12288;{{ supplierObj.enterpriseIntroduction }}</p>
</div> </div>
<div class="line-btn" style="padding: 42px 0;"> <div class="line-btn" style="padding: 42px 0;">
<div class="btn-o" style="padding: 15px" @click="inquiry(supplierObj, 'supplier')">马上沟通</div> <div class="btn-o" style="padding: 15px" @click="inquiry({id:null, customerId:supplierObj.customerId}, 'supplier')">马上沟通</div>
</div> </div>
</div> </div>
<div v-show="tabIndex==='2'"> <div v-show="tabIndex==='2'">
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<el-col :span="5" class="grid-content"><div class="grid-label">法定代表人</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">法定代表人</div></el-col>
<el-col :span="7" class="grid-content">&#12288;{{ supplierObj.legalRepresentative||'-' }}</el-col> <el-col :span="7" class="grid-content">&#12288;{{ supplierObj.legalRepresentative||'-' }}</el-col>
<el-col :span="5" class="grid-content"><div class="grid-label">经营状态</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">经营状态</div></el-col>
<el-col :span="7" class="grid-content">&#12288;{{ supplierObj.businessStatus||'-' }}</el-col> <el-col :span="7" class="grid-content">&#12288;{{ dict.label.business_status[supplierObj.businessStatus]||'-' }}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="5" class="grid-content"><div class="grid-label">成立日期</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">成立日期</div></el-col>
...@@ -122,13 +122,13 @@ ...@@ -122,13 +122,13 @@
<el-col :span="5" class="grid-content"><div class="grid-label">审核/年检日期</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">审核/年检日期</div></el-col>
<el-col :span="7" class="grid-content">&#12288;{{ supplierObj.annualInspectionDate||'-' }}</el-col> <el-col :span="7" class="grid-content">&#12288;{{ supplierObj.annualInspectionDate||'-' }}</el-col>
<el-col :span="5" class="grid-content"><div class="grid-label">企业类型</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">企业类型</div></el-col>
<el-col :span="7" class="grid-content">&#12288;{{ supplierObj.enterpriseType||'-' }}</el-col> <el-col :span="7" class="grid-content">&#12288;{{ dict.label.company_type[supplierObj.enterpriseType]||'-' }}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="5" class="grid-content"><div class="grid-label">注册资本</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">注册资本</div></el-col>
<el-col :span="7" class="grid-content">&#12288;{{ supplierObj.registeredCapital||'-' }}</el-col> <el-col :span="7" class="grid-content">&#12288;{{ supplierObj.registeredCapital||'-' }}</el-col>
<el-col :span="5" class="grid-content"><div class="grid-label">所属行业</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">所属行业</div></el-col>
<el-col :span="7" class="grid-content">&#12288;{{ supplierObj.industry||'-' }}</el-col> <el-col :span="7" class="grid-content">&#12288;{{ dict.label.industry_type[supplierObj.industry]||'-' }}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="5" class="grid-content"><div class="grid-label">注册地址</div></el-col> <el-col :span="5" class="grid-content"><div class="grid-label">注册地址</div></el-col>
...@@ -272,7 +272,7 @@ import { HttpReq } from '@/api/common' ...@@ -272,7 +272,7 @@ import { HttpReq } from '@/api/common'
export default { export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, floatInquiryView }, components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, floatInquiryView },
dicts: [], dicts: ['industry_type', 'company_type', 'business_status', 'area_province'],
data() { data() {
return { return {
defaultImgProduct: default_product, defaultImgProduct: default_product,
...@@ -290,53 +290,10 @@ export default { ...@@ -290,53 +290,10 @@ export default {
mapDom: null, mapDom: null,
tabIndex: '1', tabIndex: '1',
productList: [], productList: [],
supplierObj: { supplierObj: {},
annualInspectionDate: '', // 审核日期
businessLicense: '', // 营业执照的照片名称
businessScope: '温度传感器 热电偶传感器 流量计 报做仪 pt100热电阳 压力变送器 气体检测仪 氟化氢检测仪', // 经营范围
businessScopeIntroduction: '光学分析仪器、温度测量仪表、温度计、红外测温仪、环境监测专用仪器仪表、自动气象监测仪器、\n' +
'扬尘噪声监测系统,气体报警仪、土壤情监测系统、太阳能农林防控设备、实验设备、物联网传感器\n' +
'电子产品的技术研发、生产及组装,教学仪器、办公自动化设备、计算机软硬件、通讯设备、电子\n' +
'设备及配件、五金产品、金属制品、机械设备、玻璃制品的销售:计算机领域内技术开发、技术咨询、\n' +
'技术转让、技术服务:电气工程技术的开发、转让:技术推广服务、环境空气质量检测服务、食品检测\n' +
'服务:经营进出口业务。 (依法须经批准的项目,经相关部门批准后方可开展经营活动)', // 业务范围介绍
businessStatus: '', // 经营状态
enterpriseAddress: '青岛路150-3号', // 企业地址
enterpriseContactPerson: '王先生', // 企业联系人
enterpriseContactPersonPhone: '', // 企业联系人手机号
enterpriseEmail: '', // 企业邮箱
enterpriseIntroduction: '威海品合数字矿山技术有限公司(以下简称晶合) ,成立于2012年,位于美丽的海滨城市山东威海。经过多年的专业深耕与创新发展晶合被评为高新技术企业双软企业、入库于帆企业,现已成为国内优秀的智悬矿山及应急管理等领域的解决方案提供商。\n' +
' 晶合重视技术开发与创新,研发人员占公司总人数35%以上,中高级工程师占比15%以上。公司多次承担、参与国家及省部级科技项目,建立了都发工厂山) 安全监测工程技术研究中心。先后荣获中国岩石力学与工程学会科学技术奖一等奖、山东省科学技术奖、山东省地质勘查资源开发科学技术奖、中国煤M工业学会科学技术奖等多个科技笑项,多项产品获很具有国际领先水平的科技成果鉴定。作为专法致力于知矿山、地灾监测及应急管理领域的行业,最合拥有完整的研发、生产、销售、售后体系,建立了S0901、ISO45001、S014001等管理体系,严格把控产品质量,与中国织业、中国有、中矿集团、山东黄金集团、魏桥集团等建立了长期的业务合作关系。在国际市场方面,产品远销澳大利亚、俄罗斯南非、印尼等十多个国家地区,已形成稳定的国际销售网络,晶合的“矿山之是”品牌受到了国内外客户的广泛认可。\n' +
' 面向未来,晶合格继练重承“以技术为核心,以质量为保证”的理念,空记“为矿山安全保驾护航” 的使命,有该明务,精益求,追或卓越,打造品所先讲的科技创新型企业。', // 企业介绍
enterpriseName: '佛山英沃传感器科技有限公司', // 企业名称
enterpriseType: '', // 企业类型
establishmentDate: '2023 01-01', // 成立日期
industry: '', // 所属行业
legalRepresentative: '', // 法定代表人
mainProductsIntroduction: '多功能网络电力仪表, 电流互感器, 电气火灾监控装置', // 主营产品介绍
operatingPeriod: '', // 经营期限
registeredAddressArea: '', // 注册地址-区
registeredAddressCity: '', // 注册地址-市
registeredAddressProvince: '', // 注册地址-省
registeredAddressStreet: '江苏省淮安市', // 注册地址-街道
registeredCapital: '', // 注册资本
registrationAuthority: '', // 登记机关
supplierLevel: '1', // 供应商级别
taxpayerIdentificationNumber: '', // 纳税人识别号
unifiedSocialCreditCode: '', // 统一社会信用代码
isGood: true
},
throttle: null, // 节流器 throttle: null, // 节流器
throttleTime: 300, throttleTime: 300,
urls: [ urls: []
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg'
]
} }
}, },
mounted() { mounted() {
...@@ -346,7 +303,19 @@ export default { ...@@ -346,7 +303,19 @@ export default {
}) })
}, },
methods: { methods: {
onDictReady(dict) {}, onDictReady(dict) {
HttpReq.webClientApi.supplierDetails({
customerId: this.$route.params.id
}).then((res) => {
this.supplierObj = res.data
this.urls = this.supplierObj.businessLicense.split(';').map(item => { return this.imgSrcStart + '/businessLicense/' + item })
this.$refs.floatInquiryView.setOption({
customerId: this.supplierObj.customerId,
title: this.supplierObj.enterpriseName,
location: this.dict.label.area_province[this.supplierObj.registeredAddressProvince]
})
})
},
search() { search() {
HttpReq.webClientApi.productGetHardwareList({ HttpReq.webClientApi.productGetHardwareList({
page: this.page - 1, page: this.page - 1,
...@@ -396,8 +365,7 @@ export default { ...@@ -396,8 +365,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(null, item.customerId, type, '9')
this.$refs.inquiryView.initView(item.id, type)
}, },
// 点击收藏 // 点击收藏
storeShowcase(item, type) { storeShowcase(item, type) {
......
...@@ -113,10 +113,21 @@ ...@@ -113,10 +113,21 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div v-for="(p,i) in item.products" :key="'p_'+index+'_'+i" class="product_card"> <div v-if="item.products[0]" class="product_card">
<el-image :src="p.imgSrc?imgSrcStart+'/productPic/'+p.imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" /> <el-image :src="item.products[0].imgSrc?imgSrcStart+'/productPic/'+item.products[0].imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" />
<div class="product_title touch ellipsis" :title="p.name" @click="goToDetails(p, '/product/details')">{{ p.name }}</div> <div class="product_title touch ellipsis" :title="item.products[0].name" @click="goToDetails(item.products[0], '/product/details')">{{ item.products[0].name }}</div>
</div> </div>
<div v-else style="width:240px;height:278px;" />
<div v-if="item.products[1]" class="product_card">
<el-image :src="item.products[1].imgSrc?imgSrcStart+'/productPic/'+item.products[1].imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" />
<div class="product_title touch ellipsis" :title="item.products[1].name" @click="goToDetails(item.products[1], '/product/details')">{{ item.products[1].name }}</div>
</div>
<div v-else style="width:240px;height:278px;" />
<div v-if="item.products[2]" class="product_card">
<el-image :src="item.products[2].imgSrc?imgSrcStart+'/productPic/'+item.products[2].imgSrc:defaultImgProduct" style="width:240px;height: 220px;border-radius: 10px;" />
<div class="product_title touch ellipsis" :title="item.products[2].name" @click="goToDetails(item.products[2], '/product/details')">{{ item.products[2].name }}</div>
</div>
<div v-else style="width:240px;height:278px;" />
</div> </div>
<div class="pagination"> <div class="pagination">
<!-- <span style="font-size: 14px; color: #666; margin-right: 8px">{{ total }} 条记录</span>--> <!-- <span style="font-size: 14px; color: #666; margin-right: 8px">{{ total }} 条记录</span>-->
...@@ -215,8 +226,7 @@ export default { ...@@ -215,8 +226,7 @@ export default {
}, },
// 点击询价 // 点击询价
inquiry(item, type) { inquiry(item, type) {
console.log(item, type) this.$refs.inquiryView.initView(null, item.customerId, type, '9')
this.$refs.inquiryView.initView(item.id, type)
}, },
// 跳转到详情 // 跳转到详情
goToDetails(item, path) { goToDetails(item, path) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment