1、新增黄页

2、新增学堂
3、其他调整、修改
This commit is contained in:
2023-12-04 01:32:33 +08:00
parent 78f89f2673
commit 16ebffc27e
50 changed files with 2724 additions and 1325 deletions
+6 -1
View File
@@ -7,7 +7,7 @@
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
@@ -107,6 +107,11 @@ export default {
})
this.list = rows
},
toMySchool(){
vk.navigateTo({
url: '/pages/user/school'
})
}
},
onLoad() {
this.getCateList()
+34 -12
View File
@@ -5,7 +5,7 @@
<view class="w-1200">
<el-row :gutter="20">
<el-col :span="6">
<el-menu @select="menuSelect" default-active="0" class="el-menu-vertical-demo">
<el-menu @select="menuSelect" :default-active="menuIndex" class="el-menu-vertical-demo">
<el-menu-item index="0">
<i class="el-icon-edit"></i>
<span slot="title">待创建</span>
@@ -91,7 +91,7 @@
{{item._add_time_str}}到期,到期将无法签署合同
</view> -->
<view class="">
<el-button
<el-button @click.native="changeContract(item.contract)"
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
size="mini" type="primary">修改合同内容
</el-button>
@@ -129,6 +129,7 @@ export default {
data() {
return {
pageIndex: 1,
menuIndex: '0',
formData: {
status: 0,
tradeMethod: null
@@ -138,12 +139,18 @@ export default {
form1: {
// 表单请求数据,此处可以设置默认值
data: {
contractId: ''
contractId: '',
signEndDate: '',
title: '',
contractFile: '',
buyerSignKeyword: '',
sellerSignKeyword: '',
otherFile: '',
},
// 表单属性
props: {
// 表单请求地址
action: "client/contract/kh/launch",
action: 'client/contract/kh/launch',
// 表单字段显示规则
columns: [{
key: "title",
@@ -232,11 +239,12 @@ export default {
},
methods: {
menuSelect(e) {
this.menuIndex = String(e)
this.formData.status = Number(e)
this.query(1)
},
async query(pageIndex) {
const tableData = await vk.callFunction({
this.tableData = await vk.callFunction({
url: 'client/contract/kh/getList',
title: '请求中...',
data: {
@@ -246,24 +254,38 @@ export default {
},
});
// tableData.rows.forEach(item => {
// })
this.tableData = tableData
},
/**
* @param {Object} item
* 创建合同
* @param contract
*/
createContract(contract) {
this.form1.data.contractId = contract._id
this.form1.props.action = 'client/contract/kh/launch'
this.form1.props.show = true
},
async changeContract(contract){
this.form1.data.contractId = contract._id
const res = await vk.callFunction({
url: 'client/contract/kh/getDetail',
title: '请求中...',
data: {
contractId: contract._id
},
});
this.form1.data.signEndDate = res.signEndDate
this.form1.data.title = res.docTitle
this.form1.data.contractFile = res.contractBase
this.form1.data.buyerSignKeyword = res.buyerSignKeyword
this.form1.data.sellerSignKeyword = res.sellerSignKeyword
this.form1.data.otherFile = res.otherFile
this.form1.props.show = true
},
onFormSuccess() {
this.form1.props.show = false
this.form1.data.contractId = null
this.formData.status = 1
this.menuIndex = '1'
this.query(1)
},
/**
+1 -1
View File
@@ -176,7 +176,7 @@
</el-select>
</el-col>
<el-col :span="8">
<el-input v-model="form1.data.addressRegion"
<el-input v-model="form1.data.addressDetail"
placeholder="详细地址或几公里范围内"></el-input>
</el-col>
</el-row>
+7 -7
View File
@@ -26,7 +26,7 @@
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
<view class="text-main ">
<text class="mx-20">{{
(sheet.quoteList && sheet.quoteList.rows && sheet.quoteList.rows.length > 0) ? sheet.quoteList.rows.length : 0
(sheet.quoteList && sheet.quoteList.length > 0) ? sheet.quoteList.length : 0
}}
</text>
<text>家已报价</text>
@@ -57,10 +57,10 @@
</text>
</view>
<el-button type="primary" @click.native="toQuote"
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId">我要申请加工
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId && sheet.status === 0">我要报价
</el-button>
<el-button type="primary" @click.native="showDialog = true"
v-else>查看收到的申请加工
v-else-if="vk.getVuex('$user.userInfo._id') === sheet.userId">查看收到的申请报价
</el-button>
</view>
<view class="item-wrap">
@@ -190,13 +190,13 @@
<text class="flex-1">报价</text>
<text class="flex-1">操作</text>
</view>
<view class="quote" v-for="(item, index) in sheet.quoteList.rows" :key="index">
<view class="quote" v-for="(item, index) in sheet.quoteList" :key="index">
<text class="flex-1">{{ item.subjectName }}</text>
<text class="flex-1">{{ item._add_time_str }}</text>
<text class="flex-1">{{ item.subjectMobile }}</text>
<text class="flex-1">{{ item.totalPrice }}元</text>
<text class="flex-1">
<el-button type="primary">选择</el-button>
<el-button type="primary" v-if="sheet.status === 0">选择</el-button>
</text>
</view>
</view>
@@ -312,7 +312,7 @@ export default {
url: 'client/enquiry/quote/kh/confirmQuote',
title: '请求中...',
data: {
quoteId: item._id
quoteId: item._id,
},
success: (data) => {
vk.navigateTo('/pages/contract/index');
@@ -328,7 +328,7 @@ export default {
return vk.getVuex('$user.userInfo._id') != this.sheet.userId
},
onClick: (item) => {
vk.toast(`${item._id}-按钮1`);
this.showDialog = true
}
},
]
+19 -29
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
@@ -88,7 +88,7 @@
</view>
</el-form-item>
<el-form-item label="供应商:" class="border-bottom pb-30">
<view class="flex justify-start items-center">
<view class="flex justify-start items-center flex-wrap">
<text @click="selectCompany(-1)" class="pointer mr-25"
:class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部
</text>
@@ -115,7 +115,7 @@
<!-- 商品列表 -->
<view class="sheet-list">
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
:customRightBtns="table1.customRightBtns"
:customRightBtns="table1.customRightBtns" :query-form-param="queryParam"
:pagination="true"></vk-data-table>
</view>
@@ -147,11 +147,13 @@ export default {
checkCompanyList: [],
attributes: [],
keyword: '',
queryParam: {},
// 表格相关开始 -----------------------------------------------------------
table1: {
// 表格数据请求地址
action: (obj = {}) => {
let {data, success, fail, complete} = obj;
console.log(data)
vk.callFunction({
url: `client/enquiry/sheet/pub/getList`,
data: data,
@@ -265,7 +267,7 @@ export default {
// 表格相关结束 -----------------------------------------------------------
};
},
onLoad() {
onShow() {
// this.search(1)
vk.callFunction({
url: 'client/spot/category/pub/getTree',
@@ -318,13 +320,13 @@ export default {
const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCertUrl()
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', {
@@ -332,7 +334,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo('/pages/user/user?menu=business-card');
vk.navigateTo({url: '/pages/user/user?menu=business-card'});
})
} else {
vk.navigateTo({
@@ -345,30 +347,18 @@ export default {
search(pageIndex) {
const categoryIds = []
this.checkCategoryList.forEach(item => {
item.forEach(sitem => {
categoryIds.push(sitem._id)
})
// console.log(item)
// item.forEach(sitem => {
// categoryIds.push(sitem._id)
// })
categoryIds.push(item)
})
let provinceCodes = this.checkProvinceList.map(item => item.code)
if (provinceCodes.includes(9999)) {
provinceCodes = []
this.queryParam.formData = {
keyword: this.keyword,
companyList: this.checkCompanyList,
categoryIds
}
vk.callFunction({
url: 'client/enquiry/sheet/pub/getList',
data: {
pageIndex: pageIndex,
pageSize: 20,
keyword: this.keyword,
},
success: (data) => {
console.log('data: ', data);
this.goodsData = data
}
});
this.$refs.table1.search()
},
getAttributes() {
vk.callFunction({
+1 -1
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
+2 -2
View File
@@ -51,7 +51,7 @@ export default {
action: "client/enquiry/quote/kh/addQuote",
// 表单字段显示规则
columns: [
{key: "totalPrice", title: "货款总价", type: "money"},
{key: "totalPrice", title: "货款总价", type: "number"},
{key: "totalPriceStr", title: "人民币大写", type: "text"},
{key: "remark", title: "报价单详情", type: "editor"},
],
@@ -97,7 +97,7 @@ export default {
},
methods: {
onFormSuccess() {
vk.navigateBack()
},
// 提交报价单
async submit() {
+18 -16
View File
@@ -9,7 +9,7 @@
<el-carousel height="365px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/image/336a76fbf9fe44a07b5cfd4caf6f8bb9.jpg"
src="/static/images/336a76fbf9fe44a07b5cfd4caf6f8bb9.jpg"
mode="scaleToFill"></image>
</el-carousel-item>
</el-carousel>
@@ -66,8 +66,9 @@
<view class="" style="height: 40px;"></view>
<div class="mod-inner2Listcenter clearfix sliper">
<ul class="clearfix">
<li v-for="(item, index) in enquirySheetData" class="inli-mask" :key="index">
<a href="javascript:void(0)" style="display: block;" rel="nofollow" target="_blank">
<li v-for="(item, index) in enquirySheetData" class="inli-mask" :key="index"
@click="vk.navigateTo('/pages/enquiry/detail?id=' + item._id);">
<a href="javascript:void(0)" style="display: block;" rel="nofollow">
<div class="detail">
<div class="detail-kind clearfix">
<div class="tag">报价中</div>
@@ -101,18 +102,20 @@
</el-divider>
<view class="" style="height: 40px;"></view>
<view class="goods-list">
<view v-for="(item, index) in spotGoodsData" :key="index" class="goods">
<view v-for="(item, index) in spotGoodsData" :key="index" class="goods"
:style="{marginRight:( index % 4 === 0 && index > 0) ? 0 : '25px'}">
<view class="goods-title">{{ item.name }}</view>
<view class="goods-stock">库存:{{ item.stock }}吨</view>
<view class="goods-address">供货地:{{ item.addressStr }}</view>
<view class="goods-image">
<image :src="item.user.businessCard.logo" mode="aspectFit"></image>
</view>
<!-- <view class="goods-image">-->
<!-- <image :src="item.user.businessCard.logo" mode="aspectFit"></image>-->
<!-- </view>-->
<view v-if="item.user.accountType === 1" class="goods-company">{{ item.user.person.personName }}
</view>
<view v-if="item.user.accountType === 2" class="goods-company">{{ item.user.company.companyName }}
</view>
<el-button class="empty-bg-plain-btn" @click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);"
<el-button class="empty-bg-plain-btn"
@click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);"
type="primary" plain size="small">立即查看
</el-button>
</view>
@@ -274,18 +277,17 @@ export default {
}
.goods-list {
display: flex;
flex-wrap: wrap;
}
.goods {
width: 217px;
width: 200px;
//height: 280px;
background-color: #FFFFFF;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.05);
text-align: center;
margin-right: 20px;
//margin-right: 25px;
margin-bottom: 25px;
padding: 10px 20px;
@@ -295,6 +297,9 @@ export default {
height: 62px;
padding-top: 20px;
font-weight: bold;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
&-stock {
@@ -308,7 +313,7 @@ export default {
}
&-image {
width: 200px;
width: 100%;
height: 70px;
margin: 0 auto;
@@ -338,9 +343,6 @@ export default {
cursor: pointer;
}
.goods-image {
width: 100%;
}
.goods-address {
color: gray;
+10 -9
View File
@@ -20,15 +20,15 @@
</view>
</view>
<view class="flex justify-end items-end"
v-if="info.answerEndTime && dayjs().diff(dayjs(info.answerEndTime), 'second') > 0">
v-if="info.answerEndTime && dayjs().diff(dayjs(info.answerEndTime), 'second') < 0">
<text>距离加工结束还有:</text>
<view class="border-main countdown text-main">{{
dayjs().diff(dayjs(info.answerEndTime), 'day')
dayjs(info.answerEndTime).diff(dayjs(), 'day')
}}
</view>
<text>天</text>
<view class="border-main countdown text-main">
{{ (dayjs().diff(dayjs(info.answerEndTime), 'hour')) % 24 }}
{{ (dayjs(info.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
</view>
<text>时</text>
</view>
@@ -41,10 +41,10 @@
</text>
</view>
<el-button type="primary" @click.native="toQuote"
v-if="vk.getVuex('$user.userInfo._id') !== info.userId">我要申请加工
v-if="vk.getVuex('$user.userInfo._id') !== info.userId && info.status === 0">我要申请加工
</el-button>
<el-button type="primary" @click.native="showDialog = true"
v-else>查看收到的申请加工
v-else-if="vk.getVuex('$user.userInfo._id') === info.userId">查看收到的申请加工
</el-button>
</view>
<view class="item-wrap">
@@ -170,7 +170,7 @@
<text>收到的加工申请</text>
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
</view>
<view class="mt-15">
<view class="mt-15" v-if="info && info.quoteList">
<view class="request-header">
<text class="flex-1">加工商</text>
<text class="flex-1">报价</text>
@@ -185,7 +185,7 @@
<text class="flex-1">{{ item.totalPrice }}元</text>
<text class="flex-1">{{ item._add_time_str }}</text>
<text class="flex-1">
<el-button type="primary" @click.native="createContract(item)">选择</el-button>
<el-button type="primary" @click.native="createContract(item)" v-if="info.status === 0">选择</el-button>
</text>
</view>
</view>
@@ -225,14 +225,15 @@ export default {
toQuote() {
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
},
createContract({totalPrice, uid}) {
createContract({totalPrice, uid, _id}) {
vk.callFunction({
url: 'client/contract/kh/add',
data: {
type: 'process',
productTitle: this.info.title,
transactionId: vk.pubfn.createOrderNo("P", 20),
quoteId: this.id,
sheetId: this.id,
quoteId: _id,
buyer: vk.getVuex('$user.userInfo._id'),
seller: uid,
amount: totalPrice,
+61 -53
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
@@ -70,7 +70,7 @@
</view>
</el-form-item>
<el-form-item label="供应商:" class="border-bottom pb-30">
<view class="flex justify-start items-center">
<view class="flex justify-start items-center flex-wrap">
<text @click="selectCompany(-1)" class="pointer mr-25"
:class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部
</text>
@@ -97,8 +97,12 @@
<!-- 商品列表 -->
<view class="sheet-list">
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
:customRightBtns="table1.customRightBtns"
:pagination="true"></vk-data-table>
:customRightBtns="table1.customRightBtns" :query-form-param="queryParam"
:pagination="true">
<template v-slot:action="{ row, column, index }">
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)">{{ vk.getVuex('$user.userInfo._id') === row.userId ? '查看' : '申请加工' }}</el-button>
</template>
</vk-data-table>
</view>
<common-footer></common-footer>
@@ -126,6 +130,7 @@ export default {
checkCategoryList: [],
showAllCompany: false,
keyword: '',
queryParam: {},
// 表格相关开始 -----------------------------------------------------------
table1: {
// 表格数据请求地址
@@ -150,16 +155,16 @@ export default {
}
})
},
customRightBtns: [{
title: '申请加工',
// icon: 'el-icon-search',
type: 'primary',
plain: true,
onClick: ({_id}) => {
this.toDetail(_id)
// vk.navigateTo('/pages/process/detail?id=' + item._id);
}
},],
// customRightBtns: [{
// title: vk.getVuex('$user.userInfo._id') '申请加工',
// // icon: 'el-icon-search',
// type: 'primary',
// plain: true,
// onClick: ({_id}) => {
// this.toDetail(_id)
// // vk.navigateTo('/pages/process/detail?id=' + item._id);
// }
// },],
// 表格字段显示规则
columns: [
{
@@ -178,23 +183,23 @@ export default {
// return val.map(item=>item.procureNumber + item.procureUnit).join("/")
// }
},
{
key: "productList",
title: "收货地",
type: "text",
formatter: (val, row, column, index) => {
let str = ""
try {
str = val.map(item => {
const addressStr = item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name
return addressStr
}).join("/")
} catch (err) {
str = ""
}
return str
}
},
// {
// key: "productList",
// title: "收货地",
// type: "text",
// formatter: (val, row, column, index) => {
// let str = ""
// try {
// str = val.map(item => {
// const addressStr = item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name
// return addressStr
// }).join("/")
// } catch (err) {
// str = ""
// }
// return str
// }
// },
{
key: "user",
title: "采购企业",
@@ -220,7 +225,9 @@ export default {
title: "发布时间",
type: "time",
},
{
key: "action", title: "操作", type: "html"
},
],
// 多选框选中的值
multipleSelection: [],
@@ -296,13 +303,13 @@ export default {
const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCertUrl()
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', {
@@ -310,7 +317,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo('/pages/user/user?menu=business-card');
vk.navigateTo({url: '/pages/user/user?menu=business-card'});
})
} else {
vk.navigateTo({
@@ -328,7 +335,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCertUrl()
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', {
@@ -352,25 +359,26 @@ export default {
})
})
let provinceCodes = this.checkProvinceList.map(item => item.code)
if (provinceCodes.includes(9999)) {
provinceCodes = []
this.queryParam.formData = {
keyword: this.keyword,
companyList: this.checkCompanyList,
categoryIds
}
this.$refs.table1.search()
vk.callFunction({
url: 'client/process/sheet/pub/getList',
data: {
pageIndex: pageIndex,
pageSize: 20,
keyword: this.keyword,
},
success: (data) => {
console.log('data: ', data);
this.goodsData = data
}
});
// vk.callFunction({
// url: 'client/process/sheet/pub/getList',
// data: {
// pageIndex: pageIndex,
// pageSize: 20,
// keyword: this.keyword,
// },
// success: (data) => {
// console.log('data: ', data);
//
// this.goodsData = data
// }
// });
},
getCertUrl() {
vk.callFunction({
+1 -1
View File
@@ -15,7 +15,7 @@
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
+2 -2
View File
@@ -51,7 +51,7 @@ export default {
action: "client/process/quote/kh/addQuote",
// 表单字段显示规则
columns: [
{key: "totalPrice", title: "货款总价", type: "money"},
{key: "totalPrice", title: "货款总价", type: "number"},
{key: "totalPriceStr", title: "人民币大写", type: "text"},
{key: "remark", title: "报价单详情", type: "editor"},
],
@@ -97,7 +97,7 @@ export default {
},
methods: {
onFormSuccess() {
vk.navigateBack()
},
// 提交报价单
async submit() {
+11 -11
View File
@@ -59,15 +59,11 @@
<el-input v-model="form1.data.num" type="number"/>
</el-form-item>
<el-form-item label="附件内容" required>
<el-upload action="#" :on-change="selectFile" :auto-upload="false" ref="uploader">
<!-- <el-upload action="#" :before-upload="upload">-->
<view class="attachment-upload" v-if="!form1.data.attachment">
<i class="el-icon-plus"/>
</view>
<data-file theme="two-tone" size="24" :fill="['#333' ,'#ffffff']" strokeLinecap="square"
v-else/>
<!-- <el-image v-else :url="form1.data.attachment" fit="cover"/>-->
</el-upload>
<!-- <el-upload action="#" :before-upload="upload">-->
<vk-data-upload v-model="form1.data.files" v-if="!form1.data.attachment" :limit="1" accept="image/*,application/pdf"/>
<data-file theme="two-tone" size="24" :fill="['#333' ,'#ffffff']" strokeLinecap="square"
v-else/>
<!-- <el-image v-else :url="form1.data.attachment" fit="cover"/>-->
</el-form-item>
</view>
@@ -114,13 +110,17 @@
<text>开票时间:</text>
<el-radio-group v-model="form1.data.writeInvoiceTime">
<el-radio v-for="(item, index) in WRITE_INVOICE_TIME" :key="index" :label="index">
{{ item }}</el-radio>
{{ item }}
</el-radio>
</el-radio-group>
</view>
<view class="mb-20 flex justify-start items-center">
<text>发票种类:</text>
<el-radio-group v-model="form1.data.invoiceType">
<el-radio v-for="(item, index) in INVOICE_TYPE" :key="index" :label="index">{{ item }}</el-radio>
<el-radio v-for="(item, index) in INVOICE_TYPE" :key="index" :label="index">{{
item
}}
</el-radio>
</el-radio-group>
<view class="ml-20 flex justify-start items-center">
<text class="label-width">其他要求:</text>
File diff suppressed because it is too large Load Diff
+12 -9
View File
@@ -22,7 +22,8 @@
<view class="goods-options">
<el-row class="">
<el-button @click="toRelease" type="primary" round>发布现货</el-button>
<el-button @click="toMy" type="primary" round plain class="empty-bg-plain-btn">我发布的现货</el-button>
<el-button @click="toMy" type="primary" round plain class="empty-bg-plain-btn">我发布的现货
</el-button>
</el-row>
</view>
</view>
@@ -94,13 +95,14 @@
<!-- 商品列表 -->
<view class="goods-list">
<view v-for="(item, index) in goodsData.rows" :key="index" class="goods">
<view v-for="(item, index) in goodsData.rows" :key="index" class="goods"
:style="{marginRight:( (index + 1) % 5 === 0 && index > 0) ? 0 : '28px'}">
<view class="goods-title">{{ item.name }}</view>
<view class="goods-stock mt-40">现货库存:{{ item.stock }}吨</view>
<view class="goods-address text-gray">供货地:{{ item.addressStr }}</view>
<view class="goods-image">
<image :src="item.user.businessCard.logo" mode="aspectFit"></image>
</view>
<!-- <view class="goods-image">-->
<!-- <image :src="item.user.businessCard.logo" mode="aspectFit"></image>-->
<!-- </view>-->
<view v-if="item.user.accountType == 1" class="goods-company">{{ item.user.person.personName }}</view>
<view v-if="item.user.accountType == 2" class="goods-company">{{ item.user.company.companyName }}</view>
<el-button @click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);" type="primary" plain
@@ -118,7 +120,7 @@
:total="goodsData.total">
</el-pagination>
</view>
<common-footer></common-footer>
</view>
</template>
@@ -142,7 +144,7 @@ export default {
showAllProvince: false
};
},
onLoad() {
onShow() {
this.search(1)
vk.callFunction({
url: 'client/spot/category/pub/getTree',
@@ -179,13 +181,13 @@ export default {
const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCertUrl()
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', {
@@ -315,6 +317,7 @@ export default {
width: 1200px;
margin: 20px auto;
display: flex;
flex-wrap: wrap;
}
+219
View File
@@ -0,0 +1,219 @@
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="carousel">
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
<view class="goods-options">
<el-row class="">
<el-button @click="toRelease" type="primary" round>发布现货</el-button>
</el-row>
</view>
</view>
<!-- 商品列表 -->
<view class="sheet-list">
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns" :customRightBtns="table1.customRightBtns"
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
</view>
<common-footer></common-footer>
</view>
</template>
<script>
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
provinces.unshift({
code: 9999,
name: '全国'
})
export default {
data() {
return {
keyword: '',
// 表格相关开始 -----------------------------------------------------------
queryForm1: {
formData: {
userId: vk.getVuex('$user.userInfo._id')
},
columns: [
{ key:"userId", title:"发布人ID", type:"text", width:160, mode:"=" },
]
},
table1: {
// 表格数据请求地址
action: "client/spot/goods/kh/getSelfOne",
customRightBtns: [
{
title: '详情',
icon: 'el-icon-search',
type: 'primary',
onClick: (item) => {
vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);
}
},
{
title: '删除',
icon: 'el-icon-delete',
type: 'primary',
onClick: (item) => {
this.$confirm('').then(()=> {
}).then(() => {
vk.callFunction({
url: 'client/enquiry/sheet/kh/delete',
title: '请求中...',
data: {
_id: item._id
},
}).then(res => {
this.$refs.table1.refresh()
})
})
}
},
],
// 表格字段显示规则
columns: [
{
key: "name",
title: "标题",
type: "text"
},
{
key: "stock",
title: "现货库存",
type: "text"
},
{
key: "address",
title: "供货地",
type: "text",
formatter: (val, row, column, index) => {
return val.province.name + "-" + val.city.name + "-" + val.area.name
}
},
{
key: "_add_time",
title: "发布时间",
type: "time",
width: 160
},
],
// 多选框选中的值
multipleSelection: [],
// 当前高亮的记录
selectItem: "",
},
// 表格相关结束 -----------------------------------------------------------
};
},
onLoad() {
},
methods: {
toRelease() {
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCertUrl()
})
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
this.$confirm('请完善名片信息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo('/pages/user/user?menu=business-card');
})
} else {
uni.navigateTo({
url: '/pages/spot/release/release'
})
}
},
},
computed: {
checkCategoryArr() {
let arr = []
this.checkCategoryList.forEach(item => {
arr.push(...item)
})
this.checkProvinceList.forEach(item => {
arr.push({
...item
})
})
return arr
}
}
}
</script>
<style lang="scss" scoped>
.carousel {
width: 1200px;
margin: 20px auto;
}
.carousel-img {
width: 100%;
height: 100%;
}
.goods-options {
background-color: #FFFFFF;
padding: 20px;
}
.filter-outer {
width: 1200px;
margin: 20px auto;
background-color: #FFFFFF;
padding: 20px;
}
.tags {
display: flex;
.el-tag {
margin-right: 10px;
}
}
.sheet-list {
width: 1200px;
margin: 20px auto;
// display: flex;
}
.paginatio {
float: none;
width: 1200px;
margin: 20px auto;
display: flex;
justify-content: center;
}
</style>
+3 -1
View File
@@ -160,7 +160,9 @@
});
},
methods: {
onFormSuccess() {}
onFormSuccess() {
vk.navigateBack()
}
}
}
</script>
+12 -1
View File
@@ -56,6 +56,16 @@
title: "职位",
type: "text"
},
{
key: "phone",
title: "联系电话",
type: "text"
},
{
key: "mobile",
title: "联系电话",
type: "text"
},
{
key: "address",
title: "地区",
@@ -165,7 +175,8 @@
// 是否显示表单1 的弹窗
show: false,
beforeAction: (formData) => {
vk.userCenter.updateUser({
vk.callFunction({
url: 'client/user/kh/addAuth',
data: {
businessCard: formData
},
+69 -29
View File
@@ -8,12 +8,25 @@
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 1">个人认证</span>
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 2">企业认证</span>
<div class="ml-20 flex justify-start items-center" v-if="!form1.data.fadadaConfirm">
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square" style="height: 18px"/>
<span v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
<span v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square"
style="height: 18px"/>
<template v-if="form1.data.authStatus === null || form1.data.authStatus === -1">
<span
v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
<span
v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
</template>
<template v-else-if="form1.data.authStatus === 0">
<span>审核中</span>
</template>
<template v-else-if="form1.data.authStatus === 2">
<span>审核不通过:{{ form1.data.refuseReason }}</span>
</template>
</div>
</div>
<el-button type="primary" plain class="empty-bg-plain-btn" size="small">制作我的名片</el-button>
<el-button type="primary" plain class="empty-bg-plain-btn" size="small" @click.native="makeCard">
制作我的名片
</el-button>
</div>
</div>
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
@@ -24,6 +37,7 @@
@success="onFormSuccess1">
<template v-slot:toFadada="{form, keyName}">
<el-button @click="getCertUrl" type="primary" size="small">去认证</el-button>
<el-button @click="getCertRes" type="primary" size="small">获取认证结果</el-button>
</template>
<template v-slot:accountAuth="{form, keyName}">
<div>
@@ -39,7 +53,8 @@
<div class="flex justify-start items-center">
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square" style="height: 24px"/>
<span class="text-40 mr-35">企业授权人信息</span>
<el-button type="primary" size="small" @click.native="addManage" v-if="manageList.length === 0">
<el-button type="primary" size="small" @click.native="addManage"
v-if="manageList.length === 0 && (JSON.stringify(form.manager) === '{}' || !form.manager)">
添加授权人
</el-button>
</div>
@@ -48,7 +63,9 @@
<view v-for="(item, index) in manageList" :key="index">
<manage-list v-model="manageList[index]"/>
</view>
<el-button type="primary" @click.native="allSubmit" v-if="form1.data.authType === 2">{{
<el-button type="primary" @click.native="allSubmit"
v-if="form1.data.authType === 2 && (form1.data.authStatus === null || [-1, 2].includes(form1.data.authStatus))">
{{
vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'
}}
</el-button>
@@ -73,31 +90,33 @@ export default {
data: {
person: {},
company: {},
manager: {},
manager: null,
fadadaConfirm: false,
authType: 1,
authStatus: null,
refuseReason: '',
},
// 表单属性
props: {
// 表单请求地址
action: "user/kh/setCertification",
action: "client/user/kh/addAuth",
// 表单字段显示规则
columns: [
{
key: "authType", title: "认证方式", type: "radio",
data: [
{value: 1, label: "法大大接口认证"},
{value: 2, label: "后台审核认证"},
{value: 2, label: "金九信平台审核"},
],
showRule: ({fadadaConfirm}) => {
return fadadaConfirm
showRule: ({authStatus}) => {
return authStatus === null || [-1, 2].includes(authStatus)
},
},
{
key: "toFadada", title: "认证方式", type: "html",
showLabel: false,
showRule: (formData) => {
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm)
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm) && (formData.authStatus === null || [-1, 2].includes(formData.authStatus))
},
},
{
@@ -167,7 +186,7 @@ export default {
]
},
{
key: "", title: "", type: "group", justify: "start",
key: "address", title: "", type: "group", justify: "start",
columns: [
{key: "addressRegion", title: "公司所在地", type: "address",},
{
@@ -179,6 +198,12 @@ export default {
},
]
},
{
key: "mobile",
title: "联系方式",
type: "text",
placeholder: "请输入您的联系方式",
},
{
key: "mailAddress",
title: "有效通信地址",
@@ -388,19 +413,20 @@ export default {
loading: false,
// 是否显示表单1 的弹窗
show: false,
beforeAction: (formData) => {
// const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
// 'contactWechatImage', 'contactQq', 'mailAddress'
// ])
vk.userCenter.updateUser({
data: {...formData, ...{manager: this.manageList[0]}},
success: (data) => {
// 成功后的逻辑
}
});
return false;
},
// beforeAction: (formData) => {
// // const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
// // 'contactWechatImage', 'contactQq', 'mailAddress'
// // ])
// // vk.userCenter.updateUser({
// // data: {...formData, ...{manager: this.manageList[0]}},
// // success: (data) => {
// // // 成功后的逻辑
// //
// // }
// // });
// // return false;
//
// },
}
},
// 表单相关结束-----------------------------------------------------------
@@ -417,7 +443,8 @@ export default {
success: (data) => {
this.form1.data = _.pick(data.userInfo, [
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress'
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress',
'authStatus', 'authType', 'refuseReason'
])
// if (!this.form1.data.hasOwnProperty('fadadaConfirm') || !this.form1.data.fadadaConfirm) this.form1.data.authType = 1
// this.form1.data.authType = 2
@@ -434,7 +461,7 @@ export default {
});
},
onFormSuccess1() {
console.log(123);
window.location.reload()
},
getCertUrl() {
vk.callFunction({
@@ -448,8 +475,21 @@ export default {
this.manageList.push({})
},
allSubmit() {
// this.form1.data.manager = this.manageList[0]
this.form1.data.authStatus = 0
this.form1.data.refuseReason = null
this.form1.data.manager = this.manageList[0]
this.$refs.form1.submitForm()
},
makeCard() {
this.$emit('makeCard')
},
getCertRes() {
vk.callFunction({
url: 'client/user/kh/getFadadaRes',
success: (res) => {
console.log(res)
}
})
}
}
}
+253
View File
@@ -0,0 +1,253 @@
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="w-1200 flex justify-start items-start my-25 m-a">
<view class="flex-col flex-col justify-center items-center bg-white text-40 left-wrap pointer">
<view class="flex justify-center items-center" :class="[activeIndex === 0 ? 'active' : '' ]"
@click="changeActive(0)">
<i class="el-icon-upload2"/>
<text class="ml-20">我的上传</text>
</view>
<view class="flex justify-center items-center" :class="[activeIndex === 1 ? 'active' : '' ]"
@click="changeActive(1)">
<i class="el-icon-download"/>
<text class="ml-20">我的收藏</text>
</view>
<view class="flex justify-center items-center" :class="[activeIndex === 2 ? 'active' : '' ]"
@click="changeActive(2)">
<i class="el-icon-star-off"/>
<text class="ml-20">我的下载</text>
</view>
</view>
<view class="ml-35 bg-white p-40 flex-1">
<template v-if="mode === 'list'">
<view v-if="activeIndex === 0" class="flex justify-start items-center text-50">
<view class="flex justify-start items-center mr-35">
<text>累计上传</text>
<text class="text-main">{{ list.length }}</text>
<text>篇</text>
</view>
<el-button type="primary" @click="showAction">我要上传</el-button>
</view>
<view v-if="activeIndex === 1" class="flex justify-start items-center text-50">
<view class="flex justify-start items-center mr-35">
<text>共计收藏</text>
<text class="text-main">{{ list.length }}</text>
<text>篇</text>
</view>
</view>
<view v-if="activeIndex === 2" class="flex justify-start items-center text-50">
<view class="flex justify-start items-center mr-35">
<text>累计下载</text>
<text class="text-main">{{ list.length }}</text>
<text>篇</text>
</view>
<el-button type="primary" @click="showAction">我要上传</el-button>
</view>
<view class="flex flex-col justify-start items-start pointer w-100p">
<view v-for="(item, index) in list" :key="index" class="content-item-wrap">
<file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/>
<view class="content">
<text class="title">{{ item.name }}</text>
<view class="desc">
<text class="item">{{ item._add_time_str }}</text>
<text class="item">{{ item.viewNum }}人浏览</text>
<text class="item">{{ item.downloadNum }}次下载</text>
<text class="item">{{ item.amount === 0 ? '免费下载' : `${item.amount}元下载` }}</text>
<!-- <text class="item">{{ item._add_time_str }}</text>-->
</view>
</view>
</view>
</view>
</template>
<template v-else>
<view class="flex justify-start items-center">
<text class="text-50">上传文档</text>
<vk-data-upload v-model="form1.data.file" accept="image/*,application/pdf"></vk-data-upload>
</view>
<vk-data-form v-model="form1.data" :rules="form1.props.rules" :action="form1.props.action"
:form-type="form1.props.formType" :columns='form1.props.columns' label-width="120px"
@success="addSuccess"></vk-data-form>
</template>
</view>
</view>
<common-footer></common-footer>
</view>
</template>
<script>
import {FileWord} from "@icon-park/vue";
export default {
name: "school",
components: {FileWord},
data() {
return {
activeIndex: 0,
mode: 'list',
list: [],
cateList: [],
uploadFile: null,
form1: {
// 表单请求数据,此处可以设置默认值
data: {
amount: 0,
},
// 表单属性
props: {
// 表单请求地址
action: "client/article/list/kh/add",
// 表单字段显示规则
columns: [
{
key: "name",
title: "标题",
type: "text",
placeholder: "请输入标题"
},
{
key: "parentId",
title: "分类",
type: "remote-select",
placeholder: "请选择分类",
showAll: true,
action: "client/article/category/pub/getList",
props: {
list: "rows",
value: "_id",
label: "name",
},
},
{
key: "content",
title: "内容",
type: "editor",
placeholder: "请输入内容"
},
{
key: "amount",
title: "金额",
type: "text",
placeholder: "请输入内容",
},
],
// 表单验证规则
rules: {
name: [
{required: true, message: '名称不能为空', trigger: 'blur'},
],
},
// add 代表添加 update 代表修改
formType: "",
// 是否显示表单的弹窗
show: false
}
},
}
},
methods: {
async getList() {
const {rows} = await vk.callFunction({
url: 'client/article/list/kh/getUserList'
})
this.list = rows
},
async getCollectList() {
const {rows} = await vk.callFunction({
url: 'client/article/collect/kh/getList'
})
this.list = rows
},
changeActive(index) {
this.list = []
this.mode = 'list'
this.activeIndex = index
if (index === 0) this.getList()
else if (index === 1) this.getCollectList()
},
showAction() {
this.mode = 'action'
this.activeIndex = null
},
addSuccess() {
this.mode = 'list'
this.activeIndex = 0
this.getList()
}
// beforeUpload(file) {
// this.uploadFile = file
// // return false
// },
// doUpload() {
// vk.uploadFile({
// title: '上传中',
// filePath: this.uploadFile,
// success(res) {
// console.log(res)
// }
// })
// }
},
onLoad() {
this.getList()
}
}
</script>
<style lang="scss" scoped>
.left-wrap {
width: 240px;
view {
padding: 20px;
}
.active {
background-color: #a92924;
color: white;
}
}
.content-item-wrap {
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin: 30px 0;
.content {
margin-left: 25px;
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-direction: column;
.title{
font-size: 20px;
}
.desc {
font-size: 14px;
color: #bbb;
display: flex;
align-items: flex-start;
justify-content: flex-start;
margin-top: 10px;
.item {
padding: 0 10px;
border-right: 2px solid #bbb;
}
:first-child{
padding-left: 0;
}
:last-child{
border-right: none
}
}
}
}
</style>
+1 -3
View File
@@ -49,11 +49,9 @@
data() {
return {
currMenu: 'fadada',
// currMenu: 'fadada',
};
},
onLoad(options) {
console.log(options);
if(options && options.menu) {
this.currMenu = options.menu
}
@@ -66,7 +64,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.w-1200 {
width: 1200px;
margin: 20px auto;
+287
View File
@@ -0,0 +1,287 @@
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="w-1200 m-a">
<view class="page-nav">
<el-breadcrumb separator=">">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>
<navigator style="display: inline-block;" url="/pages/yellowPage/list">金久信黄页</navigator>
</el-breadcrumb-item>
<el-breadcrumb-item class="text-main">{{ info.company.companyName }}</el-breadcrumb-item>
</el-breadcrumb>
</view>
<view class="mt-40 bg-white company">
<view class="p-50 flex justify-between items-center pb-30 border-bottom">
<view class="flex justify-start items-center">
<image class="logo" :src="info.businessCard.logo"/>
<view class="ml-35 flex flex-col justify-start items-start">
<text class="text-40 font-bold">{{ info.company.companyName }}</text>
<text class="text-gray text-28 mt-40">主营业务: {{ info.businessCard.mainBusiness }}</text>
</view>
</view>
<view class="flex justify-end items-center">
<view class="flex flex-col justify-center items-center">
<view class="flex justify-center items-center">
<protect theme="filled" size="24" fill="#d0021b" strokeLinecap="square"/>
<view class="text-gray">平台累计交易</view>
</view>
<text class="text-main font-bold text-50">{{ info.transactionAmount }}</text>
</view>
<view class="flex flex-col justify-center items-center ml-35">
<view class="flex justify-center items-center">
<exchange-three theme="filled" size="24" fill="#d0021b" strokeLinecap="square"/>
<view class="text-gray">已缴纳交易保证金</view>
</view>
<text class="text-main font-bold text-50">{{ info.paidEnsure }}</text>
</view>
</view>
</view>
<view class="mt-30 p-40">
<view class="flex justify-between items-center mb-20">
<view class="title">企业简介</view>
<view class="mt-20" v-html="info.companyIntroduction"></view>
</view>
<view class="flex flex-col justify-start items-start mb-20">
<view class="title">联系我们</view>
<view class="mt-20 flex justify-start items-start flex-wrap w-100p text-30">
<view class="flex justify-start items-center w-33p mb-20">
<i class="el-icon-map-location mr-15"/>
<text>地址:{{ info.manager.address }}</text>
</view>
<view class="flex justify-start items-center w-33p mb-20">
<i class="el-icon-phone mr-15"/>
<text>电话:{{ info.businessCard.phone }}</text>
</view>
<view class="flex justify-start items-center w-33p mb-20">
<i class="el-icon-mobile mr-15"/>
<text>手机:{{ info.businessCard.mobile }}</text>
</view>
<view class="flex justify-start items-center w-33p">
<i class="el-icon-message mr-15"/>
<text>邮箱:{{ info.businessCard.email }}</text>
</view>
<view class="flex justify-start items-center w-33p">
<i class="el-icon-data-board mr-15"/>
<text>网址:{{ info.businessCard.website }}</text>
</view>
</view>
</view>
<view class="flex flex-col justify-start items-start mb-20">
<view class="title">发布的现货</view>
<view class="mt-20 bg-gray w-100p p-40" v-for="(item, index) in info.spotList" :key="index">
<view class="w-100p flex justify-between items-center">
<text class="font-bold text-40">{{ item.name }}</text>
<el-button type="primary" plain class="empty-bg-plain-btn"
@click.native="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id)">查看详情
</el-button>
</view>
<view class="w-60p flex justify-between items-center text-main my-20">
<text>库存:{{ item.stock }}吨</text>
<text>供货地:{{ item.address.province.name }}-{{
item.address.city.name
}}-{{ item.address.area.name }}
</text>
</view>
<view class="w-60p flex justify-between items-center text-gray">
<view class="flex justify-start items-center">
<i class="el-icon-user"/>
<text>{{ info.company.companyName }}</text>
</view>
<text class="">{{ item._add_time_str }}发布</text>
</view>
</view>
</view>
<view class="flex justify-between items-start mb-20">
<view class="title">发布的询价单</view>
<view class="text-main pointer" @click="vk.navigateTo('/pages/spot/goods/goods')">查看更多></view>
</view>
<view class="bg-gray-light flex justify-center items-center table-header p-20">
<view class="text-gray flex-1">品名/材质</view>
<view class="text-gray flex-1">采购量</view>
<view class="text-gray flex-1">收购地</view>
<view class="text-gray flex-1">采购企业</view>
<view class="text-gray flex-1">报价情况</view>
<view class="text-gray flex-1">发布时间</view>
<view class="text-gray flex-1">操作</view>
</view>
<view class="flex justify-center items-center mt-20 w-100p p-20"
v-for="(item, index) in info.enquiryList" :key="index">
<view class="text-main flex-1">{{ item.productList[0].goodsName }}</view>
<view class="flex-1">{{ item.productList[0].procureNumber }}{{
item.productList[0].procureUnit
}}
</view>
<view class="flex-1">{{ item.address }}</view>
<view class="flex-1">{{ info.company.companyName }}</view>
<view class="flex-1">{{ item.answerNumber }}家已报价</view>
<view class="flex-1">{{ item._add_time_str }}</view>
<view class="flex-1">
<el-button type="primary" plain class="empty-bg-plain-btn"
@click.native="vk.navigateTo('/pages/enquiry/detail?id=' + item._id);">查看
</el-button>
</view>
</view>
<view class="flex justify-between items-start mb-20">
<view class="title">发布的加工单</view>
<view class="text-main" @click="vk.navigateTo('/pages/process/list')">查看更多></view>
</view>
<view class="bg-gray-light flex justify-center items-center table-header p-20">
<view class="text-gray flex-1">品名/材质</view>
<view class="text-gray flex-1">加工量</view>
<!-- <view class="text-gray flex-1">收购地</view>-->
<view class="text-gray flex-1">采购企业</view>
<view class="text-gray flex-1">报价情况</view>
<view class="text-gray flex-1">发布时间</view>
<view class="text-gray flex-1">操作</view>
</view>
<view class="flex justify-center items-center mt-20 w-100p p-20"
v-for="(item, index) in info.processList" :key="index">
<view class="text-main flex-1">{{ item.title }}</view>
<view class="flex-1">{{ item.productList[0].procureNumber }}{{
item.productList[0].procureUnit
}}
</view>
<!-- <view class="flex-1">{{ item.address }}</view>-->
<view class="flex-1">{{ item.num }}</view>
<view class="flex-1">{{ info.company.companyName }}</view>
<view class="flex-1">{{ item.answerNumber }}家已报价</view>
<view class="flex-1">{{ item._add_time_str }}</view>
<view class="flex-1">
<el-button type="primary" plain class="empty-bg-plain-btn"
@click.native="toProcessDetail(row._id)">查看
</el-button>
</view>
</view>
</view>
</view>
</view>
<gap/>
<common-footer></common-footer>
</view>
</template>
<script>
import {Protect, ExchangeThree} from '@icon-park/vue'
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
import Gap from "../../components/gap/gap.vue";
export default {
name: "info",
components: {Gap, Protect, ExchangeThree},
data() {
return {
id: null,
provinceData: provinces,
cityData: citys,
areaData: areas,
info: {
transactionAmount: 0,
paidEnsure: 0,
spotList: [],
enquiryList: [],
processList: [],
},
}
},
methods: {
getInfo() {
vk.callFunction({
url: "client/user/pub/getDetail",
data: {
_id: this.id
},
success: (res) => {
this.info = res.data
this.info.enquiryList.map(val => {
let str = ''
if (val.productList.length > 0 && val.productList[0].addressRegion.length > 0) {
let provinceIndex = 0, cityIndex = 0, areaIndex = 0
this.provinceData.forEach((item, index) => {
if (parseInt(val.productList[0].addressRegion[0]) === parseInt(item.code)) {
provinceIndex = index
str = item.name
}
})
this.cityData[provinceIndex].forEach((item, index) => {
if (parseInt(val.productList[0].addressRegion[1]) === parseInt(item.code)) {
cityIndex = index
str += item.name
}
})
this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
if (parseInt(val.productList[0].addressRegion[2]) === parseInt(item.code)) {
areaIndex = index
str += item.name
}
})
str += val.productList[0].addressDetail
}
val.address = str
return val
})
}
});
},
async toProcessDetail(id) {
const {userInfo} = await vk.callFunction({
url: 'user/kh/getMyUserInfo'
})
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
})
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
this.$confirm('请完善名片信息', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vk.navigateTo('/pages/user/user?menu=business-card');
})
} else {
vk.navigateTo({
url: `/pages/process/detail?id=${id}`
})
}
},
},
onLoad(option) {
if (option.id) {
this.id = option.id
this.getInfo()
}
}
}
</script>
<style lang="scss" scoped>
.company {
.logo {
width: 100px;
height: 100px;
}
.title {
font-size: 16px;
padding-left: 5px;
border-left: 3px solid #d0021b;
color: #d0021b;
}
.table-header {
border-top: 8px solid #F4F4F4;
}
}
</style>
+307
View File
@@ -0,0 +1,307 @@
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="carousel">
<el-carousel height="170px">
<el-carousel-item v-for="item in 4" :key="item">
<image class="carousel-img"
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
mode="aspectFill"></image>
</el-carousel-item>
</el-carousel>
</view>
<view class="filter-outer">
<el-form @submit.native.prevent label-width="80px">
<el-form-item label="关键词:" class="border-bottom pb-30">
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
</el-button>
</el-input>
</el-form-item>
<el-form-item label="行业类型:" class="border-bottom pb-30">
</el-form-item>
<el-form-item label="分类:" class="border-bottom pb-30">
<view class="flex justify-start items-center flex-wrap">
<text @click="clickedCateIndex = -1" class="pointer mr-25"
:class="[clickedCateIndex === -1 ? 'text-main selected-cate' : '']">全部
</text>
<view v-for="(item, index) in categoryTreeData" :key="index">
<text @click="clickedCateIndex = index" class="pointer mr-25"
:class="[clickedCateIndex === index ? 'text-main selected-cate' : '']"
v-if="index < 10">
{{ item.name }}
</text>
</view>
</view>
<view class="child-cate flex justify-start items-center flex-wrap" v-if="clickedCateIndex !== null">
<template v-if="clickedCateIndex === -1">
<text class="pointer mr-25" @click="selectCate(item._id)"
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
</text>
</template>
<template v-else>
<text class="pointer mr-25" @click="selectCate(item._id)"
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
{{ item.name }}
</text>
</template>
</view>
</el-form-item>
<el-form-item label="城市" class="border-bottom pb-30">
<view class="flex justify-start items-center flex-wrap">
<text @click="selectProvince(-1)" class="pointer mr-25 flex-grow-0"
:class="[checkProvinceList.length === 0 ? 'text-main selected-cate' : '']">全国
</text>
<view v-for="(item, index) in provinceData" :key="index" class="flex-grow-0 pointer mr-25">
<text @click="selectProvince(item.code)"
:class="[checkProvinceList.includes(item.code)? 'text-main selected-cate' : '']"
v-if="index < 10 || showAllProvince">
{{ item.name }}
</text>
</view>
<text @click="showAllProvince = !showAllProvince" class="pointer mr-25">查看更多
</text>
</view>
</el-form-item>
<el-form-item label="已选择">
<view class="tags">
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
</view>
</el-form-item>
</el-form>
</view>
<view class="w-1200 flex justify-start items-start flex-wrap m-a">
<view v-for="(item, index) in companyList" :key="index" class="w-50p company-item">
<view class="p-40">
<view class="rounded shadow p-50 bg-white flex flex-col justify-start items-start">
<view class="flex justify-end w-100p">
<image class="authed" src="/static/images/authed.png" mode="aspectFit"
v-if="item.authStatus === 1"/>
</view>
<view class="flex justify-start items-center">
<image :src="item.businessCard.logo" class="logo"/>
<view class="ml-35 flex flex-col justify-start items-start">
<text>{{ item.name }}</text>
<i class="el-icon-star-off text-main my-20"/>
<view class="flex justify-start items-center">
<i class="el-icon-user"/>
<text class="ml-10">{{ item.manager.personName }}</text>
<text class="ml-20 text-28">{{ item.businessCard.position }}</text>
</view>
</view>
</view>
<view class="flex justify-start items-center mt-20">
<i class="el-icon-map-location mr-15"/>
<text>地址:{{ item.manager.address }}</text>
</view>
<view class="flex justify-start items-center mt-20">
<i class="el-icon-phone mr-15"/>
<text>电话:{{ item.businessCard.phone }}</text>
</view>
<view class="flex justify-start items-center mt-20">
<i class="el-icon-mobile mr-15"/>
<text>手机:{{ item.businessCard.mobile }}</text>
</view>
<view class="flex justify-start items-center mt-20">
<i class="el-icon-message mr-15"/>
<text>邮箱:{{ item.businessCard.email }}</text>
</view>
<view class="flex justify-start items-center mt-20">
<i class="el-icon-data-board mr-15"/>
<text>网址:{{ item.businessCard.website }}</text>
</view>
<view class="flex justify-between items-center w-100p">
<view class="flex justify-start items-center mt-20">
<text class="text-main">主营业务:</text>
<text>{{ item.businessCard.mainBusiness }}</text>
</view>
<el-button type="primary" @click="showInfo(item._id)">查看详情</el-button>
</view>
</view>
</view>
</view>
</view>
<common-footer></common-footer>
</view>
</template>
<script>
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
export default {
name: "list",
data() {
return {
categoryTreeData: [],
allChildCate: [],
clickedCateIndex: null,
checkCategoryList: [],
keyword: '',
provinceData: provinces,
checkProvinceList: [],
showAllProvince: false,
companyList: []
}
},
methods: {
getCategoryTreeData() {
vk.callFunction({
url: 'client/spot/category/pub/getTree',
title: '请求中...',
data: {},
success: (data) => {
this.categoryTreeData = data.rows
this.allChildCate = []
this.categoryTreeData.forEach(item => {
item.children.forEach(child => {
this.allChildCate.push(child)
})
})
}
});
},
selectCate(id) {
const index = this.checkCategoryList.indexOf(id)
if (index === -1) this.checkCategoryList.push(id)
else this.checkCategoryList.splice(index, 1)
this.search(1)
},
selectProvince(code) {
if (code === -1) this.checkProvinceList = []
else {
const index = this.checkProvinceList.indexOf(code)
if (index === -1) this.checkProvinceList.push(code)
else this.checkProvinceList.splice(index, 1)
}
this.search(1)
},
search() {
},
getCompany() {
vk.callFunction({
url: 'client/user/pub/getCompany',
title: '请求中...',
data: {},
success: (data) => {
this.companyList = data.rows.map(item => {
item.name = item.company.companyName
return item
})
}
});
},
showInfo(id){
vk.navigateTo({
url: `/pages/yellowPage/info?id=${id}`
})
}
},
onShow() {
this.getCategoryTreeData()
this.getCompany()
},
computed: {
checkCategoryArr() {
const arr = []
this.allChildCate.forEach(item => {
if (this.checkCategoryList.includes(item._id)) arr.push(item)
})
this.provinceData.forEach(item => {
if (this.checkProvinceList.includes(item.code)) {
arr.push(item)
}
})
return arr
}
}
}
</script>
<style lang="scss" scoped>
.carousel {
width: 1200px;
margin: 20px auto;
}
.carousel-img {
width: 100%;
height: 100%;
}
.goods-options {
background-color: #FFFFFF;
padding: 20px;
}
.filter-outer {
width: 1200px;
margin: 20px auto;
background-color: #FFFFFF;
padding: 20px;
}
.tags {
display: flex;
.el-tag {
margin-right: 10px;
}
}
.paginatio {
float: none;
width: 1200px;
margin: 20px auto;
display: flex;
justify-content: center;
}
.post-btn {
background: none;
}
.post-btn:hover {
background: #f6eae9;
color: #A92924;
}
.selected-cate {
border-bottom: 2px solid #BD3124;
line-height: 40rpx;
}
.child-cate {
background-color: #DB8382;
color: white;
margin-top: 10rpx;
border-radius: 15rpx;
padding: 0 20rpx;
}
.company-item {
font-size: 16px;
.authed {
height: 40px;
width: 60px;
}
.logo {
width: 100px;
height: 100px;
}
}
</style>