签章流程
This commit is contained in:
@@ -171,9 +171,9 @@
|
||||
timeS = 60
|
||||
timer = setInterval(() => {
|
||||
timeS--
|
||||
if (timeS == 0) {
|
||||
this.stopTimer()
|
||||
if (timeS <= 0) {
|
||||
this.smsTips = "重新发送"
|
||||
this.stopTimer()
|
||||
} else {
|
||||
this.smsTips = timeS + "秒"
|
||||
}
|
||||
@@ -196,7 +196,10 @@
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.stopTimer()
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -54,7 +54,20 @@
|
||||
<input type="password" class="form-control" v-model="form1.repassword"
|
||||
placeholder="确认登录密码" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div v-show="form1.accountType == 1" class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.person.personName"
|
||||
placeholder="请输入姓名" autocomplete="off">
|
||||
</div>
|
||||
<div v-show="form1.accountType == 2" class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.company.companyName"
|
||||
placeholder="请输入公司名称" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
@@ -103,6 +116,12 @@
|
||||
password: '',
|
||||
repassword: '',
|
||||
inviteCode: '',
|
||||
person: {
|
||||
personName: ''
|
||||
},
|
||||
company: {
|
||||
companyName: ''
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -125,9 +144,9 @@
|
||||
timeS = 60
|
||||
timer = setInterval(() => {
|
||||
timeS--
|
||||
if (timeS == 0) {
|
||||
this.stopTimer()
|
||||
if (timeS <= 0) {
|
||||
this.smsTips = "重新发送"
|
||||
this.stopTimer()
|
||||
} else {
|
||||
this.smsTips = timeS + "秒"
|
||||
}
|
||||
@@ -146,7 +165,9 @@
|
||||
password, // 密码 6-20位
|
||||
repassword, // 重复输入密码
|
||||
inviteCode, // 邀请码
|
||||
accountType
|
||||
accountType,
|
||||
company,
|
||||
person
|
||||
} = this.form1
|
||||
|
||||
vk.userCenter.loginBySms({
|
||||
@@ -156,7 +177,10 @@
|
||||
code: smsCode,
|
||||
password,
|
||||
inviteCode,
|
||||
accountType
|
||||
accountType,
|
||||
company,
|
||||
person
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
uni.reLaunch({
|
||||
@@ -175,6 +199,9 @@
|
||||
password, // 密码 6-20位
|
||||
repassword, // 重复输入密码
|
||||
inviteCode, // 邀请码
|
||||
accountType,
|
||||
company,
|
||||
person
|
||||
} = this.form1;
|
||||
|
||||
// 手机号验证
|
||||
@@ -218,14 +245,39 @@
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
if(accountType == 1 && !person.personName) {
|
||||
this.$message({
|
||||
message: '请输入姓名',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
if(accountType == 2 && !company.companyName) {
|
||||
this.$message({
|
||||
message: '请输入公司名称',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
},
|
||||
stopTimer() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
onUnload() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,21 @@
|
||||
<el-breadcrumb-item>{{product.name}}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="commpany-list">
|
||||
<view class="company">
|
||||
<view class="company-head">
|
||||
<image src="" mode=""></image>
|
||||
<view class="company-manager"></view>
|
||||
</view>
|
||||
<view class="company-info">地址:</view>
|
||||
<view class="company-info">电话:</view>
|
||||
<view class="company-info">邮箱</view>
|
||||
<view class="company-info">网址</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -29,6 +44,19 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.commpany-list {
|
||||
width: 565px;
|
||||
height: 420px;
|
||||
border-radius: 18px;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
margin-bottom: 40px;
|
||||
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<top-bar></top-bar>
|
||||
<common-nav></common-nav>
|
||||
<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-item index="0">
|
||||
<i class="el-icon-edit"></i>
|
||||
<span slot="title">待创建</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<span slot="title">待签署</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2">
|
||||
<i class="el-icon-circle-check"></i>
|
||||
<span slot="title">已完成</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="-1">
|
||||
<i class="el-icon-delete"></i>
|
||||
<span slot="title">已作废</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<view class="contract-list">
|
||||
<view class="trade-method">
|
||||
<view @click="formData.tradeMethod = 1" class="trade-method-item"
|
||||
:class="{active: formData.tradeMethod == 1}">自主交易</view>
|
||||
<view @click="formData.tradeMethod = 0" class="trade-method-item"
|
||||
:class="{active: formData.tradeMethod == 0}">金久信公正</view>
|
||||
</view>
|
||||
<view v-for="(item,index) in tableData.rows" class="contract-box" :key="index">
|
||||
<view class="contract-left">
|
||||
<view class="contract-left-top">
|
||||
<el-tag size="mini" v-if="item.contract.type == 'enquiry'" type="danger"
|
||||
effect="plain">询价单</el-tag>
|
||||
<view class="contract-product">
|
||||
{{item.contract.productTitle}}
|
||||
</view>
|
||||
<view class="contract-status">
|
||||
<text v-if="item.contract.status == 0">待创建</text>
|
||||
<template v-if="item.contract.status == 1">
|
||||
<view class="contract-status-tag"
|
||||
v-for="(party, pIndex) in item.contract.partyList" :key="pIndex">
|
||||
<el-tag size="mini"
|
||||
v-if="party.userId != vk.getVuex('$user.userInfo._id') && !party.sign"
|
||||
type="warning" effect="plain">待交易方签署</el-tag>
|
||||
<el-tag size="mini"
|
||||
v-if="party.userId == vk.getVuex('$user.userInfo._id') && !party.sign"
|
||||
type="warning" effect="plain">待我签署</el-tag>
|
||||
</view>
|
||||
</template>
|
||||
<text v-if="item.contract.status == -1">已作废</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contract-left-center">
|
||||
交易编码:{{item.contract.transactionId}} 创建时间:{{item.contract._add_time_str}}
|
||||
</view>
|
||||
<view class="contract-left-bottom">
|
||||
<el-button size="mini" type="text">查看交易方</el-button>
|
||||
<el-button
|
||||
v-if="item.contract.status == 0 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
|
||||
@click="createContract(item.contract)" size="mini" type="text">创建合同</el-button>
|
||||
<el-button v-if="item.contract.status == 1" @click="extSign(item.contract)"
|
||||
size="mini" type="text">签署合同</el-button>
|
||||
<el-button v-if="item.contract.status == 2" @click="viewContract(item.contract)"
|
||||
size="mini" type="text">查看合同</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contract-right">
|
||||
<!-- <view class="">
|
||||
{{item._add_time_str}}到期,到期将无法签署合同
|
||||
</view> -->
|
||||
<view class="">
|
||||
<el-button
|
||||
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
|
||||
size="mini" type="primary">修改合同内容</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="paginatio">
|
||||
<el-pagination @current-change="query" background layout="prev, pager, next"
|
||||
:total="tableData.total"></el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="form1.props.show">
|
||||
<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="true" label-width="140px" @success="onFormSuccess"></vk-data-form>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 上传合同弹窗 -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
formData: {
|
||||
status: 0,
|
||||
tradeMethod: null
|
||||
},
|
||||
tableData: {},
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
contractId: ''
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/contract/kh/launch",
|
||||
// 表单字段显示规则
|
||||
columns: [{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "signEndDate",
|
||||
title: "签署截止日期",
|
||||
type: "date",
|
||||
pickerOptions: {
|
||||
disabledDate: (date) => {
|
||||
const now = new Date()
|
||||
return now > date
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
key: "contractFile",
|
||||
title: "签署文档",
|
||||
type: "file",
|
||||
limit: 1,
|
||||
accept: ".pdf",
|
||||
tips: "仅支持PDF文件",
|
||||
},
|
||||
{
|
||||
key: "buyerSignKeyword",
|
||||
title: "买家签章关键字",
|
||||
type: "text",
|
||||
tip: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||||
},
|
||||
{
|
||||
key: "sellerSignKeyword",
|
||||
title: "卖家签章关键字",
|
||||
type: "text",
|
||||
tip: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||||
},
|
||||
{
|
||||
key: "otherFile",
|
||||
title: "附件",
|
||||
type: "file"
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
title: [{
|
||||
required: true,
|
||||
message: "标题不能为空",
|
||||
trigger: "change"
|
||||
}, ],
|
||||
signEndDate: [{
|
||||
required: true,
|
||||
message: "签署截止日期不能为空",
|
||||
trigger: "change"
|
||||
} ],
|
||||
buyerSignKeyword: [{
|
||||
required: true,
|
||||
message: "买家签章关键字不能为空",
|
||||
trigger: "change"
|
||||
} ],
|
||||
sellerSignKeyword: [{
|
||||
required: true,
|
||||
message: "卖家签章关键字不能为空",
|
||||
trigger: "change"
|
||||
} ],
|
||||
contractFile: [{
|
||||
required: true,
|
||||
message: "签署文档不能为空",
|
||||
trigger: "change"
|
||||
}, ]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.query(1)
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.formData.status = Number(e)
|
||||
this.query(1)
|
||||
},
|
||||
async query(pageIndex) {
|
||||
const tableData = await vk.callFunction({
|
||||
url: 'client/contract/kh/getList',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: 10,
|
||||
status: this.formData.status
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
// tableData.rows.forEach(item => {
|
||||
|
||||
// })
|
||||
|
||||
this.tableData = tableData
|
||||
},
|
||||
/**
|
||||
* @param {Object} item
|
||||
* 创建合同
|
||||
*/
|
||||
createContract(contract) {
|
||||
this.form1.data.contractId = contract._id
|
||||
this.form1.props.show = true
|
||||
},
|
||||
onFormSuccess() {
|
||||
this.form1.props.show = false
|
||||
this.form1.data.contractId = null
|
||||
this.query(1)
|
||||
},
|
||||
/**
|
||||
* 签署合同
|
||||
* @param {Object} contract
|
||||
*/
|
||||
extSign(contract) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/extSign',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: contract._id
|
||||
},
|
||||
success: (res) => {
|
||||
window.open(res.data)
|
||||
}
|
||||
});
|
||||
},
|
||||
viewContract(contract) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/viewContract',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: contract._id
|
||||
},
|
||||
success: (res) => {
|
||||
window.open(res.data)
|
||||
this.query(1)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.contract-list {
|
||||
background-color: #FFFFFF;
|
||||
padding: 10px 20px 20px;
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.contract-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: solid 1px #e8e8e8;
|
||||
}
|
||||
|
||||
.contract-left {}
|
||||
|
||||
.contract-right {
|
||||
text-align: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.trade-method {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: solid 2px #f4f4f4;
|
||||
}
|
||||
|
||||
.trade-method-item {
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
margin-right: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.trade-method-item.active {
|
||||
color: #A92924;
|
||||
border-bottom: solid 2px #A92924;
|
||||
}
|
||||
|
||||
.contract-left-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.contract-product {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.contract-left-center {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #999999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.contract-left-bottom {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.contract-status {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.contract-status-tag {
|
||||
margin-left: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <view class="product-title">{{title}}</view> -->
|
||||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
|
||||
<vk-data-form v-if="attributesLoaded" 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"
|
||||
:before-action="form1.props.beforeAction" :auto-close="true" label-width="140px" :footer-show="false"
|
||||
@success="onFormSuccess">
|
||||
@@ -33,6 +33,8 @@
|
||||
data() {
|
||||
return {
|
||||
title: '商品',
|
||||
attributesLoaded: false,
|
||||
attributes: [],
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
@@ -58,26 +60,34 @@
|
||||
},
|
||||
props: {
|
||||
list: "rows",
|
||||
value: "_id",
|
||||
value: "name",
|
||||
label: "name"
|
||||
},
|
||||
watch: (res) => {
|
||||
const {
|
||||
option
|
||||
} = res
|
||||
this.form1.props.columns[2].columns = option.extraAttributes.map((item, index) => {
|
||||
return {
|
||||
key: index,
|
||||
title: item.lable,
|
||||
type: "select",
|
||||
data: item.values.map(citem => {
|
||||
return {
|
||||
value: JSON.stringify({keyName: item.lable,keyValue: citem}),
|
||||
label: citem
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(option);
|
||||
if(option.extraAttributes) {
|
||||
this.form1.props.columns[2].columns = option.extraAttributes.map((item, index) => {
|
||||
return {
|
||||
key: index,
|
||||
title: item.label,
|
||||
type: "select",
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: item.values.map(citem => {
|
||||
return {
|
||||
value: JSON.stringify({keyName: item.lable,keyValue: citem}),
|
||||
label: citem
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.form1.props.columns[2].columns = []
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -93,15 +103,159 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "attributes",
|
||||
title: "固定属性",
|
||||
type: "object",
|
||||
// justify: "start",
|
||||
key: "",
|
||||
title: "",
|
||||
type: "group",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: [
|
||||
{
|
||||
key: "brand",
|
||||
title: "品牌厂家",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '品牌厂家')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
key: "materialQuality",
|
||||
title: "材质",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '材质')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "",
|
||||
title: "",
|
||||
type: "group",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: [
|
||||
{
|
||||
key: "singleLength",
|
||||
title: "单件长度",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '单件长度')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
key: "productStandard",
|
||||
title: "产品标准",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '产品标准')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "",
|
||||
title: "",
|
||||
type: "group",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: [
|
||||
|
||||
{
|
||||
key: "pricingForm",
|
||||
title: "计价形式",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '计价形式')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
key: "processStandard",
|
||||
title: "加工标准",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '加工标准')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "",
|
||||
title: "",
|
||||
type: "group",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: [
|
||||
{
|
||||
key: "deliveryService",
|
||||
title: "交货服务",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '交货服务')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
},
|
||||
{key: "deliveryTime", title: "交货时限", type: "date",},
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
key: "",title: "",type: 'group',showLabel: false, justify: "start",columns:
|
||||
[
|
||||
@@ -109,18 +263,24 @@
|
||||
{
|
||||
key: "procureUnit",
|
||||
title: "单位",
|
||||
type: "remote-select",
|
||||
type: "select",
|
||||
showAll: true,
|
||||
action: "client/enquiry/attributes/pub/getOne",
|
||||
actionData: {
|
||||
label: '单位',
|
||||
},
|
||||
allowCreate: true,
|
||||
filterable: true,
|
||||
data: () => {
|
||||
const row = this.attributes.find(item => item.label == '单位')
|
||||
if(row) {
|
||||
return row.options
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{key: "deliveryTime", title: "交货时限", type: "date",},
|
||||
|
||||
{
|
||||
key: "address",
|
||||
title: "交货地点",
|
||||
@@ -157,6 +317,18 @@
|
||||
},
|
||||
created() {
|
||||
this.form1.props.columns[0].title = '商品' + (this.productIndex + 1)
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/attributes/pub/getList',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
this.attributes = data.rows
|
||||
this.attributesLoaded = true
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
@@ -0,0 +1,350 @@
|
||||
<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/enquiry/list">询价单</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>询价单详情</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<el-descriptions class="description" title="采购商信息" :column="3" size="medium" direction="vertical" border>
|
||||
<template slot="title">
|
||||
采购商信息 (已有{{sheet.answerCount || 0}}家报价)
|
||||
</template>
|
||||
<template slot="extra">
|
||||
<span style="padding-right: 20px;">距离报价结束还剩<span
|
||||
style="color: red;">{{vk.pubfn.dateDiff2(sheet.answerTime)}}</span></span>
|
||||
<el-button type="primary" size="small" @click="toQuote">我要报价</el-button>
|
||||
</template>
|
||||
<el-descriptions-item label="采购商">
|
||||
<template v-if="sheet.user.accountType == 1">{{sheet.user.person.personName}}</template>
|
||||
<template v-if="sheet.user.accountType == 2">{{sheet.user.company.companyName}}</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<template v-if="sheet.user.accountType == 1">{{sheet.user.person.mobile}}</template>
|
||||
<template v-if="sheet.user.accountType == 2">{{sheet.user.company.companyName}}</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发布时间">
|
||||
{{sheet._add_time_str}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 产品列表 -->
|
||||
<el-descriptions v-for="(item,index) in productList" class="description" :title="'采购商品' + (index + 1)"
|
||||
:column="3" size="medium" border :key="index">
|
||||
<el-descriptions-item label="商品">
|
||||
{{item.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-for="(attr, aindex) in item.extraAttributes" :label="attr.keyName"
|
||||
:key="aindex">
|
||||
{{attr.keyValue}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="品牌厂家">
|
||||
{{item.brand}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="材质">
|
||||
{{item.materialQuality}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单件长度">
|
||||
{{item.singleLength}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品标准">
|
||||
{{item.productStandard}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计价形式">
|
||||
{{item.pricingForm}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="加工标准">
|
||||
{{item.processStandard}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货服务">
|
||||
{{item.deliveryService}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货时限">
|
||||
{{item.deliveryTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采购数量">
|
||||
{{item.procureNumber}}{{item.procureUnit}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货地点">
|
||||
<template
|
||||
v-if="item.address && item.address.region">{{item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name}}</template>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions class="description" title="采购商其他要求" :column="3" size="medium" direction="vertical" border>
|
||||
<el-descriptions-item label="其他要求">
|
||||
{{sheet.remark || '无'}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions class="description" title="发票要求" :column="3" size="medium" border direction="vertical">
|
||||
<el-descriptions-item label="是否含税">
|
||||
{{sheet.invoice? '含税': '不含税'}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="sheet.invoice" label="发票种类">
|
||||
{{sheet.nvoiceType}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="sheet.invoice" label="开票时间">
|
||||
{{sheet.writeInvoiceTime}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions class="description" title="运输要求" :column="3" size="medium" border direction="vertical">
|
||||
<el-descriptions-item label="随货资料">
|
||||
{{sheet.transportDocuments.join("、")}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他资料">
|
||||
{{sheet.otherTransportDocuments}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="运输限制">
|
||||
{{sheet.transportLimit}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions class="description" title="交易模式" :column="3" size="medium" border>
|
||||
<el-descriptions-item label="交易模式">
|
||||
<template v-if="sheet.tradeMethod == 1">自主交易</template>
|
||||
<template v-else-if="sheet.tradeMethod == 0">金久信公正</template>
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款方式">
|
||||
<template v-if="sheet.payMethod == 1">预付{{sheet.advancePayRate}}%货到付全款</template>
|
||||
<template v-else-if="sheet.payMethod == 2">货到验收后付款</template>
|
||||
<template v-else-if="sheet.payMethod == 3">提货付全款</template>
|
||||
<template v-else-if="sheet.payMethod == 4">信誉采购</template>
|
||||
<template v-else-if="sheet.payMethod == 5">{{item.otherPayMethod}}</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价时限">
|
||||
|
||||
{{vk.pubfn.timeFormat(sheet.answerTime,"yyyy-MM-dd hh:mm:ss")}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="保证金要求">
|
||||
{{sheet.earnestMoney}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
<!-- 报价列表 -->
|
||||
<vk-data-table :data="sheet.quoteList" :columns="table1.columns" title="adasda "
|
||||
:customRightBtns="table1.customRightBtns"></vk-data-table>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
enquiryId: undefined,
|
||||
productList: [],
|
||||
sheetTitle: '',
|
||||
sheet: {
|
||||
user: {},
|
||||
productList: [],
|
||||
transportDocuments: []
|
||||
},
|
||||
table1: {
|
||||
// 表格数据
|
||||
data: [],
|
||||
// 表格字段显示规则
|
||||
columns: [{
|
||||
key: "subjectName",
|
||||
title: "供应商",
|
||||
type: "text",
|
||||
width: 300,
|
||||
formatter: (val, row, column, index) => {
|
||||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId) {
|
||||
return val
|
||||
}
|
||||
if (row.accountType == 1) {
|
||||
return vk.pubfn.hidden(val, 1, 1);
|
||||
} else {
|
||||
return vk.pubfn.hidden(val, 2, 4);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "报价时间",
|
||||
type: "text",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
key: "subjectMobile",
|
||||
title: "联系方式",
|
||||
type: "text",
|
||||
width: 120,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = val
|
||||
if (row.managerMobile) {
|
||||
str = row.managerMobile
|
||||
}
|
||||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId) {
|
||||
return str
|
||||
}
|
||||
return vk.pubfn.hidden(str, 3, 4);
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "报价",
|
||||
type: "textarea",
|
||||
width: 130,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = val
|
||||
if (row.managerMobile) {
|
||||
str = row.managerMobile
|
||||
}
|
||||
if (vk.getVuex('$user.userInfo._id') == this.sheet.userId) {
|
||||
return val
|
||||
}
|
||||
return "******";
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
],
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '合同',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
show: (row) => {
|
||||
return vk.getVuex('$user.userInfo._id') == this.sheet.userId && row.status == 1
|
||||
},
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/contract/index');
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: '选择',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
show: (row) => {
|
||||
return vk.getVuex('$user.userInfo._id') == this.sheet.userId && row.status == 0
|
||||
},
|
||||
onClick: (item) => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId: item._id
|
||||
},
|
||||
success: (data) => {
|
||||
vk.navigateTo('/pages/contract/index');
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '查看报价详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-search',
|
||||
disabled: (item) => {
|
||||
return vk.getVuex('$user.userInfo._id') != this.sheet.userId
|
||||
},
|
||||
onClick: (item) => {
|
||||
vk.toast(`${item._id}-按钮1`);
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
if (!id) {
|
||||
vk.navigateTo('/pages/enquiry/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = id
|
||||
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 打开报价窗口
|
||||
*/
|
||||
toQuote() {
|
||||
// 获取用户信息
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
const {
|
||||
userInfo
|
||||
} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
center: true
|
||||
}).then(res => {
|
||||
vk.navigateTo('/pages/enquiry/quote?enquiryId=' + this.enquiryId);
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
const {
|
||||
productList
|
||||
} = res.data
|
||||
productList.forEach(item => {
|
||||
const keys = Object.keys(item.extraAttributes)
|
||||
keys.forEach(citem => {
|
||||
item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
citem])
|
||||
})
|
||||
})
|
||||
this.productList = productList
|
||||
|
||||
delete res.data.productList
|
||||
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
+114
-99
@@ -22,61 +22,19 @@
|
||||
<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-button @click="toMyEnquiry" type="primary" round plain>我发布的询价单</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词">
|
||||
<el-input @keyup.enter.native="search" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<el-button @click="search(1)" type="primary" slot="append" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类">
|
||||
<el-tabs>
|
||||
<el-tab-pane v-for="(item, index) in categoryTreeData" :label="item.name" :key="item._id">
|
||||
<el-checkbox-group v-model="checkCategoryList[index]">
|
||||
<el-checkbox v-for="(citem, cindex) in item.children" :label="citem"
|
||||
:key="cindex">{{citem.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市">
|
||||
<el-checkbox-group v-model="checkProvinceList">
|
||||
<!-- <el-checkbox :label="{code:0,name: '全国'}">全国</el-checkbox> -->
|
||||
<el-checkbox :checked="cindex == 0" v-for="(citem, cindex) in provinceData" :label="citem"
|
||||
:key="cindex">{{citem.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</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="goods-list">
|
||||
|
||||
</view>
|
||||
|
||||
<view class="paginatio">
|
||||
<el-pagination
|
||||
@current-change="search"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="goodsData.total">
|
||||
</el-pagination>
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns" :customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -89,37 +47,101 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
goodsData: {
|
||||
total: 0,
|
||||
rows: []
|
||||
}
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/sheet/pub/getList",
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item._id);
|
||||
}
|
||||
}, ],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "productList",
|
||||
title: "品名/材质",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item=>item.name).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "采购量",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item=>item.procureNumber + item.procureUnit).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
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: "采购单位",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
if(val.accountType == 1) {
|
||||
return val.person.personName
|
||||
}else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
// {
|
||||
// key: "_add_time",
|
||||
// title: "添加时间",
|
||||
// type: "time",
|
||||
// width: 160
|
||||
// },
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
// this.search(1)
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -128,7 +150,7 @@
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
}else if(vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -136,15 +158,15 @@
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
}else {
|
||||
uni.navigateTo({
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
@@ -161,24 +183,15 @@
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/pub/getList',
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
categoryIds: categoryIds,
|
||||
provinceCodes: provinceCodes
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ',data);
|
||||
data.rows.forEach(item => {
|
||||
try {
|
||||
item.addressStr = item.address.province.name + "-" + item.address.city.name + "-" + item.address.area.name
|
||||
} catch(err){
|
||||
item.addressStr = ""
|
||||
}
|
||||
})
|
||||
console.log('data: ', data);
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
@@ -187,6 +200,7 @@
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
@@ -196,6 +210,7 @@
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
@@ -233,22 +248,22 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-list {
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.paginatio{
|
||||
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -0,0 +1,241 @@
|
||||
<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="http://jyx.gxwebsoft.com/uploads/20210506/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" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</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/enquiry/sheet/pub/getList",
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item._id);
|
||||
}
|
||||
}, ],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "productList",
|
||||
title: "品名/材质",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item=>item.name).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "采购量",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item=>item.procureNumber + item.procureUnit).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
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: "采购单位",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
if(val.accountType == 1) {
|
||||
return val.person.personName
|
||||
}else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
// {
|
||||
// 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/enquiry/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>
|
||||
@@ -0,0 +1,228 @@
|
||||
<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/enquiry/list">询价单</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
|
||||
<!-- 产品列表 -->
|
||||
<view class="quote" v-for="(item,index) in sheet.productList" :key="index">
|
||||
<el-descriptions class="description" :title="'采购商品' + (index + 1)" :column="3"
|
||||
size="medium" border >
|
||||
<el-descriptions-item label="商品">
|
||||
{{item.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-for="(attr, aindex) in item.extraAttributes" :label="attr.keyName"
|
||||
:key="aindex">
|
||||
{{attr.keyValue}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="品牌厂家">
|
||||
{{item.brand}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="材质">
|
||||
{{item.materialQuality}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单件长度">
|
||||
{{item.singleLength}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品标准">
|
||||
{{item.productStandard}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计价形式">
|
||||
{{item.pricingForm}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="加工标准">
|
||||
{{item.processStandard}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货服务">
|
||||
{{item.deliveryService}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货时限">
|
||||
{{item.deliveryTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采购数量">
|
||||
{{item.procureNumber}}{{item.procureUnit}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货地点">
|
||||
{{item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<view class="quote-form">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="报价单价">
|
||||
<vk-data-input-money v-model="item.unitPrice" placeholder="请输入单价" rightText="元"></vk-data-input-money>
|
||||
</el-form-item>
|
||||
<el-form-item label="小计金额">
|
||||
<vk-data-input-money :readonly="true" :value="item.unitPrice * item.procureNumber" placeholder="" rightText="元"></vk-data-input-money>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<el-form label-width="120px" :inline="true">
|
||||
<el-form-item label="报价总价">
|
||||
<vk-data-input-money :readonly="true" :value="totalPrice" placeholder="请输入单价" rightText="元"></vk-data-input-money>
|
||||
</el-form-item>
|
||||
<el-form-item label="人民币大写">
|
||||
<el-input :readonly="true" :value="totalPriceStr" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<view class="form-footer">
|
||||
<el-button type="primary" @click="submit">提交报价单</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
enquiryId: undefined,
|
||||
// productList: [],
|
||||
sheetTitle: '',
|
||||
sheet: {
|
||||
productList: []
|
||||
},
|
||||
// totalPriceStr: ''
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
const {
|
||||
enquiryId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/enquiry/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = enquiryId
|
||||
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
totalPrice() {
|
||||
let price = 0
|
||||
this.sheet.productList.forEach(item => {
|
||||
price += item.unitPrice * item.procureNumber
|
||||
})
|
||||
|
||||
return price
|
||||
},
|
||||
totalPriceStr() {
|
||||
if(this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 提交报价单
|
||||
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'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
res.data.productList.forEach(item => {
|
||||
item.unitPrice = 0
|
||||
const keys = Object.keys(item.extraAttributes)
|
||||
keys.forEach(citem => {
|
||||
item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
citem])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -30,9 +30,13 @@
|
||||
<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"
|
||||
:before-action="form1.props.beforeAction" label-width="140px" cancel-text="保存草稿" submit-text="提交询价单"
|
||||
@success="onFormSuccess">
|
||||
@success="onFormSuccess" :footer-show="false">
|
||||
|
||||
</vk-data-form>
|
||||
<view class="form-footer">
|
||||
<el-button type="" >保存草稿</el-button>
|
||||
<el-button type="primary" @click="submit">提交询价单</el-button>
|
||||
</view>
|
||||
<!-- <el-divider content-position="left">其他设置</el-divider> -->
|
||||
</view>
|
||||
|
||||
@@ -110,16 +114,16 @@
|
||||
title: "运输限制",
|
||||
type: "text",
|
||||
},
|
||||
{key: "", title: "交易模式", type: "bar-title", component: 'custom-form-section'},
|
||||
{key: "", title: "交易说明", type: "bar-title", component: 'custom-form-section'},
|
||||
{key: "tradeMethod",
|
||||
title: "交易模式",
|
||||
type: "radio",
|
||||
data: [
|
||||
{ value: '自主交易', label: "自主交易" },
|
||||
{ value: '金久信公证', label: "金久信公证" },
|
||||
{ value: 1, label: "自主交易" },
|
||||
{ value: 0, label: "金久信公证" },
|
||||
],
|
||||
},
|
||||
{key: "", title: "交易说明", type: "bar-title"},
|
||||
// {key: "", title: "交易说明", type: "bar-title"},
|
||||
{
|
||||
key: "payMethod",
|
||||
title: "付款方式",
|
||||
@@ -199,6 +203,13 @@
|
||||
},
|
||||
addProduct() {
|
||||
this.productList.push({})
|
||||
},
|
||||
onFormSuccess() {
|
||||
vk.navigateTo('/pages/enquiry/list');
|
||||
},
|
||||
submit() {
|
||||
|
||||
this.$refs.form1.submitForm()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -231,4 +242,12 @@
|
||||
padding-left: 140px;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
.form-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
+274
-20
@@ -2,8 +2,124 @@
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
这是首页
|
||||
<category-bar alwaysShowCategory></category-bar>
|
||||
|
||||
<!-- banner -->
|
||||
<view class="banner-outer">
|
||||
<el-carousel height="365px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="http://jyx.gxwebsoft.com/uploads/20210521/336a76fbf9fe44a07b5cfd4caf6f8bb9.jpg"
|
||||
mode="scaleToFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</view>
|
||||
<!-- banner下 -->
|
||||
<div class="group-inner3">
|
||||
<div class="group-inner3-list">
|
||||
<a href="/support/brand.html" rel="nofollow" target="_blank">
|
||||
<div class="group-inner3-listleft">
|
||||
<h2>厂家直营</h2>
|
||||
<p>产地货源 正规优价</p>
|
||||
</div>
|
||||
<div class="group-inner3-listright">
|
||||
<img src="/static/images/home1.png">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="group-inner3-list">
|
||||
<a href="/market/index.html" rel="nofollow" target="_blank">
|
||||
<div class="group-inner3-listleft">
|
||||
<h2>采购·找现货</h2>
|
||||
<p>专属采购助手<br>
|
||||
为您匹配优质供应商</p>
|
||||
</div>
|
||||
<div class="group-inner3-listright">
|
||||
<img src="/static/images/home2.png">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="group-inner3-list">
|
||||
<a href="/yellowpage/index.html" rel="nofollow" target="_blank">
|
||||
<div class="group-inner3-listleft">
|
||||
<h2>供应·找买家 </h2>
|
||||
<p>快速发布您的产品<br>
|
||||
让网上生意变的如此简单</p>
|
||||
</div>
|
||||
<div class="group-inner3-listright">
|
||||
<img src="/static/images/home3.png">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="clear:both;width: 100%;"></div>
|
||||
|
||||
<!-- 询价列表 start -->
|
||||
<view class="enquiry-outer">
|
||||
<view class="" style="height: 40px;"></view>
|
||||
<el-divider>
|
||||
<view class="divider-text">最新询价信息</view>
|
||||
</el-divider>
|
||||
<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">
|
||||
<div class="detail">
|
||||
<div class="detail-kind clearfix">
|
||||
<div class="tag">报价中</div>
|
||||
<div class="kind"><span>{{item.answerNumber || 0}}</span>家已报价</div>
|
||||
</div>
|
||||
<div class="detail-infor">
|
||||
<span>`</span><span>50支</span>
|
||||
</div>
|
||||
<div class="detail-num">
|
||||
<span v-if="item.user.accountType == 1" class="company">{{item.user.person.personName}}</span>
|
||||
<span v-if="item.user.accountType == 2" class="company">{{item.user.company.companyName}}</span>
|
||||
<span class="time">{{item._add_time_str}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<div style="clear:both;width: 100%;"></div>
|
||||
</ul>
|
||||
</div>
|
||||
</view>
|
||||
<!-- 询价列表 end -->
|
||||
|
||||
<!-- 现货市场 start -->
|
||||
<view class="" style="height: 40px;"></view>
|
||||
<view class="spot-outer">
|
||||
<el-divider>
|
||||
<view class="divider-text">现货市场</view>
|
||||
</el-divider>
|
||||
<view class="" style="height: 40px;"></view>
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in spotGoodsData" :key="index" class="goods">
|
||||
<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 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
|
||||
round size="small">立即查看</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<el-button>查看更多</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -15,14 +131,16 @@
|
||||
// 页面数据变量
|
||||
return {
|
||||
// init请求返回的数据
|
||||
data:{
|
||||
|
||||
spotGoodsData: [],
|
||||
enquirySheetData: [],
|
||||
data: {
|
||||
|
||||
},
|
||||
// 表单请求数据
|
||||
form1:{
|
||||
|
||||
form1: {
|
||||
|
||||
},
|
||||
scrollTop:0,
|
||||
scrollTop: 0,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -35,42 +153,178 @@
|
||||
this.init(options);
|
||||
},
|
||||
// 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快,会在页面进入动画完成前触发
|
||||
onReady(){
|
||||
|
||||
onReady() {
|
||||
|
||||
},
|
||||
// 监听 - 页面每次【显示时】执行(如:前进和返回) (页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面)
|
||||
onShow() {
|
||||
|
||||
|
||||
},
|
||||
// 监听 - 页面每次【隐藏时】执行(如:返回)
|
||||
onHide() {
|
||||
|
||||
|
||||
},
|
||||
// 监听 - 点击右上角转发时
|
||||
onShareAppMessage(options) {
|
||||
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
// 页面数据初始化函数
|
||||
init(options){
|
||||
|
||||
getSpotGoods() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/pub/getList',
|
||||
loading: false,
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
data.rows.forEach(item => {
|
||||
try {
|
||||
item.addressStr = item.address.province.name + "-" + item.address.city
|
||||
.name + "-" + item.address.area.name
|
||||
} catch (err) {
|
||||
item.addressStr = ""
|
||||
}
|
||||
})
|
||||
this.spotGoodsData = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
pageTo(path){
|
||||
getEnquirySheetList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
loading: false,
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
success: (data) => {
|
||||
this.enquirySheetData = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
// 页面数据初始化函数
|
||||
init(options) {
|
||||
this.getSpotGoods()
|
||||
this.getEnquirySheetList()
|
||||
},
|
||||
pageTo(path) {
|
||||
vk.navigateTo(path);
|
||||
}
|
||||
},
|
||||
// 监听器
|
||||
watch:{
|
||||
|
||||
watch: {
|
||||
|
||||
},
|
||||
// 计算属性
|
||||
computed:{
|
||||
|
||||
computed: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.banner-outer {}
|
||||
|
||||
.carousel-img {
|
||||
width: 760px;
|
||||
height: 365px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
background-color: initial;
|
||||
}
|
||||
|
||||
.el-carousel__item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.divider-text {
|
||||
color: #393735;
|
||||
font-size: 28px;
|
||||
padding: 0 20px;
|
||||
background-color: #f4f4f4;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.enquiry-outer{
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.enquiry-outer .mod-inner2Listcenter {
|
||||
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.spot-outer{
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
.goods-list {
|
||||
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
.goods {
|
||||
width: 217px;
|
||||
height: 280px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 25px;
|
||||
|
||||
&-title {
|
||||
font-size: 15px;
|
||||
color: #101010;
|
||||
height: 62px;
|
||||
padding-top: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&-stock {
|
||||
font-size: 12px;
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
&-address {
|
||||
font-size: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 200px;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-company {
|
||||
color: #4F4F4F;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-buy {
|
||||
width: 108px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
color: rgba(169, 41, 36, 1);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
font-family: Roboto;
|
||||
border: 1px solid rgba(169, 41, 36, 1);
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -16,6 +16,8 @@
|
||||
label-width="140px"
|
||||
input-width="400px"
|
||||
:before-action="form1.props.beforeAction"
|
||||
:show-cancel="false"
|
||||
submit-text="保存名片"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<!-- v-slot:editor 中的 editor 对应 columns中的 key, form对应 form1.data keyName 对应 columns中的 key -->
|
||||
@@ -49,11 +51,6 @@
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "personName",
|
||||
title: "姓名",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "position",
|
||||
title: "职位",
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return formData.person.personName != null
|
||||
return vk.getVuex('$user.userInfo.accountType') === 1
|
||||
},
|
||||
columns: [{
|
||||
key: "personName",
|
||||
@@ -75,9 +75,16 @@
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "bankCardNo",
|
||||
title: "银行卡号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "电话",
|
||||
title: "手机号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
@@ -91,7 +98,7 @@
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return formData.company.companyName != null
|
||||
return vk.getVuex('$user.userInfo.accountType') === 2
|
||||
},
|
||||
columns: [{
|
||||
key: "companyName",
|
||||
@@ -283,8 +290,16 @@
|
||||
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
|
||||
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
])
|
||||
// 成功后的逻辑
|
||||
console.log('data: ', data);
|
||||
|
||||
if(data.userInfo.fadadaConfirm && data.userInfo.businessCard == null) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
<view class="w-1200">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-menu @select="menuSelect" default-active="fadada" class="el-menu-vertical-demo">
|
||||
<el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo">
|
||||
<el-menu-item index="fadada">
|
||||
<i class="el-icon-menu"></i>
|
||||
<span slot="title">实名认证</span>
|
||||
@@ -35,7 +35,7 @@
|
||||
components: {Personal, BusinessCard},
|
||||
data() {
|
||||
return {
|
||||
currMenu: 'business-card',
|
||||
currMenu: 'fadada',
|
||||
// currMenu: 'fadada',
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user