20231129
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
<h2 style="margin-bottom: 15px;">会员登录</h2>
|
||||
<div id="from" action="">
|
||||
<div class="input-grouptabs clear">
|
||||
<span @click="memberType = 'business'"
|
||||
:class="{'tab-active': memberType === 'business'}" class="nopassword" data-id="1"
|
||||
id="nopw"><i></i>企业用户</span>
|
||||
<span @click="memberType = 'personal'"
|
||||
:class="{'tab-active': memberType == 'personal'}" class="normal" data-id="0"
|
||||
:class="{'tab-active': memberType === 'personal'}" class="normal" data-id="0"
|
||||
id="normal"><i></i>个人用户</span>
|
||||
<span @click="memberType = 'business'"
|
||||
:class="{'tab-active': memberType == 'business'}" class="nopassword" data-id="1"
|
||||
id="nopw"><i></i>企业用户</span>
|
||||
</div>
|
||||
<!-- 账号密码登录 -->
|
||||
<view class="login-method">
|
||||
@@ -101,7 +101,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
memberType: 'personal', // business 企业 、、personal个人
|
||||
memberType: 'business', // business 企业 、、personal个人
|
||||
loginMethod: 'username', // username 用户名 + 密码 、、mobile 手机号 + 验证码
|
||||
smsTips: '获取验证码',
|
||||
form1: {
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
<h2 style="margin-bottom: 15px;">免费注册会员</h2>
|
||||
<view id="from" action="">
|
||||
<div class="input-grouptabs clear">
|
||||
<span @click="form1.accountType = 2"
|
||||
:class="{'tab-active': form1.accountType === 2}" class="nopassword" data-id="1"
|
||||
id="nopw"><i></i>企业用户</span>
|
||||
<span @click="form1.accountType = 1"
|
||||
:class="{'tab-active': form1.accountType == 1}" class="normal" data-id="0"
|
||||
:class="{'tab-active': form1.accountType === 1}" class="normal" data-id="0"
|
||||
id="normal"><i></i>个人用户</span>
|
||||
<span @click="form1.accountType = 2"
|
||||
:class="{'tab-active': form1.accountType == 2}" class="nopassword" data-id="1"
|
||||
id="nopw"><i></i>企业用户</span>
|
||||
</div>
|
||||
<div class="tabContent">
|
||||
<div class="login-con active" id="rc">
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
smsTips: '点击获取',
|
||||
form1: {
|
||||
accountType: 1, // business 企业 、、personal个人
|
||||
accountType: 2, // business 企业 、、personal个人
|
||||
mobile: '',
|
||||
smsCode: '',
|
||||
password: '',
|
||||
|
||||
+350
-327
@@ -1,363 +1,386 @@
|
||||
<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="">
|
||||
<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>
|
||||
<el-tag size="mini" v-else-if="item.contract.type === 'process'" type="warning"
|
||||
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">
|
||||
<view>
|
||||
交易编码:{{ item.contract.transactionId }}
|
||||
</view>
|
||||
<view>
|
||||
创建时间:{{ item.contract._add_time_str }}
|
||||
</view>
|
||||
</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>
|
||||
<view class="paginatio">
|
||||
<el-pagination @current-change="query" background layout="prev, pager, next"
|
||||
:total="tableData.total"></el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</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>
|
||||
<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>
|
||||
<!-- 上传合同弹窗 -->
|
||||
</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
|
||||
}
|
||||
}
|
||||
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",
|
||||
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||||
},
|
||||
{
|
||||
key: "sellerSignKeyword",
|
||||
title: "卖家签章关键字",
|
||||
type: "text",
|
||||
tips: '关键字为文档中的文字内容(要能使用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
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "contractFile",
|
||||
title: "签署文档",
|
||||
type: "file",
|
||||
limit: 1,
|
||||
accept: ".pdf",
|
||||
tips: "仅支持PDF文件",
|
||||
},
|
||||
{
|
||||
key: "buyerSignKeyword",
|
||||
title: "买家签章关键字",
|
||||
type: "text",
|
||||
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||||
},
|
||||
{
|
||||
key: "sellerSignKeyword",
|
||||
title: "卖家签章关键字",
|
||||
type: "text",
|
||||
tips: '关键字为文档中的文字内容(要能使用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 => {
|
||||
// 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)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.contract-list {
|
||||
background-color: #FFFFFF;
|
||||
padding: 10px 20px 20px;
|
||||
}
|
||||
.contract-list {
|
||||
background-color: #FFFFFF;
|
||||
padding: 10px 20px 20px;
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.paginatio {
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.contract-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: solid 1px #e8e8e8;
|
||||
}
|
||||
.contract-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: solid 1px #e8e8e8;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.contract-left {}
|
||||
.contract-left {
|
||||
}
|
||||
|
||||
.contract-right {
|
||||
text-align: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
.contract-right {
|
||||
text-align: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.trade-method {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: solid 2px #f4f4f4;
|
||||
}
|
||||
.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 {
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
margin-right: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.trade-method-item.active {
|
||||
color: #A92924;
|
||||
border-bottom: solid 2px #A92924;
|
||||
}
|
||||
.trade-method-item.active {
|
||||
color: #A92924;
|
||||
border-bottom: solid 2px #A92924;
|
||||
}
|
||||
|
||||
.contract-left-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.contract-left-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.contract-product {
|
||||
margin: 0 10px;
|
||||
}
|
||||
.contract-product {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.contract-left-center {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #999999;
|
||||
font-size: 12px;
|
||||
}
|
||||
.contract-left-center {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
color: #999999;
|
||||
font-size: 12px;
|
||||
flex-direction: column;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.contract-left-bottom {
|
||||
display: flex;
|
||||
}
|
||||
.contract-left-bottom {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.contract-status {
|
||||
display: flex;
|
||||
}
|
||||
.contract-status {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.contract-status-tag {
|
||||
margin-left: 2px;
|
||||
}
|
||||
.contract-status-tag {
|
||||
margin-left: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,351 +1,571 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <view class="product-title">{{title}}</view> -->
|
||||
<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">
|
||||
</vk-data-form>
|
||||
</view>
|
||||
<view class="border-bottom pt-20">
|
||||
<el-form ref="form" :model="form1" label-width="80px" :rules="form1.props.rules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品名称">
|
||||
<el-select v-model="form1.data.goodsId" placeholder="请选择商品" @change="selectGoods">
|
||||
<el-option
|
||||
v-for="(item, index) in goodsList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item._id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号">
|
||||
<el-select v-model="form1.data.model" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '规格型号')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '规格型号').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其他数据">
|
||||
<el-select v-model="form1.data.otherData" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '其他数据')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '其他数据').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="执行标准">
|
||||
<el-select v-model="form1.data.standard" placeholder="请选择">
|
||||
<template v-if="form1.data.goodsId">
|
||||
<el-option
|
||||
v-for="(item, index) in goodsList.find(goods => goods._id === form1.data.goodsId).attributes.filter(attr => attr.label === '执行标准')[0].values"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="单件长度">
|
||||
<el-input placeholder="请输入内容" v-model="form1.data.singleLength" class="input-with-select">
|
||||
<el-select v-model="form1.data.singleLengthUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单件长度')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单件长度').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="材质">
|
||||
<el-select v-model="form1.data.materialQuality" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '材质')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '材质').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交货服务">
|
||||
<el-select v-model="form1.data.deliverService" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '交货服务')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '交货服务').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购数量">
|
||||
<el-input v-model="form1.data.procureNumber">
|
||||
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单位')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单位').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计价形式">
|
||||
<el-select v-model="form1.data.pricingForm" placeholder="请选择">
|
||||
<template v-if="attributes.find(attr => attr.label === '计价形式')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '计价形式').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交货时限">
|
||||
<el-date-picker
|
||||
v-model="form1.data.deliveryTime"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<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"/>
|
||||
<!-- <span slot="prefix">省</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">市</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县">
|
||||
<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>
|
||||
<!-- <span slot="prefix">区/县</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form1.data.addressRegion"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
baseAttributes: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
productIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '商品',
|
||||
attributesLoaded: false,
|
||||
attributes: [],
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
extraAttributes: {},
|
||||
attributes: {},
|
||||
addressRegion: undefined
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/kh/add",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "", title: "商品1", type: "bar-title", component: 'custom-form-section'},
|
||||
{
|
||||
key: "name",
|
||||
title: "模板",
|
||||
type: "remote-select",
|
||||
action: "client/enquiry/template/pub/getList",
|
||||
showAll: true,
|
||||
actionData: {
|
||||
pageSize: 1000
|
||||
},
|
||||
props: {
|
||||
list: "rows",
|
||||
value: "name",
|
||||
label: "name"
|
||||
},
|
||||
watch: (res) => {
|
||||
const {
|
||||
option
|
||||
} = res
|
||||
console.log(option);
|
||||
if(option.extraAttributes) {
|
||||
let groupIndex = -1
|
||||
option.extraAttributes.forEach((item, index) => {
|
||||
if(index%4 == 0) {
|
||||
this.form1.props.columns[2].columns.push({
|
||||
key: "",
|
||||
title: "",
|
||||
type: "group",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: []
|
||||
})
|
||||
groupIndex ++
|
||||
}
|
||||
|
||||
this.form1.props.columns[2].columns[0].columns.push({
|
||||
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 = []
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "extraAttributes",
|
||||
title: "额外属性",
|
||||
type: "object",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: [
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
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: "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: "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:
|
||||
[
|
||||
{key: "procureNumber", title: "采购数量", type: "number",},
|
||||
{
|
||||
key: "procureUnit",
|
||||
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: "addressRegion", title: "交货地点", type: "address",},
|
||||
{key: "addressDetail", title: "详细地址", type: "textarea",},
|
||||
]
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
name:[
|
||||
{ required:true, message:'商品不能为空', trigger: ["change","blur"] }
|
||||
],
|
||||
addressRegion:[
|
||||
{ required:true, message:'交货地点不能为空', trigger: ["change","blur"] }
|
||||
],
|
||||
procureNumber:[
|
||||
{ required:true, message:'采购数量不能为空', trigger: ["change","blur"] },
|
||||
{ min: 1,type: 'number', message:'采购数量不能小于1', trigger: ["change","blur"] }
|
||||
],
|
||||
procureUnit:[
|
||||
{ required:true, message:'采购数量不能为空', trigger: ["change","blur"] },
|
||||
],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "add",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData)=> {
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
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: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
"form1.data"(val){
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
},
|
||||
value(val) {
|
||||
this.form1.data = val
|
||||
console.log("this.form1.data = val", val);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
baseAttributes: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
productIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
title: '商品',
|
||||
attributesLoaded: false,
|
||||
goodsList: [],
|
||||
attributes: [],
|
||||
form: {
|
||||
addressDetail: ''
|
||||
},
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
goodsId: null,
|
||||
model: null,
|
||||
otherData: null,
|
||||
materialQuality: null,
|
||||
singleLength: null,
|
||||
singleLengthUnit: null,
|
||||
deliverService: null,
|
||||
standard: null,
|
||||
pricingForm: null,
|
||||
deliveryTime: null,
|
||||
len: null,
|
||||
extraAttributes: {},
|
||||
attributes: {},
|
||||
addressRegion: undefined
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/kh/add",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "", title: "商品1", type: "bar-title", component: 'custom-form-section'},
|
||||
{
|
||||
key: "name",
|
||||
title: "模板",
|
||||
type: "remote-select",
|
||||
action: "client/enquiry/template/pub/getList",
|
||||
showAll: true,
|
||||
actionData: {
|
||||
pageSize: 1000
|
||||
},
|
||||
props: {
|
||||
list: "rows",
|
||||
value: "name",
|
||||
label: "name"
|
||||
},
|
||||
watch: (res) => {
|
||||
const {
|
||||
option
|
||||
} = res
|
||||
console.log(option);
|
||||
if (option.extraAttributes) {
|
||||
let groupIndex = -1
|
||||
option.extraAttributes.forEach((item, index) => {
|
||||
if (index % 4 == 0) {
|
||||
this.form1.props.columns[2].columns.push({
|
||||
key: "",
|
||||
title: "",
|
||||
type: "group",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: []
|
||||
})
|
||||
groupIndex++
|
||||
}
|
||||
|
||||
this.form1.props.columns[2].columns[0].columns.push({
|
||||
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 = []
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "extraAttributes",
|
||||
title: "额外属性",
|
||||
type: "object",
|
||||
justify: "start",
|
||||
showLabel: false,
|
||||
columns: [],
|
||||
},
|
||||
{
|
||||
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: "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: "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:
|
||||
[
|
||||
{key: "procureNumber", title: "采购数量", type: "number",},
|
||||
{
|
||||
key: "procureUnit",
|
||||
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: "addressRegion", title: "交货地点", type: "address",},
|
||||
{key: "addressDetail", title: "详细地址", type: "textarea",},
|
||||
]
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
goodsId: [
|
||||
{required: true, message: '商品不能为空', trigger: ["change", "blur"]}
|
||||
],
|
||||
addressRegion: [
|
||||
{required: true, message: '交货地点不能为空', trigger: ["change", "blur"]}
|
||||
],
|
||||
procureNumber: [
|
||||
{required: true, message: '采购数量不能为空', trigger: ["change", "blur"]},
|
||||
{min: 1, type: 'number', message: '采购数量不能小于1', trigger: ["change", "blur"]}
|
||||
],
|
||||
procureUnit: [
|
||||
{required: true, message: '采购数量不能为空', trigger: ["change", "blur"]},
|
||||
],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "add",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
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
|
||||
}
|
||||
});
|
||||
this.getGoodsList()
|
||||
},
|
||||
methods: {
|
||||
getGoodsList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/template/pub/getList',
|
||||
title: '请求中',
|
||||
success: ({rows}) => {
|
||||
this.goodsList = rows
|
||||
}
|
||||
})
|
||||
},
|
||||
selectGoods(val) {
|
||||
this.goodsList.forEach(({_id, name}) => {
|
||||
if (_id === val) this.form1.data.goodsName = name
|
||||
})
|
||||
},
|
||||
selectProvince(index){
|
||||
console.log(index, this.provinceIndex)
|
||||
console.log(this.cityData, this.cityData[index])
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"form1.data"(val) {
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
},
|
||||
value(val) {
|
||||
this.form1.data = val
|
||||
console.log("this.form1.data = val", val);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.product-title {
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.product-title {
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.input-with-select .el-input-group__append {
|
||||
background-color: #fff !important;
|
||||
width: 130px !important;
|
||||
}
|
||||
</style>
|
||||
+450
-321
@@ -1,351 +1,480 @@
|
||||
<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 style="display: inline-block;" url="/pages/enquiry/list">询价单</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>询价单详情</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 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>
|
||||
<view class="page-main" v-if="sheet">
|
||||
<view class="flex justify-between items-center">
|
||||
<text class="text-gray">加工询价单编号:{{ sheet.orderNo }}</text>
|
||||
<text class="text-gray">发布时间:{{ sheet._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-40 font-bold">{{ sheet.title }}</text>
|
||||
<view class="ml-20 flex justify-start items-center">
|
||||
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<view class="text-main ">
|
||||
<text class="mx-20">{{ sheet.quoteList.length > 0 ? sheet.quoteList.rows.length : 0 }}
|
||||
</text>
|
||||
<text>家已报价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-end"
|
||||
v-if="sheet.answerEndTime && dayjs().diff(dayjs(sheet.answerEndTime), 'second') > 0">
|
||||
<text>距离报价结束还有:</text>
|
||||
<view class="border-main countdown text-main">{{
|
||||
dayjs().diff(dayjs(sheet.answerEndTime), 'day')
|
||||
}}
|
||||
</view>
|
||||
<text>天</text>
|
||||
<view class="border-main countdown text-main">
|
||||
{{ (dayjs().diff(dayjs(sheet.answerEndTime), 'hour')) % 24 }}
|
||||
</view>
|
||||
<text>时</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center pb-20 border-bottom">
|
||||
<view class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<text class="ml-15 text-gray">
|
||||
{{
|
||||
sheet.user.accountType === 1 ? sheet.user.person.personName : sheet.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId">我要申请加工
|
||||
</el-button>
|
||||
<el-button type="primary" @click.native="showDialog = true"
|
||||
v-else>查看收到的申请加工
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
上传的附件
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 mr-15" v-for="(item, index) in sheet.files" :key="index">
|
||||
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
|
||||
:preview-src-list="sheet.files"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 产品列表 -->
|
||||
<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>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
采购商其他要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ sheet.remark }}</view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
纳税和税票
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">是否含税:{{ sheet.invoice ? '含税' : '不含税' }}</view>
|
||||
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[sheet.writeInvoiceTime] }}</view>
|
||||
<view class="mt-15">发票种类:{{ INVOICE_TYPE[sheet.invoiceType] }}</view>
|
||||
<view class="mt-15">其他要求:{{ sheet.invoiceOther }}</view>
|
||||
</view>
|
||||
|
||||
<el-descriptions class="description" title="采购商其他要求" :column="3" size="medium" direction="vertical" border>
|
||||
<el-descriptions-item label="其他要求">
|
||||
{{sheet.remark || '无'}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
运输要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">随货资料:{{ sheet.transportDocuments.join() }}</view>
|
||||
<view class="mt-15">其他要求:{{ sheet.otherTransportDocuments }}</view>
|
||||
<view class="mt-15">运输限制要求:{{ sheet.transportLimit ? '有' : '无' }}</view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
交易说明
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">付款方式:{{ PROCESS_PAY_METHOD[sheet.payMethod] }}</view>
|
||||
<view class="mt-15">报价形式:{{ sheet.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
|
||||
<view class="mt-15">报价期限:
|
||||
<text v-if="sheet.answerStartTime && sheet.answerEndTime">{{
|
||||
dayjs(sheet.answerStartTime).format('YYYY-MM-DD')
|
||||
}}~{{ dayjs(sheet.answerEndTime).format('YYYY-MM-DD') }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
简易合同备注和其他补充条款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">违约责任:</view>
|
||||
<view class="mt-15">
|
||||
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
|
||||
</view>
|
||||
<view class="mt-15">解决纠纷的方法:</view>
|
||||
<view class="mt-15">
|
||||
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
|
||||
</view>
|
||||
<view class="mt-15">不可抗力:</view>
|
||||
<view class="mt-15">
|
||||
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
|
||||
</view>
|
||||
<view class="mt-15">其他:</view>
|
||||
<view class="mt-15">
|
||||
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
|
||||
</view>
|
||||
<view class="mt-15">采购方补充条款: 供货方逾期供货承担采购方一切损失</view>
|
||||
<view class="mt-15"> 供应方补充条款:</view>
|
||||
</view>
|
||||
|
||||
<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="报价时限">
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
已收到的加工申请
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 报价列表 -->
|
||||
<vk-data-table :data="sheet.quoteList" :columns="table1.columns" title="adasda "
|
||||
:customRightBtns="table1.customRightBtns"></vk-data-table>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
{{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>
|
||||
<common-footer></common-footer>
|
||||
|
||||
|
||||
<!-- 报价列表 -->
|
||||
<vk-data-table :data="sheet.quoteList" :columns="table1.columns" title="adasda " :customRightBtns="table1.customRightBtns"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<el-dialog :visible.sync="showDialog" width="70%" :show-close="false">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的报价</text>
|
||||
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">供应商</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in sheet.quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{ item.subjectName }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">{{ item.subjectMobile }}</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
import {BuildingOne, IdCard} from "@icon-park/vue";
|
||||
import dayjs from "dayjs";
|
||||
import {WRITE_INVOICE_TIME, INVOICE_TYPE, PROCESS_PAY_METHOD} from '@/util'
|
||||
|
||||
},
|
||||
{
|
||||
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 "******";
|
||||
}
|
||||
},
|
||||
export default {
|
||||
components: {BuildingOne, IdCard},
|
||||
data() {
|
||||
return {
|
||||
WRITE_INVOICE_TIME,
|
||||
INVOICE_TYPE,
|
||||
PROCESS_PAY_METHOD,
|
||||
enquiryId: undefined,
|
||||
showDialog: false,
|
||||
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');
|
||||
},
|
||||
},
|
||||
],
|
||||
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
|
||||
}
|
||||
{
|
||||
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.enquiryId = id
|
||||
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 打开报价窗口
|
||||
*/
|
||||
toQuote() {
|
||||
// 获取用户信息
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
const {
|
||||
userInfo
|
||||
} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
/**
|
||||
* 打开报价窗口
|
||||
*/
|
||||
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);
|
||||
})
|
||||
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
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
const {
|
||||
productList
|
||||
} = res.data
|
||||
let title = []
|
||||
productList.forEach(item => {
|
||||
const keys = Object.keys(item.extraAttributes)
|
||||
keys.forEach(citem => {
|
||||
item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
citem])
|
||||
})
|
||||
title.push(item.goodsName)
|
||||
})
|
||||
this.productList = productList
|
||||
|
||||
delete res.data.productList
|
||||
delete res.data.productList
|
||||
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
this.sheet = {...res.data, ...{title: title.join()}}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
@import "@/common/css/app.scss";
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.countdown {
|
||||
padding: 2px 5px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+437
-307
@@ -1,340 +1,470 @@
|
||||
<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="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 @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="query(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<el-button @click="query(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="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns" :customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</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 @click="toMyEnquiry" type="primary" round plain class="post-btn">我发布的询价单
|
||||
</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="clickedCateIndex = -1" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === -1 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="clickedCateIndex = index" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === index ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="child-cate flex justify-start items-center flex-wrap">
|
||||
<template v-if="clickedCateIndex === -1">
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<!-- <text @click="showAllTexture = !showAllTexture" class="pointer mr-25" >查看更多-->
|
||||
<!-- </text>-->
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="材质:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectTexture(-1)" class="pointer mr-25"
|
||||
:class="[checkTextureList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in attributes" :key="index">
|
||||
<text @click="selectTexture(item.value)" class="pointer mr-25"
|
||||
:class="[checkTextureList.includes(item.value) ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllTexture">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllTexture = !showAllTexture" class="pointer mr-25" v-if="attributes.length > 10">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center">
|
||||
<text @click="selectCompany(-1)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in companyList" :key="index">
|
||||
<text @click="selectCompany(item._id)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.includes(item._id) ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllCompany">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllCompany = !showAllCompany" class="pointer mr-25" v-if="companyList.length > 10">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="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>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
provinces.unshift({
|
||||
code: 9999,
|
||||
name: '全国'
|
||||
})
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let { data,success, fail,complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/enquiry/sheet/pub/getList`,
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err=> {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
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: "",
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
allChildCate: [],
|
||||
categoryTreeData: [],
|
||||
companyList: [],
|
||||
clickedCateIndex: -1,
|
||||
showAllProvince: false,
|
||||
showAllTexture: false,
|
||||
showAllCompany: false,
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkTextureList: [],
|
||||
checkCompanyList: [],
|
||||
attributes: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/enquiry/sheet/pub/getList`,
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
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) => {
|
||||
console.log(val)
|
||||
return val.map(item => item.goodsName).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 = ""
|
||||
}
|
||||
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
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: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.getAttributes()
|
||||
this.getCompany()
|
||||
},
|
||||
methods: {
|
||||
selectCate(id) {
|
||||
const index = this.checkCategoryList.indexOf(id)
|
||||
if (index === -1) this.checkCategoryList.push(id)
|
||||
else this.checkCategoryList.splice(index, 1)
|
||||
this.search(1)
|
||||
},
|
||||
selectTexture(id) {
|
||||
if (id === -1) this.checkTextureList = []
|
||||
else {
|
||||
const index = this.checkTextureList.indexOf(id)
|
||||
if (index === -1) this.checkTextureList.push(id)
|
||||
else this.checkTextureList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectCompany(id) {
|
||||
if (id === -1) this.checkCompanyList = []
|
||||
else {
|
||||
const index = this.checkCompanyList.indexOf(id)
|
||||
if (index === -1) this.checkCompanyList.push(id)
|
||||
else this.checkCompanyList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
getAttributes() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/attributes/pub/getList',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.attributes = data.rows.find(attr => attr.label === '材质').options.map(item => {
|
||||
item.name = item.label
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
getCompany() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.companyList = data.rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
const arr = []
|
||||
this.allChildCate.forEach(item => {
|
||||
if (this.checkCategoryList.includes(item._id)) arr.push(item)
|
||||
})
|
||||
this.attributes.forEach(item => {
|
||||
if (this.checkTextureList.includes(item.value)) {
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
this.companyList.forEach(item => {
|
||||
if (this.checkCompanyList.includes(item._id)) {
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
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>
|
||||
.post-btn {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.post-btn:hover {
|
||||
background: #f6eae9;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
+180
-178
@@ -1,194 +1,196 @@
|
||||
<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 style="display: inline-block;" url="/pages/enquiry/list">询价单</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</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 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">
|
||||
<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>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<view class="page-main">
|
||||
<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>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
radio: 1,
|
||||
checkbox : [1,2]
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "template/test/sys/test",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{ key: "totalPrice", title: "货款总价", type: "money" },
|
||||
{ key: "totalPriceStr", title: "人民币大写", type: "text" },
|
||||
{ key: "remark", title: "报价单详情", type: "editor" },
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{ required: true, message: "text不能为空", trigger: "change" },
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
const {
|
||||
sheetId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "money"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{required: true, message: "text不能为空", trigger: "change"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
enquiryId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = enquiryId
|
||||
this.enquiryId = enquiryId
|
||||
this.form1.data.sheetId = enquiryId
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
totalPriceStr() {
|
||||
if(this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
|
||||
},
|
||||
// 提交报价单
|
||||
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'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
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])
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交报价单
|
||||
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'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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>
|
||||
+924
-426
File diff suppressed because it is too large
Load Diff
+315
-296
@@ -1,331 +1,350 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar alwaysShowCategory></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<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>
|
||||
<!-- 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="/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 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>
|
||||
<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>{{item.}}</span><span>{{}}支</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="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>{{item.}}</span><span>{{}}支</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>
|
||||
|
||||
<!-- 现货市场 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 -->
|
||||
<div style="clear:both;width: 100%;"></div>
|
||||
</ul>
|
||||
</div>
|
||||
</view>
|
||||
<!-- 询价列表 end -->
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<!-- 现货市场 start -->
|
||||
<view class="" style="height: 40px;"></view>
|
||||
<view class="spot-outer">
|
||||
<el-divider>
|
||||
<view class="spot-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 class="empty-bg-plain-btn" @click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);"
|
||||
type="primary" plain size="small">立即查看
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<el-button>查看更多</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="100"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
var vk = uni.vk;
|
||||
export default {
|
||||
data() {
|
||||
// 页面数据变量
|
||||
return {
|
||||
// init请求返回的数据
|
||||
spotGoodsData: [],
|
||||
enquirySheetData: [],
|
||||
data: {
|
||||
|
||||
},
|
||||
// 表单请求数据
|
||||
form1: {
|
||||
var vk = uni.vk;
|
||||
export default {
|
||||
data() {
|
||||
// 页面数据变量
|
||||
return {
|
||||
// init请求返回的数据
|
||||
spotGoodsData: [],
|
||||
enquirySheetData: [],
|
||||
data: {},
|
||||
// 表单请求数据
|
||||
form1: {},
|
||||
scrollTop: 0,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
// 监听 - 页面每次【加载时】执行(如:前进)
|
||||
onLoad(options = {}) {
|
||||
vk = uni.vk;
|
||||
this.options = options;
|
||||
this.init(options);
|
||||
},
|
||||
// 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快,会在页面进入动画完成前触发
|
||||
onReady() {
|
||||
|
||||
},
|
||||
scrollTop: 0,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
// 监听 - 页面每次【加载时】执行(如:前进)
|
||||
onLoad(options = {}) {
|
||||
vk = uni.vk;
|
||||
this.options = options;
|
||||
this.init(options);
|
||||
},
|
||||
// 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快,会在页面进入动画完成前触发
|
||||
onReady() {
|
||||
},
|
||||
// 监听 - 页面每次【显示时】执行(如:前进和返回) (页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面)
|
||||
onShow() {
|
||||
|
||||
},
|
||||
// 监听 - 页面每次【显示时】执行(如:前进和返回) (页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面)
|
||||
onShow() {
|
||||
},
|
||||
// 监听 - 页面每次【隐藏时】执行(如:返回)
|
||||
onHide() {
|
||||
|
||||
},
|
||||
// 监听 - 页面每次【隐藏时】执行(如:返回)
|
||||
onHide() {
|
||||
},
|
||||
// 监听 - 点击右上角转发时
|
||||
onShareAppMessage(options) {
|
||||
|
||||
},
|
||||
// 监听 - 点击右上角转发时
|
||||
onShareAppMessage(options) {
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
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
|
||||
}
|
||||
});
|
||||
},
|
||||
getEnquirySheetList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
loading: false,
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
success: (data) => {
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
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
|
||||
}
|
||||
});
|
||||
},
|
||||
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: {
|
||||
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
|
||||
}
|
||||
}
|
||||
this.enquirySheetData = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
// 页面数据初始化函数
|
||||
init(options) {
|
||||
this.getSpotGoods()
|
||||
this.getEnquirySheetList()
|
||||
},
|
||||
pageTo(path) {
|
||||
vk.navigateTo(path);
|
||||
}
|
||||
},
|
||||
// 监听器
|
||||
watch: {},
|
||||
// 计算属性
|
||||
computed: {}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.banner-outer {}
|
||||
.banner-outer {
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 760px;
|
||||
height: 365px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.carousel-img {
|
||||
width: 760px;
|
||||
height: 365px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
background-color: initial;
|
||||
}
|
||||
.el-divider__text {
|
||||
background-color: initial;
|
||||
}
|
||||
|
||||
.el-carousel__item {
|
||||
text-align: center;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.divider-text {
|
||||
color: #393735;
|
||||
font-size: 28px;
|
||||
padding: 0 20px;
|
||||
background-color: #f4f4f4;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.spot-outer{
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
.goods-list {
|
||||
|
||||
display: flex;
|
||||
.spot-divider-text {
|
||||
color: #393735;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
padding: 0 20px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
}
|
||||
.enquiry-outer {
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.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;
|
||||
.enquiry-outer .mod-inner2Listcenter {
|
||||
|
||||
&-title {
|
||||
font-size: 15px;
|
||||
color: #101010;
|
||||
height: 62px;
|
||||
padding-top: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
&-stock {
|
||||
font-size: 12px;
|
||||
color: #BD3124;
|
||||
}
|
||||
.spot-outer {
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
background-color: white;
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
&-address {
|
||||
font-size: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.goods-list {
|
||||
|
||||
&-image {
|
||||
width: 200px;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-company {
|
||||
color: #4F4F4F;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.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;
|
||||
padding: 10px 20px;
|
||||
|
||||
&-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;
|
||||
}
|
||||
}
|
||||
&-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;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goods-address {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
+321
-14
@@ -1,22 +1,329 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="page-main" v-if="info">
|
||||
<view class="flex justify-between items-center">
|
||||
<text class="text-gray">加工询价单编号:{{ info.orderNo }}</text>
|
||||
<text class="text-gray">发布时间:{{ info._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-40 font-bold">{{ info.title }}</text>
|
||||
<view class="ml-20 flex justify-start items-center">
|
||||
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<view class="text-main ">
|
||||
<text class="mx-20">{{ info.quoteList.rows.length }}</text>
|
||||
<text>家已报价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-end"
|
||||
v-if="info.answerEndTime && dayjs().diff(dayjs(info.answerEndTime), 'second') > 0">
|
||||
<text>距离加工结束还有:</text>
|
||||
<view class="border-main countdown text-main">{{
|
||||
dayjs().diff(dayjs(info.answerEndTime), 'day')
|
||||
}}
|
||||
</view>
|
||||
<text>天</text>
|
||||
<view class="border-main countdown text-main">
|
||||
{{ (dayjs().diff(dayjs(info.answerEndTime), 'hour')) % 24 }}
|
||||
</view>
|
||||
<text>时</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center pb-20 border-bottom">
|
||||
<view class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<text class="ml-15 text-gray">
|
||||
{{ info.user.accountType === 1 ? info.user.person.personName : info.user.company.companyName }}
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== info.userId">我要申请加工
|
||||
</el-button>
|
||||
<el-button type="primary" @click.native="showDialog = true"
|
||||
v-else>查看收到的申请加工
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
上传的附件
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
加工商其他要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ info.remark }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
纳税和税票
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">是否含税:{{ info.invoice ? '含税' : '不含税' }}</view>
|
||||
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[info.writeInvoiceTime] }}</view>
|
||||
<view class="mt-15">发票种类:{{ INVOICE_TYPE[info.invoiceType] }}</view>
|
||||
<view class="mt-15">其他要求:{{ info.invoiceOther }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
运输要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">随货资料:{{ info.transportDocuments.join() }}</view>
|
||||
<view class="mt-15">其他要求:{{ info.otherTransportDocuments }}</view>
|
||||
<view class="mt-15">运输限制要求:{{ info.transportLimit ? '有' : '无' }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
交易说明
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">付款方式:{{ PROCESS_PAY_METHOD[info.payMethod] }}</view>
|
||||
<view class="mt-15">报价形式:{{ info.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
|
||||
<view class="mt-15">报价期限:
|
||||
<text v-if="info.answerStartTime && info.answerEndTime">{{
|
||||
dayjs(info.answerStartTime).format('YYYY-MM-DD')
|
||||
}}~{{ dayjs(info.answerEndTime).format('YYYY-MM-DD') }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
简易合同备注和其他补充条款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">违约责任:</view>
|
||||
<view class="mt-15">
|
||||
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
|
||||
</view>
|
||||
<view class="mt-15">解决纠纷的方法:</view>
|
||||
<view class="mt-15">
|
||||
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
|
||||
</view>
|
||||
<view class="mt-15">不可抗力:</view>
|
||||
<view class="mt-15">
|
||||
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
|
||||
</view>
|
||||
<view class="mt-15">其他:</view>
|
||||
<view class="mt-15">
|
||||
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
|
||||
</view>
|
||||
<view class="mt-15">采购方补充条款: 供货方逾期供货承担采购方一切损失</view>
|
||||
<view class="mt-15"> 供应方补充条款:</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
已收到的加工申请
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog :visible.sync="showDialog" width="70%" :show-close="false">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
import {BuildingOne, IdCard} from '@icon-park/vue'
|
||||
import dayjs from "dayjs";
|
||||
import {WRITE_INVOICE_TIME, INVOICE_TYPE, PROCESS_PAY_METHOD} from '@/util'
|
||||
|
||||
export default {
|
||||
components: {BuildingOne, IdCard},
|
||||
data() {
|
||||
return {
|
||||
WRITE_INVOICE_TIME,
|
||||
INVOICE_TYPE,
|
||||
PROCESS_PAY_METHOD,
|
||||
id: null,
|
||||
info: null,
|
||||
showDialog: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
getInfo() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getInfo',
|
||||
data: {
|
||||
id: this.id
|
||||
}
|
||||
}).then((res) => {
|
||||
this.info = res
|
||||
})
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
quoteId: this.id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (!option.id) vk.navigateBack()
|
||||
this.id = option.id
|
||||
this.getInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
@import "@/common/css/app.scss";
|
||||
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.countdown {
|
||||
padding: 2px 5px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+423
-304
@@ -1,340 +1,459 @@
|
||||
<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="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 @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="query(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<el-button @click="query(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="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 @click="toMyEnquiry" 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 class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="clickedCateIndex = -1" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === -1 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="clickedCateIndex = index" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === index ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="child-cate flex justify-start items-center flex-wrap">
|
||||
<template v-if="clickedCateIndex === -1">
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<!-- <text @click="showAllTexture = !showAllTexture" class="pointer mr-25" >查看更多-->
|
||||
<!-- </text>-->
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center">
|
||||
<text @click="selectCompany(-1)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in companyList" :key="index">
|
||||
<text @click="selectCompany(item._id)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.includes(item._id) ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllCompany">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllCompany = !showAllCompany" class="pointer mr-25"
|
||||
v-if="companyList.length > 10">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
<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>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
provinces.unshift({
|
||||
code: 9999,
|
||||
name: '全国'
|
||||
})
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let { data,success, fail,complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err=> {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/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: "",
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
provinces.unshift({
|
||||
code: 9999,
|
||||
name: '全国'
|
||||
})
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkProvinceList: [],
|
||||
allChildCate: [],
|
||||
companyList: [],
|
||||
checkCompanyList: [],
|
||||
clickedCateIndex: -1,
|
||||
checkCategoryList: [],
|
||||
showAllCompany: false,
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '申请加工',
|
||||
// icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
plain: true,
|
||||
onClick: ({_id}) => {
|
||||
this.toDetail(_id)
|
||||
// vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
},],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// return val.map(item=>item.name).join("/")
|
||||
// }
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
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 = ""
|
||||
}
|
||||
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
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: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.getCompany()
|
||||
},
|
||||
methods: {
|
||||
selectCate(id) {
|
||||
const index = this.checkCategoryList.indexOf(id)
|
||||
if (index === -1) this.checkCategoryList.push(id)
|
||||
else this.checkCategoryList.splice(index, 1)
|
||||
this.search(1)
|
||||
},
|
||||
selectTexture(id) {
|
||||
if (id === -1) this.checkTextureList = []
|
||||
else {
|
||||
const index = this.checkTextureList.indexOf(id)
|
||||
if (index === -1) this.checkTextureList.push(id)
|
||||
else this.checkTextureList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectCompany(id) {
|
||||
if (id === -1) this.checkCompanyList = []
|
||||
else {
|
||||
const index = this.checkCompanyList.indexOf(id)
|
||||
if (index === -1) this.checkCompanyList.push(id)
|
||||
else this.checkCompanyList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
getCompany() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.companyList = data.rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
toDetail(id) {
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: `/pages/process/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
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>
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
+264
-271
@@ -1,306 +1,299 @@
|
||||
<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="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 @click="toMyEnquiry" 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>
|
||||
<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 @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
<!-- 加工单列表 -->
|
||||
<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>
|
||||
<common-footer></common-footer>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
provinces.unshift({
|
||||
code: 9999,
|
||||
name: '全国'
|
||||
})
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let { data,success, fail,complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err=> {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/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: "",
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
provinces.unshift({
|
||||
code: 9999,
|
||||
name: '全国'
|
||||
})
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
},],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
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 = ""
|
||||
}
|
||||
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
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: {},
|
||||
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: '确定',
|
||||
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 {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
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>
|
||||
+181
-29
@@ -1,36 +1,188 @@
|
||||
<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>
|
||||
<view style="display: inline-block;" @click="vk.navigateTo('/pages/process/list');">加工单</view>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="form-footer">
|
||||
<el-button type="primary" @click="submit">提交报价单</el-button>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<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/process/list">找加工</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<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>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/process/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "money"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{required: true, message: "text不能为空", trigger: "change"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
sheetId
|
||||
} = options
|
||||
if (!sheetId) {
|
||||
vk.navigateBack()
|
||||
return
|
||||
}
|
||||
|
||||
this.sheetId = sheetId
|
||||
this.form1.data.sheetId = sheetId
|
||||
// this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
vk.navigateBack()
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
// getEnquiryDetail() {
|
||||
// vk.callFunction({
|
||||
// url: 'client/progress/sheet/pub/getDetail',
|
||||
// title: '请求中...',
|
||||
// data: {
|
||||
// _id: this.sheetId
|
||||
// },
|
||||
// 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">
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
.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>
|
||||
+759
-256
File diff suppressed because it is too large
Load Diff
+349
-299
@@ -1,320 +1,370 @@
|
||||
<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="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="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 class="empty-bg-plain-btn">我发布的现货</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(1)" 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>
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="现货分类" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="clickedCateIndex = -1" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === -1 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="clickedCateIndex = index" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === index ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="child-cate flex justify-start items-center flex-wrap">
|
||||
<template v-if="clickedCateIndex === -1">
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectProvince(-1)" class="pointer mr-25 flex-grow-0"
|
||||
:class="[checkProvinceList.length === 0 ? 'text-main selected-cate' : '']">全国
|
||||
</text>
|
||||
<view v-for="(item, index) in provinceData" :key="index" class="flex-grow-0 pointer mr-25">
|
||||
<text @click="selectProvince(item.code)"
|
||||
:class="[checkProvinceList.includes(item.code)? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllProvince">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllProvince = !showAllProvince" class="pointer mr-25">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
|
||||
</el-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>
|
||||
|
||||
</el-form>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in goodsData.rows" :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="paginatio">
|
||||
<el-pagination
|
||||
@current-change="search"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="goodsData.total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in goodsData.rows" :key="index" class="goods">
|
||||
<view class="goods-title">{{ item.name }}</view>
|
||||
<view class="goods-stock mt-40">现货库存:{{ item.stock }}吨</view>
|
||||
<view class="goods-address text-gray">供货地:{{ item.addressStr }}</view>
|
||||
<view class="goods-image">
|
||||
<image :src="item.user.businessCard.logo" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view 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
|
||||
class="empty-bg-plain-btn"
|
||||
size="small">立即查看
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="paginatio">
|
||||
<el-pagination
|
||||
@current-change="search"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="goodsData.total">
|
||||
</el-pagination>
|
||||
</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 {
|
||||
categoryTreeData: [],
|
||||
provinceData: provinces,
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
goodsData: {
|
||||
total: 0,
|
||||
rows: []
|
||||
}
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
allChildCate: [],
|
||||
checkCategoryList: [],
|
||||
clickedCateIndex: -1,
|
||||
provinceData: provinces,
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
goodsData: {
|
||||
total: 0,
|
||||
rows: []
|
||||
},
|
||||
showAllProvince: false
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
selectCate(id) {
|
||||
const index = this.checkCategoryList.indexOf(id)
|
||||
if (index === -1) this.checkCategoryList.push(id)
|
||||
else this.checkCategoryList.splice(index, 1)
|
||||
this.search(1)
|
||||
},
|
||||
selectProvince(code) {
|
||||
if (code === -1) this.checkProvinceList = []
|
||||
else {
|
||||
const index = this.checkProvinceList.indexOf(code)
|
||||
if (index === -1) this.checkProvinceList.push(code)
|
||||
else this.checkProvinceList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
toRelease() {
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/spot/release/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex) {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
categoryIds: this.checkCategoryList,
|
||||
provinceCodes: this.checkProvinceList
|
||||
},
|
||||
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.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
const arr = []
|
||||
this.allChildCate.forEach(item => {
|
||||
if (this.checkCategoryList.includes(item._id)) arr.push(item)
|
||||
})
|
||||
this.provinceData.forEach(item => {
|
||||
if (this.checkProvinceList.includes(item.code)) {
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
}else if(vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
}else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/spot/release/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/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 = ""
|
||||
}
|
||||
})
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
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;
|
||||
flex-wrap: wrap;
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
.paginatio{
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
.goods {
|
||||
width: 217px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 25px;
|
||||
padding: 10px 20px;
|
||||
|
||||
&-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;
|
||||
}
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
|
||||
:footer-show="false"
|
||||
:before-action="form1.props.beforeAction" :rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading" :auto-close="true" label-width="140px"
|
||||
@success="onFormSuccess1">
|
||||
</vk-data-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {IdCard} from "@icon-park/vue";
|
||||
import _ from "lodash";
|
||||
|
||||
export default {
|
||||
name: "manageList",
|
||||
components: {IdCard},
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
person: {},
|
||||
company: {},
|
||||
manager: {},
|
||||
fadadaConfirm: false,
|
||||
authType: 1,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "type",
|
||||
title: "代理人类型",
|
||||
type: "radio",
|
||||
data: [
|
||||
{value: 0, label: '个人'},
|
||||
{value: 1, label: '法人'},
|
||||
{value: 2, label: '代理人'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "personName",
|
||||
title: "代理人姓名",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "certType",
|
||||
title: "证件类型",
|
||||
type: "radio",
|
||||
data: [
|
||||
{value: 0, label: '身份证'},
|
||||
{value: 1, label: '护照'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "idCard",
|
||||
title: "代理人身份证号",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "代理人电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "headPhotoPath",
|
||||
title: "身份证正面",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "backgroundIdCardPath",
|
||||
title: "身份证反面",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
watch: {
|
||||
"form1.data"(val) {
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+441
-305
@@ -1,322 +1,458 @@
|
||||
<template>
|
||||
<view>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span v-if="vk.getVuex('$user.userInfo.accountType') === 1">个人认证</span>
|
||||
<span v-if="vk.getVuex('$user.userInfo.accountType') === 2">企业认证</span>
|
||||
</div>
|
||||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns" :footer-show="false"
|
||||
:before-action="form1.props.beforeAction" :rules="form1.props.rules" :form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading" :auto-close="true" label-width="140px" @success="onFormSuccess1">
|
||||
<template v-slot:fadadaConfirm="{ form, keyName }">
|
||||
<view style="display: flex;">
|
||||
<el-tag type="primary" v-if="form[keyName]">已认证</el-tag>
|
||||
<el-tag type="info" v-if="!form[keyName]">未认证</el-tag>
|
||||
<view style="margin-left: 10px;" class="">
|
||||
<el-button v-if="!form[keyName]" @click="getCertUrl" type="text"
|
||||
size="small">去认证</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
</vk-data-form>
|
||||
</el-card>
|
||||
|
||||
</view>
|
||||
<view>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="flex justify-between items-center text-main">
|
||||
<div class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square" style="height: 24px"/>
|
||||
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 1">个人认证</span>
|
||||
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 2">企业认证</span>
|
||||
<div class="ml-20 flex justify-start items-center" v-if="!form1.data.fadadaConfirm">
|
||||
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square" style="height: 18px"/>
|
||||
<span v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
|
||||
<span v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn" size="small">制作我的名片</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
|
||||
:footer-show="false"
|
||||
:before-action="form1.props.beforeAction" :rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading" :auto-close="true" label-width="140px"
|
||||
@success="onFormSuccess1">
|
||||
<template v-slot:toFadada="{form, keyName}">
|
||||
<el-button @click="getCertUrl" type="primary" size="small">去认证</el-button>
|
||||
</template>
|
||||
<template v-slot:accountAuth="{form, keyName}">
|
||||
<div>
|
||||
<p>请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。</p>
|
||||
<div>
|
||||
<span>户名:金久信</span>
|
||||
<span class="ml-35">开户行:中国广发银行南宁支行</span>
|
||||
<span class="ml-35">账号:6222XXXXX</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:manageList="{form, keyName}">
|
||||
<div class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square" style="height: 24px"/>
|
||||
<span class="text-40 mr-35">企业授权人信息</span>
|
||||
<el-button type="primary" size="small" @click.native="addManage" v-if="manageList.length === 0">
|
||||
添加授权人
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
<view v-for="(item, index) in manageList" :key="index">
|
||||
<manage-list v-model="manageList[index]"/>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="allSubmit" v-if="form1.data.authType === 2">{{
|
||||
vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'
|
||||
}}
|
||||
</el-button>
|
||||
</el-card>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var _ = require('lodash');
|
||||
export default {
|
||||
data() {
|
||||
// 页面数据变量
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
person: {},
|
||||
company: {},
|
||||
manager: {},
|
||||
fadadaConfirm: false
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "user/kh/setCertification",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "fadadaConfirm",
|
||||
title: "认证状态",
|
||||
type: "text",
|
||||
},
|
||||
import {IdCard, Info} from '@icon-park/vue'
|
||||
import ManageList from "./manageList.vue";
|
||||
|
||||
{
|
||||
key: "person",
|
||||
title: "个人",
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return vk.getVuex('$user.userInfo.accountType') === 1
|
||||
},
|
||||
columns: [{
|
||||
key: "personName",
|
||||
title: "姓名",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "idCard",
|
||||
title: "身份证号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "bankCardNo",
|
||||
title: "银行卡号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "手机号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
var _ = require('lodash');
|
||||
export default {
|
||||
components: {ManageList, IdCard, Info},
|
||||
data() {
|
||||
// 页面数据变量
|
||||
return {
|
||||
manageList: [],
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
person: {},
|
||||
company: {},
|
||||
manager: {},
|
||||
fadadaConfirm: false,
|
||||
authType: 1,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "user/kh/setCertification",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "authType", title: "认证方式", type: "radio",
|
||||
data: [
|
||||
{value: 1, label: "法大大接口认证"},
|
||||
{value: 2, label: "后台审核认证"},
|
||||
],
|
||||
showRule: ({fadadaConfirm}) => {
|
||||
return fadadaConfirm
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "toFadada", title: "认证方式", type: "html",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm)
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "person",
|
||||
title: "个人",
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return vk.getVuex('$user.userInfo.accountType') === 1
|
||||
},
|
||||
columns: [{
|
||||
key: "personName",
|
||||
title: "姓名",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "idCard",
|
||||
title: "身份证号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "bankCardNo",
|
||||
title: "银行卡号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "手机号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "company",
|
||||
title: "企业信息",
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return vk.getVuex('$user.userInfo.accountType') === 2
|
||||
},
|
||||
columns: [{
|
||||
key: "companyName",
|
||||
title: "企业名称",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "organization",
|
||||
title: "统一社会信用代码",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "legalName",
|
||||
title: "法人",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "legalMobile",
|
||||
title: "法人电话",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "company",
|
||||
title: "企业信息",
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return vk.getVuex('$user.userInfo.accountType') === 2
|
||||
&& (formData.authType === 2 || (formData.hasOwnProperty('fadadaConfirm') && formData.fadadaConfirm))
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{
|
||||
key: "companyName",
|
||||
title: "企业名称",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "organization",
|
||||
title: "统一社会信用代码",
|
||||
type: "text",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{key: "addressRegion", title: "公司所在地", type: "address",},
|
||||
{
|
||||
key: "addressDetail",
|
||||
title: "详细地址",
|
||||
type: "text",
|
||||
showLabel: false,
|
||||
placeholder: "详细地址",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "mailAddress",
|
||||
title: "有效通信地址",
|
||||
type: "text",
|
||||
placeholder: "请输入您的通信地址",
|
||||
},
|
||||
{
|
||||
key: "contactEmail",
|
||||
title: "有效邮箱地址",
|
||||
type: "text",
|
||||
placeholder: "请输入您的邮箱地址",
|
||||
},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{
|
||||
key: "companyAccount",
|
||||
title: "对公账号",
|
||||
type: "text",
|
||||
placeholder: "请输入对公账号",
|
||||
},
|
||||
{
|
||||
key: "companyBankName",
|
||||
title: "开户行",
|
||||
type: "text",
|
||||
placeholder: "请输入开户行",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{
|
||||
key: "personAccount",
|
||||
title: "个人账号",
|
||||
type: "text",
|
||||
placeholder: "请输入个人账号",
|
||||
},
|
||||
{
|
||||
key: "personBankName",
|
||||
title: "个人开户行",
|
||||
type: "text",
|
||||
placeholder: "请输入个人开户行",
|
||||
},
|
||||
]
|
||||
},
|
||||
{key: "accountName", title: "户名", type: "text", placeholder: "请输入户名",},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{key: "organizationPath", title: "上传营业执照", type: "image", limit: 1},
|
||||
{key: "businessType", title: "经营类目", type: "text"},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{key: "invoiceInfo", title: "上传开票资料", type: "image", limit: 1},
|
||||
{
|
||||
key: "taxType", title: "", type: "radio", showLabel: false,
|
||||
data: [
|
||||
{value: "一般纳税人", label: "一般纳税人"},
|
||||
{value: "小规模纳税人", label: "小规模纳税人"},
|
||||
{value: "其他", label: "其他"},
|
||||
],
|
||||
},
|
||||
]
|
||||
},
|
||||
{key: "taxImage", title: "纳税人资格", type: "image", limit: 1},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "accountAuth", title: "平台交易账号认证", type: "html", showRule: (formData) => {
|
||||
return vk.getVuex('$user.userInfo.accountType') === 2
|
||||
&& (formData.authType === 2 || (formData.hasOwnProperty('fadadaConfirm') && formData.fadadaConfirm))
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "manageList", title: "", type: "html", showLabel: false, showRule: (formData) => {
|
||||
return vk.getVuex('$user.userInfo.accountType') === 2
|
||||
&& (formData.authType === 2 || (formData.hasOwnProperty('fadadaConfirm') && formData.fadadaConfirm))
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "manager",
|
||||
title: "代理人",
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return formData.manager.personName != null
|
||||
},
|
||||
columns: [{
|
||||
key: "personName",
|
||||
title: "代理人",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "idCard",
|
||||
title: "代理人身份证号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "代理人电话",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
key: "manager",
|
||||
title: "代理人",
|
||||
type: "object",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return formData.manager.personName != null
|
||||
},
|
||||
columns: [{
|
||||
key: "personName",
|
||||
title: "代理人",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "idCard",
|
||||
title: "代理人身份证号",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "代理人电话",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
disabled: true
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
// {
|
||||
// key: "bankCardNo",
|
||||
// title: "银行卡号",
|
||||
// type: "text",
|
||||
// disabled: true,
|
||||
// // tips: `请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。\r\n,
|
||||
// // 户名:金久信开户行:中国广发银行南宁支行账号:622252 20151145678XX'`
|
||||
// },
|
||||
// {
|
||||
// key: "mailAddress",
|
||||
// title: "有效通讯地址",
|
||||
// type: "text"
|
||||
// },
|
||||
// {
|
||||
// key: "contactQq",
|
||||
// title: "QQ号码",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "contactEmail",
|
||||
// title: "邮箱",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "",
|
||||
// title: "",
|
||||
// type: "group",
|
||||
// justify: "start",
|
||||
// columns: [{
|
||||
// key: "contactWechatImage",
|
||||
// title: "微信二维码",
|
||||
// type: "image",
|
||||
// limit: 1
|
||||
// },
|
||||
// {
|
||||
// key: "contactWechat",
|
||||
// title: "微信号",
|
||||
// type: "text",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// key: "bank_name",
|
||||
// title: "开户行",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "bank_account_name",
|
||||
// title: "户名",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "bankCardNo",
|
||||
// title: "银行卡号",
|
||||
// type: "text",
|
||||
// disabled: true,
|
||||
// // tips: `请用个人账户向以下账户转账0.10元。请备注:账号认证,平台将7个工作日内退回原账户。\r\n,
|
||||
// // 户名:金久信开户行:中国广发银行南宁支行账号:622252 20151145678XX'`
|
||||
// },
|
||||
// {
|
||||
// key: "mailAddress",
|
||||
// title: "有效通讯地址",
|
||||
// type: "text"
|
||||
// },
|
||||
// {
|
||||
// key: "contactQq",
|
||||
// title: "QQ号码",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "contactEmail",
|
||||
// title: "邮箱",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "",
|
||||
// title: "",
|
||||
// type: "group",
|
||||
// justify: "start",
|
||||
// columns: [{
|
||||
// key: "contactWechatImage",
|
||||
// title: "微信二维码",
|
||||
// type: "image",
|
||||
// limit: 1
|
||||
// },
|
||||
// {
|
||||
// key: "contactWechat",
|
||||
// title: "微信号",
|
||||
// type: "text",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// key: "bank_name",
|
||||
// title: "开户行",
|
||||
// type: "text",
|
||||
// },
|
||||
// {
|
||||
// key: "bank_account_name",
|
||||
// title: "户名",
|
||||
// type: "text",
|
||||
// },
|
||||
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
mailAddress: [{
|
||||
required: true,
|
||||
message: "通讯地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactQq: [{
|
||||
required: true,
|
||||
message: "QQ号码不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactWechat: [{
|
||||
required: true,
|
||||
message: "微信不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactWechatImage: [{
|
||||
required: true,
|
||||
message: "微信二维码不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactEmail: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
validator: vk.pubfn.validator("email"),
|
||||
message: '邮箱格式错误',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
mailAddress: [{
|
||||
required: true,
|
||||
message: "通讯地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactQq: [{
|
||||
required: true,
|
||||
message: "QQ号码不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactWechat: [{
|
||||
required: true,
|
||||
message: "微信不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactWechatImage: [{
|
||||
required: true,
|
||||
message: "微信二维码不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
contactEmail: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
validator: vk.pubfn.validator("email"),
|
||||
message: '邮箱格式错误',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
// const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
|
||||
// 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
// ])
|
||||
vk.userCenter.updateUser({
|
||||
data: {...formData, ...{manager: this.manageList[0]}},
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
|
||||
'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
])
|
||||
vk.userCenter.updateUser({
|
||||
data: newFormData,
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.form1.data = _.pick(data.userInfo, [
|
||||
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
|
||||
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
])
|
||||
|
||||
if(data.userInfo.fadadaConfirm && data.userInfo.businessCard == null) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onFormSuccess1() {
|
||||
console.log(123);
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.form1.data = _.pick(data.userInfo, [
|
||||
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
|
||||
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
])
|
||||
// if (!this.form1.data.hasOwnProperty('fadadaConfirm') || !this.form1.data.fadadaConfirm) this.form1.data.authType = 1
|
||||
// this.form1.data.authType = 2
|
||||
if (data.userInfo.fadadaConfirm && data.userInfo.businessCard == null) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onFormSuccess1() {
|
||||
console.log(123);
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
addManage() {
|
||||
this.manageList.push({})
|
||||
},
|
||||
allSubmit() {
|
||||
// this.form1.data.manager = this.manageList[0]
|
||||
this.$refs.form1.submitForm()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
+3
-3
@@ -23,9 +23,9 @@
|
||||
</el-menu>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<personal v-if="currMenu == 'fadada'"></personal>
|
||||
<business-card v-else-if="currMenu == 'business-card'"></business-card>
|
||||
<seal v-else-if="currMenu == 'seal'"></seal>
|
||||
<personal v-if="currMenu === 'fadada'"></personal>
|
||||
<business-card v-else-if="currMenu === 'business-card'"></business-card>
|
||||
<seal v-else-if="currMenu === 'seal'"></seal>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user