20261008
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<view class="flex justify-end items-center">
|
||||
<el-button type="primary" @click="showAdd" v-if="!isAdd">新增收款账户</el-button>
|
||||
</view>
|
||||
<view class="mt-20" v-if="isAdd">
|
||||
<el-form ref="form" :model="form" label-width="120px">
|
||||
<el-form-item label="类型" required v-if="vk.getVuex('$user.userInfo.accountType') === 2">
|
||||
<el-select v-model="form.type" placeholder="请选择账号类型">
|
||||
<el-option label="对公账号" value="company"/>
|
||||
<el-option label="个人账号" value="person"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行" required>
|
||||
<el-input v-model="form.bankName" placeholder="请输入开户行"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号名称" required>
|
||||
<el-input v-model="form.accountName" placeholder="请输入账号名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" required>
|
||||
<el-input v-model="form.account" placeholder="请输入账号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="默认账号">
|
||||
<el-switch v-model="form.isDefault"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<view class="mt-30 flex justify-center items-center">
|
||||
<el-button plain @click="isAdd = !isAdd">取消</el-button>
|
||||
<el-button type="primary" @click="addContact">确定</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="py-20 border-bottom flex justify-between items-center" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center">
|
||||
<el-tag type="primary" size="small" class="mr-25" v-if="item.isDefault">默认</el-tag>
|
||||
<el-tag type="success" size="small" class="mr-25">{{
|
||||
item.type === 'company' ? '对公' : '个人'
|
||||
}}
|
||||
</el-tag>
|
||||
<text class="font-bold text-40">{{ item.account }}</text>
|
||||
</view>
|
||||
<view class="my-20">{{ item.accountName }}</view>
|
||||
<view class="my-20">{{ item.bankName }}</view>
|
||||
</view>
|
||||
<view class="flex flex-col justify-end">
|
||||
<el-button type="primary" size="small" @click="edit(item)">编辑</el-button>
|
||||
<view class="mt-20">
|
||||
<el-button type="primary" size="small" @click="del(item._id)" plain>删除</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "account",
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
form: {
|
||||
_id: null,
|
||||
bankName: '',
|
||||
accountName: '',
|
||||
account: '',
|
||||
type: '',
|
||||
isDefault: false,
|
||||
},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async addContact() {
|
||||
if (!this.form.bankName) {
|
||||
this.$message.error('请输入开户行')
|
||||
return
|
||||
}
|
||||
if (!this.form.accountName) {
|
||||
this.$message.error('请输入账号名称')
|
||||
return
|
||||
}
|
||||
if (!this.form.account) {
|
||||
this.$message.error('请输入账号')
|
||||
return
|
||||
}
|
||||
if (!this.form.type && parseInt(vk.getVuex('$user.userInfo.accountType')) === 2) {
|
||||
this.$message.error('请选择类型')
|
||||
return
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/account/kh/action',
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success(this.form._id ? '修改成功' : '新增成功')
|
||||
await this.getList()
|
||||
this.isAdd = false
|
||||
this.form = {
|
||||
_id: null,
|
||||
bankName: '',
|
||||
accountName: '',
|
||||
account: '',
|
||||
type: '',
|
||||
isDefault: false,
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/account/kh/getList',
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
del(_id) {
|
||||
this.$confirm('确认删除该账号吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await vk.callFunction({
|
||||
url: 'client/account/kh/delete',
|
||||
data: {_id}
|
||||
})
|
||||
await this.getList()
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
for (let key in this.form) this.form[key] = item[key]
|
||||
this.isAdd = true
|
||||
},
|
||||
showAdd() {
|
||||
const user = vk.getVuex('$user.userInfo')
|
||||
if (vk.getVuex('$user.userInfo.accountType') === 2) {
|
||||
this.form.account = user.company.companyAccount
|
||||
this.form.bankName = user.company.companyBankName
|
||||
this.form.accountName = user.company.companyName
|
||||
}else {
|
||||
this.form.account = user.person.personAccount
|
||||
this.form.bankName = user.person.personBankName
|
||||
this.form.accountName = user.person.accountName
|
||||
console.log(user)
|
||||
}
|
||||
this.isAdd = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (parseInt(vk.getVuex('$user.userInfo.authStatus')) !== 1) {
|
||||
this.$message.error('请先完成实名认证')
|
||||
this.$emit('done', 'fadada')
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<div class="pay-desc">微信、支付宝、云闪付扫码完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
@@ -202,7 +202,8 @@ export default {
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
// notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
notifyUrl: 'https://tcb-n44byxi8bmrfrki-d4bn1c4a206d.service.tcloudbase.com/pay_notify'
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -214,7 +215,7 @@ export default {
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// this.$alert('', '微信、支付宝、云闪付扫码完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
|
||||
@@ -1,224 +1,358 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>我的名片</span>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>我的名片</span>
|
||||
</div>
|
||||
<p class="text-main" v-if="parseInt(vk.getVuex('$user.userInfo.authStatus')) !== 1">请先完成认证</p>
|
||||
<template
|
||||
v-else-if="parseInt(vk.getVuex('$user.userInfo.authStatus')) === 1 && vk.getVuex('$user.userInfo.businessCard')">
|
||||
<div class="text-main flex justify-start items-center">
|
||||
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square"
|
||||
style="height: 18px"/>
|
||||
<span v-if="parseInt(vk.getVuex('$user.userInfo.businessCard.status')) === 0">名片审核中</span>
|
||||
<span v-if="parseInt(vk.getVuex('$user.userInfo.businessCard.status')) === 2">名片审核失败: {{
|
||||
vk.getVuex('$user.userInfo.businessCard.refuseReason')
|
||||
}}</span>
|
||||
<span v-if="parseInt(vk.getVuex('$user.userInfo.businessCard.status')) === 1">名片审核通过</span>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 表单开始 -->
|
||||
<vk-data-form
|
||||
v-if="parseInt(vk.getVuex('$user.userInfo.authStatus')) === 1"
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:rules="form1.props.rules"
|
||||
:action="form1.props.action"
|
||||
:form-type="form1.props.formType"
|
||||
:columns='form1.props.columns'
|
||||
:loading.sync="form1.props.loading"
|
||||
label-width="140px"
|
||||
input-width="400px"
|
||||
:before-action="form1.props.beforeAction"
|
||||
:show-cancel="false"
|
||||
submit-text="保存名片"
|
||||
:submit-disabled="!!vk.getVuex('$user.userInfo.businessCard') && parseInt(vk.getVuex('$user.userInfo.businessCard.status')) === 0"
|
||||
>
|
||||
<!-- v-slot:editor 中的 editor 对应 columns中的 key, form对应 form1.data keyName 对应 columns中的 key -->
|
||||
<template v-slot:video="{ form, keyName }">
|
||||
<vk-data-upload v-model="form1.data.video" list-type="text" :limit="1"
|
||||
accept="video/*">
|
||||
</vk-data-upload>
|
||||
|
||||
</template>
|
||||
<template v-slot:album="{ form, keyName }">
|
||||
<vk-data-upload v-model="form1.data.album" list-type="picture-card"
|
||||
:limit="albumLimit"
|
||||
accept=".jpg,.jpeg,.png">
|
||||
</vk-data-upload>
|
||||
|
||||
</template>
|
||||
<template v-slot:productImageList="{ form, keyName }">
|
||||
<vk-data-upload v-model="form1.data.productImageList" list-type="picture-card"
|
||||
:limit="productImageLimit"
|
||||
accept=".jpg,.jpeg,.png">
|
||||
</vk-data-upload>
|
||||
|
||||
</template>
|
||||
<template v-slot:exampleImageList="{ form, keyName }">
|
||||
<vk-data-upload v-model="form1.data.exampleImageList" list-type="picture-card"
|
||||
:limit="productImageLimit"
|
||||
accept=".jpg,.jpeg,.png">
|
||||
</vk-data-upload>
|
||||
</template>
|
||||
<template v-slot:map="{ form, keyName }">
|
||||
<div class="mapDiv">
|
||||
<tdt-map :center="center" :zoom="zoom" @click="mapClick">
|
||||
<tdt-marker :position="[form1.data.longitude, form1.data.latitude]" :draggable="false"/>
|
||||
</tdt-map>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:rules="form1.props.rules"
|
||||
:action="form1.props.action"
|
||||
:form-type="form1.props.formType"
|
||||
:columns='form1.props.columns'
|
||||
:loading.sync="form1.props.loading"
|
||||
label-width="140px"
|
||||
input-width="400px"
|
||||
:before-action="form1.props.beforeAction"
|
||||
:show-cancel="false"
|
||||
submit-text="保存名片"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<!-- v-slot:editor 中的 editor 对应 columns中的 key, form对应 form1.data keyName 对应 columns中的 key -->
|
||||
<!-- <template v-slot:editor="{ form, keyName }">
|
||||
<vk-data-input-editor v-model="form[keyName]" placeholder="开始输入" width="750px"></vk-data-input-editor>
|
||||
</template> -->
|
||||
|
||||
</vk-data-form>
|
||||
</el-card>
|
||||
</vk-data-form>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Info} from "@icon-park/vue";
|
||||
import MapInit from '@/util/MapInit'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
companyIntroduction: ''
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "no",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
type: 'group',
|
||||
columns: [
|
||||
{
|
||||
key: "logo",
|
||||
title: "Logo",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "personalWechat",
|
||||
title: "个人微信",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "companyWechat",
|
||||
title: "企业微信",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "position",
|
||||
title: "职位",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "companyMobile",
|
||||
title: "公司电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "managerMobile",
|
||||
title: "负责人电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "地区",
|
||||
type: "address"
|
||||
},
|
||||
{
|
||||
key: "addressDetail",
|
||||
title: "详细地址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "email",
|
||||
title: "邮箱",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "website",
|
||||
title: "网址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "mainBusiness",
|
||||
title: "主营业务",
|
||||
type: "textarea"
|
||||
},
|
||||
{
|
||||
key: "companyIntroduction",
|
||||
title: "企业简介",
|
||||
type: "editor"
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
logo: [{
|
||||
required: true,
|
||||
message: "请上传Logo",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personalWechat: [{
|
||||
required: true,
|
||||
message: "请上传个人微信",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
companyWechat: [{
|
||||
required: true,
|
||||
message: "请上传企业微信",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personName: [{
|
||||
required: true,
|
||||
message: "姓名不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
position: [{
|
||||
required: true,
|
||||
message: "职位不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
address: [{
|
||||
required: true,
|
||||
message: "地区不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
addressDetail: [{
|
||||
required: true,
|
||||
message: "详细地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
email: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
// website: [{
|
||||
// required: true,
|
||||
// message: "logo不能为空",
|
||||
// trigger: ['blur', 'change']
|
||||
// }],
|
||||
mainBusiness: [{
|
||||
required: true,
|
||||
message: "主营业务不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
mainSpotCategoryIds: [{
|
||||
required: true,
|
||||
message: "主营商品不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "update",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
data: {
|
||||
businessCard: formData
|
||||
},
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
components: {Info},
|
||||
data() {
|
||||
return {
|
||||
T: null,
|
||||
tMap: null,
|
||||
userInfo: {
|
||||
accountType: 1,
|
||||
userLevel: -1,
|
||||
},
|
||||
productImageLimit: 2,
|
||||
albumLimit: 2,
|
||||
dialogVisible: false,
|
||||
center: [108.358150, 22.826820],
|
||||
zoom: 12,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
companyIntroduction: '',
|
||||
video: '',
|
||||
longitude: 108.358150,
|
||||
latitude: 22.826820,
|
||||
album: [],
|
||||
productImageList: [],
|
||||
exampleImageList: [],
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "no",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
type: 'group',
|
||||
columns: [
|
||||
{
|
||||
key: "logo",
|
||||
title: "Logo",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "personalWechat",
|
||||
title: "个人微信",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "companyWechat",
|
||||
title: "企业微信",
|
||||
type: "image",
|
||||
limit: 1,
|
||||
showRule: (formData) => {
|
||||
console.log('formData', this.userInfo)
|
||||
return parseInt(this.userInfo.accountType) === 2
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "position",
|
||||
title: "职位",
|
||||
type: "text",
|
||||
showRule: (formData) => {
|
||||
return parseInt(this.userInfo.accountType) !== 2
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "companyMobile",
|
||||
title: "公司电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "managerMobile",
|
||||
title: "负责人电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "地区",
|
||||
type: "address"
|
||||
},
|
||||
{
|
||||
key: "addressDetail",
|
||||
title: "详细地址",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "email",
|
||||
title: "有效邮箱",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "website",
|
||||
title: "网址",
|
||||
type: "text",
|
||||
showRule: (formData) => {
|
||||
return parseInt(this.userInfo.accountType) === 2 && parseInt(this.userInfo.userLevel) > 2
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "companyIntroduction",
|
||||
title: "企业简介",
|
||||
type: "editor"
|
||||
},
|
||||
{
|
||||
key: "video",
|
||||
title: "视频",
|
||||
type: "html",
|
||||
showRule: (formData) => {
|
||||
return parseInt(this.userInfo.accountType) === 2 && parseInt(this.userInfo.userLevel) > 2
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "album",
|
||||
title: `首页大图`,
|
||||
type: "html",
|
||||
},
|
||||
{
|
||||
key: "productImageList",
|
||||
title: `产品展示`,
|
||||
type: "html",
|
||||
},
|
||||
{
|
||||
key: "exampleImageList",
|
||||
title: `案例展示`,
|
||||
type: "html",
|
||||
},
|
||||
{
|
||||
key: "map",
|
||||
title: `地图定位`,
|
||||
type: "html",
|
||||
showRule: (formData) => {
|
||||
return parseInt(this.userInfo.accountType) === 2 && parseInt(this.userInfo.userLevel) > 1
|
||||
},
|
||||
},
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
logo: [{
|
||||
required: true,
|
||||
message: "请上传Logo",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personalWechat: [{
|
||||
required: true,
|
||||
message: "请上传个人微信",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
personName: [{
|
||||
required: true,
|
||||
message: "姓名不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
address: [{
|
||||
required: true,
|
||||
message: "地区不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
addressDetail: [{
|
||||
required: true,
|
||||
message: "详细地址不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
email: [{
|
||||
required: true,
|
||||
message: "邮箱不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
// website: [{
|
||||
// required: true,
|
||||
// message: "logo不能为空",
|
||||
// trigger: ['blur', 'change']
|
||||
// }],
|
||||
mainBusiness: [{
|
||||
required: true,
|
||||
message: "主营业务不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
mainSpotCategoryIds: [{
|
||||
required: true,
|
||||
message: "主营商品不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "update",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
data: {
|
||||
businessCard: {...formData, status: 0},
|
||||
isBusinessCard: true
|
||||
},
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '提交成功,新信息将在审核通过后显示',
|
||||
duration: 5000
|
||||
})
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 1000)
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
for (let key in this.userInfo) this.userInfo[key] = data.userInfo[key]
|
||||
if (!data.userInfo.businessCard) {
|
||||
if (this.userInfo.company.mobile) this.form1.data.companyMobile = this.userInfo.company.mobile
|
||||
if (this.userInfo.manager.mobile) this.form1.data.managerMobile = this.userInfo.manager.mobile
|
||||
if (this.userInfo.company.email) this.form1.data.email = this.userInfo.company.email
|
||||
} else {
|
||||
if (data.userInfo.businessCard.album && !Array.isArray(data.userInfo.businessCard.album)) this.form1.data.album = [data.userInfo.businessCard.album]
|
||||
}
|
||||
if (!this.form1.data.longitude) this.form1.data.longitude = 108.358150
|
||||
if (!this.form1.data.latitude) this.form1.data.latitude = 22.826820
|
||||
|
||||
if (this.userInfo.userLevel === 0) {
|
||||
this.albumLimit = 1
|
||||
this.productImageLimit = 2
|
||||
} else if (this.userInfo.userLevel === 1) {
|
||||
this.albumLimit = 2
|
||||
this.productImageLimit = 4
|
||||
} else if (this.userInfo.userLevel === 2) {
|
||||
this.albumLimit = 2
|
||||
this.productImageLimit = 12
|
||||
} else if (this.userInfo.userLevel > 2) {
|
||||
this.albumLimit = 4
|
||||
if (this.userInfo.userLevel > 3) {
|
||||
this.albumLimit = 6
|
||||
}
|
||||
this.productImageLimit = 30
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
mapClick({type, lnglat}) {
|
||||
if (type === "click") {
|
||||
this.form1.data.longitude = parseFloat(lnglat.lng);
|
||||
this.form1.data.latitude = parseFloat(lnglat.lat);
|
||||
this.$message.success("已选择");
|
||||
console.log(this.form1.data.longitude, this.form1.data.latitude)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.mapDiv {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<view class="flex justify-end items-center">
|
||||
<el-button type="primary" @click="isAdd = !isAdd" v-if="!isAdd">新增业务联系人</el-button>
|
||||
</view>
|
||||
<view class="mt-20" v-if="isAdd">
|
||||
<el-form ref="form" :model="form" label-width="120px">
|
||||
<el-form-item label="姓名" required>
|
||||
<el-input v-model="form.name" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" required>
|
||||
<el-input v-model="form.phone" placeholder="请输入手机号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" required>
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职位" required>
|
||||
<el-input v-model="form.position" placeholder="请输入职位"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<view class="mt-30 flex justify-center items-center">
|
||||
<el-button plain @click="isAdd = !isAdd">取消</el-button>
|
||||
<el-button type="primary" @click="addContact">确定</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="py-20 border-bottom flex justify-between items-center" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view>
|
||||
<text class="font-bold text-40">{{ item.name }}</text>
|
||||
<text class="ml-20 text-gray">({{ item.position }})</text>
|
||||
</view>
|
||||
<view class="my-20">手机号:{{ item.phone }}</view>
|
||||
<view class="my-20">邮箱:{{ item.email }}</view>
|
||||
</view>
|
||||
<view class="flex flex-col justify-end">
|
||||
<el-button type="primary" size="small" @click="edit(item)">编辑</el-button>
|
||||
<view class="mt-20">
|
||||
<el-button type="primary" size="small" @click="del(item._id)" plain>删除</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "business-contact",
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
form: {
|
||||
_id: null,
|
||||
phone: '',
|
||||
name: '',
|
||||
email: '',
|
||||
position: '',
|
||||
},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async addContact() {
|
||||
if (!this.form.name) {
|
||||
this.$message.error('请输入姓名')
|
||||
return
|
||||
}
|
||||
if (!this.form.phone) {
|
||||
this.$message.error('请输入手机号')
|
||||
return
|
||||
}
|
||||
if (!this.form.email) {
|
||||
this.$message.error('请输入邮箱')
|
||||
return
|
||||
}
|
||||
if (!this.form.position) {
|
||||
this.$message.error('请输入职位')
|
||||
return
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/businessContact/kh/action',
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success(this.form._id ? '修改成功' : '新增成功')
|
||||
await this.getList()
|
||||
this.isAdd = false
|
||||
this.form = {
|
||||
_id: null,
|
||||
phone: '',
|
||||
name: '',
|
||||
email: '',
|
||||
position: '',
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
del(_id) {
|
||||
this.$confirm('确认删除该业务联系人吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await vk.callFunction({
|
||||
url: 'client/businessContact/kh/delete',
|
||||
data: {_id}
|
||||
})
|
||||
await this.getList()
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
for (let key in this.form) this.form[key] = item[key]
|
||||
this.isAdd = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+601
-595
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<p class="text-main font-bold mb-20">加工商状态: {{
|
||||
(isNaN(factoryStatus) || factoryStatus === -1) ? '未提交审核' : (factoryStatus === 0 ? '审核中' : (factoryStatus === 1 ? '审核通过' : `审核不通过:${refuseReason}`))
|
||||
}}</p>
|
||||
<p class="text-main font-bold mb-20" v-if="factoryStatus === 0">
|
||||
温馨提示:审核中不能修改内容,如有数据变更审核通过后再次修改提交。
|
||||
</p>
|
||||
<el-form ref="form" :model="form" label-width="140px">
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">工厂信息</span>
|
||||
</el-divider>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成立年限" required>
|
||||
<el-input v-model="form.year" placeholder="请输入成立年限" type="number"
|
||||
:readonly="factoryStatus === 0">
|
||||
<template #append>年</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年产值" required>
|
||||
<el-input v-model="form.yearsIncome" placeholder="请输入年产值" type="number"
|
||||
:readonly="factoryStatus === 0">
|
||||
<template #append>万元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mt-20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工人数" required>
|
||||
<el-input v-model="form.employeeNum" placeholder="请输入员工人数" type="number"
|
||||
:readonly="factoryStatus === 0">
|
||||
<template #append>人</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="流水线数量" required>
|
||||
<el-input v-model="form.flowNum" placeholder="请输入流水线数量" type="number"
|
||||
:readonly="factoryStatus === 0">
|
||||
<template #append>条</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mt-20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂房归属" required>
|
||||
<el-input v-model="form.blongTo" placeholder="请输入厂房归属" :readonly="factoryStatus === 0"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂房面积" required>
|
||||
<el-input v-model="form.size" placeholder="请输入厂房面积" :readonly="factoryStatus === 0">
|
||||
<template #append>平方米</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="所在地" required>
|
||||
<el-cascader :options="options" :props="{label: 'name', value: 'code'}" v-model="addressRegion"
|
||||
clearable :disabled="factoryStatus === 0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主营类别" required>
|
||||
<el-select multiple v-model="form.mainSpotCategory" style="width: 100%">
|
||||
<el-option v-for="(item, index) in goodsCate" :key="index" :value="item.name">{{ item.name }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="主营工艺和业务范围">
|
||||
<el-input v-model="form.mainProcess" placeholder="请输入主营工艺和业务范围"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务信息">
|
||||
<el-input v-model="form.serviceInfo" placeholder="请输入服务信息" type="textarea"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频">
|
||||
<vk-data-upload v-model="form.video" list-type="text"
|
||||
accept="video/*">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">设备信息</span>
|
||||
</el-divider>
|
||||
<el-row :gutter="10" class="p-20 bg-gray-light">
|
||||
<el-col :span="3">
|
||||
<p class="text-center">设备名称</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">设备数量({{ deviceNum }}台)</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">设备来源</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">设备类型</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">品牌</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">型号</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">投产年限</p>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<p class="text-center">特点描述</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="p-20 bg-gray-light pos-r" v-for="(item, index) in form.deviceList" :key="index">
|
||||
<el-col :span="3">
|
||||
<el-input v-model="form.deviceList[index].name" placeholder="设备名称"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="form.deviceList[index].num" placeholder="设备数量" type="number"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-select v-model="form.deviceList[index].source" placeholder="请选择设备来源"
|
||||
:disabled="factoryStatus === 0">
|
||||
<el-option v-for="item in deviceSource" :key="item" :label="item" :value="item"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-select v-model="form.deviceList[index].type" placeholder="请选择设备类型"
|
||||
:disabled="factoryStatus === 0">
|
||||
<el-option v-for="item in deviceType" :key="item" :label="item" :value="item"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="form.deviceList[index].brand" placeholder="品牌"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="form.deviceList[index].model" placeholder="型号"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="form.deviceList[index].year" placeholder="投产年限" type="number"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-input v-model="form.deviceList[index].desc" placeholder="特点描述"
|
||||
:readonly="factoryStatus === 0"/>
|
||||
</el-col>
|
||||
<i class="el-icon-remove pointer text-main text-40 pos-a" style="right: -10px; top: 20px"
|
||||
@click="remove(index)" v-if="factoryStatus !== 0"/>
|
||||
</el-row>
|
||||
<div class="mt-20 text-center">
|
||||
<el-button type="text" @click.native="addDevice" v-if="factoryStatus !== 0">添加设备</el-button>
|
||||
</div>
|
||||
<el-divider>
|
||||
<span class="text-50 text-main font-bold">工厂实景</span>
|
||||
</el-divider>
|
||||
<vk-data-upload v-model="form.album" :limit="userLevel.factoryPicNum"
|
||||
:disabled="factoryStatus === 0"></vk-data-upload>
|
||||
<div class="mt-20 text-center">
|
||||
<el-button type="primary" @click.native="submit" v-if="factoryStatus !== 0">提交</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
|
||||
export default {
|
||||
name: "factory",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
year: null,
|
||||
yearsIncome: null,
|
||||
employeeNum: null,
|
||||
flowNum: null,
|
||||
blongTo: null,
|
||||
size: null,
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
},
|
||||
mainProcess: null,
|
||||
serviceInfo: null,
|
||||
video: '',
|
||||
deviceList: [],
|
||||
album: [],
|
||||
mainSpotCategory: [],
|
||||
},
|
||||
options: [],
|
||||
addressRegion: [],
|
||||
deviceSource: ['国产', '进口'],
|
||||
deviceType: ['生产设备', '维护设备'],
|
||||
userLevel: {
|
||||
factoryPicNum: 0
|
||||
},
|
||||
factoryStatus: parseInt(vk.getVuex('$user.userInfo.factoryStatus')),
|
||||
refuseReason: '',
|
||||
goodsCate: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addDevice() {
|
||||
this.form.deviceList.push({
|
||||
name: null,
|
||||
num: null,
|
||||
source: null,
|
||||
type: null,
|
||||
brand: null,
|
||||
model: null,
|
||||
year: null,
|
||||
desc: null
|
||||
})
|
||||
},
|
||||
getGoodsCate() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/category/pub/getList',
|
||||
success: (res) => {
|
||||
this.goodsCate = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
remove(index) {
|
||||
this.form.deviceList.splice(index, 1)
|
||||
},
|
||||
async getUserLevelInfo() {
|
||||
const res = await vk.callFunction({
|
||||
url: "client/userLevel/kh/getInfoByUser",
|
||||
})
|
||||
if (res) {
|
||||
if (!res.data) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请先完成认证'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$emit('done', 'fadada')
|
||||
}, 1000)
|
||||
return
|
||||
}
|
||||
this.userLevel.factoryPicNum = res.factoryPicNum
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
if (!this.form.year) return this.$message.error('请输入投产年限')
|
||||
if (!this.form.yearsIncome) return this.$message.error('请输入年收入')
|
||||
if (!this.form.employeeNum) return this.$message.error('请选输入员工人数')
|
||||
if (!this.form.flowNum) return this.$message.error('请输入流水线数量')
|
||||
if (!this.form.blongTo) return this.$message.error('请输入厂房归属')
|
||||
if (!this.form.size) return this.$message.error('请输入厂房面积')
|
||||
if (this.addressRegion.length === 0) return this.$message.error('请选择所在地')
|
||||
if (this.form.deviceList.length === 0) return this.$message.error('请添加设备信息')
|
||||
if (this.form.mainSpotCategory.length === 0) return this.$message.error('请选择主营类别')
|
||||
// if (this.form.album.length === 0) return this.$message.error('请上传工厂实景图')
|
||||
const province = provinces.find(item => item.code === this.addressRegion[0])
|
||||
const city = province.children.find(item => item.code === this.addressRegion[1])
|
||||
const addressRegion = {
|
||||
province: {
|
||||
code: province.code,
|
||||
name: province.name,
|
||||
},
|
||||
city: {
|
||||
code: city.code,
|
||||
name: city.name,
|
||||
}
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: "client/factory/kh/addUpdate",
|
||||
data: {
|
||||
year: this.form.year,
|
||||
yearsIncome: this.form.yearsIncome,
|
||||
employeeNum: this.form.employeeNum,
|
||||
flowNum: this.form.flowNum,
|
||||
blongTo: this.form.blongTo,
|
||||
size: this.form.size,
|
||||
addressRegion,
|
||||
mainProcess: this.form.mainProcess,
|
||||
serviceInfo: this.form.serviceInfo,
|
||||
deviceList: this.form.deviceList,
|
||||
album: this.form.album,
|
||||
video: this.form.video,
|
||||
mainSpotCategory: this.form.mainSpotCategory,
|
||||
}
|
||||
})
|
||||
this.$message.success('提交成功')
|
||||
this.factoryStatus = 0
|
||||
},
|
||||
async getInfo() {
|
||||
const res = await vk.callFunction({
|
||||
url: "client/factory/kh/getInfo",
|
||||
})
|
||||
if (res) {
|
||||
for (let key in this.form) this.form[key] = res[key]
|
||||
this.addressRegion = [res.addressRegion.province.code, res.addressRegion.city.code]
|
||||
if (res.status === 2) this.refuseReason = res.refuseReason
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.options = provinces.map(item => {
|
||||
item.children = [];
|
||||
return item
|
||||
})
|
||||
this.options.forEach((province, index) => {
|
||||
citys[index].forEach(city => {
|
||||
this.options[index].children.push(city)
|
||||
})
|
||||
})
|
||||
this.getGoodsCate()
|
||||
this.getUserLevelInfo()
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
const factoryStatus = parseInt(data.userInfo.factoryStatus)
|
||||
this.factoryStatus = (isNaN(factoryStatus) || factoryStatus === -1) ? -1 : factoryStatus
|
||||
if (this.factoryStatus > -1) this.getInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
deviceNum() {
|
||||
let num = 0
|
||||
this.form.deviceList.forEach(item => {
|
||||
if (item.num && !isNaN(parseInt(item.num))) num += parseInt(item.num)
|
||||
})
|
||||
return num
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+124
-63
@@ -5,12 +5,13 @@
|
||||
</div>
|
||||
<div class="grade-list">
|
||||
<div class="item pointer" v-for="(item,index) in gradeList" :key="index"
|
||||
:class="gradeIndex === index ? 'active' : ''" @click="onChange(index)">
|
||||
:class="[parseInt(gradeIndex) === index ? 'active' : '', item.disabled ? 'disabled' : '']"
|
||||
@click="onChange(index)">
|
||||
<div class="item-box">
|
||||
<div class="title">{{ item.name }}</div>
|
||||
<div class="title">
|
||||
<span>{{ item.amount }}元/年</span>
|
||||
<span v-if="parseFloat(item.ensureAmount) > 0">+交易保证金</span>
|
||||
<span v-if="parseFloat(item.ensureAmount) > 0">+交易保证金({{ item.ensureAmount }}元)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
@@ -19,11 +20,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item pointer"
|
||||
:class="[gradeIndex === -2 ? 'active' : '']" @click="onChange(-2)">
|
||||
<div class="item-box">
|
||||
<div class="title">交易保证金缴纳</div>
|
||||
<div class="title">
|
||||
<el-select v-model="ensureAmount" size="small">
|
||||
<el-option
|
||||
v-for="item in ensureList"
|
||||
:key="item.amount"
|
||||
:label="`${item.amount.toFixed(2)}元`"
|
||||
:value="item.amount">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-start items-center mt-20" v-if="gradeIndex === 2">
|
||||
<div @click="ensureIndex = 0"
|
||||
:style="{backgroundColor: ensureIndex === 0 ? '#a92924' : '', color: ensureIndex === 0 ? 'white' : ''}"
|
||||
class="border rounded p-20">50000元保证金
|
||||
</div>
|
||||
<div @click="ensureIndex = 1"
|
||||
:style="{backgroundColor: ensureIndex === 1 ? '#a92924' : '', color: ensureIndex === 1 ? 'white' : ''}"
|
||||
class="border rounded p-20 mx-20">100000元保证金
|
||||
</div>
|
||||
<div @click="ensureIndex = 2"
|
||||
:style="{backgroundColor: ensureIndex === 2 ? '#a92924' : '', color: ensureIndex === 2 ? 'white' : ''}"
|
||||
class="border rounded p-20">200000元保证金
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bzj-readme">
|
||||
<div class="sub-title">保证金说明</div>
|
||||
<div class="sub-title">保证金协议</div>
|
||||
<div class="content">
|
||||
保证金说明内容...
|
||||
{{ desc }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
@@ -41,7 +77,7 @@
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<div class="pay-desc">微信、支付宝、云闪付扫码完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
@@ -67,80 +103,80 @@ export default {
|
||||
payment: ["银联支付"],
|
||||
showQrcode: false,
|
||||
billQRCode: '',
|
||||
gradeIndex: 1,
|
||||
gradeList: []
|
||||
gradeIndex: null,
|
||||
desc: '',
|
||||
gradeList: [],
|
||||
ensureList: [],
|
||||
ensureAmount: null,
|
||||
ensureIndex: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserLevelList()
|
||||
this.getDesc()
|
||||
this.getEnsureConfig()
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
this.gradeList.map(item => {
|
||||
item.disabled = false
|
||||
if (data.userInfo.userLevel && parseInt(data.userInfo.userLevel) > -1) {
|
||||
item.disabled = parseInt(item.level) < parseInt(data.userInfo.userLevel)
|
||||
}
|
||||
return item
|
||||
})
|
||||
for (let i in this.gradeList) {
|
||||
if (!this.gradeList[i].disabled) {
|
||||
this.gradeIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onChange(index) {
|
||||
this.gradeIndex = index
|
||||
if (index === -2) this.gradeIndex = index
|
||||
else {
|
||||
if (this.gradeList[index].disabled) return
|
||||
this.gradeIndex = index
|
||||
}
|
||||
},
|
||||
async onPay() {
|
||||
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goods: {
|
||||
name: '会员升级',
|
||||
amount: this.amount,
|
||||
cover: null
|
||||
},
|
||||
type: 3,
|
||||
goodsId: parseInt(this.gradeList[this.gradeIndex].level),
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
billNo: res.data,
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
}
|
||||
let res
|
||||
if (this.gradeIndex === -2) {
|
||||
res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goods: {
|
||||
name: `交易保证金-${this.ensureAmount}元`,
|
||||
amount: this.ensureAmount,
|
||||
cover: null
|
||||
},
|
||||
type: 2,
|
||||
goodsId: null,
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
res = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goods: {
|
||||
name: `会员升级-${this.gradeList[this.gradeIndex].name}`,
|
||||
amount: this.amount,
|
||||
cover: null
|
||||
},
|
||||
type: 3,
|
||||
goodsId: parseInt(this.gradeList[this.gradeIndex].level),
|
||||
ensureIndex: this.ensureIndex,
|
||||
num: 1,
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
sdk.exec(data).then(res => {
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
vk.redirectTo({url: `/pages/index/shop/pay?id=${res.data}`})
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
@@ -151,13 +187,33 @@ export default {
|
||||
},
|
||||
success: (data) => {
|
||||
this.gradeList = data.rows.filter(item => parseFloat(item.amount) > 0)
|
||||
this.getUserInfo()
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async getDesc() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '880c33886636217300376edd5a56e1e6'
|
||||
},
|
||||
})
|
||||
this.desc = res.content
|
||||
},
|
||||
async getEnsureConfig() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/ensureConfig/pub/getList',
|
||||
})
|
||||
this.ensureList = rows
|
||||
this.ensureAmount = this.ensureList[0].amount
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
return parseFloat(this.gradeList[this.gradeIndex].amount) + parseFloat(this.gradeList[this.gradeIndex].ensureAmount)
|
||||
if (this.gradeIndex === -2) return this.ensureAmount
|
||||
else if (this.gradeIndex === 2) return parseFloat(this.gradeList[this.gradeIndex].amount) + [50000, 100000, 200000][this.ensureIndex]
|
||||
else return parseFloat(this.gradeList[this.gradeIndex].amount) + parseFloat(this.gradeList[this.gradeIndex].ensureAmount)
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -288,4 +344,9 @@ export default {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
cursor: not-allowed;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -77,13 +77,13 @@ export default {
|
||||
},
|
||||
{
|
||||
key: "headPhotoPath",
|
||||
title: "身份证正面",
|
||||
title: "身份证头像面",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
{
|
||||
key: "backgroundIdCardPath",
|
||||
title: "身份证反面",
|
||||
title: "身份证国徽面",
|
||||
type: "image",
|
||||
limit: 1
|
||||
},
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<view class="flex justify-end items-center">
|
||||
<el-button type="primary" @click="showAdd" v-if="!isAdd">新增新闻动态</el-button>
|
||||
</view>
|
||||
<view class="mt-20" v-if="isAdd">
|
||||
<el-form ref="form" :model="form" label-width="120px">
|
||||
<el-form-item label="标题" required>
|
||||
<el-input v-model="form.title" placeholder="请输入标题"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容">
|
||||
<vk-data-input-editor v-model="form.content" width="750px"></vk-data-input-editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<view class="mt-30 flex justify-center items-center">
|
||||
<el-button plain @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="addArticle">确定</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="py-20 border-bottom flex justify-between items-center" v-for="(item, index) in list"
|
||||
:key="index">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text>{{ item.title }}</text>
|
||||
<text class="mt-20 text-gray text-28">{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-end">
|
||||
<el-button type="primary" size="small" @click="edit(item)">编辑</el-button>
|
||||
<view class="mt-20">
|
||||
<el-button type="primary" size="small" @click="del(item._id)" plain>删除</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "news",
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
form: {
|
||||
_id: null,
|
||||
title: '',
|
||||
content: '',
|
||||
},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async addArticle() {
|
||||
if (!this.form.title) {
|
||||
this.$message.error('请输入标题')
|
||||
return
|
||||
}
|
||||
if (!this.form.content) {
|
||||
this.$message.error('请输入内容')
|
||||
return
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/userArticle/kh/action',
|
||||
data: this.form
|
||||
})
|
||||
this.$message.success(this.form._id ? '修改成功' : '新增成功')
|
||||
await this.getList()
|
||||
this.isAdd = false
|
||||
this.form = {
|
||||
_id: null,
|
||||
title: '',
|
||||
content: '',
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/userArticle/kh/getList',
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
del(_id) {
|
||||
this.$confirm('确认删除该新闻动态吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await vk.callFunction({
|
||||
url: 'client/userArticle/kh/delete',
|
||||
data: {_id}
|
||||
})
|
||||
await this.getList()
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
for (let key in this.form) this.form[key] = item[key]
|
||||
this.isAdd = true
|
||||
},
|
||||
showAdd() {
|
||||
this.isAdd = true
|
||||
},
|
||||
cancel(){
|
||||
this.isAdd = !this.isAdd
|
||||
this.form = {
|
||||
_id: null,
|
||||
title: '',
|
||||
content: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>您有<em style="color: #bf2b28;padding: 0 3px;font-weight: 500">{{ unreadNum }}</em>条未读消息</span>
|
||||
<div slot="header" class="flex justify-between items-start">
|
||||
<div class="flex flex-col justify-start items-start">
|
||||
<span>您有<em style="color: #bf2b28;padding: 0 3px;font-weight: 500">{{
|
||||
unreadNum
|
||||
}}</em>条未读消息</span>
|
||||
<span class="text-main pointer" @click="allRead">全部已读</span>
|
||||
</div>
|
||||
<el-button style="float: right; padding: 3px 0; color: #666" type="text" @click="onSetting"
|
||||
v-if="parseInt(vk.getVuex('$user.userInfo.userLevel')) > 0"><i
|
||||
class="el-icon-setting"></i> 消息推送设置
|
||||
@@ -25,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc">
|
||||
<div class="desc pointer" @click="toDetail(item, index)">
|
||||
{{ item.content }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +40,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加或编辑的弹窗结束 -->
|
||||
<el-dialog title="提示" :visible.sync="dialogVisible" width="70%">
|
||||
<el-descriptions title="报价详情" v-if="sheet && dialogVisible" border :column="1">
|
||||
<el-descriptions-item label="公司">{{ sheet.user.company.companyName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{ sheet.user.manager.personName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{ sheet.user.businessCard.companyMobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="价格">{{ sheet.amount }}元</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<p v-for="(item, index) in sheet.files" :key="index">
|
||||
<a :href="item" target="_blank">预览:文件{{ index + 1 }}</a>
|
||||
</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ sheet.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="toContact" type="primary">去签合同</el-button>
|
||||
<el-button @click="dialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@@ -46,27 +68,33 @@ export default {
|
||||
return {
|
||||
unreadNum: 0,
|
||||
noticeList: [],
|
||||
pageSize: 20,
|
||||
total: 0
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
sheet: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getUnreadNum()
|
||||
},
|
||||
methods: {
|
||||
async getList(pageIndex = 1) {
|
||||
const {rows} = await vk.callFunction({
|
||||
const {rows, total} = await vk.callFunction({
|
||||
url: 'client/message/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
}
|
||||
})
|
||||
this.unreadNum = 0
|
||||
this.total = total
|
||||
this.noticeList = rows
|
||||
this.noticeList.forEach(item => {
|
||||
if (!item.hasRead) this.unreadNum++
|
||||
})
|
||||
},
|
||||
async getUnreadNum() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/message/kh/getUnreadCount',
|
||||
});
|
||||
this.unreadNum = data
|
||||
},
|
||||
async setRead(index) {
|
||||
this.noticeList[index].hasRead = true
|
||||
@@ -77,29 +105,66 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
async del(index) {
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/delete',
|
||||
data: {
|
||||
id: this.noticeList[index]._id
|
||||
}
|
||||
del(index) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/delete',
|
||||
data: {
|
||||
id: this.noticeList[index]._id
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
await this.getList()
|
||||
await this.getUnreadNum()
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
await this.getList()
|
||||
|
||||
},
|
||||
onSetting() {
|
||||
this.$emit('done', 'setting')
|
||||
},
|
||||
toDetail(item, index) {
|
||||
this.setRead(index)
|
||||
if (!item.hasRead) this.setRead(index)
|
||||
let url = null
|
||||
if (item.type === 'old') url = `/pages/index/old/detail?id=${item.pk}`
|
||||
else if (item.type === 'enquiry') url = `/pages/enquiry/detail?id=${item.pk}`
|
||||
else if (item.type === 'process') url = `/pages/process/detail?id=${item.pk}`
|
||||
else if (item.type === 'contract') url = `/pages/contract/index?tab=1`
|
||||
else if (item.type === 'self-support') url = `/pages/index/self-support/quote?id=${item.pk}`
|
||||
else if (item.type === 'self-product') url = `/pages/order/order`
|
||||
else if (item.type === 'self-support-quote') {
|
||||
this.getQuoteDetail(item.pk)
|
||||
}
|
||||
if (url) vk.navigateTo({url})
|
||||
},
|
||||
async allRead() {
|
||||
await vk.callFunction({
|
||||
url: 'client/message/kh/setAllRead'
|
||||
})
|
||||
await this.getList(1)
|
||||
await this.getUnreadNum()
|
||||
},
|
||||
async getQuoteDetail(_id){
|
||||
await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getQuoteDetail',
|
||||
data: {
|
||||
_id
|
||||
},
|
||||
success: ({rows}) => {
|
||||
this.sheet = rows
|
||||
this.dialogVisible = true
|
||||
}
|
||||
});
|
||||
},
|
||||
toContact(){
|
||||
this.dialogVisible = false
|
||||
vk.navigateTo({url: '/pages/contract/index?tab=1'})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,6 +179,8 @@ export default {
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
|
||||
.title-box {
|
||||
display: flex;
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<div class="pay-desc">微信、支付宝、云闪付扫码完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
@@ -142,7 +142,8 @@ export default {
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
// notifyUrl: 'https://static-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/#/'
|
||||
notifyUrl: 'https://tcb-n44byxi8bmrfrki-d4bn1c4a206d.service.tcloudbase.com/pay_notify'
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -154,7 +155,7 @@ export default {
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
// this.$alert('', '请打开手机微信,扫一扫完成支付', {
|
||||
// this.$alert('', '微信、支付宝、云闪付扫码完成支付', {
|
||||
// confirmButtonText: '确定',
|
||||
// callback: action => {
|
||||
// this.$message({
|
||||
|
||||
+603
-754
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,431 @@
|
||||
<template>
|
||||
<view v-if="userInfo && userInfo.person">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="真实姓名" required>
|
||||
<el-input v-model="form.person.personName" v-if="isEdit"/>
|
||||
<text v-else>{{ userInfo.person.personName }}</text>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="主营类目" required>-->
|
||||
<!-- <el-input v-model="form.person.businessType" v-if="isEdit"/>-->
|
||||
<!-- <text v-else>{{ userInfo.person.businessType }}</text>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<!-- <el-form-item label="主营商品" required>-->
|
||||
<!-- <el-checkbox-group v-model="form.person.mainSpotCategoryIds" v-if="isEdit">-->
|
||||
<!-- <el-checkbox v-for="(item, index) in goodsCate" :key="index" :label="item._id">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </el-checkbox>-->
|
||||
<!-- </el-checkbox-group>-->
|
||||
<!-- <template v-else>-->
|
||||
<!-- <text v-if="userInfo.person.mainSpotCategoryIds">-->
|
||||
<!-- {{-->
|
||||
<!-- userInfo.person.mainSpotCategoryIds.length ? userInfo.person.mainSpotCategoryIds.map(item => goodsCate.find(i => i._id === item) ? goodsCate.find(i => i._id === item).name : '').join('、') : ''-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="行业分类">
|
||||
<el-select v-model="form.person.businessType" placeholder="请选择行业分类" v-if="isEdit">
|
||||
<el-option
|
||||
v-for="(item, index) in industryList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.company.businessType" v-if="isEdit"/>-->
|
||||
<text v-else>{{ userInfo.person.businessType }}</text>
|
||||
</el-form-item>
|
||||
<el-form-item label="现居住所在地" required>
|
||||
<el-row :gutter="10" v-if="isEdit">
|
||||
<el-col :span="8">
|
||||
<el-select v-model="addressIndex[0]" placeholder="请选择省" class="w-100p">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-select v-model="addressIndex[1]" placeholder="请选择市" class="w-100p"
|
||||
:readonly="addressIndex.length === 0 || [0, 1].includes(userInfo.authStatus)">
|
||||
<template v-if="addressIndex[0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[0]]" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-select v-model="addressIndex[2]" placeholder="请选择区" class="w-100p">
|
||||
<template v-if="addressIndex[0] !== null && addressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[0]][addressIndex[1]]"
|
||||
:key="index" :label="item.name" :value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<view v-else-if="!isEdit && userInfo.person.addressRegion">
|
||||
<text>{{
|
||||
userInfo.person.addressRegion.province ? userInfo.person.addressRegion.province.name : ''
|
||||
}}
|
||||
</text>
|
||||
<text>{{
|
||||
userInfo.person.addressRegion.city ? userInfo.person.addressRegion.city.name : ''
|
||||
}}
|
||||
</text>
|
||||
<text>{{
|
||||
userInfo.person.addressRegion.area ? userInfo.person.addressRegion.area.name : ''
|
||||
}}
|
||||
</text>
|
||||
<text>{{ userInfo.person.addressDetail ? userInfo.person.addressDetail : '' }}</text>
|
||||
</view>
|
||||
<el-input v-model="form.person.addressDetail" placeholder="请输入详细地址" v-if="isEdit"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="有效通信地址">
|
||||
<text>{{ form.person.address }}</text>
|
||||
</el-form-item>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="个人账号" required>
|
||||
<el-input v-model="form.person.personAccount" v-if="isEdit"/>
|
||||
<text v-else>{{ userInfo.person.personAccount }}</text>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="个人开户行" required>
|
||||
<el-input v-model="form.person.personBankName" v-if="isEdit"/>
|
||||
<text v-else>{{ userInfo.person.personBankName }}</text>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="个人账户名" required>
|
||||
<el-input v-model="form.person.accountName" v-if="isEdit"/>
|
||||
<text v-else>{{ userInfo.person.accountName }}</text>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item label="联系方式" required>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.person.mobile" v-if="isEdit" placeholder="请输入手机号码"/>
|
||||
<text v-else>{{ userInfo.person.mobile }}</text>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.person.qq" v-if="isEdit" placeholder="请输入QQ号码"/>
|
||||
<text v-else>{{ userInfo.person.qq }}</text>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.person.contactEmail" v-if="isEdit" placeholder="请输入邮箱地址"/>
|
||||
<text v-else>{{ userInfo.person.contactEmail }}</text>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="短信验证码" required>
|
||||
<el-input v-model="form.smsCode" :disabled="!form.person.mobile" v-if="isEdit"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" :disabled="!form.person.mobile || codeDisabled" @click="sendSmsCode">
|
||||
{{ smsTips }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<text>(请勿告知他人相关信息)</text>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-form-item label="平台交易账号认证" required v-if="isEdit">-->
|
||||
<!-- <div v-html="authBankInfo"></div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="金久信平台幕布照" required>-->
|
||||
<!-- <view class="flex justify-start items-center" v-if="isEdit">-->
|
||||
<!-- <vk-data-upload :limit="1" v-model="form.person.photo"></vk-data-upload>-->
|
||||
<!-- <text class="text-main ml-20 pointer" @click="openDownload">电子版文件下载</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <el-image :src="userInfo.person.photo" style="width: 100px;height: 100px" fit="cover"-->
|
||||
<!-- v-else-if="!isEdit && userInfo.person.photo && userInfo.person.photo.includes('.')"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<view class="flex justify-start items-center">
|
||||
<view class="flex justify-start items-center" v-if="[1, 2].includes(userInfo.authStatus)">
|
||||
<view class="mr-15">
|
||||
<el-button type="primary" plain @click.native="changeEdit">{{
|
||||
isEdit ? '取消' : '编辑'
|
||||
}}
|
||||
</el-button>
|
||||
</view>
|
||||
<el-button v-if="userInfo.authStatus === 1" type="primary" @click.native="submit(0)"
|
||||
:disabled="!isEdit">提交个人认证
|
||||
</el-button>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="submit()"
|
||||
v-if="userInfo.authStatus === null || [-1, 2].includes(userInfo.authStatus)">提交个人认证
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import key from "@icon-park/vue/lib/icons/Key";
|
||||
|
||||
let timer = null
|
||||
let timeS = 60
|
||||
|
||||
export default {
|
||||
name: "personalAuth",
|
||||
data() {
|
||||
return {
|
||||
isEdit: false,
|
||||
authBankInfo: '',
|
||||
authPhotoBack: '',
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
form: {
|
||||
person: {
|
||||
personName: '',
|
||||
address: '',
|
||||
businessType: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
mobile: '',
|
||||
qq: '',
|
||||
contactEmail: '',
|
||||
personAccount: '',
|
||||
personBankName: '',
|
||||
accountName: '',
|
||||
photo: '',
|
||||
mainSpotCategoryIds: []
|
||||
},
|
||||
smsCode: '',
|
||||
},
|
||||
smsTips: '点击获取',
|
||||
codeDisabled: false,
|
||||
goodsCate: [],
|
||||
industryList: [],
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getIndustryList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/industry/pub/getList'
|
||||
})
|
||||
this.industryList = rows
|
||||
},
|
||||
getGoodsCate() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getList',
|
||||
data: {
|
||||
whereJson: {
|
||||
level: 2
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
this.goodsCate = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
getAuthBankInfo() {
|
||||
vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d38a8337a9f0756cb3b22'
|
||||
},
|
||||
success: res => {
|
||||
this.authBankInfo = res.content
|
||||
}
|
||||
});
|
||||
},
|
||||
getAuthPhoto() {
|
||||
vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d3a178b0da41d31112468'
|
||||
},
|
||||
success: res => {
|
||||
this.authPhotoBack = res.content
|
||||
}
|
||||
});
|
||||
},
|
||||
openDownload() {
|
||||
window.open(this.authPhotoBack)
|
||||
},
|
||||
async submit(authStatus = 0) {
|
||||
if (!this.form.person.personName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请输入真实姓名'
|
||||
})
|
||||
// if (!this.form.person.businessType) return this.$message({
|
||||
// type: 'error',
|
||||
// message: '请选择行业分类'
|
||||
// })
|
||||
// if (this.form.person.mainSpotCategoryIds.length === 0) return this.$message({
|
||||
// type: 'error',
|
||||
// message: '请选择主营商品'
|
||||
// })
|
||||
if (!this.form.person.mobile) return this.$message({
|
||||
type: 'error',
|
||||
message: '请输入联系方式'
|
||||
})
|
||||
if (!this.form.person.personAccount) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写个人账号'
|
||||
})
|
||||
if (!this.form.person.personBankName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请选择个人开户行'
|
||||
})
|
||||
if (!this.form.person.accountName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请选择个人账户名'
|
||||
})
|
||||
// if (!this.form.person.photo) return this.$message({
|
||||
// type: 'error',
|
||||
// message: '请上传平台幕布照'
|
||||
// })
|
||||
if (!this.form.smsCode) return this.$message({
|
||||
type: 'error',
|
||||
message: '请输入短信验证码'
|
||||
})
|
||||
if (this.addressIndex[2] === null) return this.$message({
|
||||
type: 'error',
|
||||
message: '请完善居住所在地'
|
||||
})
|
||||
|
||||
// this.form.person.addressRegion.province = this.provinceData[this.addressIndex[0]]
|
||||
// this.form.person.addressRegion.city = this.cityData[this.addressIndex[0]][this.addressIndex[1]]
|
||||
// this.form.person.addressRegion.area = this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]]
|
||||
const data = {...this.form, ...{authStatus}}
|
||||
if (authStatus === 0) data.authType = 2
|
||||
await vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
title: '提交中...',
|
||||
data
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '提交成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 1500)
|
||||
},
|
||||
sendSmsCode() {
|
||||
if (timer != null) return
|
||||
this.codeDisabled = true
|
||||
vk.userCenter.sendSmsCode({
|
||||
loading: true,
|
||||
data: {
|
||||
mobile: this.form.person.mobile,
|
||||
type: 'verify',
|
||||
},
|
||||
success: (data) => {
|
||||
this.codeDisabled = false
|
||||
this.$message({
|
||||
message: "验证码已发送",
|
||||
type: 'success'
|
||||
})
|
||||
timeS = 60
|
||||
timer = setInterval(() => {
|
||||
timeS--
|
||||
if (timeS <= 0) {
|
||||
this.smsTips = "重新发送"
|
||||
this.stopTimer()
|
||||
} else {
|
||||
this.smsTips = timeS + "秒"
|
||||
}
|
||||
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
},
|
||||
stopTimer() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
},
|
||||
selectRegion() {
|
||||
this.form.person.address = ''
|
||||
if (this.addressIndex[0] !== null) {
|
||||
this.form.person.address = this.provinceData[this.addressIndex[0]].name
|
||||
this.form.person.addressRegion.province = this.provinceData[this.addressIndex[0]]
|
||||
if (this.addressIndex[1] !== null) {
|
||||
this.form.person.address += this.cityData[this.addressIndex[0]][this.addressIndex[1]].name
|
||||
this.form.person.addressRegion.city = this.cityData[this.addressIndex[0]][this.addressIndex[1]]
|
||||
if (this.addressIndex[2] !== null) {
|
||||
this.form.person.address += this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]].name
|
||||
this.form.person.addressRegion.area = this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]]
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.form.person.addressDetail) this.form.person.address += this.form.person.addressDetail
|
||||
},
|
||||
changeEdit() {
|
||||
this.isEdit = !this.isEdit
|
||||
this.codeDisabled = !this.isEdit
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getGoodsCate()
|
||||
this.getIndustryList()
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.userInfo = data.userInfo
|
||||
|
||||
this.isEdit = this.userInfo.authStatus === -1
|
||||
this.codeDisabled = !this.isEdit
|
||||
if (this.userInfo.person) for (let key in this.form.person) this.form.person[key] = this.userInfo.person[key]
|
||||
if (JSON.stringify(this.userInfo.person.addressRegion) !== "{}" && this.userInfo.person.addressRegion && this.userInfo.person.addressRegion.province) {
|
||||
this.addressIndex[0] = this.provinceData.findIndex(item => parseInt(item.code) === parseInt(this.userInfo.person.addressRegion.province.code))
|
||||
if (this.addressIndex[0] !== -1) {
|
||||
this.addressIndex[1] = this.cityData[this.addressIndex[0]].findIndex(item => parseInt(item.code) === parseInt(this.userInfo.person.addressRegion.city.code))
|
||||
if (this.addressIndex[1] !== -1) {
|
||||
this.addressIndex[2] = this.areaData[this.addressIndex[0]][this.addressIndex[1]].findIndex(item => parseInt(item.code) === parseInt(this.userInfo.person.addressRegion.area.code))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.form.person.addressRegion = {
|
||||
province: {
|
||||
code: '',
|
||||
name: ''
|
||||
},
|
||||
city: {
|
||||
code: '',
|
||||
name: ''
|
||||
},
|
||||
area: {
|
||||
code: '',
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!this.userInfo.person.mainSpotCategoryIds) {
|
||||
this.userInfo.person.mainSpotCategoryIds = []
|
||||
this.form.person.mainSpotCategoryIds = []
|
||||
}
|
||||
if (!this.userInfo.person.personAccount && this.userInfo.person.bankCardNo)
|
||||
this.form.person.personAccount = this.userInfo.person.bankCardNo
|
||||
if (!this.userInfo.person.accountName && this.userInfo.person.personName)
|
||||
this.form.person.accountName = this.userInfo.person.personName
|
||||
// this.getAuthBankInfo()
|
||||
// this.getAuthPhoto()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-form ref="resetForm" :model="formData" label-width="100px" :rules="rules">
|
||||
<el-form-item label="原密码" prop="oldPassword">
|
||||
<el-input type="password" v-model="formData.oldPassword" clearable
|
||||
placeholder="请输入原密码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword">
|
||||
<el-input type="password" v-model="formData.newPassword" clearable
|
||||
placeholder="请输入新密码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="passwordConfirmation">
|
||||
<el-input type="password" v-model="formData.passwordConfirmation" clearable
|
||||
placeholder="请再次输入新密码"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" @click.native="submit">确定</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "pwd",
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
oldPassword: null,
|
||||
newPassword: null,
|
||||
passwordConfirmation: null,
|
||||
},
|
||||
rules: {
|
||||
oldPassword: [
|
||||
{required: true, message: '请输入原密码', trigger: 'blur'},
|
||||
],
|
||||
newPassword: [
|
||||
{required: true, message: '请输入新密码', trigger: 'blur'},
|
||||
{min: 6, max: 16, message: '密码长度在 6 到 16 个字符', trigger: 'blur'},
|
||||
],
|
||||
passwordConfirmation: [
|
||||
{required: true, message: '请再次输入新密码', trigger: 'blur'},
|
||||
{validator: this.checkPassword, trigger: 'blur'},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
if (!this.formData.oldPassword) return this.$message.error('请输入原密码');
|
||||
if (!this.formData.newPassword) return this.$message.error('请输入原密码');
|
||||
if (!this.formData.passwordConfirmation) return this.$message.error('请输入原密码');
|
||||
if (this.formData.newPassword !== this.formData.passwordConfirmation) return this.$message.error('两次输入的密码不一致!');
|
||||
if (this.formData.newPassword === this.formData.oldPassword) return this.$message.error('新密码不能与原密码相同!');
|
||||
if (this.formData.newPassword.length < 6) return this.$message.error('密码长度在 6 到 16 个字符');
|
||||
const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+$/
|
||||
if (!reg.test(this.formData.newPassword)) {
|
||||
return this.$message({
|
||||
message: '密码必须由数字和字母组成',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
vk.callFunction({
|
||||
url: 'user/kh/updatePwd',
|
||||
data: this.formData
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改成功'
|
||||
})
|
||||
this.$refs.resetForm.resetFields();
|
||||
})
|
||||
},
|
||||
checkPassword(rule, value, callback) {
|
||||
if (value !== this.formData.newPassword) {
|
||||
callback(new Error('两次输入的密码不一致!'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -64,7 +64,7 @@
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_srt",
|
||||
key: "_add_time_str",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
|
||||
+359
-190
@@ -1,220 +1,389 @@
|
||||
<template>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix" style="text-align: center">
|
||||
<span style="font-size: 20px;line-height: 2em;">消息推送设置</span>
|
||||
<div style="color: #999999">我们将针对您的选择,为您精准推送询价信息</div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix" style="text-align: center">
|
||||
<span style="font-size: 20px;line-height: 2em;">消息推送设置</span>
|
||||
<div style="color: #999999">我们将针对您的选择,为您精准推送询价信息</div>
|
||||
</div>
|
||||
<el-row class="setting-list" :gutter="50">
|
||||
<el-col :span="12" v-for="(item,index) in settingList" :key="index">
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<el-badge is-dot class="badge"></el-badge>
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-switch active-text="开启"
|
||||
v-model="item.status">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="setting-list" :gutter="50">
|
||||
<el-col :span="12" v-for="(item,index) in settingList" :key="index">
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<el-badge is-dot class="badge"></el-badge>
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-switch
|
||||
v-model="item.status">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择产品:
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-position="left" label-width="120px">
|
||||
<el-form-item :label="item.name" v-for="(item, index) in productList" :key="index">
|
||||
<el-checkbox-group v-model="productList[index].idList" size="small">
|
||||
<el-checkbox v-for="(productItem, productIndex) in item.children" :key="productIndex"
|
||||
:label="productItem._id" border
|
||||
:checked="productList[index].idList.includes(item._id)">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择产品:
|
||||
</div>
|
||||
<!-- <el-form ref="form" :model="form" label-position="left" label-width="120px">-->
|
||||
<!-- <el-form-item :label="item.name" v-for="(item, index) in productList" :key="index">-->
|
||||
<!-- <el-checkbox-group v-model="productList[index].idList" size="small" class="flex justify-start items-start flex-wrap">-->
|
||||
<!-- <el-checkbox v-for="(productItem, productIndex) in item.children" :key="productIndex"-->
|
||||
<!-- :label="productItem.name" border style="margin: 10px 10px 0 0"-->
|
||||
<!-- :checked="productList[index].idList.includes(productItem.name)">-->
|
||||
<!-- {{ productItem.name }}-->
|
||||
<!-- </el-checkbox>-->
|
||||
<!-- </el-checkbox-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<div class="flex justify-center items-start">
|
||||
<div v-for="(item, index) in productList" class="flex-1 mx-15" :key="index">
|
||||
<div class="flex justify-start items-center">
|
||||
<image :src="item.icon" style="width: 15px; height: 15px"/>
|
||||
<span class="ml-10">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="ml-25 flex flex-wrap justify-start items-start">
|
||||
<span class="mr-25 mt-20 pointer" @click="changeCheck(productItem)"
|
||||
:class="[allSelectedProductList.includes(productItem.name) ? 'text-main' : '']"
|
||||
v-for="(productItem, productIndex) in item.children"
|
||||
:key="productIndex"> {{ productItem.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择服务地区:
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[0]" placeholder="请选择省">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[1]" placeholder="请选择市"
|
||||
:disabled="addressIndex.length === 0">
|
||||
<template v-if="addressIndex[0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[2]" placeholder="请选择区"
|
||||
:disabled="addressIndex.length === 1">
|
||||
<template
|
||||
v-if="addressIndex[0] !== null && addressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[0]][addressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="flex justify-start items-center flex-wrap mt-20">
|
||||
<span style="margin: 10px 10px 0 0">已选:</span>
|
||||
<div class="flex justify-start items-center pointer" @click="changeCheck(productItem)"
|
||||
v-for="(productItem, productIndex) in allProductList.filter(all => allSelectedProductList.includes(all.name))"
|
||||
:key="productIndex" style="margin: 10px 10px 0 0">
|
||||
<image src="/static/images/check.png" style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">{{ productItem.parentName }}-{{ productItem.name }}</span>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-button type="danger" round @click.native="save">保存设置</el-button>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择服务地区:
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select size="small" v-model="addressIndex[0]" placeholder="请选择省">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select size="small" v-model="addressIndex[1]" placeholder="请选择市"
|
||||
:disabled="addressIndex[0] === null">
|
||||
<template v-if="addressIndex[0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select size="small" v-model="addressIndex[2]" placeholder="请选择区"
|
||||
:disabled="addressIndex[1] === null">
|
||||
<template v-if="addressIndex[0] !== null && addressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[0]][addressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="flex justify-start items-center">
|
||||
<el-button type="primary" size="mini" @click="addAddress">添加</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="flex justify-start items-start flex-wrap mt-20">
|
||||
<div class="flex justify-start items-center pointer" @click="deleteAddress(item)"
|
||||
v-for="(item, index) in addressList"
|
||||
:key="index" style="margin: 10px 10px 0 0">
|
||||
<image src="/static/images/check.png" style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">{{ item.province.name }}-{{
|
||||
item.city ? item.city.name : '不限'
|
||||
}}-{{ item.area ? item.area.name : '不限' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择单笔交易额:
|
||||
</div>
|
||||
<div class="flex justify-start items-center">
|
||||
<el-input size="small" v-model="tradeAmount[0]" placeholder="请输入金额" style="width: 200px">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
<span class="mx-20">~</span>
|
||||
<el-input size="small" v-model="tradeAmount[1]" placeholder="请输入金额" style="width: 200px">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请选择交易方式:
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<div class="flex justify-start items-center pointer" @click="changeItemCheck('tradeSelf')"
|
||||
style="margin: 10px 10px 0 0">
|
||||
<image :src="tradeSelf ? '/static/images/check.png' : '/static/images/uncheck.png'"
|
||||
style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">自主交易</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="flex justify-start items-center pointer" @click="changeItemCheck('tradePlatform')"
|
||||
style="margin: 10px 10px 0 0">
|
||||
<image :src="tradePlatform ? '/static/images/check.png' : '/static/images/uncheck.png'"
|
||||
style="width: 12px; height: 12px; margin-right: 5px"/>
|
||||
<span style="line-height: 18px">金久信公证</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="form">
|
||||
<div class="form-title">
|
||||
* 请设置免打扰时间段:
|
||||
</div>
|
||||
<div class="flex justify-start items-center">
|
||||
<!-- <el-time-picker v-model="doNotDisturbRange" range-separator="~" is-range style="width: 200px"/>-->
|
||||
<el-cascader v-model="settingList.doNotDisturbStart" :options="timeList"/>
|
||||
<span class="mx-15">至</span>
|
||||
<el-cascader v-model="settingList.doNotDisturbEnd" :options="timeList"/>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="danger" round @click.native="save">保存设置</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import {CheckCorrect} from '@icon-park/vue'
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
settingList: {
|
||||
article: {
|
||||
title: '行情信息推送服务',
|
||||
status: false
|
||||
},
|
||||
process: {
|
||||
title: '找加工信息推送服务',
|
||||
status: false
|
||||
},
|
||||
old: {
|
||||
title: '旧货交易信息推送服务',
|
||||
status: false
|
||||
},
|
||||
enquiry: {
|
||||
title: '询价单和选项推送服务',
|
||||
status: false
|
||||
},
|
||||
},
|
||||
form: {},
|
||||
group1: [],
|
||||
productList: [],
|
||||
addressRegion: {}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getCate()
|
||||
await this.getConfig()
|
||||
},
|
||||
methods: {
|
||||
async getConfig() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/message/config/kh/getConfig'
|
||||
})
|
||||
for (let key in this.settingList) this.settingList[key].status = res[key]
|
||||
this.productList.forEach((item, index) => {
|
||||
item.children.forEach(productItem => {
|
||||
if (res.productList.includes(productItem._id)) {
|
||||
this.productList[index].idList.push(productItem._id)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (res.addressRegion.province) {
|
||||
this.addressIndex[0] = this.provinceData.findIndex(item => item.code === res.addressRegion.province.code)
|
||||
if (this.addressIndex[0] !== -1) {
|
||||
this.addressIndex[1] = this.cityData[this.addressIndex[0]].findIndex(item => item.code === res.addressRegion.city.code)
|
||||
if (this.addressIndex[1] !== -1) {
|
||||
this.addressIndex[2] = this.areaData[this.addressIndex[0]][this.addressIndex[1]].findIndex(item => item.code === res.addressRegion.area.code)
|
||||
}
|
||||
}
|
||||
}
|
||||
components: {CheckCorrect},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
addressList: [],
|
||||
settingList: {
|
||||
article: {
|
||||
title: '现货推送服务',
|
||||
status: false
|
||||
},
|
||||
async getCate() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
});
|
||||
this.productList = rows.map(item => {
|
||||
item.idList = []
|
||||
return item
|
||||
})
|
||||
process: {
|
||||
title: '找加工信息推送服务',
|
||||
status: false
|
||||
},
|
||||
async save() {
|
||||
let productList = []
|
||||
this.productList.forEach(item => {
|
||||
productList = [...productList, ...item.idList]
|
||||
})
|
||||
await vk.callFunction({
|
||||
url: 'client/message/config/kh/update',
|
||||
data: {
|
||||
article: this.settingList.article.status,
|
||||
process: this.settingList.process.status,
|
||||
old: this.settingList.old.status,
|
||||
enquiry: this.settingList.enquiry.status,
|
||||
productList,
|
||||
addressRegion: {
|
||||
province: this.provinceData[this.addressIndex[0]],
|
||||
city: this.cityData[this.addressIndex[0]][this.addressIndex[1]],
|
||||
area: this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]],
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
}
|
||||
old: {
|
||||
title: '旧货交易信息推送服务',
|
||||
status: false
|
||||
},
|
||||
enquiry: {
|
||||
title: '询价单和选项推送服务',
|
||||
status: false
|
||||
},
|
||||
doNotDisturbStart: [],
|
||||
doNotDisturbEnd: [],
|
||||
},
|
||||
form: {},
|
||||
group1: [],
|
||||
productList: [],
|
||||
allProductList: [],
|
||||
allSelectedProductList: [],
|
||||
addressRegion: {},
|
||||
tradeSelf: false,
|
||||
tradePlatform: false,
|
||||
doNotDisturbRange: [new Date(2024, 1, 1, 0, 0), new Date(2024, 1, 1, 0, 0)],
|
||||
tradeAmount: [],
|
||||
timeList: []
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getCate()
|
||||
await this.getConfig()
|
||||
this.timeList = []
|
||||
for (let i = 0; i < 24; i++) {
|
||||
const minuteList = []
|
||||
const secondList = []
|
||||
for (let j = 0; j < 60; j++) {
|
||||
secondList.push({
|
||||
label: j.toString().padStart(2, '0') + '秒',
|
||||
value: j
|
||||
})
|
||||
}
|
||||
for (let j = 0; j < 60; j++) {
|
||||
minuteList.push({
|
||||
label: j.toString().padStart(2, '0') + '分',
|
||||
value: j,
|
||||
children: secondList
|
||||
})
|
||||
}
|
||||
this.timeList.push({
|
||||
label: i.toString().padStart(2, '0') + '时',
|
||||
value: i,
|
||||
children: minuteList
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getConfig() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/message/config/kh/getConfig'
|
||||
})
|
||||
this.allProductList = []
|
||||
this.allSelectedProductList = []
|
||||
for (let key in this.settingList) this.settingList[key].status = res[key]
|
||||
this.productList.forEach((item, index) => {
|
||||
item.children.forEach(productItem => {
|
||||
if (res.productList.includes(productItem.name)) {
|
||||
this.productList[index].idList.push(productItem.name)
|
||||
this.allSelectedProductList.push(productItem.name)
|
||||
}
|
||||
this.allProductList.push({
|
||||
...productItem,
|
||||
parentName: item.name
|
||||
})
|
||||
})
|
||||
})
|
||||
this.tradeSelf = res.tradeSelf ?? false
|
||||
this.tradePlatform = res.tradePlatform ?? false
|
||||
if (res.addressList) this.addressList = res.addressList
|
||||
else {
|
||||
this.addressList = []
|
||||
}
|
||||
this.settingList.doNotDisturbStart = res.doNotDisturbStart ?? []
|
||||
this.settingList.doNotDisturbEnd = res.doNotDisturbEnd ?? []
|
||||
const today = dayjs().format('YYYY-MM-DD')
|
||||
this.tradeAmount = res.tradeAmount ?? []
|
||||
},
|
||||
async getCate() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
});
|
||||
this.productList = rows.map(item => {
|
||||
item.idList = []
|
||||
return item
|
||||
})
|
||||
},
|
||||
async save() {
|
||||
// let productList = []
|
||||
// console.log(this.allSelectedProductList)
|
||||
// this.productList.forEach(item => {
|
||||
// productList = [...productList, ...item.idList]
|
||||
// })
|
||||
await vk.callFunction({
|
||||
url: 'client/message/config/kh/update',
|
||||
data: {
|
||||
article: this.settingList.article.status,
|
||||
process: this.settingList.process.status,
|
||||
old: this.settingList.old.status,
|
||||
enquiry: this.settingList.enquiry.status,
|
||||
productList: this.allSelectedProductList,
|
||||
addressList: this.addressList,
|
||||
tradeSelf: this.tradeSelf,
|
||||
tradePlatform: this.tradePlatform,
|
||||
doNotDisturbRange: this.doNotDisturbRange,
|
||||
tradeAmount: this.tradeAmount,
|
||||
doNotDisturbStart: this.settingList.doNotDisturbStart,
|
||||
doNotDisturbEnd: this.settingList.doNotDisturbEnd,
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
},
|
||||
changeCheck(product) {
|
||||
const index = this.allSelectedProductList.findIndex(item => item === product.name)
|
||||
if (index > -1) {
|
||||
this.allSelectedProductList.splice(index, 1)
|
||||
} else {
|
||||
this.allSelectedProductList.push(product.name)
|
||||
}
|
||||
},
|
||||
addAddress() {
|
||||
if (!this.addressIndex[0]) return
|
||||
this.addressList.push({
|
||||
province: this.provinceData[this.addressIndex[0]],
|
||||
city: this.addressIndex[1] != null ? this.cityData[this.addressIndex[0]][this.addressIndex[1]] : null,
|
||||
area: this.addressIndex[2] != null ? this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]] : null
|
||||
})
|
||||
this.addressIndex = [null, null, null]
|
||||
},
|
||||
deleteAddress(index) {
|
||||
this.addressList.splice(index, 1)
|
||||
},
|
||||
changeItemCheck(field) {
|
||||
this[field] = !this[field]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.setting-list {
|
||||
.item {
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin: 5px auto;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.badge {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin: 5px auto;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-title {
|
||||
color: #bf2b28;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 2em;
|
||||
margin-bottom: 10px;
|
||||
color: #bf2b28;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/deep/ .i-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/deep/ .el-input__suffix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
:before-close="handleClose">
|
||||
<view class="p3">
|
||||
<view v-for="(item, index) in userLevelList" :key="index">
|
||||
<view class="item pointer"
|
||||
<view class="item pointer p-20"
|
||||
v-if="item.recommendUpgrade && parseInt(item.recommendUpgrade) > 0"
|
||||
:class="index == current ? 'active' : ''" @click="onSelect(item, index)">
|
||||
<view class="t">{{ item.name }}</view>
|
||||
@@ -50,7 +50,7 @@
|
||||
</view>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="exchangeUpgrade">确定兑换</el-button>
|
||||
<el-button type="primary" @click="exchangeUpgrade" :disabled="current == null">确定兑换</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</view>
|
||||
@@ -61,7 +61,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
progress: 0,
|
||||
current: 0,
|
||||
current: null,
|
||||
dialogVisible: false,
|
||||
user: this.vk.getVuex('$user.userInfo'),
|
||||
userLevelList: [],
|
||||
@@ -77,9 +77,14 @@ export default {
|
||||
},
|
||||
onSelect(item, index) {
|
||||
if (parseInt(this.user.inviteNum) >= item.recommendUpgrade && item.level > parseInt(this.user.userLevel)) this.current = index
|
||||
else this.$message({
|
||||
type: 'error',
|
||||
message: '您的邀请人数不足'
|
||||
})
|
||||
},
|
||||
copy() {
|
||||
const url = window.location.origin + `/#/pages/auth/register/register?code=${this.user.my_invite_code}`
|
||||
// const url = window.location.origin + `/#/pages/auth/register/register?code=${this.user.my_invite_code}`
|
||||
const url = this.user.my_invite_code
|
||||
document.oncopy = function (e) {
|
||||
e.clipboardData.setData('text', url);
|
||||
e.preventDefault();
|
||||
@@ -172,7 +177,7 @@ export default {
|
||||
|
||||
.item {
|
||||
width: 250upx;
|
||||
height: 180upx;
|
||||
min-height: 240upx;
|
||||
border-radius: 10upx;
|
||||
box-shadow: 1px 1px 5px 1px #A92924;
|
||||
display: flex;
|
||||
@@ -181,6 +186,7 @@ export default {
|
||||
justify-content: center;
|
||||
font-size: 24upx;
|
||||
color: #A92924;
|
||||
padding: 10upx 20upx;
|
||||
|
||||
.t {
|
||||
font-size: 30upx;
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="flex justify-center items-start main-wrap">
|
||||
<view class="flex-col flex-col justify-center items-center bg-white text-40 left-wrap pointer">
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 0 ? 'active' : '' ]"
|
||||
@click="changeActive(0)">
|
||||
<text>询价管理</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 1 ? 'active' : '' ]"
|
||||
@click="changeActive(1)">
|
||||
<text>订单管理</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 2 ? 'active' : '' ]"
|
||||
@click="changeActive(2)">
|
||||
<text>合同管理</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<el-table :data="tableData" style="width: 100%" border stripe>
|
||||
<el-table-column prop="orderNo" label="订单号" width="200"/>
|
||||
<el-table-column label="订单类型">
|
||||
<template v-slot="{ row }">
|
||||
<span>{{ row.type === 0 ? '普通订单' : '金久信自营订单' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品列表" width="250">
|
||||
<template v-slot="{ row }">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view v-for="(item, index) in row.goods" :key="index"
|
||||
class="flex justify-start items-start">
|
||||
<image :src="item.goodsCover" class="goods-cover" v-if="row.type === 0"/>
|
||||
<view class="ml-20 flex flex-col justify-start items-start">
|
||||
<text class="text-main font-bold">{{ item.goodsName }}</text>
|
||||
<text class="mt-20">¥{{ item.goodsPrice }}</text>
|
||||
<text class="mt-20">x{{ item.num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" label="订单金额"/>
|
||||
<el-table-column prop="payAmount" label="支付金额"/>
|
||||
<el-table-column label="订单状态">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.orderStatus === 0">待支付</span>
|
||||
<span v-if="row.orderStatus === 1">已支付</span>
|
||||
<span v-if="row.orderStatus === 2">待收货</span>
|
||||
<span v-if="row.orderStatus === 3">已完成</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="_add_time_str" label="下单时间"/>
|
||||
<el-table-column label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<text v-if="row.orderStatus === 0" class="text-main pointer" @click="repay(row)">去支付</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<view class="text-center mt-20">
|
||||
<el-pagination
|
||||
:page-size="pageSize"
|
||||
@current-change="getOrderList"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pay from "../index/shop/pay.vue";
|
||||
|
||||
export default {
|
||||
name: "order",
|
||||
computed: {
|
||||
pay() {
|
||||
return pay
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
activeIndex: 0,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeActive(index) {
|
||||
this.list = []
|
||||
this.mode = 'list'
|
||||
if (index !== 2) this.activeIndex = index
|
||||
if (index === 0) {
|
||||
} else if (index === 1) this.getOrderList()
|
||||
else if (index === 2) {
|
||||
vk.navigateTo({
|
||||
url: '/pages/contract/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
async getOrderList(pageIndex = 1) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/order/kh/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
}
|
||||
})
|
||||
this.tableData = rows
|
||||
console.log(this.tableData)
|
||||
},
|
||||
async repay(row) {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/resetOrderNo',
|
||||
data: {
|
||||
id: row._id,
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${row._id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.tab) {
|
||||
this.changeActive(parseInt(options.tab))
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.main-wrap {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
position: relative;
|
||||
|
||||
.left-wrap {
|
||||
position: absolute;
|
||||
width: 220px;
|
||||
left: -240px;
|
||||
top: 0;
|
||||
|
||||
view {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #a92924;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-cover {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</style>
|
||||
+156
-45
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<common-nav></common-nav>
|
||||
<view class="w-1200 flex justify-start items-start my-25 m-a">
|
||||
<view class="flex-col flex-col justify-center items-center bg-white text-40 left-wrap pointer">
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 0 ? 'active' : '' ]"
|
||||
@@ -12,12 +11,12 @@
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 1 ? 'active' : '' ]"
|
||||
@click="changeActive(1)">
|
||||
<i class="el-icon-download"/>
|
||||
<i class="el-icon-star-off"/>
|
||||
<text class="ml-20">我的收藏</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 2 ? 'active' : '' ]"
|
||||
@click="changeActive(2)">
|
||||
<i class="el-icon-star-off"/>
|
||||
<i class="el-icon-download"/>
|
||||
<text class="ml-20">我的下载</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -46,43 +45,81 @@
|
||||
</view>
|
||||
<el-button type="primary" @click="showAction">我要上传</el-button>
|
||||
</view>
|
||||
<view class="flex flex-col justify-start items-start pointer w-100p">
|
||||
<view v-for="(item, index) in list" :key="index" class="content-item-wrap">
|
||||
<file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/>
|
||||
<view class="flex flex-col justify-start items-start w-100p">
|
||||
<view v-for="(item, index) in list" :key="index" class="content-item-wrap pointer"
|
||||
@click="navTo(`/pages/article/detail?id=${item._id}`)">
|
||||
<template v-if="item.files && item.files.length > 0">
|
||||
<template v-if="['doc', 'docx'].includes(item.files[0].split('.').pop())">
|
||||
<file-word theme="outline" class="pointer" size="80" fill="#4a90e2" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else-if="['xls', 'xlsx'].includes(item.files[0].split('.').pop())">
|
||||
<file-excel theme="outline" class="pointer" size="80" fill="#417505" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else-if="['pdf'].includes(item.files[0].split('.').pop())">
|
||||
<file-pdf-one theme="outline" class="pointer" size="80" fill="#f5a623" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-image :src="item.files[0]" style="width: 100px; height: 100px" fit="cover"
|
||||
:preview-src-list="[item.files]"/>
|
||||
</template>
|
||||
</template>
|
||||
<view class="content">
|
||||
<text class="title">{{ item.name }}</text>
|
||||
<view class="desc">
|
||||
<text class="item">{{ item._add_time_str }}</text>
|
||||
<text class="item">{{ item.viewNum }}人浏览</text>
|
||||
<text class="item">{{ item.downloadNum }}次下载</text>
|
||||
<text class="item">{{
|
||||
item.amount === 0 ? '免费下载' : `${item.amount}元下载`
|
||||
}}
|
||||
</text>
|
||||
<!-- <text class="item">{{ item._add_time_str }}</text>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-50">上传文档</text>
|
||||
<vk-data-upload v-model="form1.data.files" accept="image/*,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint">
|
||||
<template>
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</template>
|
||||
</vk-data-upload>
|
||||
<!-- <u-upload :custom-btn="true" :show-upload-list="false" :action="">-->
|
||||
<!-- <template v-slot:addBtn>-->
|
||||
<!-- <el-button type="primary">点击上传</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </u-upload>-->
|
||||
</view>
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <text class="text-50">上传文档</text>-->
|
||||
<!-- <vk-data-upload v-model="form1.data.files" accept="image/*,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint">-->
|
||||
<!-- <template>-->
|
||||
<!-- <el-button type="primary">点击上传</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </vk-data-upload>-->
|
||||
<!-- <u-upload :custom-btn="true" :show-upload-list="false" :action="">-->
|
||||
<!-- <template v-slot:addBtn>-->
|
||||
<!-- <el-button type="primary">点击上传</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </u-upload>-->
|
||||
<!-- </view>-->
|
||||
<vk-data-form v-model="form1.data" :rules="form1.props.rules" :action="form1.props.action"
|
||||
:form-type="form1.props.formType" :columns='form1.props.columns' label-width="120px"
|
||||
@success="addSuccess"></vk-data-form>
|
||||
@success="addSuccess" :show-cancel="false">
|
||||
<!-- <template v-slot:content="{ form, keyName }">-->
|
||||
<!-- <div style="border: 1px solid #ccc;">-->
|
||||
<!-- <Toolbar-->
|
||||
<!-- style="border-bottom: 1px solid #ccc"-->
|
||||
<!-- :editor="editor"-->
|
||||
<!-- :defaultConfig="toolbarConfig"-->
|
||||
<!-- mode="simple"-->
|
||||
<!-- />-->
|
||||
<!-- <Editor-->
|
||||
<!-- style="height: 500px; overflow-y: hidden;"-->
|
||||
<!-- v-model="form1.data.content"-->
|
||||
<!-- :defaultConfig="editorConfig"-->
|
||||
<!-- mode="simple"-->
|
||||
<!-- @onCreated="onCreated"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
</vk-data-form>
|
||||
</template>
|
||||
<div class="text-center">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page-size="pageSize"
|
||||
@click="changePage"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
@@ -90,22 +127,29 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {FileWord} from "@icon-park/vue";
|
||||
import {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
|
||||
import {Editor, Toolbar} from '@wangeditor/editor-for-vue'
|
||||
|
||||
export default {
|
||||
name: "school",
|
||||
components: {FileWord},
|
||||
components: {FilePdfOne, FileExcel, FileWord, Editor, Toolbar},
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
pageSize: 5,
|
||||
activeIndex: 0,
|
||||
mode: 'list',
|
||||
list: [],
|
||||
cateList: [],
|
||||
uploadFile: null,
|
||||
editor: null,
|
||||
toolbarConfig: {},
|
||||
editorConfig: {placeholder: '请输入内容...'},
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
amount: 0,
|
||||
content: ''
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
@@ -119,6 +163,12 @@ export default {
|
||||
type: "text",
|
||||
placeholder: "请输入标题"
|
||||
},
|
||||
{
|
||||
key: "files",
|
||||
title: "附件",
|
||||
type: "file",
|
||||
accept: '.xls,.xlsx,.doc,.docx,.ppt,.pptx,.pdf,.png,.jpg,.jpeg'
|
||||
},
|
||||
{
|
||||
key: "parentId",
|
||||
title: "分类",
|
||||
@@ -132,24 +182,30 @@ export default {
|
||||
label: "name",
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "content",
|
||||
title: "内容",
|
||||
type: "editor",
|
||||
placeholder: "请输入内容"
|
||||
},
|
||||
{
|
||||
key: "amount",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
placeholder: "请输入内容",
|
||||
},
|
||||
{key: "content", title: "内容", type: "editor"},
|
||||
// {
|
||||
// key: "content",
|
||||
// title: "内容",
|
||||
// type: "html",
|
||||
// },
|
||||
// {
|
||||
// key: "amount",
|
||||
// title: "金额",
|
||||
// type: "text",
|
||||
// placeholder: "请输入内容",
|
||||
// },
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '名称不能为空', trigger: 'blur'},
|
||||
],
|
||||
parentId: [
|
||||
{required: true, message: '请选择分类', trigger: 'blur'},
|
||||
],
|
||||
content: [
|
||||
{required: true, message: '请输入内容', trigger: 'blur'},
|
||||
],
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
@@ -160,17 +216,55 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
onCreated(editor) {
|
||||
this.editor = Object.seal(editor)
|
||||
},
|
||||
async getList(pageIndex = 1) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/list/kh/getUserList'
|
||||
url: 'client/article/list/kh/getUserList',
|
||||
pageIndex,
|
||||
pageSize: this.pageSize
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
async getCollectList() {
|
||||
async getCollectList(pageIndex = 1) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/collect/kh/getList'
|
||||
url: 'client/article/collect/kh/getList',
|
||||
pageIndex,
|
||||
pageSize: this.pageSize
|
||||
})
|
||||
this.list = rows
|
||||
this.list = rows.map(item => {
|
||||
if (item.article) {
|
||||
item._id = item.article._id
|
||||
item.name = item.article.name
|
||||
item._add_time_str = item.article._add_time_str
|
||||
item.viewNum = item.article.viewNum
|
||||
item.downloadNum = item.article.downloadNum
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
async getDownloadList(pageIndex = 1) {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/list/kh/getDownloadList',
|
||||
pageIndex,
|
||||
pageSize: this.pageSize
|
||||
})
|
||||
this.list = rows.map(item => {
|
||||
if (item.article) {
|
||||
item._id = item.article._id
|
||||
item.name = item.article.name
|
||||
item._add_time_str = item.article._add_time_str
|
||||
item.viewNum = item.article.viewNum
|
||||
item.downloadNum = item.article.downloadNum
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
changePage(page) {
|
||||
if (this.activeIndex === 0) this.getList(page)
|
||||
else if (this.activeIndex === 1) this.getCollectList(page)
|
||||
else if (this.activeIndex === 2) this.getDownloadList(page)
|
||||
},
|
||||
changeActive(index) {
|
||||
this.list = []
|
||||
@@ -178,6 +272,7 @@ export default {
|
||||
this.activeIndex = index
|
||||
if (index === 0) this.getList()
|
||||
else if (index === 1) this.getCollectList()
|
||||
else if (index === 2) this.getDownloadList()
|
||||
},
|
||||
showAction() {
|
||||
this.mode = 'action'
|
||||
@@ -187,6 +282,9 @@ export default {
|
||||
this.mode = 'list'
|
||||
this.activeIndex = 0
|
||||
this.getList()
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo({url})
|
||||
}
|
||||
// beforeUpload(file) {
|
||||
// this.uploadFile = file
|
||||
@@ -203,10 +301,23 @@ export default {
|
||||
// }
|
||||
},
|
||||
onLoad() {
|
||||
if (!vk.getVuex('$user.userInfo.mobile')) {
|
||||
this.$confirm('请先绑定手机号', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.redirectTo(`/pages/auth/login/wechat?state=jjx_` + vk.getVuex('$user.userInfo.accountType'))
|
||||
}).catch(() => {
|
||||
vk.redirectTo(`/pages/auth/login/wechat?state=jjx_` + vk.getVuex('$user.userInfo.accountType'))
|
||||
})
|
||||
return
|
||||
}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style src="@wangeditor/editor/dist/css/style.css"></style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.left-wrap {
|
||||
|
||||
+158
-106
@@ -1,117 +1,169 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-nav></common-nav>
|
||||
<view>
|
||||
<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="currMenu" class="el-menu-vertical-demo">
|
||||
<el-menu-item index="fadada">
|
||||
<i class="el-icon-menu"></i>
|
||||
<span slot="title">实名认证</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="business-card">
|
||||
<i class="el-icon-setting"></i>
|
||||
<span slot="title">我的名片</span>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item index="seal">
|
||||
<i class="el-icon-s-check"></i>
|
||||
<span slot="title">我的印章</span>
|
||||
</el-menu-item> -->
|
||||
<el-menu-item index="notice">
|
||||
<i class="el-icon-bell"></i>
|
||||
<span slot="title">我的消息</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="equity">
|
||||
<i class="el-icon-wallet"></i>
|
||||
<span slot="title">平台权益</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="yaoqing">
|
||||
<i class="el-icon-user"></i>
|
||||
<span slot="title">我的邀请</span>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item index="grade">-->
|
||||
<!-- <i class="el-icon-user"></i>-->
|
||||
<!-- <span slot="title">会员等级(临时)</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="added">-->
|
||||
<!-- <i class="el-icon-medal"></i>-->
|
||||
<!-- <span slot="title">购买增值服务(临时)</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
</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>
|
||||
<notice v-else-if="currMenu === 'notice'" @done="onDone"></notice>
|
||||
<setting v-else-if="currMenu === 'setting'" @done="onDone"></setting>
|
||||
<equity v-else-if="currMenu === 'equity'" @done="onDone"></equity>
|
||||
<payment v-else-if="currMenu === 'payment'" @done="onDone"></payment>
|
||||
<grade v-else-if="currMenu === 'grade'" @done="onDone"></grade>
|
||||
<Added v-else-if="currMenu === 'added'" @done="onDone"></Added>
|
||||
<Yaoqing v-else-if="currMenu === 'yaoqing'" @done="onDone"></Yaoqing>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<view class="w-1200">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo">
|
||||
<el-menu-item index="fadada">
|
||||
<i class="el-icon-menu"></i>
|
||||
<span slot="title">实名认证</span>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item index="business-card">-->
|
||||
<!-- <i class="el-icon-setting"></i>-->
|
||||
<!-- <span slot="title">我的名片</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="business-contact">-->
|
||||
<!-- <i class="el-icon-phone"></i>-->
|
||||
<!-- <span slot="title">业务联系人</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="notice">-->
|
||||
<!-- <i class="el-icon-bell"></i>-->
|
||||
<!-- <span slot="title">我的消息</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="equity">-->
|
||||
<!-- <i class="el-icon-s-cooperation"></i>-->
|
||||
<!-- <span slot="title">平台权益</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="yaoqing">-->
|
||||
<!-- <i class="el-icon-user"></i>-->
|
||||
<!-- <span slot="title">我的邀请</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="factory">-->
|
||||
<!-- <i class="el-icon-office-building"></i>-->
|
||||
<!-- <span slot="title">我的加工厂</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="account">-->
|
||||
<!-- <i class="el-icon-wallet"></i>-->
|
||||
<!-- <span slot="title">收款账户</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="news" v-if="userInfo.userLevel > 1">-->
|
||||
<!-- <i class="el-icon-s-order"></i>-->
|
||||
<!-- <span slot="title">新闻动态</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<el-menu-item index="pwd">
|
||||
<i class="el-icon-lock"></i>
|
||||
<span slot="title">修改密码</span>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item index="grade">-->
|
||||
<!-- <i class="el-icon-user"></i>-->
|
||||
<!-- <span slot="title">会员等级(临时)</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="added">-->
|
||||
<!-- <i class="el-icon-medal"></i>-->
|
||||
<!-- <span slot="title">购买增值服务(临时)</span>-->
|
||||
<!-- </el-menu-item>-->
|
||||
</el-menu>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<personal v-if="currMenu === 'fadada'" @done="onDone"></personal>
|
||||
<business-card v-else-if="currMenu === 'business-card'"></business-card>
|
||||
<business-contact v-else-if="currMenu === 'business-contact'"></business-contact>
|
||||
<seal v-else-if="currMenu === 'seal'"></seal>
|
||||
<notice v-else-if="currMenu === 'notice'" @done="onDone"></notice>
|
||||
<setting v-else-if="currMenu === 'setting'" @done="onDone"></setting>
|
||||
<equity v-else-if="currMenu === 'equity'" @done="onDone"></equity>
|
||||
<payment v-else-if="currMenu === 'payment'" @done="onDone"></payment>
|
||||
<grade v-else-if="currMenu === 'grade'" @done="onDone"></grade>
|
||||
<Added v-else-if="currMenu === 'added'" @done="onDone"></Added>
|
||||
<Yaoqing v-else-if="currMenu === 'yaoqing'" @done="onDone"></Yaoqing>
|
||||
<factory v-else-if="currMenu === 'factory'" @done="onDone"></factory>
|
||||
<pwd v-else-if="currMenu === 'pwd'" @done="onDone"></pwd>
|
||||
<account v-else-if="currMenu === 'account'" @done="onDone"></account>
|
||||
<news v-else-if="currMenu === 'news'" @done="onDone"></news>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="100" />
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="100"/>
|
||||
<common-footer></common-footer>
|
||||
<!-- <right-bar></right-bar>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Personal from './components/personal'
|
||||
import BusinessCard from './components/business-card'
|
||||
import Seal from './components/seal'
|
||||
import Notice from './components/notice'
|
||||
import Setting from './components/setting'
|
||||
import Equity from './components/equity'
|
||||
import Grade from './components/grade'
|
||||
import Added from './components/added'
|
||||
import Payment from './components/payment'
|
||||
import Yaoqing from './components/yaoqing'
|
||||
import Personal from './components/personal'
|
||||
import BusinessCard from './components/business-card'
|
||||
import Seal from './components/seal'
|
||||
import Notice from './components/notice'
|
||||
import Setting from './components/setting'
|
||||
import Equity from './components/equity'
|
||||
import Grade from './components/grade'
|
||||
import Added from './components/added'
|
||||
import Payment from './components/payment'
|
||||
import Yaoqing from './components/yaoqing'
|
||||
import Factory from "./components/factory.vue";
|
||||
import Pwd from "./components/pwd.vue";
|
||||
import BusinessContact from "./components/business-contact.vue";
|
||||
import Account from "./components/account.vue";
|
||||
import News from "./components/news.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Personal,
|
||||
BusinessCard,
|
||||
Seal,
|
||||
Notice,
|
||||
Equity,
|
||||
Setting,
|
||||
Grade,
|
||||
Added,
|
||||
Payment,
|
||||
Yaoqing
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currMenu: 'fadada',
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.menu) {
|
||||
this.currMenu = options.menu
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.currMenu = e
|
||||
},
|
||||
onDone(index) {
|
||||
this.currMenu = index
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
Account,
|
||||
BusinessContact,
|
||||
Pwd,
|
||||
Factory,
|
||||
Personal,
|
||||
BusinessCard,
|
||||
Seal,
|
||||
Notice,
|
||||
Equity,
|
||||
Setting,
|
||||
Grade,
|
||||
Added,
|
||||
Payment,
|
||||
Yaoqing,
|
||||
News,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currMenu: 'fadada',
|
||||
userInfo: null
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.menu) {
|
||||
this.currMenu = options.menu
|
||||
}
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.currMenu = e
|
||||
},
|
||||
onDone(index) {
|
||||
this.currMenu = index
|
||||
},
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.userInfo = data.userInfo
|
||||
if (!this.userInfo.mobile) {
|
||||
this.$confirm('请先绑定手机号', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.redirectTo(`/pages/auth/login/wechat?state=jjx_` + vk.getVuex('$user.userInfo.accountType'))
|
||||
}).catch(() => {
|
||||
vk.redirectTo(`/pages/auth/login/wechat?state=jjx_` + vk.getVuex('$user.userInfo.accountType'))
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user