20261008
This commit is contained in:
+587
-384
File diff suppressed because it is too large
Load Diff
+886
-425
File diff suppressed because it is too large
Load Diff
+260
-206
@@ -1,236 +1,290 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<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-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
<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>-->
|
||||
<common-swiper page="old-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布旧货交易</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</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>
|
||||
<!-- 商品列表 -->
|
||||
<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>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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/old/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/index/old/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('').then(()=> {
|
||||
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/old/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "标题",
|
||||
title: "title",
|
||||
type: "text",
|
||||
width: 280
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "所在地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
str = val.map(item=>{
|
||||
return item.addressRegion[0].name + "-" + item.addressRegion[1].name
|
||||
}).join("/")
|
||||
} catch(err){
|
||||
str = ""
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "supplier.companyName",
|
||||
title: "供应商",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_srt",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
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/old/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/index/old/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('如果你要删除此条信息,之前其他客户填写的留言将无法查看', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/old/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
},
|
||||
show: (item) => {
|
||||
console.log(item.status)
|
||||
return item.status === 0
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
width: 280
|
||||
},
|
||||
{
|
||||
key: "addressRegion",
|
||||
title: "所在地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
if (row.type === 1) str = (row.deliverAddressRegion && row.deliverAddressRegion.city) ? (row.deliverAddressRegion.province.name + "-" + row.deliverAddressRegion.city.name) : ''
|
||||
else str = (row.addressRegion && row.addressRegion.city) ? (row.addressRegion.province.name + "-" + row.addressRegion.city.name) : ''
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// if (row.type === 2) {
|
||||
// str = row.offerAddressRegion.province.name + row.offerAddressRegion.city.name + row.offerAddressRegion.area.name
|
||||
// } else if (row.type === 1) {
|
||||
// str = row.deliverAddressRegion.province.name + row.deliverAddressRegion.city.name + row.deliverAddressRegion.area.name
|
||||
// } else {
|
||||
// str = val.province.name + val.city.name + val.area.name
|
||||
// }
|
||||
} catch (err) {
|
||||
str = ""
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
return str
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "quoteNum",
|
||||
title: "报价数",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}家已报价`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "type",
|
||||
title: "类型",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '拍卖'},
|
||||
{value: 1, label: '采购'},
|
||||
{value: 2, label: '租赁'},
|
||||
{value: 3, label: '物资回收'},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// key: "supplier",
|
||||
// title: "供应商",
|
||||
// type: "text",
|
||||
// formatter: (val, row, column, index) => {
|
||||
// console.log(val.companyName, val.companyName === '')
|
||||
// if (val.companyName && val.companyName !== '') return val.companyName
|
||||
// else return val.personName
|
||||
// // console.log((val.companyName && val.companyName !== ''), val.companyName)
|
||||
// // return ((val.companyName && val.companyName !== '') ? val.companyName : val.personName)
|
||||
// }
|
||||
// },
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
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/index/old/release'
|
||||
})
|
||||
}
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
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({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/index/old/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
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 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+581
-490
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<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/index/old/old">旧货交易</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="old" :id="id"/>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="false"
|
||||
label-width="140px"
|
||||
:show-cancel="false"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<template v-slot:totalPrice>
|
||||
<el-input v-if="sheet.type === 2 && sheet.rentType === 1" v-model="form1.data.totalPrice"
|
||||
placeholder="请输入询价内容"/>
|
||||
<el-input v-else v-model="form1.data.totalPrice" placeholder="请输入总价"
|
||||
@change="formatNumber"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
sheet: null,
|
||||
reloaded: false,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/old/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "totalPrice", title: "总价(人民币:元)", type: "number", showRule: () => {
|
||||
return this.sheet.type !== 2 || (this.sheet.type === 2 && this.sheet.rentType === 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "totalPrice", title: '简述询价内容', type: "number", showRule: () => {
|
||||
return this.sheet.type === 2 && this.sheet.rentType === 1
|
||||
}
|
||||
},
|
||||
{key: "files", title: "附件", type: "file", accept: '.pdf'},
|
||||
{
|
||||
key: "remark", title: "报价单详情", type: "textarea", showRule: () => {
|
||||
return this.sheet.type !== 2 || (this.sheet.type === 2 && this.sheet.rentType === 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "remark", title: "询价详情", type: "textarea", showRule: () => {
|
||||
return this.sheet.type === 2 && this.sheet.rentType === 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "supplierExt", title: "报价补充条款", type: "textarea", showRule: () => {
|
||||
return this.sheet.type !== 2 || (this.sheet.type === 2 && this.sheet.rentType === 0)
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
totalPrice: [
|
||||
{required: true, message: "总价不能为空", trigger: "change,blur"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
if (!id) {
|
||||
vk.navigateTo('/pages/index/old/old');
|
||||
return
|
||||
}
|
||||
|
||||
this.id = id
|
||||
this.form1.data.sheetId = id
|
||||
this.getDetail()
|
||||
},
|
||||
computed: {
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice === 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.reloaded = false
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res
|
||||
this.reloaded = true
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
if (err.code === -1) {
|
||||
setTimeout(() => {
|
||||
vk.navigateBack()
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
},
|
||||
formatNumber(e) {
|
||||
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
|
||||
},
|
||||
onFormSuccess() {
|
||||
vk.redirectTo({url: `/pages/index/old/detail?id=${this.id}`})
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
// this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning',
|
||||
// center: true
|
||||
// }).then(res => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
// })
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.quote-form {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<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-button type="primary" round plain>我发布的询价单</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"></vk-data-table>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/old/kh/getMyQuoteList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/index/old/detail?id=' + item.sheetId);
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "sheet.title",
|
||||
title: "旧货标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "sheet.type",
|
||||
title: "旧货类型",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '拍卖'},
|
||||
{value: 1, label: '采购'},
|
||||
{value: 2, label: '租赁'},
|
||||
{value: 3, label: '物资回收'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}元`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
title: "状态",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '待选商'},
|
||||
{value: 1, label: '已被选商'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/old/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</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>
|
||||
+136
-33
@@ -1,30 +1,37 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white">
|
||||
<image src="/static/images/old/liucheng2.png" class="w-full" mode="widthFix"/>
|
||||
<view class="p-20">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="拍卖信息发布" name="0">
|
||||
<type_0/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购信息发布" name="1">
|
||||
<type_1/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="承租信息发布" name="2">
|
||||
<type_2/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物资回收信息发布" name="3">
|
||||
<type_3/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white">
|
||||
<image src="/static/images/old/liucheng2.png" class="w-full" mode="widthFix"/>
|
||||
<view class="p-20">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="拍卖信息发布" name="0">
|
||||
<type_0 v-if="parseInt(activeName) === 0" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" :unitList="unitList"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购信息发布" name="1">
|
||||
<type_1 v-if="parseInt(activeName) === 1" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="承租、租赁信息发布" name="2">
|
||||
<type_2 v-if="parseInt(activeName) === 2" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物资回收信息发布" name="3">
|
||||
<type_3 v-if="parseInt(activeName) === 3" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -34,13 +41,109 @@ import Type_2 from "./release/type_2.vue";
|
||||
import Type_3 from "./release/type_3.vue";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
components: {Type_3, Type_2, Type_1, Type_0},
|
||||
data() {
|
||||
return {
|
||||
activeName: '0'
|
||||
}
|
||||
name: "list",
|
||||
components: {Type_3, Type_2, Type_1, Type_0},
|
||||
data() {
|
||||
return {
|
||||
activeName: '0',
|
||||
urgentAmount: 1,
|
||||
remainOldNum: vk.getVuex('$user.userInfo.remainOldNum') ? parseInt(vk.getVuex('$user.userInfo.remainOldNum')) : 0,
|
||||
buyOldNumAmount: 5,
|
||||
agreement: '',
|
||||
commonContractUrl: '',
|
||||
contactList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUrgentAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587dd2fe0ec19027452c5b5'
|
||||
},
|
||||
})
|
||||
this.urgentAmount = res.content
|
||||
},
|
||||
methods: {}
|
||||
async getBuyOldAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587dd54189f86d49b3d5ff5'
|
||||
},
|
||||
})
|
||||
this.buyOldNumAmount = res.content
|
||||
},
|
||||
async getUnitList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'a45325976635f10600341a7f2f472cd1'
|
||||
},
|
||||
})
|
||||
this.unitList = res.content.split(',')
|
||||
},
|
||||
async getAgreement() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '65885d5b862066f18a4e4a36'
|
||||
},
|
||||
})
|
||||
this.agreement = res.content
|
||||
},
|
||||
async getCommonContractUrl() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d36befe975f63af1f24e7'
|
||||
},
|
||||
})
|
||||
this.commonContractUrl = res.content
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.getUnitList()
|
||||
this.getUrgentAmount()
|
||||
this.getBuyOldAmount()
|
||||
this.getAgreement()
|
||||
this.getCommonContractUrl()
|
||||
this.getContactList()
|
||||
},
|
||||
onShow() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.remainOldNum = data.userInfo.remainOldNum ? parseInt(data.userInfo.remainOldNum) : 0
|
||||
if (this.remainOldNum === 0) {
|
||||
this.$confirm('您的旧货发布次数已用完,是否立即购买?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}).catch(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/deep/ .el-tabs__item.is-active{
|
||||
font-size: 1.2rem!important;
|
||||
}
|
||||
</style>
|
||||
+711
-415
File diff suppressed because it is too large
Load Diff
+762
-479
File diff suppressed because it is too large
Load Diff
+744
-479
File diff suppressed because it is too large
Load Diff
+371
-197
@@ -1,135 +1,158 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的回收信息</text>
|
||||
<text class="text-gray">回收信息越完整,成功交易越容易</text>
|
||||
<el-form ref="form" :model="form" label-width="140px" class="mt-20">
|
||||
<el-form-item label="信息失效时间:">
|
||||
<el-date-picker
|
||||
v-model="form.expiredTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资分类:">
|
||||
<el-radio-group v-model="form.category" size="small">
|
||||
<el-radio label="机械设备">
|
||||
<text>机械设备</text>
|
||||
</el-radio>
|
||||
<el-radio label="成品钢材">
|
||||
<text>成品钢材</text>
|
||||
</el-radio>
|
||||
<el-radio label="废旧钢材">
|
||||
<text>废旧钢材</text>
|
||||
</el-radio>
|
||||
<el-radio label="旧架子管">
|
||||
<text>旧架子管</text>
|
||||
</el-radio>
|
||||
<el-radio label="旧扣件">
|
||||
<text>旧扣件</text>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息标题:">
|
||||
<el-input v-model="form.title" placeholder="一句话简介物资,如拍卖直缝钢管200吨等"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收方简述:">
|
||||
<el-input v-model="form.desc" placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
type="textarea" show-word-limit maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收物实景照片:">
|
||||
<vk-data-upload v-model="form.files"
|
||||
accept="image/*">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收单位地址" class="ml-10">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
|
||||
<template v-if="provinceIndex !== null && cityIndex !== null">
|
||||
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
|
||||
:key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
回收单位信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司信息">
|
||||
<el-input v-model="form.supplier.companyName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司联系方式">
|
||||
<el-input v-model="form.supplier.contract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人信息">
|
||||
<el-input v-model="form.supplier.personalName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人联系方式">
|
||||
<el-input v-model="form.supplier.personalContract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授权人姓名">
|
||||
<el-input v-model="form.supplier.managerName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授权联系方式">
|
||||
<el-input v-model="form.supplier.managerContract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a">
|
||||
<el-button type="primary" :disabled="checked === '否'" @click="publish">立即发布</el-button>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的回收信息</text>
|
||||
<text class="text-gray">回收信息越完整,成功交易越容易</text>
|
||||
<el-form ref="form" :model="form" label-width="140px" class="mt-20">
|
||||
<el-form-item label="信息失效时间:" required>
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="form.expiredTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资分类:" required>
|
||||
<div class="flex justify-start items-center">
|
||||
<el-cascader :options="cateData" v-model="form.category" :disabled="form.otherCate"
|
||||
:props="{'label': 'name', 'value': 'name'}"/>
|
||||
<el-checkbox v-model="form.otherCate" class="mx-20">其他分类</el-checkbox>
|
||||
<el-input v-model="form.otherCateName" :disabled="!form.otherCate" placeholder="如物资分类选项中不能描述您的信息物资主要内容,请在此用专业或通用术语填写"
|
||||
class="ml-20"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息标题:" required>
|
||||
<el-input v-model="form.title" placeholder="一句话简介回收内容,如 常年回收 二手、废旧螺纹钢、型材等"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收方简述:">
|
||||
<el-input v-model="form.desc" placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
type="textarea" show-word-limit maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收物实景照片:">
|
||||
<vk-data-upload v-model="form.files" list-type="text"
|
||||
accept="image/*">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收单位地址" class="ml-10" required>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
|
||||
<template v-if="provinceIndex !== null && cityIndex !== null">
|
||||
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
|
||||
:key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
回收单位信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<el-row :gutter="10" v-if="vk.getVuex('$user.userInfo.accountType') === 2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司信息">
|
||||
<el-input v-model="form.supplier.companyName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司联系方式">
|
||||
<el-input v-model="form.supplier.contract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="vk.getVuex('$user.userInfo.accountType') === 1">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人信息">
|
||||
<el-input v-model="form.supplier.personalName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人联系方式">
|
||||
<el-input v-model="form.supplier.personalContract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12" class="flex justify-start items-center">
|
||||
<el-form-item label="授权业务咨询人">
|
||||
<el-select v-model="form.supplier.managerName" placeholder="点击选择业务联系人"
|
||||
class="w-100p" @change="selectContact">
|
||||
<el-option
|
||||
v-for="(item, index) in contactList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
<view slot="empty" class="text-gray pointer p-20">
|
||||
<text>无业务联系人,请到</text>
|
||||
<text class="text-main mx-15" @click="navTo">个人中心</text>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="flex justify-start items-center">
|
||||
<el-form-item label="业务咨询联系方式">
|
||||
<el-input v-model="form.supplier.managerContract" type="number" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">是否加急({{ urgentAmount }}元/次,将在旧货交易页面加急展示区展示):</text>
|
||||
<el-radio :label="true" v-model="form.isUrgent">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio :label="false" v-model="form.isUrgent">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox v-model="agree">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a">
|
||||
<el-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</el-button>
|
||||
</view>
|
||||
<el-dialog title="金久信旧货交易协议" :visible.sync="dialogVisible" width="70%" close-on-press-escape
|
||||
close-on-click-modal show-close
|
||||
>
|
||||
<div v-html="agreement"></div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -138,59 +161,206 @@ import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
export default {
|
||||
name: "type_3",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
form: {
|
||||
type: 3,
|
||||
category: 0,
|
||||
files: [],
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: [],
|
||||
addressDetail: '',
|
||||
expiredTime: '',
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
checked: '否'
|
||||
}
|
||||
name: "type_3",
|
||||
props: {
|
||||
urgentAmount: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
methods: {
|
||||
selectProvince(index) {
|
||||
this.form.addressRegion[0] = this.provinceData[index]
|
||||
remainOldNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
agreement: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
contactList: {
|
||||
type: Array,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
selectCity(index) {
|
||||
this.form.addressRegion[1] = this.cityData[this.provinceIndex][index]
|
||||
},
|
||||
agree: false,
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
allChildCate: [],
|
||||
cateData: [],
|
||||
form: {
|
||||
otherCate: false,
|
||||
otherCateName: '',
|
||||
type: 3,
|
||||
category: 0,
|
||||
files: [],
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
expiredTime: '',
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
selectArea(index) {
|
||||
this.form.addressRegion[2] = this.areaData[this.provinceIndex][this.cityIndex][index]
|
||||
},
|
||||
async publish() {
|
||||
await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
this.$message({
|
||||
message: "提交成功",
|
||||
type: 'success'
|
||||
})
|
||||
vk.navigateBack()
|
||||
}
|
||||
isUrgent: false
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
checked: '否',
|
||||
dialogVisible: false
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectProvince(index) {
|
||||
this.form.addressRegion.province = this.provinceData[index]
|
||||
},
|
||||
selectCity(index) {
|
||||
this.form.addressRegion.city = this.cityData[this.provinceIndex][index]
|
||||
},
|
||||
selectArea(index) {
|
||||
this.form.addressRegion.area = this.areaData[this.provinceIndex][this.cityIndex][index]
|
||||
},
|
||||
async publish() {
|
||||
if (this.remainOldNum === 0) {
|
||||
this.$confirm('您的旧货发布次数已用完,是否立即购买?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async ({confirm}) => {
|
||||
if (confirm) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.provinceIndex === null || this.cityIndex === null || this.areaIndex === null) return this.$message({
|
||||
message: "请选择完整的地址",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.addressDetail) return this.$message({
|
||||
message: "请填写详细地址",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.title) return this.$message({
|
||||
message: "请填写标题",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.otherCate) {
|
||||
if (!this.form.category) return this.$message({
|
||||
message: "请选择分类",
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
if (!this.form.otherCateName) return this.$message({
|
||||
message: "请输入其他分类",
|
||||
type: 'warning'
|
||||
})
|
||||
this.form.category = ['', this.form.otherCateName]
|
||||
}
|
||||
if (!this.form.expiredTime) return this.$message({
|
||||
message: "请选择失效时间",
|
||||
type: 'warning'
|
||||
})
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
localStorage.removeItem("old_3")
|
||||
this.$message({
|
||||
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
|
||||
type: 'success'
|
||||
})
|
||||
if (this.form.isUrgent) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${res.data}`
|
||||
})
|
||||
} else {
|
||||
vk.redirectTo({url: '/pages/index/old/old'});
|
||||
}
|
||||
},
|
||||
showAgreement() {
|
||||
// this.$confirm(this.agreement, '金久信旧货交易协议', {
|
||||
// cancelButtonText: '关闭',
|
||||
// showConfirmButton: false,
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// customClass: 'confirm-box'
|
||||
// })
|
||||
this.dialogVisible = true
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
selectContact(name) {
|
||||
const contact = this.contactList.find(item => item.name === name)
|
||||
this.form.supplier.managerContract = contact.phone
|
||||
},
|
||||
save() {
|
||||
localStorage.setItem("old_3", JSON.stringify({
|
||||
form: this.form,
|
||||
provinceIndex: this.provinceIndex,
|
||||
cityIndex: this.cityIndex,
|
||||
areaIndex: this.areaIndex,
|
||||
}))
|
||||
this.$message({
|
||||
message: "已保存",
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {type: 3},
|
||||
success: (data) => {
|
||||
this.cateData = data.rows.map(item => {
|
||||
item.children.forEach(child => {
|
||||
delete child.children
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
if (vk.getVuex('$user.userInfo.accountType') === 2) {
|
||||
this.form.supplier.companyName = vk.getVuex('$user.userInfo.company.companyName')
|
||||
this.form.supplier.contract = vk.getVuex('$user.userInfo.company.mobile')
|
||||
} else {
|
||||
this.form.supplier.personalName = vk.getVuex('$user.userInfo.person.personName')
|
||||
this.form.supplier.personalContract = vk.getVuex('$user.userInfo.person.mobile')
|
||||
}
|
||||
if (!!localStorage.getItem("old_3")) {
|
||||
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const savedData = JSON.parse(localStorage.getItem("old_3"))
|
||||
this.form = savedData.form
|
||||
this.provinceIndex = savedData.provinceIndex
|
||||
this.cityIndex = savedData.cityIndex
|
||||
this.areaIndex = savedData.areaIndex
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -198,38 +368,42 @@ export default {
|
||||
@import "@/common/css/app.scss";
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: $--color-primary;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid $--color-primary;
|
||||
}
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: $--color-primary;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid $--color-primary;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sign-method-header {
|
||||
width: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/deep/ .input-with-select{
|
||||
width: 200px;
|
||||
/deep/ .input-with-select {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
/deep/ .input-with-select .el-input-group__append {
|
||||
background-color: #fff !important;
|
||||
width: 80px !important;
|
||||
background-color: #fff !important;
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
.confirm-box .el-dialog {
|
||||
width: 70%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user