20261008
This commit is contained in:
+72
@@ -5,3 +5,75 @@
|
||||
/.idea
|
||||
/uniCloud-aliyun/cloudfunctions/router/node_modules/
|
||||
/pnpm-lock.yaml
|
||||
/金久信源码/金久信数据库/fadada-verify-record.json
|
||||
/金久信源码/金久信数据库/jjx-account.json
|
||||
/金久信源码/金久信数据库/jjx-ad.json
|
||||
/金久信源码/金久信数据库/jjx-album.json
|
||||
/金久信源码/金久信数据库/jjx-article.json
|
||||
/金久信源码/金久信数据库/jjx-article-category.json
|
||||
/金久信源码/金久信数据库/jjx-article-collect.json
|
||||
/金久信源码/金久信数据库/jjx-article-download.json
|
||||
/金久信源码/金久信数据库/jjx-balance.json
|
||||
/金久信源码/金久信数据库/jjx-balance-log.json
|
||||
/金久信源码/金久信数据库/jjx-business-card.json
|
||||
/金久信源码/金久信数据库/jjx-business-contact.json
|
||||
/金久信源码/金久信数据库/jjx-cart.json
|
||||
/金久信源码/金久信数据库/jjx-certificate.json
|
||||
/金久信源码/金久信数据库/jjx-company-manage-change-log.json
|
||||
/金久信源码/金久信数据库/jjx-contract.json
|
||||
/金久信源码/金久信数据库/jjx-contract-template.json
|
||||
/金久信源码/金久信数据库/jjx-coop-config.json
|
||||
/金久信源码/金久信数据库/jjx-dict.json
|
||||
/金久信源码/金久信数据库/jjx-enquiry-attributes.json
|
||||
/金久信源码/金久信数据库/jjx-enquiry-category.json
|
||||
/金久信源码/金久信数据库/jjx-enquiry-package.json
|
||||
/金久信源码/金久信数据库/jjx-enquiry-quote.json
|
||||
/金久信源码/金久信数据库/jjx-enquiry-sheet.json
|
||||
/金久信源码/金久信数据库/jjx-enquiry-template.json
|
||||
/金久信源码/金久信数据库/jjx-ensure-config.json
|
||||
/金久信源码/金久信数据库/jjx-factory.json
|
||||
/金久信源码/金久信数据库/jjx-goods.json
|
||||
/金久信源码/金久信数据库/jjx-goods-category.json
|
||||
/金久信源码/金久信数据库/jjx-goods-cooperate.json
|
||||
/金久信源码/金久信数据库/jjx-industry.json
|
||||
/金久信源码/金久信数据库/jjx-message.json
|
||||
/金久信源码/金久信数据库/jjx-message-config.json
|
||||
/金久信源码/金久信数据库/jjx-old.json
|
||||
/金久信源码/金久信数据库/jjx-old-category.json
|
||||
/金久信源码/金久信数据库/jjx-old-quote.json
|
||||
/金久信源码/金久信数据库/jjx-order.json
|
||||
/金久信源码/金久信数据库/jjx-order-goods.json
|
||||
/金久信源码/金久信数据库/jjx-order-pay-list.json
|
||||
/金久信源码/金久信数据库/jjx-order-selfProduct.json
|
||||
/金久信源码/金久信数据库/jjx-other-article.json
|
||||
/金久信源码/金久信数据库/jjx-other-article-category.json
|
||||
/金久信源码/金久信数据库/jjx-process-category.json
|
||||
/金久信源码/金久信数据库/jjx-process-quote.json
|
||||
/金久信源码/金久信数据库/jjx-process-sheet.json
|
||||
/金久信源码/金久信数据库/jjx-quote-num-config.json
|
||||
/金久信源码/金久信数据库/jjx-qyb.json
|
||||
/金久信源码/金久信数据库/jjx-self-support.json
|
||||
/金久信源码/金久信数据库/jjx-self-support-quote-list.json
|
||||
/金久信源码/金久信数据库/jjx-sign-pay_list.json
|
||||
/金久信源码/金久信数据库/jjx-site-config.json
|
||||
/金久信源码/金久信数据库/jjx-spot-ad.json
|
||||
/金久信源码/金久信数据库/jjx-spot-amount.json
|
||||
/金久信源码/金久信数据库/jjx-spot-category.json
|
||||
/金久信源码/金久信数据库/jjx-spot-goods.json
|
||||
/金久信源码/金久信数据库/jjx-steal-factory.json
|
||||
/金久信源码/金久信数据库/jjx-user-address.json
|
||||
/金久信源码/金久信数据库/jjx-user-article.json
|
||||
/金久信源码/金久信数据库/jjx-user-contract.json
|
||||
/金久信源码/金久信数据库/jjx-user-level.json
|
||||
/金久信源码/金久信数据库/jjx-user-quote-num.json
|
||||
/金久信源码/金久信数据库/opendb-admin-log.json
|
||||
/金久信源码/金久信数据库/opendb-admin-menus.json
|
||||
/金久信源码/金久信数据库/opendb-app-list.json
|
||||
/金久信源码/金久信数据库/opendb-verify-codes.json
|
||||
/金久信源码/金久信数据库/uni-id-log.json
|
||||
/金久信源码/金久信数据库/uni-id-permissions.json
|
||||
/金久信源码/金久信数据库/uni-id-roles.json
|
||||
/金久信源码/金久信数据库/uni-id-users.json
|
||||
/金久信源码/金久信数据库/vk-files.json
|
||||
/金久信源码/金久信数据库/vk-files-categories.json
|
||||
/金久信源码/金久信数据库/vk-global-data.json
|
||||
|
||||
@@ -1,81 +1,51 @@
|
||||
<script>
|
||||
import config from '@/app.config.js'
|
||||
import { version } from './package.json'
|
||||
export default {
|
||||
methods: {
|
||||
import config from '@/app.config.js'
|
||||
import {version} from './package.json'
|
||||
|
||||
},
|
||||
// 监听 - 页面404
|
||||
onPageNotFound:function(e) {
|
||||
uni.redirectTo({
|
||||
url: config.error.url
|
||||
})
|
||||
},
|
||||
onLaunch: function(options) {
|
||||
// 注意:config.debug 在正式环境时,值为false,故此{}内的代码只有开发环境才会执行
|
||||
if (config.debug) {
|
||||
// #ifndef APP-PLUS
|
||||
console.log(
|
||||
`%c vk-client %c v${version} `,
|
||||
'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
|
||||
'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0; color: #fff; font-weight: bold;'
|
||||
);
|
||||
// #endif
|
||||
console.log('App Launch');
|
||||
}
|
||||
// 注意:以下代码正式和开发环境都会执行
|
||||
// #ifdef MP
|
||||
uni.vk.updateManager.updateReady(); // 此代码可以让小程序自动检测最新版本
|
||||
// #endif
|
||||
export default {
|
||||
methods: {},
|
||||
// 监听 - 页面404
|
||||
onPageNotFound: function (e) {
|
||||
uni.redirectTo({
|
||||
url: config.error.url
|
||||
})
|
||||
},
|
||||
onLaunch: function (options) {
|
||||
// 注意:config.debug 在正式环境时,值为false,故此{}内的代码只有开发环境才会执行
|
||||
if (config.debug) {
|
||||
// #ifndef APP-PLUS
|
||||
console.log(
|
||||
`%c vk-client %c v${version} `,
|
||||
'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
|
||||
'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0; color: #fff; font-weight: bold;'
|
||||
);
|
||||
// #endif
|
||||
console.log('App Launch');
|
||||
}
|
||||
// 注意:以下代码正式和开发环境都会执行
|
||||
// #ifdef MP
|
||||
uni.vk.updateManager.updateReady(); // 此代码可以让小程序自动检测最新版本
|
||||
// #endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 加载商品分类数据
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
loading: false,
|
||||
data: {
|
||||
|
||||
},
|
||||
success: (data) => {
|
||||
vk.setVuex('$app.siteData.categoryData', data.rows)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
if (config.debug) console.log("App Show");
|
||||
// #ifdef MP-WEIXIN
|
||||
// 检测如果当前是体验版,但没有点HBX的【发行】菜单发布,则提示开发者请点【发行】按钮
|
||||
try {
|
||||
console.log('当前运行模式: ', process.env.NODE_ENV);
|
||||
const info = uni.getAccountInfoSync();
|
||||
if (info.miniProgram.envVersion === "trial" && process.env.NODE_ENV !== 'production') {
|
||||
// 如果不想要alert弹窗提示,可以将vk.alert改成console.log
|
||||
uni.vk.alert('检测到您当前发布的【体验版】是通过【运行】按钮打包发布的,请重新点击HBX上方菜单的【发行】按钮进行打包发布小程序(如果确定是【发行】按钮打包的,请删除手机上的体验版小程序并重新扫码进入)', '重要提示', '好的');
|
||||
}
|
||||
} catch(err){}
|
||||
// #endif
|
||||
},
|
||||
onHide: function() {
|
||||
if(config.debug) console.log('App Hide');
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function () {
|
||||
if (config.debug) console.log("App Show");
|
||||
// #ifdef MP-WEIXIN
|
||||
// 检测如果当前是体验版,但没有点HBX的【发行】菜单发布,则提示开发者请点【发行】按钮
|
||||
try {
|
||||
console.log('当前运行模式: ', process.env.NODE_ENV);
|
||||
const info = uni.getAccountInfoSync();
|
||||
if (info.miniProgram.envVersion === "trial" && process.env.NODE_ENV !== 'production') {
|
||||
// 如果不想要alert弹窗提示,可以将vk.alert改成console.log
|
||||
uni.vk.alert('检测到您当前发布的【体验版】是通过【运行】按钮打包发布的,请重新点击HBX上方菜单的【发行】按钮进行打包发布小程序(如果确定是【发行】按钮打包的,请删除手机上的体验版小程序并重新扫码进入)', '重要提示', '好的');
|
||||
}
|
||||
} catch (err) {
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onHide: function () {
|
||||
if (config.debug) console.log('App Hide');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/*每个页面公共css */
|
||||
// @import "./uni_modules/vk-uview-ui/index.scss";
|
||||
@import "./common/css/app.scss";
|
||||
</style>
|
||||
|
||||
+5
-9
@@ -11,16 +11,12 @@ uni-modal,
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
/* 使用预编译主题,避免 dart-sass 编译 element-ui 源码产生 slash-div 警告并拖垮构建 */
|
||||
@import "@/common/css/element-theme/index.css";
|
||||
|
||||
/* 改变主题色变量 */
|
||||
$--color-primary: #A92924;
|
||||
|
||||
/* 改变 icon 字体路径变量,必需 */
|
||||
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
||||
|
||||
$--button-border-radius: 12px;
|
||||
|
||||
@import "~element-ui/packages/theme-chalk/src/index";
|
||||
.el-button {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.el-input.is-disabled .el-input__inner {
|
||||
color: #333333 !important;
|
||||
|
||||
+28
-5
@@ -529,6 +529,7 @@ h1, h2, h3, h4, h5 {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 0;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.mod-mini-search .mod-hot-query li {
|
||||
@@ -748,7 +749,7 @@ button, input, select, textarea {
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
/*cursor: pointer;*/
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -892,7 +893,7 @@ button, input, select, textarea {
|
||||
|
||||
.cate-menu {
|
||||
height: 500px;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -2170,6 +2171,10 @@ input:disabled {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.text-blue {
|
||||
color: #316ccb;
|
||||
}
|
||||
|
||||
.color-6C {
|
||||
color: #6C6C6C;
|
||||
}
|
||||
@@ -2322,6 +2327,10 @@ input:disabled {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.w-35p {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.w-40p {
|
||||
width: 40%;
|
||||
}
|
||||
@@ -2701,11 +2710,11 @@ input:disabled {
|
||||
border-right: 1rpx solid #F1F5F9;
|
||||
}
|
||||
|
||||
.bg-gray{
|
||||
.bg-gray {
|
||||
background-color: #DDD;
|
||||
}
|
||||
|
||||
.bg-gray-light{
|
||||
.bg-gray-light {
|
||||
background-color: #F9F9F9;
|
||||
}
|
||||
|
||||
@@ -2741,9 +2750,23 @@ input:disabled {
|
||||
border: 1px solid #a92924;
|
||||
}
|
||||
|
||||
.line-1{
|
||||
.line-1 {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.line-2 {
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.text-line-through {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
+8
-4
@@ -213,7 +213,7 @@ body, html {
|
||||
}
|
||||
|
||||
.mod-inner2Listcenter .inli-mask{
|
||||
width: 266px;
|
||||
width: 220px;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 13px 5px;
|
||||
@@ -221,12 +221,12 @@ body, html {
|
||||
-webkit-transition: all .2s linear;
|
||||
-o-transition: all .2s linear;
|
||||
transition: all .2s linear;
|
||||
margin-right: 45px;
|
||||
margin-right: 10px;
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 45rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.mod-inner2Listcenter .inli-mask:nth-child(4n){
|
||||
.mod-inner2Listcenter .inli-mask:nth-child(5n){
|
||||
margin-right: 0;
|
||||
}
|
||||
.mod-inner2Listcenter{
|
||||
@@ -2638,3 +2638,7 @@ letter-spacing: 3px;
|
||||
.ddddd .shop_check{
|
||||
color: #a92924;
|
||||
}
|
||||
|
||||
.currentDatePickerClass .el-picker-panel__footer .el-button--text.el-picker-panel__link-btn {
|
||||
display: none;
|
||||
}
|
||||
@@ -1,374 +1,502 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="group-nav">
|
||||
<div class="mod-nav clearfix">
|
||||
<div class="first-level-nav ">
|
||||
<div class="clearfix navigation-bottom">
|
||||
<div class="classification" id="bannerAllPro">
|
||||
<div class="classification-text">
|
||||
<i class="el-icon-menu"></i> 全部商品分类
|
||||
</div>
|
||||
<!--全部商品分类开始-->
|
||||
<div v-show="alwaysShowCategory || showCategory" class="banner-left" style="">
|
||||
<div class="mod-category">
|
||||
<div class="part-category">
|
||||
<div class="cate-menu" psa="a156">
|
||||
<ul id="nav-sub" class="">
|
||||
<li v-for="(item,index) in vk.getVuex('$app.siteData.categoryData')"
|
||||
class="clearfix menuliselected" :key="index">
|
||||
<i class="cate-menu-icon cate-icon-1"></i>
|
||||
<h2>
|
||||
<a href="">{{ item.name }}</a>
|
||||
</h2>
|
||||
<div class="cate-item clearfix">
|
||||
<a v-for="(citem,cindex) in item.children" href=""
|
||||
:key="cindex">{{ citem.name }}</a>
|
||||
</div>
|
||||
</li>
|
||||
<view>
|
||||
<div class="group-nav">
|
||||
<div class="mod-nav clearfix">
|
||||
<div class="first-level-nav ">
|
||||
<div class="clearfix navigation-bottom">
|
||||
<div class="classification" id="bannerAllPro">
|
||||
<div class="classification-text">
|
||||
<i class="el-icon-menu"></i> 全部商品分类
|
||||
</div>
|
||||
<!--全部商品分类开始-->
|
||||
<div v-show="alwaysShowCategory || showCategory" class="banner-left" style="">
|
||||
<div class="mod-category">
|
||||
<div class="part-category">
|
||||
<div class="cate-menu" psa="a156">
|
||||
<ul id="nav-sub" class="">
|
||||
<li v-for="(item,index) in categoryData"
|
||||
@mouseenter="showShowChild(index)"
|
||||
@mouseleave="hideShowChild(index)"
|
||||
class="clearfix menuliselected" :key="index">
|
||||
<i class="cate-menu-icon cate-icon-1"></i>
|
||||
<h2>
|
||||
<a @click="jumpToIndex(item)" class="pointer cate-name">{{
|
||||
item.name
|
||||
}}</a>
|
||||
</h2>
|
||||
<div class="cate-item clearfix" v-if="item.showChild">
|
||||
<a v-for="(citem,cindex) in item.children" href="javascript:;"
|
||||
v-show="cindex < 9"
|
||||
@click="jump(item, citem)"
|
||||
:key="cindex">{{ citem.name }}</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div class="cate-cont" psa="a157" style="">-->
|
||||
<!-- <div class="item-main" style="">-->
|
||||
<!-- <div class="part-hot-word">-->
|
||||
<!-- <div class="item">-->
|
||||
<!-- <div class="title">-->
|
||||
<!-- <h2>-->
|
||||
<!-- <a href="/market/index.html?name2=螺纹钢、高线">螺纹钢</a>-->
|
||||
<!-- </h2>-->
|
||||
<!-- <a href="/market/index.html" class="more">更多-->
|
||||
<!-- <i>></i></a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="cont">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="part-logo-cont">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ul>
|
||||
<!--全部商品分类结束-->
|
||||
</div>
|
||||
<div class="linkNav">
|
||||
<ul>
|
||||
<li class="nav ">
|
||||
<a href="/">首页</a>
|
||||
</li>
|
||||
<li class="nav" @click="navTo('/pages/index/self-support/self-support')"
|
||||
:class="[currentPage.includes('self-support') ? 'active' : '']">
|
||||
<a href="javascript:;">金久信自营</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/spot/goods/goods')" class="nav"
|
||||
:class="[currentPage.includes('spot') ? 'active' : '']">
|
||||
<a href="javascript:;" class="navigator">
|
||||
现货市场
|
||||
</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/enquiry/list')" class="nav "
|
||||
:class="[currentPage.includes('enquiry') ? 'active' : '']">
|
||||
<a href="javascript:;" class="navigator">
|
||||
找供应
|
||||
</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/process/list')" class="nav "
|
||||
:class="[currentPage.includes('process') ? 'active' : '']">
|
||||
<a href="javascript:;">找加工</a>
|
||||
</li>
|
||||
<li class="nav " @click="navTo('/pages/index/old/old')"
|
||||
:class="[currentPage.includes('old') ? 'active' : '']">
|
||||
<a href="javascript:;">旧货交易</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/yellowPage/list')" class="nav "
|
||||
:class="[currentPage.includes('yellowPage') ? 'active' : '']">
|
||||
<a href="javascript:;">金久信黄页</a>
|
||||
</li>
|
||||
<li class="nav " @click="navTo('/pages/article/list')"
|
||||
:class="[currentPage.includes('article') ? 'active' : '']">
|
||||
<a href="javascript:;">金久信学堂</a>
|
||||
</li>
|
||||
<li class="nav " @click="navTo('/pages/index/shop/shop')"
|
||||
:class="[(currentPage.includes('shop') && !currentPage.includes('pay')) ? 'active' : '']">
|
||||
<a href="javascript:;">特产商城</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="classification">
|
||||
<div class="entry">
|
||||
<div class="entry-link " @click="navTo('/pages/index/self-support/self-support')">
|
||||
<img src="@/static/images/logo-left2.png">
|
||||
</div>
|
||||
</div>
|
||||
<!--全部商品分类开始-->
|
||||
<div v-show="alwaysShowCategory" class="zghome-nav-display">
|
||||
|
||||
</div>
|
||||
<div class="cate-cont" psa="a157" style="">
|
||||
<div class="item-main" style="">
|
||||
<div class="part-hot-word">
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<h2>
|
||||
<a href="/market/index.html?name2=螺纹钢、高线">螺纹钢</a>
|
||||
</h2>
|
||||
<a href="/market/index.html" class="more">更多
|
||||
<i>></i></a>
|
||||
</div>
|
||||
<div class="cont">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="part-logo-cont">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="alwaysShowCategory" class="mod-manage" style="height: 500px;">
|
||||
|
||||
<!--全部商品分类结束-->
|
||||
<div class="me-login">
|
||||
<div class="login-not">
|
||||
<div class="login-head">
|
||||
<img src="/static/images/logo-small.png" alt="">
|
||||
</div>
|
||||
<div class="login-action">
|
||||
<el-button v-if="!vk.getVuex('$user.userInfo.nickname')" type="primary"
|
||||
class="empty-bg-plain-btn w-full" plain icon="el-icon-user"
|
||||
@click.native="navTo('/pages/auth/login/login')">登录
|
||||
</el-button>
|
||||
<el-button v-else type="primary"
|
||||
class="empty-bg-plain-btn w-full" plain icon="el-icon-user"
|
||||
@click.native="navTo('/pages/user/user')">个人中心
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="login-action">
|
||||
<el-button type="primary" class="auth-btn"
|
||||
@click.native="navTo('/pages/user/user')">
|
||||
<text class="company-name" style="max-width: 320rpx">{{
|
||||
JSON.stringify(vk.getVuex('$user.userInfo')) === '{}' ? '实名认证' :
|
||||
([2, '2'].includes(vk.getVuex('$user.userInfo.accountType')) ? vk.getVuex('$user.userInfo.company.companyName') : vk.getVuex('$user.userInfo.person.personName'))
|
||||
}}
|
||||
</text>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="me-tab">
|
||||
<div class="me-tab-text">
|
||||
<ul>
|
||||
<li @click="canShareType = 0;"
|
||||
class="tab-left"
|
||||
:class="[canShareType === 0 ? 'active' : '']">
|
||||
<a href="javascript:void(0)">买家可享</a>
|
||||
</li>
|
||||
<li @click="canShareType = 1;" class=""
|
||||
:class="[canShareType === 1 ? 'active' : '']">
|
||||
<a href="javascript:void(0)">卖家可享</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="me-tab-content">
|
||||
<div class="tab-inner">
|
||||
<div class="me-step clearfix" v-if="canShareType === 0">
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg1.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>免费注册</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg2.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>发布需求</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg3.png"></i>
|
||||
</dt>
|
||||
<dd>管理采购</dd>
|
||||
</dl>
|
||||
<dl class="dowslf3">
|
||||
<dt class="clearfix">
|
||||
<i class="iconNew iconNew-step-arrow2"><img
|
||||
src="/static/images/lg14.png"></i>
|
||||
</dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg6.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>完成交易</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg5.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>货物验收</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg4.png"></i>
|
||||
</dt>
|
||||
<dd>我的订单</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="linkNav">
|
||||
<ul>
|
||||
<li class="nav ">
|
||||
<a href="/">首页</a>
|
||||
</li>
|
||||
<li class="nav" @click="navTo('/pages/index/self-support/self-support')" :class="[currentPage.includes('self-support') ? 'active' : '']">
|
||||
<a href="javascript:;">金久信自营</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/spot/goods/goods')" class="nav"
|
||||
:class="[currentPage.includes('spot') ? 'active' : '']">
|
||||
<a href="javascript:;" class="navigator">
|
||||
现货市场
|
||||
</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/enquiry/list')" class="nav "
|
||||
:class="[currentPage.includes('enquiry') ? 'active' : '']">
|
||||
<a href="javascript:;" class="navigator">
|
||||
找买家
|
||||
</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/process/list')" class="nav "
|
||||
:class="[currentPage.includes('process') ? 'active' : '']">
|
||||
<a href="javascript:;">找加工</a>
|
||||
</li>
|
||||
<li class="nav " @click="navTo('/pages/index/old/old')"
|
||||
:class="[currentPage.includes('old') ? 'active' : '']">
|
||||
<a href="javascript:;">旧货交易</a>
|
||||
</li>
|
||||
<li @click="navTo('/pages/yellowPage/list')" class="nav "
|
||||
:class="[currentPage.includes('yellowPage') ? 'active' : '']">
|
||||
<a href="javascript:;">金久信黄页</a>
|
||||
</li>
|
||||
<li class="nav " @click="navTo('/pages/article/list')"
|
||||
:class="[currentPage.includes('article') ? 'active' : '']">
|
||||
<a href="javascript:;">金久信学堂</a>
|
||||
</li>
|
||||
<li class="nav " @click="navTo('/pages/index/shop/shop')" :class="[currentPage.includes('shop') ? 'active' : '']">
|
||||
<a href="javascript:;">特产商城</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="me-step clearfix" v-else-if="canShareType === 1">
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg1.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>免费注册</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg2.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>优势报价</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg3.png"></i>
|
||||
</dt>
|
||||
<dd>管理销售</dd>
|
||||
</dl>
|
||||
<dl class="dowslf3">
|
||||
<dt class="clearfix">
|
||||
<i class="iconNew iconNew-step-arrow2"><img
|
||||
src="/static/images/lg14.png"></i>
|
||||
</dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg6.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>完成交易</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg5.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>组织发货</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg4.png"></i>
|
||||
</dt>
|
||||
<dd>我的订单</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="classification">
|
||||
<div class="entry">
|
||||
<div class="entry-link">
|
||||
<img src="@/static/images/logo-left2.png">
|
||||
</div>
|
||||
</div>
|
||||
<!--全部商品分类开始-->
|
||||
<div v-show="alwaysShowCategory" class="zghome-nav-display">
|
||||
<p style="width: 100%;margin:10px 0;">
|
||||
<a v-if="canShareType === 0" href="javascript:;" @click="navTo('/pages/store/buyer')"
|
||||
style="text-align: center;color: #a92924;font-size: 13px;line-height: 2">进入买家中心
|
||||
></a>
|
||||
<a v-else-if="canShareType === 1" href="javascript:;" @click="navTo('/pages/store/store')"
|
||||
style="text-align: center;color: #a92924;font-size: 13px;line-height: 2">进入卖家中心
|
||||
></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="tab-inner" style="display: none;">
|
||||
<div class="me-step clearfix">
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg7.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>企业注册</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg8.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>商品管理</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg9.png"></i>
|
||||
</dt>
|
||||
<dd>匹配需求</dd>
|
||||
</dl>
|
||||
<dl class="dowslf3">
|
||||
<dt class="clearfix">
|
||||
<i class="iconNew iconNew-step-arrow2"><img
|
||||
src="/static/images/lg14.png"></i>
|
||||
</dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg12.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>完成订单</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg11.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>卖出货品</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg10.png"></i>
|
||||
</dt>
|
||||
<dd> 报价</dd>
|
||||
</dl>
|
||||
|
||||
<div v-show="alwaysShowCategory" class="mod-manage" style="height: 500px;">
|
||||
|
||||
<div class="me-login">
|
||||
<div class="login-not">
|
||||
<div class="login-head">
|
||||
<img src="/static/images/logo-small.png" alt="">
|
||||
</div>
|
||||
<div class="login-action">
|
||||
<el-button v-if="!vk.getVuex('$user.userInfo.nickname')" type="primary"
|
||||
class="empty-bg-plain-btn w-full" plain icon="el-icon-user"
|
||||
@click.native="navTo('/pages/auth/login/login')">登录
|
||||
</el-button>
|
||||
<el-button v-else type="primary"
|
||||
class="empty-bg-plain-btn w-full" plain icon="el-icon-user"
|
||||
@click.native="navTo('/pages/user/user')">个人中心
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="login-action">
|
||||
<el-button type="primary" class="auth-btn">
|
||||
<img src="@/static/images/id-card.png">
|
||||
<text>实名认证</text>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="me-tab">
|
||||
<div class="me-tab-text">
|
||||
<ul>
|
||||
<li @click="canShareType = 0" class="tab-left"
|
||||
:class="[canShareType === 0 ? 'active' : '']">
|
||||
<a href="javascript:void(0)">买家可享</a>
|
||||
</li>
|
||||
<li @click="canShareType = 1" class=""
|
||||
:class="[canShareType === 1 ? 'active' : '']">
|
||||
<a href="javascript:void(0)">卖家可享</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="me-tab-content">
|
||||
<div class="tab-inner">
|
||||
<div class="me-step clearfix">
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg1.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>免费注册</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg2.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>发布需求</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg3.png"></i>
|
||||
</dt>
|
||||
<dd>管理采购</dd>
|
||||
</dl>
|
||||
<dl class="dowslf3">
|
||||
<dt class="clearfix">
|
||||
<i class="iconNew iconNew-step-arrow2"><img
|
||||
src="/static/images/lg14.png"></i>
|
||||
</dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg6.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>达成交易</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg5.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>验收</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg4.png"></i>
|
||||
</dt>
|
||||
<dd> 我的订单</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p style="width: 100%;margin:10px 0px;">
|
||||
<a href="/buyer/index.html"
|
||||
style="text-align: center;color: #a92924;font-size: 13px;line-height: 2">进入买家中心
|
||||
></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="tab-inner" style="display: none;">
|
||||
<div class="me-step clearfix">
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg7.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>企业注册</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg8.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg13.png"></i>
|
||||
</dt>
|
||||
<dd>商品管理</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg9.png"></i>
|
||||
</dt>
|
||||
<dd>匹配需求</dd>
|
||||
</dl>
|
||||
<dl class="dowslf3">
|
||||
<dt class="clearfix">
|
||||
<i class="iconNew iconNew-step-arrow2"><img
|
||||
src="/static/images/lg14.png"></i>
|
||||
</dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg12.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>完成订单</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg11.png"></i>
|
||||
<i class="iconNew iconNew-step-arrow"><img
|
||||
src="/static/images/lg15.png"></i>
|
||||
</dt>
|
||||
<dd>卖出货品</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="iconNew"><img
|
||||
src="/static/images/lg10.png"></i>
|
||||
</dt>
|
||||
<dd> 报价</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<p style="width: 100%;margin:10px 0px;">
|
||||
<a href="/seller/index.html"
|
||||
style="text-align: center;color: #a92924;font-size: 13px;line-height: 2">进入卖家中心
|
||||
></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix wartchar">
|
||||
<div class="wartcharlist"><img src="/static/images/wx.png"
|
||||
style="height: 38px;margin-top: 5px;">
|
||||
<p style="padding-top: 5px;line-height: 2">金久信</p>
|
||||
<p>微信公众号</p>
|
||||
</div>
|
||||
<div class="wartcharlist">
|
||||
<img src="/static/images/80705c8b12d05d0ff67a2758749ef09c.jpg"
|
||||
style="height: 100px;width: 100px;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
<p style="width: 100%;margin:10px 0;">
|
||||
<a href="javascript:;" @click="navTo('/pages/store/store')"
|
||||
style="text-align: center;color: #a92924;font-size: 13px;line-height: 2">进入卖家中心
|
||||
></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix wartchar">
|
||||
<div class="wartcharlist"><img src="/static/images/wx.png"
|
||||
style="height: 38px;margin-top: 5px;">
|
||||
<p style="padding-top: 5px;line-height: 2">金久信</p>
|
||||
<p>微信公众号</p>
|
||||
</div>
|
||||
<div class="wartcharlist">
|
||||
<img :src="gzhQr"
|
||||
style="height: 100px;width: 100px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
alwaysShowCategory: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
name: "category-bar",
|
||||
data() {
|
||||
return {
|
||||
showCategory: false,
|
||||
canShareType: 0,
|
||||
currentPage: ''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
const bannerAllPro = document.getElementById("bannerAllPro")
|
||||
bannerAllPro.addEventListener("mouseover", () => {
|
||||
that.showCategory = true
|
||||
})
|
||||
bannerAllPro.addEventListener("mouseleave", () => {
|
||||
that.showCategory = false
|
||||
})
|
||||
const routes = getCurrentPages()
|
||||
this.currentPage = getCurrentPages()[routes.length - 1].route
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route({meta: {pagePath}}) {
|
||||
this.currentPage = pagePath
|
||||
}
|
||||
props: {
|
||||
alwaysShowCategory: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
name: "category-bar",
|
||||
data() {
|
||||
return {
|
||||
showCategory: false,
|
||||
canShareType: 0,
|
||||
currentPage: '',
|
||||
gzhQr: '',
|
||||
categoryData: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
this.getCateList()
|
||||
const bannerAllPro = document.getElementById("bannerAllPro")
|
||||
bannerAllPro.addEventListener("mouseover", () => {
|
||||
that.showCategory = true
|
||||
})
|
||||
bannerAllPro.addEventListener("mouseleave", () => {
|
||||
that.showCategory = false
|
||||
})
|
||||
const routes = getCurrentPages()
|
||||
this.currentPage = getCurrentPages()[routes.length - 1].route
|
||||
this.getGzhQr()
|
||||
},
|
||||
methods: {
|
||||
async getGzhQr() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'cd349d8f691400d0033a5408018d2fe7'
|
||||
|
||||
},
|
||||
})
|
||||
this.gzhQr = res.content
|
||||
},
|
||||
navTo(url) {
|
||||
if (JSON.stringify(vk.getVuex('$user.userInfo')) === '{}') {
|
||||
if (url === '/pages/user/user') url = '/pages/auth/register/register'
|
||||
}
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
showShowChild(index) {
|
||||
this.$set(this.categoryData[index], 'showChild', true)
|
||||
},
|
||||
hideShowChild(index) {
|
||||
this.$set(this.categoryData[index], 'showChild', false)
|
||||
},
|
||||
getCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
loading: false,
|
||||
data: {},
|
||||
success: (data) => {
|
||||
data.rows.map(item => {
|
||||
item.showChild = false
|
||||
return item
|
||||
})
|
||||
this.categoryData = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
jump(item, citem) {
|
||||
if (item._id === '657609c48b0da41d31e5f901') this.navTo(`/pages/spot/goods/goods`)
|
||||
else if (item._id === '5823f6ee68ca6a9101062ab04002e715') this.navTo(`/pages/index/self-support/self-support`)
|
||||
else this.navTo(`/pages/spot/goods/goods?keyword=${citem.name}`)
|
||||
},
|
||||
jumpToIndex(item) {
|
||||
if (item._id === '657609c48b0da41d31e5f901') this.navTo(`/pages/spot/goods/goods`)
|
||||
else if (item._id === '5823f6ee68ca6a9101062ab04002e715') this.navTo(`/pages/index/self-support/self-support`)
|
||||
else this.navTo(`/pages/spot/goods/goods?keyword=${item.name}`)
|
||||
}
|
||||
|
||||
},
|
||||
watch: {
|
||||
$route({meta: {pagePath}}) {
|
||||
this.currentPage = pagePath
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.navigator {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.login-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.auth-btn {
|
||||
margin-top: .5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
.auth-btn {
|
||||
margin-top: .5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
img {
|
||||
width: 14px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
img {
|
||||
width: 14px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-icon-menu{
|
||||
|
||||
.el-icon-menu {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.company-name {
|
||||
display: inline-block;
|
||||
max-width: 100px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cate-name:hover {
|
||||
color: #a92924
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,195 +1,277 @@
|
||||
<template>
|
||||
<view id="footer">
|
||||
<div class="group-foot">
|
||||
<div class="group-foot-inner">
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>平台服务</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/index/self-support/self-support')">金久信自营</a></li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457acf082105ea4d467f0')">常见问题</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">帮助中心</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;" @click="navTo('/')">实力商家入驻</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>交易流程</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/detail?id=657458e821821b5c0fca7dff')">信誉采购</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/detail?id=6574591f7ad52d34471bd558')">金久信公正</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=6574592b09664c4f4af2e686')">自主交易</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/index/self-support/self-support')">金久信自营</a></li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/enquiry/list')">发布询价单</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>关于金久信</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">金久信动态</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">知识产权声明</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">隐私声明</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">免责声明</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">平台交易规则</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=657457b621821b5c0fca456a')">关于我们</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt> 旧货交易</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="/article/detail/id/19.html">旧货交易流程</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/18.html">如何下单</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>找加工</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="/article/detail/id/21.html">加工交易流程</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/20.html">如何下加工单</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>找合作</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="/article/detail/id/23.html">合作施工</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/22.html">合作供货</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<view id="footer">
|
||||
<div class="group-foot">
|
||||
<div class="group-foot-inner">
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>平台服务</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li v-for="(item, index) in serviceList" :key="index">
|
||||
<a rel="nofollow" href="javascript:;"
|
||||
@click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{ item.name }}</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>交易流程</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li v-for="(item, index) in tradeList" :key="index"><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{
|
||||
item.name
|
||||
}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>关于金久信</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li v-for="(item, index) in aboutList" :key="index"><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{
|
||||
item.name
|
||||
}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>旧货交易</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li v-for="(item, index) in oldList" :key="index"><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{
|
||||
item.name
|
||||
}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>找加工</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li v-for="(item, index) in processList" :key="index"><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{
|
||||
item.name
|
||||
}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<!-- <div class="mod-contact">-->
|
||||
<!-- <dl>-->
|
||||
<!-- <dt>找合作</dt>-->
|
||||
<!-- <dd>-->
|
||||
<!-- <ul>-->
|
||||
<!-- <li v-for="(item, index) in coopList" :key="index"><a rel="nofollow" href="javascript:;"-->
|
||||
<!-- @click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{ item.name }}</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- </dd>-->
|
||||
<!-- </dl>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt> 金久信学堂</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="/article/detail/id/27.html">行业动态</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/26.html">技术论坛</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/25.html">执行标准</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/24.html">基础知识</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>金久信金融</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="/article/detail/id/31.html">如何还款</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/30.html">如何使用额度</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/29.html">申请流程</a>
|
||||
</li>
|
||||
<li><a rel="nofollow" href="/article/detail/id/28.html"
|
||||
>金久信金融简介</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>金久信学堂</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo('/pages/otherArticle/list?id=6574521499c62431df5b562c')">行业动态</a>
|
||||
</li>
|
||||
<!-- <li><a rel="nofollow" href="javascript:;"-->
|
||||
<!-- @click="navTo('/pages/otherArticle/list?id=6573d6fcf082105ea4bb5d09')">技术论坛</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li><a rel="nofollow" href="javascript:;"-->
|
||||
<!-- @click="navTo('/pages/otherArticle/list?id=6573d704862066d070e8f7be')">执行标准</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li><a rel="nofollow" href="javascript:;"-->
|
||||
<!-- @click="navTo('/pages/otherArticle/list?id=6573d70c21392942007c0521')">基础知识</a>-->
|
||||
<!-- </li>-->
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="group-copyright active">
|
||||
<div class="group-copyright-inner">
|
||||
<div class="mod-inner">
|
||||
<div class="wuage-other-link">
|
||||
<div class="wuage-link">
|
||||
<p class="out-link">
|
||||
<a rel="nofollow" target="_self" href="http:/yilitong.com">亿利通官网</a>
|
||||
|<a rel="nofollow" target="_self" href="baidu.com">亿利通</a>
|
||||
</p>
|
||||
</div>
|
||||
<p class="wuage-copyright">
|
||||
Copyright © 2020-2021 jinjiuxinzg.cn All Rights Reserved 版权所有: 南宁亿利通钢管有限公司
|
||||
<a href="https:/beian.miit.gov.cn" rel="nofollow">桂ICP备19008827号-1</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="certs-group">
|
||||
<a class="cert-1" rel="nofollow">
|
||||
<span class="clearfix"><img
|
||||
src="http:/jyx.gxwebsoft.com/public/upload/image/20210220/80705c8b12d05d0ff67a2758749ef09c.jpg"><p>公众号</p></span>
|
||||
</a>
|
||||
<a class="cert-2" rel="nofollow">
|
||||
<span class="clearfix"><img
|
||||
src="http:/jyx.gxwebsoft.com/public/upload/image/20210220/80705c8b12d05d0ff67a2758749ef09c.jpg"><p>手机站</p></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mod-contact">
|
||||
<dl>
|
||||
<dt>金久信金融</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li v-for="(item, index) in jinRongList" :key="index"><a rel="nofollow" href="javascript:;"
|
||||
@click="navTo(`/pages/otherArticle/detail?id=${item._id}`)">{{
|
||||
item.name
|
||||
}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</view>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group-copyright active">
|
||||
<div class="group-copyright-inner">
|
||||
<div class="mod-inner">
|
||||
<div class="wuage-other-link">
|
||||
<!-- <div class="wuage-link">-->
|
||||
<!-- <p class="out-link">-->
|
||||
<!-- <a rel="nofollow" target="_self"-->
|
||||
<!-- href="https://baike.baidu.com/item/%E5%8D%97%E5%AE%81%E4%BA%BF%E5%88%A9%E9%80%9A%E9%92%A2%E7%AE%A1%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/23408974?fr=ge_ala">亿利通官网</a>-->
|
||||
<!-- |<a rel="nofollow" target="_self"-->
|
||||
<!-- href="https://baike.baidu.com/item/%E5%8D%97%E5%AE%81%E4%BA%BF%E5%88%A9%E9%80%9A%E9%92%A2%E7%AE%A1%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/23408974?fr=ge_ala">亿利通</a>-->
|
||||
<!-- </p>-->
|
||||
<!-- </div>-->
|
||||
<p class="wuage-copyright">
|
||||
Copyright © 2020-2021 jinjiuxinzg.cn All Rights Reserved 版权所有: 南宁亿利通钢管有限公司
|
||||
<a href="https://beian.miit.gov.cn" rel="nofollow" target="_blank">桂ICP备19008827号-1</a>
|
||||
<a class="wuage-copyright"
|
||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=45010702002145" rel="noreferrer"
|
||||
target="blank">桂公网安备45010702002145</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="certs-group" style="margin-right: 80px">
|
||||
<a class="cert-1" rel="nofollow">
|
||||
<span class="clearfix"><img
|
||||
:src="gzhQr"><p>公众号</p></span>
|
||||
</a>
|
||||
<a class="cert-2" rel="nofollow">
|
||||
<span class="clearfix"><img
|
||||
:src="mobileQr"><p>手机站</p></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "common-footer",
|
||||
data() {
|
||||
return {};
|
||||
name: "common-footer",
|
||||
data() {
|
||||
return {
|
||||
jinRongList: [],
|
||||
tradeList: [],
|
||||
aboutList: [],
|
||||
coopList: [],
|
||||
processList: [],
|
||||
oldList: [],
|
||||
serviceList: [],
|
||||
gzhQr: '',
|
||||
mobileQr: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getJinRongList()
|
||||
this.getTradeList()
|
||||
this.getAboutList()
|
||||
this.getCoopList()
|
||||
this.getProcessList()
|
||||
this.getOldList()
|
||||
this.getServiceList()
|
||||
this.getGzhQr()
|
||||
this.getMobileQr()
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url: url
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url: url
|
||||
});
|
||||
async getGzhQr() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'cd349d8f691400d0033a5408018d2fe7'
|
||||
|
||||
},
|
||||
})
|
||||
this.gzhQr = res.content
|
||||
},
|
||||
async getMobileQr() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'da8988ea691400c0033703596b9fec1e'
|
||||
},
|
||||
})
|
||||
this.mobileQr = res.content
|
||||
},
|
||||
async getJinRongList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c6a09664c4f4a325a05"
|
||||
}
|
||||
})
|
||||
this.jinRongList = res.rows
|
||||
},
|
||||
async getTradeList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "657458db9755e36c09375be8"
|
||||
}
|
||||
})
|
||||
this.tradeList = res.rows
|
||||
},
|
||||
async getAboutList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c33e0ec19b504d81f90"
|
||||
}
|
||||
})
|
||||
this.aboutList = res.rows
|
||||
},
|
||||
async getCoopList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c53337a9f0756a154ee"
|
||||
}
|
||||
})
|
||||
this.coopList = res.rows
|
||||
},
|
||||
async getProcessList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c49a09a9b1767464f4f"
|
||||
}
|
||||
})
|
||||
this.processList = res.rows
|
||||
},
|
||||
async getOldList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c40466d41a58495c9ae"
|
||||
}
|
||||
})
|
||||
this.oldList = res.rows
|
||||
},
|
||||
async getServiceList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
data: {
|
||||
parentId: "65761c229755e36c0976fb82"
|
||||
}
|
||||
})
|
||||
this.serviceList = res.rows
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,115 +1,245 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="group-head clearfix">
|
||||
<div class="group-inner clearfix">
|
||||
<div class="mod-logo">
|
||||
<a href="/" class="logo"><img src="@/static/images/logo.png"></a>
|
||||
</div>
|
||||
<div class="mod-mini-search">
|
||||
<div class="navigation-top clearfix">
|
||||
<div class="searchBar">
|
||||
<ul class="searchBar-tab clearfix">
|
||||
<li @click="searchTypeChange(0)" :class="{'active': searchType == 0}" class="_goods" >商品</li>
|
||||
<li @click="searchTypeChange(1)" :class="{'active': searchType == 1}" class="_shop">商户</li>
|
||||
</ul>
|
||||
<div class="clearfix">
|
||||
<div class="searchBar-input">
|
||||
<div class="searchBar-input-inner">
|
||||
<input type="text" :placeholder="searchList[searchType].placeholder"
|
||||
maxlength="100" autocomplete="off">
|
||||
</div>
|
||||
<div class="searchBar-input-list" style="display: none;"></div>
|
||||
</div>
|
||||
<div class="preventButton button" desc=""></div>
|
||||
<div class="button" @click="search">搜索</div>
|
||||
</div>
|
||||
</div>
|
||||
<view>
|
||||
<div class="group-head clearfix">
|
||||
<div class="group-inner clearfix">
|
||||
<div class="mod-logo">
|
||||
<a href="/" class="logo"><img src="@/static/images/logo.png"></a>
|
||||
</div>
|
||||
<div class="mod-mini-search">
|
||||
<div class="navigation-top clearfix">
|
||||
<div class="searchBar">
|
||||
<ul class="searchBar-tab clearfix">
|
||||
<li @click="searchTypeChange(1)" :class="{'active': searchType === 1}" class="_shop">
|
||||
现货
|
||||
</li>
|
||||
<li @click="searchTypeChange(2)" :class="{'active': searchType === 2}" class="_shop">
|
||||
找供应
|
||||
</li>
|
||||
<li @click="searchTypeChange(3)" :class="{'active': searchType === 3}" class="_shop">
|
||||
找加工
|
||||
</li>
|
||||
<li @click="searchTypeChange(4)" :class="{'active': searchType === 4}" class="_shop">
|
||||
旧货
|
||||
</li>
|
||||
<li @click="searchTypeChange(0)" :class="{'active': searchType === 0}" class="_goods">
|
||||
特产商品
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix">
|
||||
<div class="searchBar-input">
|
||||
<div class="searchBar-input-inner">
|
||||
<input type="text" :placeholder="searchList[searchType].placeholder"
|
||||
maxlength="100" autocomplete="off" v-model="keyword">
|
||||
</div>
|
||||
<div class="searchBar-input-list" style="display: none;"></div>
|
||||
</div>
|
||||
<div class="preventButton button" desc=""></div>
|
||||
<div class="button" @click="search">搜索</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mod-hot-query">
|
||||
<ul class="clearfix">
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=直缝焊管">直缝焊管</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=架子管">架子管</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=无缝管">无缝管</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=方矩管">方矩管</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=钢板">钢板</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=螺纹钢">螺纹钢</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=H型钢">H型钢</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=工字钢">工字钢</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=槽钢">槽钢</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/market/index.html?product_name=镀锌钢管">镀锌钢管</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mod-menu">
|
||||
<div class="hrd">
|
||||
<a href="/support/index.html" class="hrd-landing">
|
||||
<img src="@/static/images/logo-left.png">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mod-download-icon js-download">
|
||||
<a class="download clearfix" href="" target="_blank">
|
||||
<span style="float: left;font-size: 13px;padding-top: 27px;padding-right: 10px;">金久信<br>
|
||||
手机站</span>
|
||||
<img src="/public/upload/image/20210220/80705c8b12d05d0ff67a2758749ef09c.jpg"
|
||||
style="height: 90px;width: 90px;float: left;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
<div class="mod-hot-query">
|
||||
<ul style="width: 480px; overflow-x: auto;">
|
||||
<li v-for="(item, index) in allChildCate" :key="index">
|
||||
<a href="javascript:;" @click="navTo(item.name)">{{ item.name }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mod-menu">
|
||||
<div class="hrd">
|
||||
<a href="javascript:;" class="hrd-landing"
|
||||
@click="jump('/pages/index/self-support/self-support')">
|
||||
<img src="@/static/images/logo-left.png">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="mod-download-icon js-download">-->
|
||||
<!-- <a class="download clearfix" href="" target="_blank">-->
|
||||
<!-- <span style="float: left;font-size: 13px;padding-top: 27px;padding-right: 10px;">金久信<br>-->
|
||||
<!-- 手机站</span>-->
|
||||
<!-- <img src="/public/upload/image/20210220/80705c8b12d05d0ff67a2758749ef09c.jpg"-->
|
||||
<!-- style="height: 90px;width: 90px;float: left;">-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "common-header",
|
||||
data() {
|
||||
return {
|
||||
searchType: 0,
|
||||
searchList: [
|
||||
{
|
||||
type: 0,
|
||||
name: '商品',
|
||||
placeholder:'请输入品名 材质 规格 钢厂等搜索'
|
||||
},
|
||||
{
|
||||
type: 1,
|
||||
name: '商户',
|
||||
placeholder:'请输入商户名或公司名进行搜索'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
searchTypeChange(e) {
|
||||
this.searchType = e
|
||||
},
|
||||
search() {
|
||||
this.$message('这是一条消息提示');
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "common-header",
|
||||
data() {
|
||||
return {
|
||||
searchType: 1,
|
||||
allChildCate: [],
|
||||
searchList: [
|
||||
{
|
||||
type: 0,
|
||||
name: '商品',
|
||||
placeholder: '请输入商品名称等搜索',
|
||||
page: '/pages/index/shop/shop'
|
||||
},
|
||||
{
|
||||
type: 1,
|
||||
name: '现货',
|
||||
placeholder: '请输入品名 材质 规格 钢厂等搜索',
|
||||
page: '/pages/spot/goods/goods'
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
name: '找供应',
|
||||
placeholder: '请输入品名 材质 规格 钢厂等搜索',
|
||||
page: '/pages/enquiry/list'
|
||||
},
|
||||
{
|
||||
type: 3,
|
||||
name: '找加工',
|
||||
placeholder: '请输入品名 材质 规格 钢厂等搜索',
|
||||
page: '/pages/process/list'
|
||||
},
|
||||
{
|
||||
type: 4,
|
||||
name: '旧货',
|
||||
placeholder: '请输入品名 材质 规格 钢厂等搜索',
|
||||
page: '/pages/index/old/old'
|
||||
},
|
||||
],
|
||||
keyword: null,
|
||||
currentPage: '',
|
||||
spotCateList: [],
|
||||
enquiryCateList: [],
|
||||
processCateList: [],
|
||||
oldCateList: [],
|
||||
goodsCateList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
searchTypeChange(e) {
|
||||
this.searchType = e
|
||||
switch (e) {
|
||||
case 0 : {
|
||||
this.allChildCate = this.goodsCateList
|
||||
}
|
||||
break;
|
||||
case 1 : {
|
||||
this.allChildCate = this.spotCateList
|
||||
}
|
||||
break;
|
||||
case 2 : {
|
||||
this.allChildCate = this.enquiryCateList
|
||||
}
|
||||
break;
|
||||
case 3 : {
|
||||
this.allChildCate = this.processCateList
|
||||
}
|
||||
break;
|
||||
case 4 : {
|
||||
this.allChildCate = this.oldCateList
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
},
|
||||
search() {
|
||||
this.navTo(this.keyword)
|
||||
},
|
||||
getCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.spotCateList = []
|
||||
data.rows.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.spotCateList.push(child)
|
||||
})
|
||||
})
|
||||
this.allChildCate = this.spotCateList
|
||||
}
|
||||
});
|
||||
},
|
||||
async getEnquiryCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/template/pub/getList',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.enquiryCateList = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
async getProcessCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.processCateList = data.rows
|
||||
}
|
||||
});
|
||||
},
|
||||
async getOldCateList() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {type: 1},
|
||||
success: (data) => {
|
||||
this.oldCateList = data.rows.map(item => {
|
||||
item.children.forEach(child => {
|
||||
delete child.children
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
getGoodsCate() {
|
||||
vk.callFunction({
|
||||
url: 'client/goods/category/pub/getList'
|
||||
}).then(res => {
|
||||
this.goodsCateList = res.rows
|
||||
})
|
||||
},
|
||||
navTo(keyword) {
|
||||
if (this.searchType === 0) {
|
||||
vk.navigateTo({
|
||||
url: this.searchList[this.searchType].page + '?cateName=' + keyword
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: this.searchList[this.searchType].page + '?keyword=' + keyword
|
||||
})
|
||||
}
|
||||
},
|
||||
jump(url) {
|
||||
vk.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCateList()
|
||||
this.getEnquiryCateList()
|
||||
this.getProcessCateList()
|
||||
this.getOldCateList()
|
||||
this.getGoodsCate()
|
||||
},
|
||||
watch: {
|
||||
$route({meta: {pagePath}}) {
|
||||
this.currentPage = pagePath
|
||||
if (this.currentPage.includes('shop')) this.searchType = 0
|
||||
if (this.currentPage.includes('spot')) this.searchType = 1
|
||||
if (this.currentPage.includes('enquiry')) this.searchType = 2
|
||||
if (this.currentPage.includes('process')) this.searchType = 3
|
||||
if (this.currentPage.includes('old')) this.searchType = 4
|
||||
// console.log(this.currentPage.includes('process'), this.searchType)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
|
||||
<ul class="CenteruserNav-menu">
|
||||
<li class="" :class="[currentPage.includes('user') ? 'active' : '']"><a href="javascript:;"
|
||||
<li class="" :class="[(currentPage.includes('user') && !currentPage.includes('school')) ? 'active' : '']"><a href="javascript:;"
|
||||
@click="jump('/pages/user/user')">个人中心</a>
|
||||
</li>
|
||||
<li class="" :class="[currentPage.includes('buyer') ? 'active' : '']"><a href="javascript:;"
|
||||
@@ -24,7 +24,9 @@
|
||||
<li class="" :class="[currentPage.includes('contract') ? 'active' : '']"><a href="javascript:;"
|
||||
@click="jump('/pages/contract/index')">合同管理</a>
|
||||
</li>
|
||||
<li><a href="javascript:;" @click="jump('/pages/article/list')">金久信学堂</a></li>
|
||||
<li :class="[currentPage.includes('school') ? 'active' : '']"><a href="javascript:;"
|
||||
@click="jump('/pages/user/school')">金久信学堂</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<el-carousel :height="`${height}px`" :style="{width: width}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in list.swiper" :key="item" :style="{width: width}">
|
||||
<image class="carousel-img" :src="item" mode="scaleToFill" :style="{width: width}" @click="onClick(index)"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CommonSwiper",
|
||||
props: {
|
||||
page: {
|
||||
type: String,
|
||||
default: "index"
|
||||
},
|
||||
height: {
|
||||
type: String | Number,
|
||||
default: "500"
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "100%"
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
vk.callFunction({
|
||||
url: 'client/album/pub/list',
|
||||
data: {
|
||||
page: this.page
|
||||
},
|
||||
success: res => {
|
||||
this.list = res
|
||||
console.log(this.list)
|
||||
}
|
||||
})
|
||||
},
|
||||
onClick(index) {
|
||||
if (this.list.companyId) vk.navigateTo(`/pages/yellowPage/info?id=${this.list.companyId}`)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<view>
|
||||
<template v-if="['doc', 'docx'].includes(item.split('.').pop())">
|
||||
<file-word theme="outline" class="pointer" size="40" fill="#4a90e2" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">
|
||||
<file-excel theme="outline" class="pointer" size="40" fill="#417505" strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else-if="['pdf'].includes(item.split('.').pop())">
|
||||
<file-pdf-one theme="outline" class="pointer" size="40" fill="#f5a623"
|
||||
strokeLinecap="square"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
|
||||
:preview-src-list="[item]"/>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
|
||||
|
||||
export default {
|
||||
name: "file-type",
|
||||
components: {FilePdfOne, FileExcel, FileWord},
|
||||
props: {
|
||||
item: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<view>
|
||||
<template v-if="vk.getVuex('$user.userInfo.userLevel') < 3">
|
||||
<div class="mt-20 text-main font-bold" v-if="!quoteExpiredAt || monthExpired">剩余报价次数:{{
|
||||
remainQuoteNum
|
||||
}}次
|
||||
</div>
|
||||
<div class="mt-20 text-main font-bold" v-else-if="quoteExpiredAt && !monthExpired">
|
||||
报价包月过期时间:{{ dayjs(quoteExpiredAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</div>
|
||||
</template>
|
||||
<el-dialog title="报价次数" :visible.sync="dialogVisible" width="50%">
|
||||
<p>请选择购买模式</p>
|
||||
<div class="flex justify-center items-center">
|
||||
<div class="p-20 rounded m-20 shadow flex flex-col justify-center items-center flex-1 pointer"
|
||||
:class="[buyQuoteMode === 'single' ? 'buy-quote-mode-active' : '']"
|
||||
@click="buyQuoteMode = 'single'">
|
||||
<p>单次购买</p>
|
||||
<p>{{ amount ? amount : singleQuoteAmount }}元/次</p>
|
||||
</div>
|
||||
<div class="p-20 rounded m-20 shadow flex flex-col justify-center items-center flex-1 pointer"
|
||||
:class="[buyQuoteMode === item._id ? 'buy-quote-mode-active' : '']"
|
||||
:style="{cursor: 'not-allowed'}"
|
||||
@click="buyQuoteMode = item._id" v-for="(item, index) in monthlyQuoteAmountList" :key="index">
|
||||
<p>{{ item.name }}</p>
|
||||
<p>{{ item.amount }}元</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-20 flex justify-start items-center"
|
||||
v-if="vk.getVuex('$user.userInfo.userLevel') === 0 && buyQuoteMode !== 'single'">
|
||||
<span>您还未成为会员,仅能单次购买。请</span>
|
||||
<span class="text-main font-bold pointer mx-15 text-35" style="text-decoration: underline"
|
||||
@click="toUpgrade">升级会员</span>
|
||||
<span> ,可享受优惠报价套餐。</span>
|
||||
</div>
|
||||
<div class="mt-20 " v-if="!vk.getVuex('$user.userInfo.quoteExpiredAt')">
|
||||
<span>剩余报价次数:</span>
|
||||
<span class="text-main font-bold text-35">{{ remainQuoteNum }}</span>
|
||||
<span>次</span>
|
||||
</div>
|
||||
<div class="mt-20 text-main font-bold" v-else>
|
||||
报价包月过期时间:{{ dayjs(quoteExpiredAt).format('YYYY-MM-DD') }}
|
||||
</div>
|
||||
<div class="mt-20 flex justify-center items-center">
|
||||
<el-button type="primary" :disabled="!buyQuoteMode || disabled" @click.native="doBuyQuote">确定
|
||||
</el-button>
|
||||
<el-button plain @click.native="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
name: "quote-remain-num",
|
||||
props: {
|
||||
amount: Number,
|
||||
type: String,
|
||||
id: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
remainQuoteNum: 0,
|
||||
quoteExpiredAt: null,
|
||||
dialogVisible: false,
|
||||
monthExpired: false,
|
||||
buyQuoteMode: null,
|
||||
disabled: false,
|
||||
singleQuoteAmount: 1,
|
||||
monthlyQuoteAmount: 10,
|
||||
monthlyQuoteAmountList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
async getSingleQuoteAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587b034466d41a591df881c'
|
||||
},
|
||||
})
|
||||
this.singleQuoteAmount = res.content
|
||||
},
|
||||
async getMonthlyAmount() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/quoteNumConfig/list/pub/list',
|
||||
})
|
||||
this.monthlyQuoteAmountList = rows
|
||||
},
|
||||
async doBuyQuote() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/enquiry/quoteNum/kh/add',
|
||||
data: {
|
||||
buyQuoteMode: this.buyQuoteMode,
|
||||
type: this.type,
|
||||
id: this.id,
|
||||
},
|
||||
})
|
||||
this.dialogVisible = false
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
vk.navigateBack()
|
||||
},
|
||||
toUpgrade() {
|
||||
this.dialogVisible = false
|
||||
vk.navigateTo({
|
||||
url: `/pages/user/user?menu=equity`
|
||||
})
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.getSingleQuoteAmount()
|
||||
await this.getMonthlyAmount()
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: async (data) => {
|
||||
if (this.amount) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/user/kh/getUserQuoteNumList',
|
||||
data: {
|
||||
type: this.type,
|
||||
sheetId: this.id,
|
||||
},
|
||||
})
|
||||
console.log('res', res.data)
|
||||
if (!res.data) this.remainQuoteNum = 0
|
||||
else this.remainQuoteNum = res.data.num
|
||||
}
|
||||
if (this.remainQuoteNum === 0) this.remainQuoteNum = data.userInfo.remainQuoteNum ? parseInt(data.userInfo.remainQuoteNum) : 0
|
||||
this.quoteExpiredAt = data.userInfo.quoteExpiredAt ? dayjs(data.userInfo.quoteExpiredAt).format('YYYY-MM-DD HH:mm:ss') : null
|
||||
this.monthExpired = dayjs(data.userInfo.quoteExpiredAt).isBefore(dayjs())
|
||||
console.log('here', this.remainQuoteNum, this.quoteExpiredAt, vk.getVuex('$user.userInfo.userLevel'))
|
||||
if (this.remainQuoteNum === 0 && (!this.quoteExpiredAt || dayjs(this.quoteExpiredAt).isBefore(dayjs())) && parseInt(vk.getVuex('$user.userInfo.userLevel')) < 3) {
|
||||
this.$confirm('您的报价次数已用完/已过期,是否立即购买?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
}).then(async () => {
|
||||
this.dialogVisible = true
|
||||
}).catch(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
buyQuoteMode(val) {
|
||||
if (vk.getVuex('$user.userInfo.userLevel') === 0) {
|
||||
if (val === 'single') this.disabled = false
|
||||
else this.disabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.buy-quote-mode-active {
|
||||
border: 1px solid #a92924;
|
||||
background-color: #f1c7c7;
|
||||
}
|
||||
</style>
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="item">
|
||||
<i class="wag-icon"><img src="@/static/images/cl1.png"></i>
|
||||
</div>
|
||||
<span>找买家</span>
|
||||
<span>下询价单</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="side-add-cart"><a rel="nofollow" href="javascript:;"
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="item">
|
||||
<i class="wag-icon"><img src="@/static/images/cl3.png"></i>
|
||||
</div>
|
||||
<span class="txt"> 进货单 </span>
|
||||
<span class="txt"> 购物车 </span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="side-steel-kefu">
|
||||
@@ -32,7 +32,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="side-steel-counter">
|
||||
<a rel="nofollow" href="/counter/index.html">
|
||||
<a rel="nofollow" href="javascript:;" @click="navTo('/pages/stealCal/stealCal')">
|
||||
<div class="item">
|
||||
<i class="wag-icon"><img src="@/static/images/cl5.png"></i>
|
||||
</div>
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="item">
|
||||
<agreement theme="outline" size="16" fill="#666" strokeLinecap="square"/>
|
||||
</div>
|
||||
<span>签约宝</span>
|
||||
<span>金久信签约宝</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class=" text-center py-15" style="background-color: red; color: yellow">本站测试中,仅对 特约用户 开放部分功能测试,谢谢您的关注,敬请期待!</view>
|
||||
<view class="group-wagbar">
|
||||
<div class="group-inner">
|
||||
<div class="mod-welcome">
|
||||
<h5 class="welcome-item slogan js-slogan">欢迎来到金久信钢城首页!</h5>
|
||||
<h5 class="welcome-item slogan js-slogan">欢迎来到金久信钢材供应链生态服务平台首页!</h5>
|
||||
<div class="welcome-item login-register">
|
||||
|
||||
<navigator v-if="!vk.getVuex('$user.userInfo.nickname')" class="login js-top-bar-login"
|
||||
@@ -22,6 +23,9 @@
|
||||
class="el-icon-arrow-down el-icon--right"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/contract/index?tab=sign">金久信签约宝</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/user/user">个人中心</navigator>
|
||||
</el-dropdown-item>
|
||||
@@ -32,19 +36,16 @@
|
||||
<navigator url="/pages/store/store">卖家中心</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/process/my">我的加工</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/user/school">金久信学堂</navigator>
|
||||
<navigator url="/pages/order/order">订单管理</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/contract/index">合同管理</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/contract/index?tab=sign">签约宝</navigator>
|
||||
<navigator url="/pages/process/my">我的加工</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/user/order">订单管理</navigator>
|
||||
<navigator url="/pages/user/school">金久信学堂</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="logout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -56,7 +57,7 @@
|
||||
<li class="tool-item buyer-item">
|
||||
<a rel="nofollow" href="javascript:;" class="bar-title">
|
||||
<navigator url="/pages/store/buyer">买家中心<i></i></navigator>
|
||||
</a>
|
||||
</a>
|
||||
<div class="bar-content">
|
||||
<dl>
|
||||
<dd>
|
||||
@@ -69,11 +70,11 @@
|
||||
<navigator url="/pages/order/order">订单管理</navigator>
|
||||
</a>
|
||||
</dd>
|
||||
<!-- <dd>-->
|
||||
<!-- <a rel="nofollow" href="javascript:;">-->
|
||||
<!-- <navigator url="/pages/order/order">订单管理</navigator>-->
|
||||
<!-- </a>-->
|
||||
<!-- </dd>-->
|
||||
<!-- <dd>-->
|
||||
<!-- <a rel="nofollow" href="javascript:;">-->
|
||||
<!-- <navigator url="/pages/order/order">订单管理</navigator>-->
|
||||
<!-- </a>-->
|
||||
<!-- </dd>-->
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
@@ -101,14 +102,15 @@
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
<li class="tool-item">
|
||||
<li class="tool-item pos-r">
|
||||
<a rel="nofollow" href="javascript:;" class="bar-title"
|
||||
@click="navTo('/pages/user/user?menu=notice')"
|
||||
>我的消息</a>
|
||||
>我的消息({{ messageUnreadNum }})</a>
|
||||
<div class="dot" v-if="messageUnreadNum > 0"></div>
|
||||
</li>
|
||||
<li class="tool-item2">
|
||||
<a rel="nofollow" href="" class="bar-title" target="_blank"><span>客服服务热线:+86
|
||||
0771-3923001</span></a>
|
||||
<a rel="nofollow" href="javascript:;" class="bar-title"><span>客服服务热线:
|
||||
{{ serviceContract }}</span></a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@@ -122,12 +124,24 @@
|
||||
export default {
|
||||
name: "top-bar",
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
messageUnreadNum: 0,
|
||||
serviceContract: '',
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
if (vk.getVuex('$user.userInfo._id')) {
|
||||
this.getUnreadNum()
|
||||
this.getServicePhone()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUnreadNum() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/message/kh/getUnreadCount',
|
||||
});
|
||||
this.messageUnreadNum = data
|
||||
},
|
||||
handleCommand(e) {
|
||||
if (e == 'logout') {
|
||||
this.logout()
|
||||
@@ -153,8 +167,16 @@ export default {
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
async getServicePhone() {
|
||||
const {content} = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d8fca55b337cfadbe1063'
|
||||
}
|
||||
})
|
||||
this.serviceContract = content
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -167,4 +189,14 @@ export default {
|
||||
color: #a92924;
|
||||
}
|
||||
}
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 999px;
|
||||
background-color: #a92924;
|
||||
}
|
||||
</style>
|
||||
+37
-19
@@ -1,22 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
<!-- 配置H5的 web图标static/logo.png -->
|
||||
<link rel="icon" href="./static/logo.png"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var mobileHost = 'm.jinjiuxinzg.cn';
|
||||
var ua = navigator.userAgent || '';
|
||||
var isMobile = /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini|Mobile/i.test(ua) ||
|
||||
(navigator.maxTouchPoints > 1 && window.innerWidth <= 768);
|
||||
|
||||
if (isMobile && location.hostname !== mobileHost) {
|
||||
location.replace('https://' + mobileHost + '/');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<title></title>
|
||||
<meta name="keywords" content="金久信签约宝,金久信签约宝会员">
|
||||
<meta name="description" content="金久信签约宝专注线上电子签约,金久信签约宝会员服务.致力于为您提供一站式金久信签约宝会员服务.">
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
<!-- 配置H5的 web图标static/logo.png -->
|
||||
<link rel="icon" href="./static/logo.png"/>
|
||||
<script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" data-appid="101415280"
|
||||
data-redirecturi="http://127.0.0.1:8080/"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,7 +2,7 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import config from '@/app.config.js'
|
||||
import config from './app.config.js'
|
||||
|
||||
// 引入 elementUI
|
||||
import elementUI from "element-ui";
|
||||
@@ -29,6 +29,16 @@ import vkAdminUI from 'vk-unicloud-admin-ui';
|
||||
import 'vk-unicloud-admin-ui/theme/index.css';
|
||||
Vue.use(vkAdminUI);
|
||||
|
||||
// 滑块
|
||||
import dragVerify from 'vue-drag-verify2'
|
||||
Vue.use(dragVerify);
|
||||
|
||||
import VueTianditu from "vue-tianditu";
|
||||
Vue.use(VueTianditu, {
|
||||
v: "4.0",
|
||||
tk: "bfbc6bd9e85fcda67b62788705aa6427"
|
||||
});
|
||||
|
||||
// 自动注册全局组件(必须加在Vue.use(vkAdminUI);的后面)
|
||||
const modulesFiles = require.context('./components', true, /\.vue$/);
|
||||
modulesFiles.keys().map((modulePath, index) => {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
"sassImplementationName": "node-sass",
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
|
||||
Generated
+1069
File diff suppressed because it is too large
Load Diff
@@ -21,12 +21,15 @@
|
||||
"dependencies": {
|
||||
"@icon-park/vue": "^1.4.2",
|
||||
"@vant/area-data": "^1.5.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^1.0.2",
|
||||
"async-validator": "^4.2.5",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.10",
|
||||
"element-ui": "2.15.13",
|
||||
"lodash": "^4.17.21",
|
||||
"md5": "^2.3.0",
|
||||
"normalize-wheel": "^1.0.1",
|
||||
"request": "^2.88.2",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
@@ -39,6 +42,8 @@
|
||||
"vue": "^2.7.15",
|
||||
"vue-clipboard2": "^0.3.3",
|
||||
"vue-cropper": "^0.6.4",
|
||||
"vue-drag-verify2": "^1.2.0",
|
||||
"vue-tianditu": "^1.2.11",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"xe-utils": "^3.5.14"
|
||||
},
|
||||
|
||||
+369
-321
@@ -1,390 +1,438 @@
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信钢城"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/error/404/404",
|
||||
"style": {
|
||||
"navigationBarTitleText": "404"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/auth/register/register",
|
||||
"style" :
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信钢城"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/error/404/404",
|
||||
"style": {
|
||||
"navigationBarTitleText": "404"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/register/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/auth/login/login",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "登录",
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信签约宝_金久信签约宝会员登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/spot/release/release",
|
||||
"style" :
|
||||
{
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/login/wechat",
|
||||
"style": {
|
||||
"navigationBarTitleText": "微信登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/login/wechat_test",
|
||||
"style": {
|
||||
"navigationBarTitleText": "微信登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/login/qq",
|
||||
"style": {
|
||||
"navigationBarTitleText": "QQ登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/login/find",
|
||||
"style": {
|
||||
"navigationBarTitleText": "找回密码",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/spot/release/release",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布现货",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/spot/goods/goods",
|
||||
"style" :
|
||||
{
|
||||
},
|
||||
{
|
||||
"path": "pages/spot/goods/goods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "现货市场",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/user/user",
|
||||
"style" :
|
||||
{
|
||||
},
|
||||
{
|
||||
"path": "pages/user/user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path" : "pages/spot/goods/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/company/company",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "黄页",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/enquiry/release",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "发布询价",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/enquiry/list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "询价",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/enquiry/my",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我发布的询价单",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/enquiry/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "报价单详情",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/enquiry/quote",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "填写报价单",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/contract/index",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "合同管理",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/process/list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "找加工",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/process/release",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "发布找加工",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/process/quote",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "加工报价",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/process/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "加工单详情",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/process/my",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我的加工单",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/spot/goods/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "现货详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/checkout/checkout",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/article/list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "金久信学堂",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/company/company",
|
||||
"style": {
|
||||
"navigationBarTitleText": "黄页",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/self-support/self-support",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "金久信自营",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/self-support/companyQuote",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "金久信自营",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/self-support/selectType",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "金久信自营",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/self-support/productQuote",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "金久信自营",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/server/server",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "平台服务",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/shop/shop",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/old/old",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "旧货交易",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/old/list/list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "旧货交易列表",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/shop/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/shop/cart",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "购物车",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yellowPage/list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/enquiry/release",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布询价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yellowPage/info",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/enquiry/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "找供应",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/user/school",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "金久信学堂",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/enquiry/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我发布的询价单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/shop/pay",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "订单支付",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/enquiry/quote/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的报价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/user/order",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "订单列表",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/enquiry/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报价单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/old/release",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "旧货交易",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/enquiry/quote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "填写报价单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/store/store",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "卖家中心",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/contract/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "合同管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/store/buyer",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "买家中心",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/contract/certificate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "司法调证",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/spot/goods/my",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "找加工",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/order",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/release",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布找加工",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/old/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/quote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "加工报价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/otherArticle/list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/quote/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的报价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/otherArticle/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "详情",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "加工单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/otherArticle/noticeDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "详情",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的加工单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/old/my",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "我发布的旧货信息",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/process/factoryList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "加工厂列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/checkout/checkout",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/article/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信学堂",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/article/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信学堂",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/self-support/self-support",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信自营",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/self-support/companyQuote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信自营",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/self-support/selectType",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信自营",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/self-support/productQuote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信自营",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/self-support/costQuote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信自营",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/self-support/quote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信自营报价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/server/server",
|
||||
"style": {
|
||||
"navigationBarTitleText": "平台服务",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/shop/shop",
|
||||
"style": {
|
||||
"navigationBarTitleText": "特产商城",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/old",
|
||||
"style": {
|
||||
"navigationBarTitleText": "旧货交易",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/quote",
|
||||
"style": {
|
||||
"navigationBarTitleText": "旧货交易报价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/quote/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的报价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/list/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "旧货交易列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/shop/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/shop/cart",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yellowPage/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "黄页列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yellowPage/info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "黄页详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/school",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信学堂",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/shop/pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单支付",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/release",
|
||||
"style": {
|
||||
"navigationBarTitleText": "旧货交易",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/store/store",
|
||||
"style": {
|
||||
"navigationBarTitleText": "卖家中心",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/store/buyer",
|
||||
"style": {
|
||||
"navigationBarTitleText": "买家中心",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/spot/goods/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的现货",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "旧货详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/otherArticle/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文章列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/otherArticle/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/otherArticle/noticeDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/old/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我发布的旧货信息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/stealCal/stealCal",
|
||||
"style": {
|
||||
"navigationBarTitleText": "钢材计算器",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yellowPage/factory",
|
||||
"style": {
|
||||
"navigationBarTitleText": "加工商信息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "金久信钢城",
|
||||
"navigationStyle": "custom",
|
||||
// #ifndef MP-ALIPAY
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
// #endif
|
||||
"backgroundColor": "#F8F8F8"
|
||||
}
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "金久信钢城",
|
||||
"navigationStyle": "custom",
|
||||
// #ifndef MP-ALIPAY
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
// #endif
|
||||
"backgroundColor": "#F8F8F8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/article/list">金久信学堂</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>金久信学堂详情</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<view class=" flex justify-between items-center">
|
||||
<text class="text-50 font-bold">{{ info.name }}</text>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<star @click.native="changeCollect" theme="outline" size="30" fill="#4a4a4a" strokeLinecap="square"
|
||||
v-if="!hasCollect" class="pointer"/>
|
||||
<star @click.native="changeCollect" theme="filled" size="30" fill="#d00243" strokeLinecap="square"
|
||||
v-else class="pointer"/>
|
||||
<text>{{ hasCollect ? '已收藏' : '收藏' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20 text-gray text-28 pb-20 border-bottom">{{ info._add_time_str }}</view>
|
||||
<view class="mt-20 text-gray text-28 pb-20 border-bottom" v-if="userInfo">
|
||||
<span>剩余</span>
|
||||
<span class="mx-15 text-main font-bold">{{ userInfo.remainArticleDownloadNum }}</span>
|
||||
<span>次下载次数</span>
|
||||
</view>
|
||||
<view class="py-20 border-bottom flex justify-start flex-col items-start " v-if="info.files">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
附件
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-start flex-wrap my-25">
|
||||
<view class="mt-15 mr-15" v-for="(item, index) in info.files" :key="index">
|
||||
<template v-if="['doc', 'docx'].includes(item.split('.').pop())">
|
||||
<file-word theme="outline" class="pointer" size="100" fill="#4a90e2" strokeLinecap="square"
|
||||
@click.native="openDownload(item)"/>
|
||||
</template>
|
||||
<template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">
|
||||
<file-excel theme="outline" class="pointer" size="100" fill="#417505" strokeLinecap="square"
|
||||
@click.native="openDownload(item)"/>
|
||||
</template>
|
||||
<template v-else-if="['pdf'].includes(item.split('.').pop())">
|
||||
<file-pdf-one theme="outline" class="pointer" size="100" fill="#f5a623"
|
||||
strokeLinecap="square"
|
||||
@click.native="openDownload(item)"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
|
||||
:preview-src-list="[item]"/>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-html="info.content" class="mt-20"></view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {FileExcel, FilePdfOne, FileWord, Star} from "@icon-park/vue";
|
||||
|
||||
export default {
|
||||
name: "detail",
|
||||
components: {FileWord, FilePdfOne, FileExcel, Star},
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
name: '',
|
||||
content: ''
|
||||
},
|
||||
hasCollect: false,
|
||||
userInfo: null,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.id) {
|
||||
this.getInfo(option.id);
|
||||
this.addView(option.id)
|
||||
this.getUserInfo()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
this.info = await vk.callFunction({
|
||||
url: `client/article/list/pub/getDetail`,
|
||||
data: {id}
|
||||
});
|
||||
await this.checkCollect()
|
||||
},
|
||||
async getUserInfo() {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
this.userInfo = userInfo
|
||||
},
|
||||
addView(id) {
|
||||
vk.callFunction({
|
||||
url: `client/article/list/pub/addView`,
|
||||
data: {id}
|
||||
});
|
||||
},
|
||||
async openDownload(url) {
|
||||
await this.getUserInfo()
|
||||
if (this.userInfo.userLevel < 0) return this.$message.error('非会员,无法下载');
|
||||
// else if (this.userInfo.userLevel === 0) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/article/list/kh/check',
|
||||
data: {
|
||||
id: this.info._id,
|
||||
}
|
||||
})
|
||||
if (!data) {
|
||||
if (this.userInfo.remainArticleDownloadNum === 0) {
|
||||
return this.$confirm(`下载次数不足,是否购买次数?`, '提示', {
|
||||
cancelButtonText: '关闭',
|
||||
}).then(async () => {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/order/kh/addDownloadOrder',
|
||||
title: '请求中...',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$confirm(`将消耗1次下载次数,是否继续?`, '提示', {
|
||||
cancelButtonText: '关闭',
|
||||
}).then(async () => {
|
||||
this.userInfo.remainArticleDownloadNum -= 1
|
||||
// await this.getUserInfo()
|
||||
vk.callFunction({
|
||||
url: 'client/article/list/pub/addDownload',
|
||||
data: {
|
||||
id: this.info._id,
|
||||
}
|
||||
})
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/reduceDownloadNum',
|
||||
})
|
||||
vk.callFunction({
|
||||
url: 'client/article/list/kh/addDownload',
|
||||
data: {
|
||||
id: this.info._id,
|
||||
}
|
||||
})
|
||||
window.open(url)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
window.open(url)
|
||||
}
|
||||
// } else {
|
||||
// vk.callFunction({
|
||||
// url: 'client/article/list/pub/addDownload',
|
||||
// data: {
|
||||
// id: this.info._id
|
||||
// }
|
||||
// })
|
||||
// window.open(url)
|
||||
// }
|
||||
|
||||
},
|
||||
async checkCollect() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/article/collect/kh/check',
|
||||
data: {
|
||||
articleId: this.info._id
|
||||
},
|
||||
});
|
||||
this.hasCollect = data
|
||||
},
|
||||
changeCollect() {
|
||||
this.hasCollect = !this.hasCollect
|
||||
vk.callFunction({
|
||||
url: 'client/article/collect/kh/changeCollect',
|
||||
data: {
|
||||
articleId: this.info._id
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
+212
-205
@@ -1,241 +1,248 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</view>
|
||||
<view class="filter-outer">
|
||||
<view class="cate">
|
||||
<view class="item" :class="[activeCateIndex === 0 ? 'active' : '']"
|
||||
@click="selectCate(0)">
|
||||
<text class="title">{{ cateList[0].name }}</text>
|
||||
<text class="remark mt-10">{{ cateList[0].remark }}</text>
|
||||
</view>
|
||||
<view class="item" :class="[activeCateIndex === 1 ? 'active' : '']"
|
||||
@click="selectCate(1)">
|
||||
<text class="title">{{ cateList[1].name }}</text>
|
||||
<text class="remark mt-10">{{ cateList[1].remark }}</text>
|
||||
</view>
|
||||
<view class="item" :class="[activeCateIndex === -1 ? 'active' : '']"
|
||||
@click="selectCate(-1)">
|
||||
<text class="title">乐邦团</text>
|
||||
<text class="remark mt-10">可提问一些与钢材有关的专业知识问答</text>
|
||||
</view>
|
||||
<view class="item" :class="[activeCateIndex === 2 ? 'active' : '']"
|
||||
@click="selectCate(2)">
|
||||
<text class="title">{{ cateList[2].name }}</text>
|
||||
<text class="remark mt-10">{{ cateList[2].remark }}</text>
|
||||
</view>
|
||||
<view class="item" :class="[activeCateIndex === -2 ? 'active' : '']"
|
||||
@click="selectCate(-2)">
|
||||
<text class="title">金久信风向标</text>
|
||||
<text class="remark mt-10">平台客户可将宝贵意见和平台需要改进的意见在此发表</text>
|
||||
</view>
|
||||
<view class="item mt-20" @click="toMySchool">
|
||||
<text class="title text-main">我的学堂</text>
|
||||
<text class="remark mt-10">我上传和下载的文档</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-wrap">
|
||||
<el-input @keyup.enter.native="getContentList" clearable placeholder="关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="getContentList" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
<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"
|
||||
@click="openDownload(item._id, item.files[0])">
|
||||
<file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/>
|
||||
<view class="content">
|
||||
<text class="title">{{ item.name }}</text>
|
||||
<view class="desc">
|
||||
<text class="item">{{ item._add_time_str }}</text>
|
||||
<text class="item">{{ item.viewNum }}人浏览</text>
|
||||
<text class="item">{{ item.downloadNum }}次下载</text>
|
||||
<text class="item">{{ item.amount === 0 ? '免费下载' : `${item.amount}元下载` }}</text>
|
||||
<!-- <text class="item">{{ item._add_time_str }}</text>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="carousel">
|
||||
<common-swiper page="article"/>
|
||||
</view>
|
||||
<view class="filter-outer">
|
||||
<view class="cate">
|
||||
<view class="item" v-for="(item, index) in cateList" :key="index" :class="[activeCateIndex === index ? 'active' : '']"
|
||||
@click="selectCate(index)">
|
||||
<text class="title">{{ item.name }}</text>
|
||||
<text class="remark mt-10">{{ item.remark }}</text>
|
||||
</view>
|
||||
<!-- <view class="item" :class="[activeCateIndex === 1 ? 'active' : '']"-->
|
||||
<!-- @click="selectCate(1)">-->
|
||||
<!-- <text class="title">{{ cateList[1].name }}</text>-->
|
||||
<!-- <text class="remark mt-10">{{ cateList[1].remark }}</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="item" :class="[activeCateIndex === -1 ? 'active' : '']"-->
|
||||
<!-- @click="selectCate(-1)">-->
|
||||
<!-- <text class="title">乐邦团</text>-->
|
||||
<!-- <text class="remark mt-10">可提问一些与钢材有关的专业知识问答</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="item" :class="[activeCateIndex === 1 ? 'active' : '']"-->
|
||||
<!-- @click="selectCate(1)">-->
|
||||
<!-- <text class="title">{{ cateList[1].name }}</text>-->
|
||||
<!-- <text class="remark mt-10">{{ cateList[1].remark }}</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="item" :class="[activeCateIndex === -2 ? 'active' : '']"-->
|
||||
<!-- @click="selectCate(-2)">-->
|
||||
<!-- <text class="title">金久信风向标</text>-->
|
||||
<!-- <text class="remark mt-10">平台客户可将宝贵意见和平台需要改进的意见在此发表</text>-->
|
||||
<!-- </view>-->
|
||||
<view class="item mt-20" @click="navTo('/pages/user/school')">
|
||||
<text class="title text-main">我的学堂</text>
|
||||
<text class="remark mt-10">我上传和下载的文档</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-wrap">
|
||||
<el-input @keyup.enter.native="getContentList()" clearable placeholder="关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="getContentList()" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
<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"
|
||||
@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>
|
||||
<el-pagination @current-change="getContentList" background layout="prev, pager, next"
|
||||
:total="total"></el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {FileWord} from '@icon-park/vue'
|
||||
import {FilePdfOne, FileExcel, FileWord} from '@icon-park/vue'
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
components: {FileWord},
|
||||
data() {
|
||||
return {
|
||||
cateList: [],
|
||||
activeCateIndex: 0,
|
||||
list: [],
|
||||
keyword: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCateList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/category/pub/getList'
|
||||
})
|
||||
this.cateList = rows
|
||||
await this.getContentList()
|
||||
},
|
||||
selectCate(index) {
|
||||
this.activeCateIndex = index
|
||||
this.getContentList()
|
||||
},
|
||||
async getContentList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/list/pub/getList',
|
||||
data: {
|
||||
parentId: this.cateList[this.activeCateIndex]._id,
|
||||
keyword: this.keyword
|
||||
}
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
toMySchool() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/user/school'
|
||||
})
|
||||
},
|
||||
async openDownload(id, url) {
|
||||
await vk.callFunction({
|
||||
url: 'client/article/list/pub/addDownload',
|
||||
data: {
|
||||
id
|
||||
}
|
||||
})
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
name: "list",
|
||||
components: {FilePdfOne, FileExcel, FileWord},
|
||||
data() {
|
||||
return {
|
||||
cateList: [],
|
||||
activeCateIndex: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
keyword: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCateList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/category/pub/getList'
|
||||
})
|
||||
this.cateList = rows
|
||||
await this.getContentList()
|
||||
},
|
||||
selectCate(index) {
|
||||
this.activeCateIndex = index
|
||||
this.getContentList()
|
||||
},
|
||||
async getContentList(pageIndex = 1) {
|
||||
const {rows, total} = await vk.callFunction({
|
||||
url: 'client/article/list/pub/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
parentId: this.cateList[this.activeCateIndex]._id,
|
||||
keyword: this.keyword
|
||||
}
|
||||
})
|
||||
this.list = rows
|
||||
this.total = total
|
||||
window.scrollTo({top: 0})
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
|
||||
//padding: 20px;
|
||||
//padding: 20px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
|
||||
.cate {
|
||||
width: 250px;
|
||||
margin-right: 30px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
.cate {
|
||||
width: 250px;
|
||||
margin-right: 30px;
|
||||
.item {
|
||||
width: 100%;
|
||||
padding: 25px 10px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
background-color: #FFFFFF;
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.remark {
|
||||
color: #bbb;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #CB5050;
|
||||
color: white;
|
||||
|
||||
.remark {
|
||||
color: #F2CFCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
.content-item-wrap {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
margin: 30px 0;
|
||||
|
||||
.content {
|
||||
margin-left: 25px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
padding: 25px 10px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
background-color: #FFFFFF;
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.remark {
|
||||
color: #bbb;
|
||||
}
|
||||
.title {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #CB5050;
|
||||
color: white;
|
||||
.desc {
|
||||
font-size: 14px;
|
||||
color: #bbb;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
margin-top: 10px;
|
||||
|
||||
.remark {
|
||||
color: #F2CFCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
.content-item-wrap {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
margin: 30px 0;
|
||||
|
||||
.content {
|
||||
margin-left: 25px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 14px;
|
||||
color: #bbb;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
margin-top: 10px;
|
||||
|
||||
.item {
|
||||
padding: 0 10px;
|
||||
border-right: 2px solid #bbb;
|
||||
}
|
||||
|
||||
:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
:last-child {
|
||||
border-right: none
|
||||
}
|
||||
}
|
||||
}
|
||||
.item {
|
||||
padding: 0 10px;
|
||||
border-right: 2px solid #bbb;
|
||||
}
|
||||
|
||||
:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
:last-child {
|
||||
border-right: none
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,633 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="outter-wrapper">
|
||||
<div class="login-page">
|
||||
<div class="header w-1180 flex-h-ac">
|
||||
<a href="" class="zg-logo fl nuxt-link-active">
|
||||
<img src="@/static/images/logo-small.png" alt="买卖钢材,上金久信">
|
||||
</a>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<div class="w-1180 flex-h-e">
|
||||
<div class="login-container">
|
||||
<h2 style="margin-bottom: 15px;">找回密码</h2>
|
||||
<div id="from" action="">
|
||||
<div class="tabContent">
|
||||
<!--企业用户登录-->
|
||||
<div class="login-con active" id="rc">
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_user"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.mobile"
|
||||
placeholder="请输入手机号" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<input type="text" class="form-control" v-model="form1.code"
|
||||
placeholder="请输入短信验证码" autocomplete="off"/>
|
||||
<div @click="sendSmsCode" id="btnSendCode1" type="button"
|
||||
class="btn-default" value="">{{ smsTips }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.password"
|
||||
placeholder="请输入新密码" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.repassword"
|
||||
placeholder="请再次输入新密码" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-groupp clear">
|
||||
<button @click="handleSubmit" type="submit" id="login" class="btnMarymt"
|
||||
style="width: 100%;">确认密码
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-groupwp clear">
|
||||
<navigator url="/pages/auth/register/register" style="float: left;text-align: left;">
|
||||
免费注册新账号
|
||||
</navigator>
|
||||
<a href="javascript:;" style="float: right;text-align: right;">
|
||||
<navigator url="/pages/auth/login/login" style="float: left;text-align: left;">
|
||||
登录
|
||||
</navigator>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var vk = uni.vk
|
||||
let timer = null
|
||||
let timeS = 60
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
memberType: 'business', // business 企业 、、personal个人
|
||||
loginMethod: 'username', // username 用户名 + 密码 、、mobile 手机号 + 验证码
|
||||
smsTips: '获取验证码',
|
||||
form1: {
|
||||
mobile: '',
|
||||
password: '',
|
||||
repassword: '',
|
||||
code: '',
|
||||
username: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSubmit() {
|
||||
if (this.testForm()) {
|
||||
const {
|
||||
password,
|
||||
mobile,
|
||||
code
|
||||
} = this.form1
|
||||
|
||||
vk.userCenter.resetPasswordByMobile({
|
||||
data: {
|
||||
password,
|
||||
mobile,
|
||||
code
|
||||
},
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
this.$message({
|
||||
message: "密码重置成功",
|
||||
type:'success'
|
||||
})
|
||||
vk.redirectTo({
|
||||
url: '/pages/auth/login/login'
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
sendSmsCode() {
|
||||
if (timer != null) {
|
||||
return
|
||||
}
|
||||
vk.userCenter.sendSmsCode({
|
||||
loading: false,
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
type: 'reset-pwd',
|
||||
},
|
||||
success: (data) => {
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
},
|
||||
loginSuccess() {
|
||||
uni.reLaunch({
|
||||
url: '/'
|
||||
})
|
||||
},
|
||||
testForm() {
|
||||
const {
|
||||
mobile, // 手机号
|
||||
code, // 短信验证码4-8位
|
||||
password, // 密码 6-20位
|
||||
repassword, // 重复输入密码
|
||||
} = this.form1;
|
||||
|
||||
// 手机号验证
|
||||
if (!mobile || !/^1[3456789]\d{9}$/.test(mobile)) {
|
||||
this.$message({
|
||||
message: '手机号为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 短信验证码验证
|
||||
if (!code || !/^\d{4,8}$/.test(code)) {
|
||||
// 短信验证码为空或格式不正确
|
||||
// 处理错误逻辑
|
||||
this.$message({
|
||||
message: '短信验证码为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 密码验证
|
||||
if (!password || password.length < 6 || password.length > 20) {
|
||||
// 密码为空或长度不符合要求
|
||||
this.$message({
|
||||
message: '密码长度不符合要求',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
// 重复输入密码验证
|
||||
if (password !== repassword) {
|
||||
// 两次输入的密码不一致
|
||||
this.$message({
|
||||
message: '两次输入的密码不一致',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
return true
|
||||
|
||||
},
|
||||
},
|
||||
onUnload() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@charset "utf-8";
|
||||
|
||||
.login-method {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
&-item {
|
||||
color: #d0111a;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.outter-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.zg-logo img {
|
||||
width: 230px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.layout-common-footer {
|
||||
text-align: center;
|
||||
margin: 15px 0px 10px;
|
||||
}
|
||||
|
||||
.layout-common-footer .copyright .link > a {
|
||||
color: #666;
|
||||
padding: 0 10px;
|
||||
display: inline-block;
|
||||
line-height: 2
|
||||
}
|
||||
|
||||
.w-1180 {
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flex-h-ac {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
min-width: 1200px;
|
||||
padding: 60px 0;
|
||||
background: #e8f5fd url(/static/images/login-bg.jpg) 50% no-repeat;
|
||||
}
|
||||
|
||||
.flex-h-e,
|
||||
.flex-h-e-ac {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.main-container .login-container {
|
||||
width: 350px;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 35px 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-container h2 {
|
||||
text-align: center;
|
||||
line-height: 2;
|
||||
color: #000;
|
||||
font-size: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.btnMarymt {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
background: #a92924;
|
||||
color: #fff !important;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnMarymt:hover {
|
||||
background: #f12d36
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.input-group-addon {
|
||||
}
|
||||
|
||||
.input-group .form-control {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: none;
|
||||
margin-left: 12px;
|
||||
outline: none;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d4d4d4;
|
||||
margin-bottom: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.input-group-addon i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat center center;
|
||||
width: 38px;
|
||||
border-right: 1px solid #d4d4d4;
|
||||
height: 26px;
|
||||
overflow: hidden;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.input-group-addon .icon_user {
|
||||
background-position: -212px -35px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_phone {
|
||||
background-position: -212px -67px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_password {
|
||||
background-position: -212px -100px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_yaoqingma {
|
||||
background-position: -209px -318px;
|
||||
}
|
||||
|
||||
.input-groupp {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#btnSendCode1 {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
top: 8px;
|
||||
line-height: 31px;
|
||||
color: #d0111a;
|
||||
width: 79px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid;
|
||||
background: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-group.focus {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 11px 0 rgba(0, 0, 0, .04)
|
||||
}
|
||||
|
||||
.input-groupwp {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.input-groupwpg a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-wetChat i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -218px -132px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-qq i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -216px -178px;
|
||||
margin: 0px 24px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-dx i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -215px -224px;
|
||||
}
|
||||
|
||||
.threeBorder {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.threeBorder:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
width: 95%;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
-webkit-transform: scaleY(0.5);
|
||||
transform: scaleY(0.5);
|
||||
-webkit-transform-origin: 0 100%;
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
.threeBorder span {
|
||||
color: #888888;
|
||||
background: #fff;
|
||||
width: 90px;
|
||||
margin: 0 auto;
|
||||
z-index: 1002;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupwpg {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
margin-top: 22px;
|
||||
|
||||
}
|
||||
|
||||
.login-con {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-grouptabs span {
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
padding: 0px 18px;
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.input-grouptabs {
|
||||
text-align: center;
|
||||
margin: 0px auto 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-grouptabs i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#normal i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#nopw i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs #normal i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs #nopw i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs span.tab-active {
|
||||
color: #a92924
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupread {
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.agreement_dialogs {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
display: none;
|
||||
background-color: rgba(35, 35, 35, 0.4);
|
||||
-webkit-transition: all 0.5s linear;
|
||||
transition: all 0.5s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_lay_1syd {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: inline-block;
|
||||
width: 750px;
|
||||
color: #656565;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
background-color: #fff;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_foot_1hHfr {
|
||||
height: 80px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #d5d5d5;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_minorBtn_1u8nf {
|
||||
display: inline-block;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: 1px #316ccb solid;
|
||||
padding: 0 30px;
|
||||
height: 40px;
|
||||
background: #a92924;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
line-height: 40px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
vertical-align: top;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.agreement_titley {
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #d5d5d5;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.agreement_content {
|
||||
margin: 23px 32px;
|
||||
}
|
||||
|
||||
.con-subhead {
|
||||
font-size: 14px;
|
||||
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.con-content {
|
||||
height: 240px;
|
||||
overflow-y: scroll;
|
||||
line-height: 2;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
+591
-538
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,651 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="outter-wrapper">
|
||||
<div class="login-page">
|
||||
<div class="header w-1180 flex-h-ac">
|
||||
<a href="" class="zg-logo fl nuxt-link-active">
|
||||
<img src="@/static/images/logo-small.png" alt="买卖钢材,上金久信">
|
||||
</a>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<div class="w-1180 flex-h-e">
|
||||
<div class="login-container">
|
||||
<h2 style="margin-bottom: 15px;">QQ登录</h2>
|
||||
<template v-if="showBind">
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_user"></i>
|
||||
</div>
|
||||
<input v-model="form1.mobile" type="text" class="form-control" name="mobile"
|
||||
placeholder="请输入手机号" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_phone"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.smsCode" name="smsCode"
|
||||
placeholder="请输入短信验证码" autocomplete="off"/>
|
||||
<view @click="sendSmsCode" id="btnSendCode1" type="button"
|
||||
class="btn-default" value="">{{ smsTips }}
|
||||
</view>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.password" name="password"
|
||||
placeholder="设置登录密码" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.repassword"
|
||||
placeholder="确认登录密码" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-groupp clear">
|
||||
<button @click="handleSubmit" type="submit" id="login" class="btnMarymt"
|
||||
style="width: 100%;">绑定并登录
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Loading} from "element-ui";
|
||||
|
||||
var vk = uni.vk
|
||||
let timer = null
|
||||
let timeS = 60
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showBind: false,
|
||||
smsTips: '获取验证码',
|
||||
form1: {
|
||||
mobile: '',
|
||||
password: '',
|
||||
repassword: '',
|
||||
smsCode: '',
|
||||
username: ''
|
||||
},
|
||||
accountType: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSubmit() {
|
||||
if (this.testForm()) {
|
||||
vk.userCenter.bindMobile({
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
code: this.form1.smsCode,
|
||||
},
|
||||
success: () => {
|
||||
vk.userCenter.resetPwd({
|
||||
data: {
|
||||
password: this.form1.password,
|
||||
},
|
||||
success: () => {
|
||||
vk.redirectTo({url: '/pages/auth/login/login'})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
sendSmsCode() {
|
||||
if (timer != null) {
|
||||
return
|
||||
}
|
||||
vk.userCenter.sendSmsCode({
|
||||
loading: false,
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
type: 'bind',
|
||||
},
|
||||
success: (data) => {
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
},
|
||||
loginSuccess() {
|
||||
uni.reLaunch({
|
||||
url: '/'
|
||||
})
|
||||
},
|
||||
async loginByQQ(code, accountType) {
|
||||
let loadingInstance1 = Loading.service({fullscreen: true, text: '登录中...'});
|
||||
const res = await vk.callFunction({
|
||||
url: 'user/pub/loginByQQ',
|
||||
data: {code, accountType}
|
||||
})
|
||||
loadingInstance1.close()
|
||||
if (res.code === 0) {
|
||||
this.loading = false
|
||||
if (!res.mobileConfirmed) {
|
||||
this.showBind = !res.mobileConfirmed
|
||||
this.accountType = parseInt(accountType)
|
||||
} else this.loginSuccess()
|
||||
}
|
||||
},
|
||||
testForm() {
|
||||
const {
|
||||
mobile, // 手机号
|
||||
smsCode, // 短信验证码4-8位
|
||||
password, // 密码 6-20位
|
||||
repassword, // 重复输入密码
|
||||
} = this.form1;
|
||||
|
||||
// 手机号验证
|
||||
if (!mobile || !/^1[3456789]\d{9}$/.test(mobile)) {
|
||||
this.$message({
|
||||
message: '手机号为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 短信验证码验证
|
||||
if (!smsCode || !/^\d{4,8}$/.test(smsCode)) {
|
||||
// 短信验证码为空或格式不正确
|
||||
// 处理错误逻辑
|
||||
this.$message({
|
||||
message: '短信验证码为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 密码验证
|
||||
if (!password || password.length < 6 || password.length > 20) {
|
||||
// 密码为空或长度不符合要求
|
||||
this.$message({
|
||||
message: '密码长度不符合要求',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+$/
|
||||
if (!reg.test(password)) {
|
||||
this.$message({
|
||||
message: '密码必须由数字和字母组成',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 重复输入密码验证
|
||||
if (password !== repassword) {
|
||||
// 两次输入的密码不一致
|
||||
this.$message({
|
||||
message: '两次输入的密码不一致',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
return true
|
||||
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.state && options.state.includes('jjx')) {
|
||||
this.loginByQQ(options.code, options.state.split('_')[1])
|
||||
} else vk.redirectTo({url: '/pages/index/index'})
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@charset "utf-8";
|
||||
|
||||
.login-method {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
&-item {
|
||||
color: #d0111a;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.outter-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.zg-logo img {
|
||||
width: 230px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.layout-common-footer {
|
||||
text-align: center;
|
||||
margin: 15px 0px 10px;
|
||||
}
|
||||
|
||||
.layout-common-footer .copyright .link > a {
|
||||
color: #666;
|
||||
padding: 0 10px;
|
||||
display: inline-block;
|
||||
line-height: 2
|
||||
}
|
||||
|
||||
.w-1180 {
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flex-h-ac {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
min-width: 1200px;
|
||||
padding: 60px 0;
|
||||
background: #e8f5fd url(/static/images/login-bg.jpg) 50% no-repeat;
|
||||
}
|
||||
|
||||
.flex-h-e,
|
||||
.flex-h-e-ac {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.main-container .login-container {
|
||||
height: 530px;
|
||||
width: 350px;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 35px 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-container h2 {
|
||||
text-align: center;
|
||||
line-height: 2;
|
||||
color: #000;
|
||||
font-size: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.btnMarymt {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
background: #a92924;
|
||||
color: #fff !important;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnMarymt:hover {
|
||||
background: #f12d36
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.input-group-addon {
|
||||
}
|
||||
|
||||
.input-group .form-control {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: none;
|
||||
margin-left: 12px;
|
||||
outline: none;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d4d4d4;
|
||||
margin-bottom: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.input-group-addon i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat center center;
|
||||
width: 38px;
|
||||
border-right: 1px solid #d4d4d4;
|
||||
height: 26px;
|
||||
overflow: hidden;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.input-group-addon .icon_user {
|
||||
background-position: -212px -35px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_phone {
|
||||
background-position: -212px -67px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_password {
|
||||
background-position: -212px -100px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_yaoqingma {
|
||||
background-position: -209px -318px;
|
||||
}
|
||||
|
||||
.input-groupp {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#btnSendCode1 {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
top: 8px;
|
||||
line-height: 31px;
|
||||
color: #d0111a;
|
||||
width: 79px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid;
|
||||
background: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-group.focus {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 11px 0 rgba(0, 0, 0, .04)
|
||||
}
|
||||
|
||||
.input-groupwp {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.input-groupwpg a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-wetChat i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -218px -132px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-qq i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -216px -178px;
|
||||
margin: 0px 24px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-dx i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -215px -224px;
|
||||
}
|
||||
|
||||
.threeBorder {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.threeBorder:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
width: 95%;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
-webkit-transform: scaleY(0.5);
|
||||
transform: scaleY(0.5);
|
||||
-webkit-transform-origin: 0 100%;
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
.threeBorder span {
|
||||
color: #888888;
|
||||
background: #fff;
|
||||
width: 90px;
|
||||
margin: 0 auto;
|
||||
z-index: 1002;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupwpg {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
margin-top: 22px;
|
||||
|
||||
}
|
||||
|
||||
.login-con {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-grouptabs span {
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
padding: 0px 18px;
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.input-grouptabs {
|
||||
text-align: center;
|
||||
margin: 0px auto 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-grouptabs i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#normal i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#nopw i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs #normal i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs #nopw i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs span.tab-active {
|
||||
color: #a92924
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupread {
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.agreement_dialogs {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
display: none;
|
||||
background-color: rgba(35, 35, 35, 0.4);
|
||||
-webkit-transition: all 0.5s linear;
|
||||
transition: all 0.5s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_lay_1syd {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: inline-block;
|
||||
width: 750px;
|
||||
color: #656565;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
background-color: #fff;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_foot_1hHfr {
|
||||
height: 80px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #d5d5d5;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_minorBtn_1u8nf {
|
||||
display: inline-block;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: 1px #316ccb solid;
|
||||
padding: 0 30px;
|
||||
height: 40px;
|
||||
background: #a92924;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
line-height: 40px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
vertical-align: top;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.agreement_titley {
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #d5d5d5;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.agreement_content {
|
||||
margin: 23px 32px;
|
||||
}
|
||||
|
||||
.con-subhead {
|
||||
font-size: 14px;
|
||||
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.con-content {
|
||||
height: 240px;
|
||||
overflow-y: scroll;
|
||||
line-height: 2;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,728 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="outter-wrapper">
|
||||
<div class="login-page">
|
||||
<div class="header w-1180 flex-h-ac">
|
||||
<a href="" class="zg-logo fl nuxt-link-active">
|
||||
<img src="@/static/images/logo-small.png" alt="买卖钢材,上金久信">
|
||||
</a>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<div class="w-1180 flex-h-e">
|
||||
<div class="login-container">
|
||||
<h2 style="margin-bottom: 15px;">手机号绑定</h2>
|
||||
<template v-if="showBind">
|
||||
<div class="input-grouptabs clear">
|
||||
<span @click="form1.accountType = 2"
|
||||
:class="{'tab-active': form1.accountType === 2}" class="nopassword"
|
||||
data-id="1"
|
||||
id="nopw"><i></i>企业用户</span>
|
||||
<span @click="form1.accountType = 1"
|
||||
:class="{'tab-active': form1.accountType === 1}" class="normal" data-id="0"
|
||||
id="normal"><i></i>个人用户</span>
|
||||
</div>
|
||||
<div v-show="form1.accountType === 1" class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.nickname"
|
||||
placeholder="请输入姓名" autocomplete="off">
|
||||
</div>
|
||||
<div v-show="form1.accountType === 2" class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.nickname"
|
||||
placeholder="请输入公司名称" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_user"></i>
|
||||
</div>
|
||||
<input v-model="form1.mobile" type="text" class="form-control" name="mobile"
|
||||
placeholder="请输入手机号" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_phone"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.smsCode" name="smsCode"
|
||||
placeholder="请输入短信验证码" autocomplete="off"/>
|
||||
<view @click="sendSmsCode" id="btnSendCode1" type="button"
|
||||
class="btn-default" value="">{{ smsTips }}
|
||||
</view>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.password" name="password"
|
||||
placeholder="设置登录密码" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.repassword"
|
||||
placeholder="确认登录密码" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.inviteCode"
|
||||
placeholder="请输入邀请码,选填" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-groupread clear">
|
||||
<el-checkbox v-model="agree"></el-checkbox>
|
||||
<label class="ml-20">阅读并同意<a href="javascript:;" style="display: inline-block;"
|
||||
@click="getInfo">
|
||||
<span style="color: #3288b2">《金久信注册协议》</span></a></label>
|
||||
</div>
|
||||
<div class="input-groupp clear">
|
||||
<button @click="handleSubmit" type="submit" id="login" class="btnMarymt"
|
||||
style="width: 100%;">绑定
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="" :visible.sync="dialogVisible" width="40%">
|
||||
<div v-html="info"></div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Loading} from "element-ui";
|
||||
|
||||
var vk = uni.vk
|
||||
let timer = null
|
||||
let timeS = 60
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
agree: false,
|
||||
info: null,
|
||||
showBind: false,
|
||||
smsTips: '获取验证码',
|
||||
form1: {
|
||||
mobile: '',
|
||||
password: '',
|
||||
repassword: '',
|
||||
smsCode: '',
|
||||
username: '',
|
||||
inviteCode: '',
|
||||
accountType: 2,
|
||||
nickname: '',
|
||||
},
|
||||
accountType: null,
|
||||
code: null,
|
||||
loginType: null,
|
||||
uid: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async handleSubmit() {
|
||||
if (!this.agree) {
|
||||
this.$message({
|
||||
message: '请先阅读并同意《金久信注册协议》',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.testForm()) {
|
||||
await vk.callFunction({
|
||||
url: '/client/user/kh/updateLoginInfo',
|
||||
data: {
|
||||
uid: this.uid,
|
||||
accountType: this.form1.accountType,
|
||||
nickname: this.form1.nickname,
|
||||
inviteCode: this.form1.inviteCode,
|
||||
}
|
||||
})
|
||||
vk.userCenter.bindMobile({
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
code: this.form1.smsCode,
|
||||
},
|
||||
success: () => {
|
||||
vk.userCenter.resetPwd({
|
||||
data: {
|
||||
password: this.form1.password,
|
||||
},
|
||||
success: async () => {
|
||||
vk.redirectTo({url: '/pages/auth/login/login'})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
sendSmsCode() {
|
||||
if (timer != null) {
|
||||
return
|
||||
}
|
||||
vk.userCenter.sendSmsCode({
|
||||
loading: false,
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
type: 'bind',
|
||||
},
|
||||
success: (data) => {
|
||||
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
|
||||
}
|
||||
},
|
||||
loginSuccess() {
|
||||
uni.reLaunch({url: '/'})
|
||||
},
|
||||
testForm() {
|
||||
const {
|
||||
mobile, // 手机号
|
||||
smsCode, // 短信验证码4-8位
|
||||
password, // 密码 6-20位
|
||||
repassword, // 重复输入密码
|
||||
nickname
|
||||
} = this.form1;
|
||||
|
||||
// 手机号验证
|
||||
if (!mobile || !/^1[3456789]\d{9}$/.test(mobile)) {
|
||||
this.$message({
|
||||
message: '手机号为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 短信验证码验证
|
||||
if (!smsCode || !/^\d{4,8}$/.test(smsCode)) {
|
||||
// 短信验证码为空或格式不正确
|
||||
// 处理错误逻辑
|
||||
this.$message({
|
||||
message: '短信验证码为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 密码验证
|
||||
if (!password || password.length < 6 || password.length > 20) {
|
||||
// 密码为空或长度不符合要求
|
||||
this.$message({
|
||||
message: '密码长度不符合要求',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+$/
|
||||
if (!reg.test(password)) {
|
||||
this.$message({
|
||||
message: '密码必须由数字和字母组成',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 重复输入密码验证
|
||||
if (password !== repassword) {
|
||||
// 两次输入的密码不一致
|
||||
this.$message({
|
||||
message: '两次输入的密码不一致',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
if (!nickname) {
|
||||
return this.$message({
|
||||
message: '请输入' + (this.form1.accountType === 2 ? '公司名称' : '您的姓名'),
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
return true
|
||||
|
||||
},
|
||||
async getInfo() {
|
||||
const {content} = await vk.callFunction({
|
||||
url: `client/otherArticle/list/pub/getDetail`,
|
||||
data: {id: '65792dc8652341901b34a0bc'}
|
||||
});
|
||||
this.info = content
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
if (options.state && options.state.includes('jjx')) {
|
||||
this.form1.accountType = parseInt(options.state.split('_')[1])
|
||||
if (options.code) {
|
||||
this.code = options.code
|
||||
const {uid, type, mobileConfirmed} = await vk.callFunction({
|
||||
url: 'user/pub/loginByWeixin',
|
||||
data: {
|
||||
code: this.code,
|
||||
accountType: this.form1.accountType,
|
||||
},
|
||||
})
|
||||
this.uid = uid
|
||||
this.showBind = type === "register"
|
||||
if (mobileConfirmed) this.loginSuccess()
|
||||
else this.showBind = true
|
||||
|
||||
} else {
|
||||
this.showBind = !vk.getVuex('$user.userInfo.mobile')
|
||||
}
|
||||
} else this.loginSuccess()
|
||||
},
|
||||
onUnload() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@charset "utf-8";
|
||||
|
||||
.login-method {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
&-item {
|
||||
color: #d0111a;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.outter-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.zg-logo img {
|
||||
width: 230px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.layout-common-footer {
|
||||
text-align: center;
|
||||
margin: 15px 0px 10px;
|
||||
}
|
||||
|
||||
.layout-common-footer .copyright .link > a {
|
||||
color: #666;
|
||||
padding: 0 10px;
|
||||
display: inline-block;
|
||||
line-height: 2
|
||||
}
|
||||
|
||||
.w-1180 {
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flex-h-ac {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
min-width: 1200px;
|
||||
padding: 60px 0;
|
||||
background: #e8f5fd url(/static/images/login-bg.jpg) 50% no-repeat;
|
||||
}
|
||||
|
||||
.flex-h-e,
|
||||
.flex-h-e-ac {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.main-container .login-container {
|
||||
height: 640px;
|
||||
width: 350px;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 35px 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-container h2 {
|
||||
text-align: center;
|
||||
line-height: 2;
|
||||
color: #000;
|
||||
font-size: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.btnMarymt {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
background: #a92924;
|
||||
color: #fff !important;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnMarymt:hover {
|
||||
background: #f12d36
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.input-group-addon {
|
||||
}
|
||||
|
||||
.input-group .form-control {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: none;
|
||||
margin-left: 12px;
|
||||
outline: none;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d4d4d4;
|
||||
margin-bottom: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.input-group-addon i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat center center;
|
||||
width: 38px;
|
||||
border-right: 1px solid #d4d4d4;
|
||||
height: 26px;
|
||||
overflow: hidden;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.input-group-addon .icon_user {
|
||||
background-position: -212px -35px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_phone {
|
||||
background-position: -212px -67px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_password {
|
||||
background-position: -212px -100px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_yaoqingma {
|
||||
background-position: -209px -318px;
|
||||
}
|
||||
|
||||
.input-groupp {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#btnSendCode1 {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
top: 8px;
|
||||
line-height: 31px;
|
||||
color: #d0111a;
|
||||
width: 79px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid;
|
||||
background: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-group.focus {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 11px 0 rgba(0, 0, 0, .04)
|
||||
}
|
||||
|
||||
.input-groupwp {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.input-groupwpg a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-wetChat i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -218px -132px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-qq i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -216px -178px;
|
||||
margin: 0px 24px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-dx i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -215px -224px;
|
||||
}
|
||||
|
||||
.threeBorder {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.threeBorder:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
width: 95%;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
-webkit-transform: scaleY(0.5);
|
||||
transform: scaleY(0.5);
|
||||
-webkit-transform-origin: 0 100%;
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
.threeBorder span {
|
||||
color: #888888;
|
||||
background: #fff;
|
||||
width: 90px;
|
||||
margin: 0 auto;
|
||||
z-index: 1002;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupwpg {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
margin-top: 22px;
|
||||
|
||||
}
|
||||
|
||||
.login-con {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-grouptabs span {
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
padding: 0px 18px;
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.input-grouptabs {
|
||||
text-align: center;
|
||||
margin: 0px auto 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-grouptabs i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#normal i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#nopw i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs #normal i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs #nopw i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs span.tab-active {
|
||||
color: #a92924
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupread {
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.agreement_dialogs {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
display: none;
|
||||
background-color: rgba(35, 35, 35, 0.4);
|
||||
-webkit-transition: all 0.5s linear;
|
||||
transition: all 0.5s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_lay_1syd {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: inline-block;
|
||||
width: 750px;
|
||||
color: #656565;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
background-color: #fff;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_foot_1hHfr {
|
||||
height: 80px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #d5d5d5;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_minorBtn_1u8nf {
|
||||
display: inline-block;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: 1px #316ccb solid;
|
||||
padding: 0 30px;
|
||||
height: 40px;
|
||||
background: #a92924;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
line-height: 40px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
vertical-align: top;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.agreement_titley {
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #d5d5d5;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.agreement_content {
|
||||
margin: 23px 32px;
|
||||
}
|
||||
|
||||
.con-subhead {
|
||||
font-size: 14px;
|
||||
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.con-content {
|
||||
height: 240px;
|
||||
overflow-y: scroll;
|
||||
line-height: 2;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,717 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="outter-wrapper">
|
||||
<div class="login-page">
|
||||
<div class="header w-1180 flex-h-ac">
|
||||
<a href="" class="zg-logo fl nuxt-link-active">
|
||||
<img src="@/static/images/logo-small.png" alt="买卖钢材,上金久信">
|
||||
</a>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<div class="w-1180 flex-h-e">
|
||||
<div class="login-container">
|
||||
<h2 style="margin-bottom: 15px;">手机号绑定</h2>
|
||||
<template v-if="showBind">
|
||||
<div class="input-grouptabs clear">
|
||||
<span @click="form1.accountType = 2"
|
||||
:class="{'tab-active': form1.accountType === 2}" class="nopassword"
|
||||
data-id="1"
|
||||
id="nopw"><i></i>企业用户</span>
|
||||
<span @click="form1.accountType = 1"
|
||||
:class="{'tab-active': form1.accountType === 1}" class="normal" data-id="0"
|
||||
id="normal"><i></i>个人用户</span>
|
||||
</div>
|
||||
<div v-show="form1.accountType === 1" class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.nickname"
|
||||
placeholder="请输入姓名" autocomplete="off">
|
||||
</div>
|
||||
<div v-show="form1.accountType === 2" class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.nickname"
|
||||
placeholder="请输入公司名称" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_user"></i>
|
||||
</div>
|
||||
<input v-model="form1.mobile" type="text" class="form-control" name="mobile"
|
||||
placeholder="请输入手机号" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_phone"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.smsCode" name="smsCode"
|
||||
placeholder="请输入短信验证码" autocomplete="off"/>
|
||||
<view @click="sendSmsCode" id="btnSendCode1" type="button"
|
||||
class="btn-default" value="">{{ smsTips }}
|
||||
</view>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.password" name="password"
|
||||
placeholder="设置登录密码" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_password"></i>
|
||||
</div>
|
||||
<input type="password" class="form-control" v-model="form1.repassword"
|
||||
placeholder="确认登录密码" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-group clear">
|
||||
<div class="input-group-addon">
|
||||
<i class="icon_yaoqingma"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" v-model="form1.inviteCode"
|
||||
placeholder="请输入邀请码,选填" autocomplete="off">
|
||||
</div>
|
||||
<div class="input-groupread clear">
|
||||
<el-checkbox v-model="agree"></el-checkbox>
|
||||
<label class="ml-20">阅读并同意<a href="javascript:;" style="display: inline-block;"
|
||||
@click="getInfo">
|
||||
<span style="color: #3288b2">《金久信注册协议》</span></a></label>
|
||||
</div>
|
||||
<div class="input-groupp clear">
|
||||
<button @click="handleSubmit" type="submit" id="login" class="btnMarymt"
|
||||
style="width: 100%;">绑定
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="" :visible.sync="dialogVisible" width="40%">
|
||||
<div v-html="info"></div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Loading} from "element-ui";
|
||||
|
||||
var vk = uni.vk
|
||||
let timer = null
|
||||
let timeS = 60
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
agree: false,
|
||||
info: null,
|
||||
showBind: false,
|
||||
smsTips: '获取验证码',
|
||||
form1: {
|
||||
mobile: '',
|
||||
password: '',
|
||||
repassword: '',
|
||||
smsCode: '',
|
||||
username: '',
|
||||
inviteCode: '',
|
||||
accountType: 2,
|
||||
nickname: '',
|
||||
},
|
||||
accountType: null,
|
||||
code: null,
|
||||
loginType: null,
|
||||
uid: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async handleSubmit() {
|
||||
if (!this.agree) {
|
||||
this.$message({
|
||||
message: '请先阅读并同意《金久信注册协议》',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.testForm()) {
|
||||
await vk.callFunction({
|
||||
url: '/client/user/kh/updateLoginInfo',
|
||||
data: {
|
||||
uid: this.uid,
|
||||
accountType: this.form1.accountType,
|
||||
nickname: this.form1.nickname,
|
||||
}
|
||||
})
|
||||
vk.userCenter.bindMobile({
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
code: this.form1.smsCode,
|
||||
},
|
||||
success: () => {
|
||||
vk.userCenter.resetPwd({
|
||||
data: {
|
||||
password: this.form1.password,
|
||||
},
|
||||
success: async () => {
|
||||
vk.redirectTo({url: '/pages/auth/login/login'})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
sendSmsCode() {
|
||||
if (timer != null) {
|
||||
return
|
||||
}
|
||||
vk.userCenter.sendSmsCode({
|
||||
loading: false,
|
||||
data: {
|
||||
mobile: this.form1.mobile,
|
||||
type: 'bind',
|
||||
},
|
||||
success: (data) => {
|
||||
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
|
||||
}
|
||||
},
|
||||
loginSuccess() {
|
||||
uni.reLaunch({url: '/'})
|
||||
},
|
||||
testForm() {
|
||||
const {
|
||||
mobile, // 手机号
|
||||
smsCode, // 短信验证码4-8位
|
||||
password, // 密码 6-20位
|
||||
repassword, // 重复输入密码
|
||||
nickname
|
||||
} = this.form1;
|
||||
|
||||
// 手机号验证
|
||||
if (!mobile || !/^1[3456789]\d{9}$/.test(mobile)) {
|
||||
this.$message({
|
||||
message: '手机号为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 短信验证码验证
|
||||
if (!smsCode || !/^\d{4,8}$/.test(smsCode)) {
|
||||
// 短信验证码为空或格式不正确
|
||||
// 处理错误逻辑
|
||||
this.$message({
|
||||
message: '短信验证码为空或格式不正确',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
// 密码验证
|
||||
if (!password || password.length < 6 || password.length > 20) {
|
||||
// 密码为空或长度不符合要求
|
||||
this.$message({
|
||||
message: '密码长度不符合要求',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
// 重复输入密码验证
|
||||
if (password !== repassword) {
|
||||
// 两次输入的密码不一致
|
||||
this.$message({
|
||||
message: '两次输入的密码不一致',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
// 处理错误逻辑
|
||||
}
|
||||
|
||||
if (!nickname) {
|
||||
return this.$message({
|
||||
message: '请输入' + (this.form1.accountType === 2 ? '公司名称' : '您的姓名'),
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
return true
|
||||
|
||||
},
|
||||
async getInfo() {
|
||||
const {content} = await vk.callFunction({
|
||||
url: `client/otherArticle/list/pub/getDetail`,
|
||||
data: {id: '65792dc8652341901b34a0bc'}
|
||||
});
|
||||
this.info = content
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
// if (options.state && options.state.includes('jjx')) {
|
||||
// this.form1.accountType = parseInt(options.state.split('_')[1])
|
||||
// if (options.code) {
|
||||
// this.code = options.code
|
||||
// const {uid, type, mobileConfirmed} = await vk.callFunction({
|
||||
// url: 'user/pub/loginByWeixin',
|
||||
// data: {
|
||||
// code: this.code,
|
||||
// accountType: this.form1.accountType,
|
||||
// },
|
||||
// })
|
||||
// this.uid = uid
|
||||
// this.showBind = type === "register"
|
||||
// if (mobileConfirmed) this.loginSuccess()
|
||||
//
|
||||
// } else {
|
||||
// this.showBind = !vk.getVuex('$user.userInfo.mobile')
|
||||
// }
|
||||
// } else this.loginSuccess()
|
||||
},
|
||||
onUnload() {
|
||||
if (timer != null) {
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@charset "utf-8";
|
||||
|
||||
.login-method {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
&-item {
|
||||
color: #d0111a;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.outter-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.zg-logo img {
|
||||
width: 230px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.layout-common-footer {
|
||||
text-align: center;
|
||||
margin: 15px 0px 10px;
|
||||
}
|
||||
|
||||
.layout-common-footer .copyright .link > a {
|
||||
color: #666;
|
||||
padding: 0 10px;
|
||||
display: inline-block;
|
||||
line-height: 2
|
||||
}
|
||||
|
||||
.w-1180 {
|
||||
width: 1200px;
|
||||
margin: 0px auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flex-h-ac {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
min-width: 1200px;
|
||||
padding: 60px 0;
|
||||
background: #e8f5fd url(/static/images/login-bg.jpg) 50% no-repeat;
|
||||
}
|
||||
|
||||
.flex-h-e,
|
||||
.flex-h-e-ac {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.main-container .login-container {
|
||||
height: 640px;
|
||||
width: 350px;
|
||||
box-sizing: border-box;
|
||||
padding: 30px 35px 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.login-container h2 {
|
||||
text-align: center;
|
||||
line-height: 2;
|
||||
color: #000;
|
||||
font-size: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.btnMarymt {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
background: #a92924;
|
||||
color: #fff !important;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnMarymt:hover {
|
||||
background: #f12d36
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.input-group-addon {
|
||||
}
|
||||
|
||||
.input-group .form-control {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: none;
|
||||
margin-left: 12px;
|
||||
outline: none;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d4d4d4;
|
||||
margin-bottom: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.input-group-addon i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat center center;
|
||||
width: 38px;
|
||||
border-right: 1px solid #d4d4d4;
|
||||
height: 26px;
|
||||
overflow: hidden;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.input-group-addon .icon_user {
|
||||
background-position: -212px -35px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_phone {
|
||||
background-position: -212px -67px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_password {
|
||||
background-position: -212px -100px;
|
||||
}
|
||||
|
||||
.input-group-addon .icon_yaoqingma {
|
||||
background-position: -209px -318px;
|
||||
}
|
||||
|
||||
.input-groupp {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#btnSendCode1 {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
top: 8px;
|
||||
line-height: 31px;
|
||||
color: #d0111a;
|
||||
width: 79px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid;
|
||||
background: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-group.focus {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 11px 0 rgba(0, 0, 0, .04)
|
||||
}
|
||||
|
||||
.input-groupwp {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.input-groupwpg a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-wetChat i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -218px -132px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-qq i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -216px -178px;
|
||||
margin: 0px 24px;
|
||||
}
|
||||
|
||||
.input-groupwpg .dsf-dx i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
background-position: -215px -224px;
|
||||
}
|
||||
|
||||
.threeBorder {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.threeBorder:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
width: 95%;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
-webkit-transform: scaleY(0.5);
|
||||
transform: scaleY(0.5);
|
||||
-webkit-transform-origin: 0 100%;
|
||||
transform-origin: 0 100%;
|
||||
}
|
||||
|
||||
.threeBorder span {
|
||||
color: #888888;
|
||||
background: #fff;
|
||||
width: 90px;
|
||||
margin: 0 auto;
|
||||
z-index: 1002;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupwpg {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
margin-top: 22px;
|
||||
|
||||
}
|
||||
|
||||
.login-con {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.input-grouptabs span {
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
padding: 0px 18px;
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.input-grouptabs {
|
||||
text-align: center;
|
||||
margin: 0px auto 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-grouptabs i {
|
||||
background: url(/static/images/iconsmall.png) no-repeat;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#normal i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs .tab-active#nopw i {
|
||||
background-position: -218px -269px;
|
||||
}
|
||||
|
||||
.input-grouptabs #normal i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs #nopw i {
|
||||
background-position: -218px -293px;
|
||||
}
|
||||
|
||||
.input-grouptabs span.tab-active {
|
||||
color: #a92924
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.input-groupread {
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.agreement_dialogs {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
display: none;
|
||||
background-color: rgba(35, 35, 35, 0.4);
|
||||
-webkit-transition: all 0.5s linear;
|
||||
transition: all 0.5s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_lay_1syd {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: inline-block;
|
||||
width: 750px;
|
||||
color: #656565;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
background-color: #fff;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_foot_1hHfr {
|
||||
height: 80px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
border-top: 1px solid #d5d5d5;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agreement_dialogs .dialog_minorBtn_1u8nf {
|
||||
display: inline-block;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: 1px #316ccb solid;
|
||||
padding: 0 30px;
|
||||
height: 40px;
|
||||
background: #a92924;
|
||||
background: linear-gradient(90deg, #f0242e, #d0111a);
|
||||
line-height: 40px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
vertical-align: top;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.agreement_titley {
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #d5d5d5;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.agreement_content {
|
||||
margin: 23px 32px;
|
||||
}
|
||||
|
||||
.con-subhead {
|
||||
font-size: 14px;
|
||||
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.con-content {
|
||||
height: 240px;
|
||||
overflow-y: scroll;
|
||||
line-height: 2;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
+698
-600
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,439 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<top-bar></top-bar>
|
||||
<common-nav></common-nav>
|
||||
<view class="w-1200">
|
||||
<view class="certificate-container bg-white p-20">
|
||||
<!-- 申请表格 -->
|
||||
<div v-html="content"></div>
|
||||
|
||||
<!-- 出证样板选择 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">出证样板查看</view>
|
||||
</view>
|
||||
|
||||
<!-- 出证方式 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">出证方式</view>
|
||||
<view class="form-content">
|
||||
<el-radio v-model="form.certificateType" label="normal">(正常)出证时效({{ amount }}元/份)</el-radio>
|
||||
<el-radio v-model="form.certificateType" label="urgent">(加急)出证时效({{
|
||||
urgentAmount
|
||||
}}元/份)
|
||||
</el-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 发票类型 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">发票类型</view>
|
||||
<view class="form-content">
|
||||
<el-radio v-model="form.invoiceTypes" label="none">无需开具发票</el-radio>
|
||||
<el-radio v-model="form.invoiceTypes" label="electronic">增值税专用发票(电子发票)</el-radio>
|
||||
<el-radio v-model="form.invoiceTypes" label="normal">普票(电子发票)</el-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 发票抬头 -->
|
||||
<template v-if="form.invoiceTypes !== 'none'">
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">发票抬头</view>
|
||||
<view class="form-content">
|
||||
<el-form :model="form.invoice" label-width="100px">
|
||||
<el-form-item label="名称:" required>
|
||||
<el-input v-model="form.invoice.companyName" placeholder="请输入企业名称或个人姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="税号/证号:" required>
|
||||
<el-input v-model="form.invoice.taxNumber" placeholder="请输入税号或身份证号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行:">
|
||||
<el-input v-model="form.invoice.bankName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户账号:">
|
||||
<el-input v-model="form.invoice.bankAccount"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话:" required>
|
||||
<el-input v-model="form.invoice.phone"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 电子发票接收信息 -->
|
||||
<!-- <view class="form-item mb-20">-->
|
||||
<!-- <view class="form-label">电子发票接收信息</view>-->
|
||||
<!-- <view class="form-content">-->
|
||||
<!-- <el-form :model="form.electronicInvoice" label-width="100px">-->
|
||||
<!-- <el-form-item label="收票人:" required>-->
|
||||
<!-- <el-input v-model="form.electronicInvoice.receiver"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="手机号码:" required>-->
|
||||
<!-- <el-input v-model="form.electronicInvoice.phone"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="邮箱:" required>-->
|
||||
<!-- <el-input v-model="form.electronicInvoice.email"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</template>
|
||||
<!-- 出证交付方式 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">出证交付方式</view>
|
||||
<view class="form-content">
|
||||
<el-checkbox v-model="form.deliveryMethods.electronic" @change="selectEle">电子</el-checkbox>
|
||||
<!-- <el-form v-if="form.deliveryMethods.electronic" :model="form.electronicDelivery" label-width="100px">-->
|
||||
<!-- <el-form-item label="收件人姓名:" class="required">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.receiver"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="手机号码:" class="required">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.phone"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="收件邮箱:" class="required">-->
|
||||
<!-- <el-input v-model="form.electronicDelivery.email"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
|
||||
<el-checkbox v-model="form.deliveryMethods.paper" @change="selectPaper">纸质邮寄</el-checkbox>
|
||||
<el-form v-if="form.deliveryMethods.paper" :model="form.paperDelivery" label-width="100px">
|
||||
<el-form-item label="收件人姓名:" class="required">
|
||||
<el-input v-model="form.paperDelivery.receiver"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码:" class="required">
|
||||
<el-input v-model="form.paperDelivery.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收件地址:" class="required">
|
||||
<el-input v-model="form.paperDelivery.address" placeholder="请输入详细地址"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式 -->
|
||||
<view class="form-item mb-20">
|
||||
<view class="form-label">支付方式</view>
|
||||
<view class="form-content">
|
||||
<el-radio v-model="form.paymentMethod" label="online">在线支付</el-radio>
|
||||
<el-radio v-model="form.paymentMethod" label="advance">公对公支付</el-radio>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="form.paymentMethod === 'advance'" v-html="bankAccount"></view>
|
||||
<!-- 提交按钮 -->
|
||||
<view class="text-center mb-20">
|
||||
<el-button type="primary" @click="submitForm" v-if="form.paymentMethod === 'online'">提交支付</el-button>
|
||||
<vk-data-upload v-else v-model="form.payVoucher" :cloudPathRemoveChinese="false" list-type="text"
|
||||
:limit="1" button-text="上传付款记录"
|
||||
accept=".jpg,.jpeg,.png" :on-success="uploadSuccess" ref="uploader"
|
||||
:show-file-list="false">
|
||||
</vk-data-upload>
|
||||
</view>
|
||||
|
||||
<!-- 客服电话 -->
|
||||
<view class="text-center">
|
||||
<view class="service-phone">客服电话:400 686 5559</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sampleSelected: false,
|
||||
paidConfirm: false,
|
||||
hasReport: false,
|
||||
certificateType: 'normal',
|
||||
lawPrice: '100',
|
||||
agreementPrice: '150',
|
||||
invoiceTypes: 'none',
|
||||
invoice: {
|
||||
companyName: '',
|
||||
taxNumber: '',
|
||||
bankName: '',
|
||||
bankAccount: '',
|
||||
phone: ''
|
||||
},
|
||||
electronicInvoice: {
|
||||
receiver: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
},
|
||||
deliveryMethods: {
|
||||
electronic: true,
|
||||
paper: false
|
||||
},
|
||||
electronicDelivery: {
|
||||
receiver: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
},
|
||||
paperDelivery: {
|
||||
receiver: '',
|
||||
phone: '',
|
||||
address: ''
|
||||
},
|
||||
paymentMethod: 'online',
|
||||
payVoucher: ''
|
||||
},
|
||||
contractId: null,
|
||||
transactionId: null,
|
||||
amount: null,
|
||||
urgentAmount: null,
|
||||
content: null,
|
||||
bankAccount: null,
|
||||
|
||||
}
|
||||
},
|
||||
onLoad({contractId, transactionId,}) {
|
||||
this.contractId = contractId;
|
||||
this.transactionId = transactionId;
|
||||
this.getContent()
|
||||
this.getAmount()
|
||||
this.getUrgentAmount()
|
||||
this.getUserInfo()
|
||||
this.getBankAccount()
|
||||
},
|
||||
methods: {
|
||||
async getUserInfo() {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
this.form.invoice.companyName = userInfo.accountType === 2 ? userInfo.company.companyName : userInfo.person.personName
|
||||
this.form.invoice.taxNumber = userInfo.accountType === 2 ? userInfo.company.organization : userInfo.person.idCard
|
||||
this.form.invoice.phone = userInfo.accountType === 2 ? userInfo.company.mobile : userInfo.person.mobile
|
||||
},
|
||||
async getContent() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'e647148e684a458a0295b0a239c3d539'
|
||||
},
|
||||
})
|
||||
this.content = res.content
|
||||
},
|
||||
async getAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'd77d384f684a47b6029a135220ecf4c9'
|
||||
},
|
||||
})
|
||||
this.amount = res.content
|
||||
},
|
||||
async getUrgentAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '8524406c684a47c402985cb55941b3cb'
|
||||
},
|
||||
})
|
||||
this.urgentAmount = res.content
|
||||
},
|
||||
uploadSuccess(response, file, fileList) {
|
||||
this.form.payVoucher = response.url;
|
||||
this.submitForm()
|
||||
},
|
||||
submitForm() {
|
||||
// 表单验证
|
||||
if (!this.validateForm()) {
|
||||
return;
|
||||
}
|
||||
if (this.form.certificateType === 'normal') {
|
||||
this.form.amount = this.amount;
|
||||
} else {
|
||||
this.form.amount = this.urgentAmount;
|
||||
}
|
||||
this.$confirm(`司法调证服务需向数据中心付费(${this.form.amount}元/次),是否继续?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
// 提交表单
|
||||
this.form.contractId = this.contractId;
|
||||
this.form.contractNo = this.transactionId;
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/certificateAdd',
|
||||
title: '提交中...',
|
||||
data: this.form,
|
||||
success: async (res) => {
|
||||
this.$message({
|
||||
message: '申请提交成功',
|
||||
type: 'success'
|
||||
});
|
||||
if (this.form.paymentMethod === 'online') {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/contract/kh/buy',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: this.contractId,
|
||||
contractNo: this.transactionId,
|
||||
amount: this.form.amount
|
||||
},
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请等待后台审核',
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
||||
vk.navigateTo({
|
||||
url: `/pages/contract/index?tab=2`
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
validateForm() {
|
||||
// 验证必填项
|
||||
// if (this.form.deliveryMethods.electronic) {
|
||||
// if (!this.form.electronicDelivery.receiver) {
|
||||
// this.$message.error('请填写电子发送邮箱的收件人姓名');
|
||||
// return false;
|
||||
// }
|
||||
// if (!this.form.electronicDelivery.phone) {
|
||||
// this.$message.error('请填写电子发送邮箱的手机号码');
|
||||
// return false;
|
||||
// }
|
||||
// if (!this.form.electronicDelivery.email) {
|
||||
// this.$message.error('请填写电子发送邮箱的收件邮箱');
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (this.form.deliveryMethods.paper) {
|
||||
if (!this.form.paperDelivery.receiver) {
|
||||
this.$message.error('请填写纸质邮寄的收件人姓名');
|
||||
return false;
|
||||
}
|
||||
if (!this.form.paperDelivery.phone) {
|
||||
this.$message.error('请填写纸质邮寄的手机号码');
|
||||
return false;
|
||||
}
|
||||
if (!this.form.paperDelivery.address) {
|
||||
this.$message.error('请填写纸质邮寄的收件地址');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
selectEle(e) {
|
||||
if (e) {
|
||||
this.form.deliveryMethods.electronic = true;
|
||||
this.form.deliveryMethods.paper = false;
|
||||
} else {
|
||||
this.form.deliveryMethods.electronic = false;
|
||||
this.form.deliveryMethods.paper = true;
|
||||
}
|
||||
},
|
||||
selectPaper(e) {
|
||||
if (!e) {
|
||||
this.form.deliveryMethods.electronic = true;
|
||||
this.form.deliveryMethods.paper = false;
|
||||
} else {
|
||||
this.form.deliveryMethods.electronic = false;
|
||||
this.form.deliveryMethods.paper = true;
|
||||
}
|
||||
},
|
||||
async getBankAccount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'b5ad93e068f343230344c7b63cb1aac5'
|
||||
},
|
||||
})
|
||||
this.bankAccount = res.content
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.certificate-container {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.certificate-table {
|
||||
width: 100%;
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
th, td {
|
||||
border: 1px solid #dcdfe6;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notice {
|
||||
border: 1px solid #dcdfe6;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
|
||||
.notice-title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.notice-item {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.form-label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.form-content {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.required ::v-deep .el-form-item__label:before {
|
||||
content: '*';
|
||||
color: #f56c6c;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.service-phone {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
+1942
-501
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="border-bottom pt-20">
|
||||
<el-form ref="form" :model="form1" label-width="80px" :rules="form1.props.rules">
|
||||
<el-form ref="form" :model="form1" label-width="140px" :rules="form1.props.rules">
|
||||
<view class="flex flex-wrap justify-start items-start">
|
||||
<view class="w-25p">
|
||||
<el-form-item label="商品名称">
|
||||
@@ -15,49 +15,51 @@
|
||||
</el-form-item>
|
||||
</view>
|
||||
<view class="w-25p" v-for="(item, index) in goodsAttributes" :key="index">
|
||||
<el-form-item :label="item.label">
|
||||
<el-select v-model="form1.data.model[item.label]" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item, index) in item.values"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-if="goodsAttributes && goodsAttributes.length > 0">
|
||||
<el-form-item :label="item.label" v-if="item.label">
|
||||
<el-select v-model="form1.data.model[index].value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(value, valueIndex) in item.values" :key="valueIndex" :label="value"
|
||||
:value="value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="单件长度">
|
||||
<el-input placeholder="请输入内容" v-model="form1.data.singleLength" class="input-with-select">
|
||||
<el-select v-model="form1.data.singleLengthUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单件长度')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单件长度').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="材质">
|
||||
<el-select v-model="form1.data.materialQuality" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '材质')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '材质').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="10">-->
|
||||
<!-- <el-form-item label="单件长度">-->
|
||||
<!-- <el-input placeholder="请输入内容" v-model="form1.data.singleLength" class="input-with-select"-->
|
||||
<!-- type="number">-->
|
||||
<!-- <template slot="append">米</template>-->
|
||||
<!--<!– <el-select v-model="form1.data.singleLengthUnit" slot="append" placeholder="请选择">–>-->
|
||||
<!--<!– <template v-if=" attributes.find(attr => attr.label === '单件长度')">–>-->
|
||||
<!--<!– <el-option–>-->
|
||||
<!--<!– v-for="(item, index) in attributes.find(attr => attr.label === '单件长度').options"–>-->
|
||||
<!--<!– :key="index"–>-->
|
||||
<!--<!– :label="item.label"–>-->
|
||||
<!--<!– :value="item.value">–>-->
|
||||
<!--<!– </el-option>–>-->
|
||||
<!--<!– </template>–>-->
|
||||
<!--<!– </el-select>–>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="6">-->
|
||||
<!-- <el-form-item label="尺寸">-->
|
||||
<!-- <el-select v-model="form1.data.materialQuality" placeholder="请选择">-->
|
||||
<!-- <template v-if=" attributes.find(attr => attr.label === '尺寸')">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="(item, index) in attributes.find(attr => attr.label === '尺寸').options"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交货服务">
|
||||
<el-select v-model="form1.data.deliverService" placeholder="请选择">
|
||||
@@ -72,24 +74,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购数量">
|
||||
<el-input v-model="form1.data.procureNumber" class="input-with-select">
|
||||
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单位')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单位').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计价形式">
|
||||
<el-select v-model="form1.data.pricingForm" placeholder="请选择">
|
||||
@@ -106,53 +90,38 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交货时限">
|
||||
<el-date-picker
|
||||
v-model="form1.data.deliveryTime"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购数量">
|
||||
<el-input v-model="form1.data.procureNumber" class="input-with-select" type="number">
|
||||
<el-select v-model="form1.data.procureUnit" slot="append" placeholder="请选择">
|
||||
<template v-if=" attributes.find(attr => attr.label === '单位')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '单位').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item label="交货地点" class="ml-10">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
<!-- <span slot="prefix">省</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">市</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
|
||||
<template v-if="provinceIndex !== null && cityIndex !== null">
|
||||
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
|
||||
:key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
<!-- <span slot="prefix">区/县</span>-->
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form1.data.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="装货、卸货费用承担">
|
||||
<el-select v-model="form1.data.loadPaidBy" placeholder="请选择" style="width: 100%">
|
||||
<template v-if="attributes.find(attr => attr.label === '装货、卸货费用承担')">
|
||||
<el-option
|
||||
v-for="(item, index) in attributes.find(attr => attr.label === '装货、卸货费用承担').options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.label">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</view>
|
||||
</template>
|
||||
@@ -183,6 +152,11 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
@@ -211,6 +185,7 @@ export default {
|
||||
deliverService: null,
|
||||
standard: null,
|
||||
pricingForm: null,
|
||||
loadPaidBy: '供货方承担装车费用,采购方承担卸货费用',
|
||||
deliveryTime: null,
|
||||
len: null,
|
||||
extraAttributes: {},
|
||||
@@ -277,8 +252,6 @@ export default {
|
||||
} else {
|
||||
this.form1.props.columns[2].columns = []
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -499,6 +472,7 @@ export default {
|
||||
getGoodsList() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/template/pub/getList',
|
||||
pageSize: 500,
|
||||
title: '请求中',
|
||||
success: ({rows}) => {
|
||||
this.goodsList = rows
|
||||
@@ -506,10 +480,17 @@ export default {
|
||||
})
|
||||
},
|
||||
selectGoods(val) {
|
||||
this.form1.data.model = []
|
||||
this.goodsList.forEach(({_id, name, extraAttributes}) => {
|
||||
if (_id === val) {
|
||||
this.form1.data.goodsName = name
|
||||
this.goodsAttributes = extraAttributes
|
||||
this.goodsAttributes.forEach(attr => {
|
||||
if (attr.label) this.form1.data.model.push({
|
||||
label: attr.label,
|
||||
value: null
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -525,13 +506,19 @@ export default {
|
||||
|
||||
},
|
||||
watch: {
|
||||
"form1.data"(val) {
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
"form1.data": {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
this.$emit('input', val)
|
||||
console.log("this.$emit('input', val.data)");
|
||||
}
|
||||
},
|
||||
value(val) {
|
||||
this.form1.data = val
|
||||
console.log("this.form1.data = val", val);
|
||||
value: {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
this.form1.data = val
|
||||
console.log("this.form1.data = val", val);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -547,7 +534,7 @@ export default {
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/deep/ .input-with-select .el-input-group__append {
|
||||
::v-deep .input-with-select .el-input-group__append {
|
||||
background-color: #fff !important;
|
||||
width: 130px !important;
|
||||
}
|
||||
|
||||
+874
-462
File diff suppressed because it is too large
Load Diff
+505
-493
File diff suppressed because it is too large
Load Diff
+219
-236
@@ -1,42 +1,43 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布询价单</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
<view class="carousel">
|
||||
<!-- <el-carousel height="170px">-->
|
||||
<!-- <el-carousel-item v-for="item in 4" :key="item">-->
|
||||
<!-- <image class="carousel-img"-->
|
||||
<!-- src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"-->
|
||||
<!-- mode="aspectFill"></image>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="enquiry-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布询价单</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -45,237 +46,219 @@ import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
queryForm1: {
|
||||
formData: {
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
columns: [
|
||||
{key: "userId", title: "发布人ID", type: "text", width: 160, mode: "="},
|
||||
]
|
||||
},
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/sheet/pub/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('').then(() => {
|
||||
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "productList",
|
||||
title: "品名/材质",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item => `${item.goodsName}(${item.materialQuality})`).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "采购量",
|
||||
type: "text",
|
||||
width: 100,
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.map(item => item.procureNumber + item.procureUnit).join("/")
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let fullAddress = ""
|
||||
try {
|
||||
let provinceIndex = 0, cityIndex = 0, areaIndex = 0
|
||||
this.provinceData.forEach((item, index) => {
|
||||
if (row.productList[0].addressRegion !== undefined && parseInt(row.productList[0].addressRegion[0]) === parseInt(item.code)) {
|
||||
provinceIndex = index
|
||||
fullAddress = item.name
|
||||
}
|
||||
})
|
||||
this.cityData[provinceIndex].forEach((item, index) => {
|
||||
if (row.productList[0].addressRegion !== undefined && parseInt(row.productList[0].addressRegion[1]) === parseInt(item.code)) {
|
||||
cityIndex = index
|
||||
fullAddress += item.name
|
||||
}
|
||||
})
|
||||
this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
|
||||
if (row.productList[0].addressRegion !== undefined && parseInt(row.productList[0].addressRegion[2]) === parseInt(item.code)) {
|
||||
areaIndex = index
|
||||
fullAddress += item.name
|
||||
}
|
||||
})
|
||||
fullAddress += row.productList[0].addressDetail
|
||||
} catch (err) {
|
||||
fullAddress = ""
|
||||
}
|
||||
|
||||
return fullAddress
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "user",
|
||||
title: "采购单位",
|
||||
type: "text",
|
||||
width: 280,
|
||||
formatter: (val, row, column, index) => {
|
||||
if (val.accountType == 1) {
|
||||
return val.person.personName
|
||||
} else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
// {
|
||||
// key: "_add_time_srt",
|
||||
// title: "添加时间",
|
||||
// type: "time",
|
||||
// width: 160
|
||||
// },
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
queryForm1: {
|
||||
formData: {
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
columns: [
|
||||
{key: "userId", title: "发布人ID", type: "text", width: 160, mode: "="},
|
||||
]
|
||||
},
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/sheet/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('如果你要删除此条信息,之前其他客户填写的留言将无法查看', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "enquiryNo",
|
||||
title: "单号",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "title",
|
||||
title: "品名/材质",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "采购量",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
if (row.fillType === 0) return val.map(item => (item.procureNumber ? item.procureNumber : '') + (item.procureUnit ? item.procureUnit : '')).join("/")
|
||||
else return row.procureUnit ? `${row.procureNumber}${row.procureUnit}` : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "addressRegion",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
let fullAddress = (val && val.province) ? `${val.province.name}${val.city.name}${val.area.name}` : ''
|
||||
if (row.addressDetail) fullAddress += ` ${row.addressDetail}`
|
||||
return fullAddress
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "user",
|
||||
title: "采购单位",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
if (!val) return ''
|
||||
if (val.accountType == 1) {
|
||||
return val.person.personName
|
||||
} else {
|
||||
return val.company.companyName
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "quoteNum",
|
||||
title: "报价数",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}家已报价`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+352
-165
@@ -1,196 +1,383 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/enquiry/list">询价单</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="true"
|
||||
label-width="140px"
|
||||
@success="onFormSuccess"
|
||||
></vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/enquiry/list">询价单</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="enquiry" :id="enquiryId"/>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
采购商信息
|
||||
</view>
|
||||
<text class="tip-text ml-10">(注册可查看信息)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">项目名称:{{ sheet.projectName ? sheet.projectName : '' }}</view>
|
||||
<view class="mt-15">项目地址:{{ sheet.fullAddress ? sheet.fullAddress : '' }}</view>
|
||||
<template v-if="canViewBuyerInfo">
|
||||
<view class="mt-15" v-if="sheet.companyName">公司信息:{{
|
||||
sheet.companyName ? sheet.companyName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.companyMobile">公司联系方式:{{
|
||||
sheet.companyMobile ? sheet.companyMobile : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15">授权业务咨询人:{{
|
||||
sheet.businessName ? sheet.businessName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15">业务咨询联系方式:{{
|
||||
sheet.businessMobile ? sheet.businessMobile : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="mt-15" v-if="sheet.companyName">公司信息:{{
|
||||
sheet.companyName ? sheet.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.companyMobile">公司联系方式:{{
|
||||
sheet.companyMobile ? sheet.companyMobile.replace(/^(.)(.)(.).*$/, "$1$2$3****") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15">授权业务咨询人:{{
|
||||
sheet.businessName ? sheet.businessName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15">业务咨询联系方式:{{
|
||||
sheet.businessMobile ? sheet.businessMobile.replace(/^(.)(.)(.).*$/, "$1$2$3****") : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="false"
|
||||
:need-alert="false"
|
||||
:show-cancel="false"
|
||||
label-width="160px"
|
||||
@success="onFormSuccess"
|
||||
@fail="onFormFail"
|
||||
>
|
||||
<template v-slot:totalPrice>
|
||||
<el-input v-model="form1.data.totalPrice" placeholder="请输入货款总价"
|
||||
@change="formatNumber"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "number"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{required: true, message: "text不能为空", trigger: "change"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
userLevel: 0
|
||||
},
|
||||
sheet: {
|
||||
files: [],
|
||||
multiFiles: [],
|
||||
quoteList: [],
|
||||
transportDocuments: [],
|
||||
productList: [],
|
||||
user: {},
|
||||
fullAddress: ''
|
||||
},
|
||||
enquiryId: null,
|
||||
reloaded: false,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null,
|
||||
totalPrice: null,
|
||||
files: [],
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/enquiry/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "货款总价(人民币:元)",
|
||||
type: "html"
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
enquiryId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = enquiryId
|
||||
this.form1.data.sheetId = enquiryId
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.navigateBack()
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
center: true
|
||||
}).then(res => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
res.data.productList.forEach(item => {
|
||||
item.unitPrice = 0
|
||||
const keys = Object.keys(item.extraAttributes)
|
||||
keys.forEach(citem => {
|
||||
item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
citem])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
this.sheet = res.data
|
||||
}
|
||||
});
|
||||
// {key: "totalPrice", title: "货款总价(人民币:元)", type: "number", precision: 2},
|
||||
{
|
||||
key: "files",
|
||||
title: "附件",
|
||||
type: "file",
|
||||
accept: '.pdf',
|
||||
tips: '仅支持纵向PDF文档,报价附件将生成标准合同附件,请认真审阅。'
|
||||
},
|
||||
{key: "remark", title: "报价单详情", type: "textarea"},
|
||||
{key: "supplierExt", title: "供应商合同补充条款", type: "textarea", autosize: {minRows: 4, maxRows: 10},},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
totalPrice: [
|
||||
{required: true, message: "货款总价不能为空", trigger: "change,blur"},
|
||||
],
|
||||
files: [
|
||||
{required: true, message: "附件不能为空", trigger: "change,blur"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
const {
|
||||
enquiryId
|
||||
} = options
|
||||
if (!enquiryId) {
|
||||
vk.navigateTo('/pages/process/sheet/list');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = enquiryId
|
||||
this.form1.data.sheetId = enquiryId
|
||||
this.userInfo = vk.getVuex('$user.userInfo') || {userLevel: 0}
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
isLoggedIn() {
|
||||
return !!vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
|
||||
canViewBuyerInfo() {
|
||||
const remainQuoteNum = Number(this.userInfo && this.userInfo.remainQuoteNum) || 0
|
||||
const quoteExpiredAt = this.userInfo && this.userInfo.quoteExpiredAt
|
||||
const monthlyQuoteActive = !!(quoteExpiredAt && dayjs(quoteExpiredAt).isAfter(dayjs()))
|
||||
return this.isLoggedIn && (
|
||||
this.sheet.isMine ||
|
||||
this.sheet.hasQuote ||
|
||||
Number(this.userInfo.userLevel) > 0 ||
|
||||
remainQuoteNum > 0 ||
|
||||
monthlyQuoteActive
|
||||
)
|
||||
},
|
||||
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
normalizeSheet(data = {}) {
|
||||
return {
|
||||
files: [],
|
||||
multiFiles: [],
|
||||
quoteList: [],
|
||||
transportDocuments: [],
|
||||
productList: [],
|
||||
user: {},
|
||||
fullAddress: '',
|
||||
...data,
|
||||
files: Array.isArray(data.files) ? data.files : [],
|
||||
multiFiles: Array.isArray(data.multiFiles) ? data.multiFiles : [],
|
||||
quoteList: Array.isArray(data.quoteList) ? data.quoteList : [],
|
||||
transportDocuments: Array.isArray(data.transportDocuments) ? data.transportDocuments : [],
|
||||
productList: Array.isArray(data.productList) ? data.productList : [],
|
||||
user: data.user || {},
|
||||
}
|
||||
},
|
||||
onFormSuccess() {
|
||||
vk.redirectTo({url: `/pages/enquiry/detail?id=${this.enquiryId}`})
|
||||
},
|
||||
onFormFail(data) {
|
||||
if (data.data.code === 12) {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.redirectTo({url: `/pages/user/user?menu=grade`})
|
||||
})
|
||||
} else {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.remainQuoteNum === 0 || !userInfo.remainQuoteNum) {
|
||||
|
||||
}
|
||||
|
||||
// this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning',
|
||||
// center: true
|
||||
// }).then(res => {
|
||||
//
|
||||
// })
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = this.normalizeSheet(res.data)
|
||||
this.sheet.fullAddress = (this.sheet.addressRegion && this.sheet.addressRegion.province) ? `${this.sheet.addressRegion.province.name}${this.sheet.addressRegion.city.name}${this.sheet.addressRegion.area.name}` : ''
|
||||
if (this.sheet.addressRegion && this.sheet.addressRegion.addressDetail) {
|
||||
this.sheet.fullAddress += this.sheet.addressRegion.addressDetail
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
formatNumber(e) {
|
||||
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.item-wrap + .el-form {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.quote-form {
|
||||
width: 260px;
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布询价单</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/enquiry/quote/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/enquiry/detail?id=' + item.sheetId);
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "sheet.title",
|
||||
title: "供应标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}元`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
title: "状态",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '待选商'},
|
||||
{value: 1, label: '已被选商'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/enquiry/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+1205
-889
File diff suppressed because it is too large
Load Diff
+1397
-1044
File diff suppressed because it is too large
Load Diff
+654
-386
File diff suppressed because it is too large
Load Diff
+960
-426
File diff suppressed because it is too large
Load Diff
+260
-206
@@ -1,236 +1,290 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布旧货交易</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="carousel">
|
||||
<!-- <el-carousel height="170px">-->
|
||||
<!-- <el-carousel-item v-for="item in 4" :key="item">-->
|
||||
<!-- <image class="carousel-img"-->
|
||||
<!-- src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"-->
|
||||
<!-- mode="aspectFill"></image>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="old-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布旧货交易</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns" :customRightBtns="table1.customRightBtns"
|
||||
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true" :query-form-param="queryForm1"></vk-data-table>
|
||||
</view>
|
||||
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
queryForm1: {
|
||||
formData: {
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
columns: [
|
||||
{ key:"userId", title:"发布人ID", type:"text", width:160, mode:"=" },
|
||||
]
|
||||
},
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/old/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/index/old/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('').then(()=> {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
queryForm1: {
|
||||
formData: {
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
columns: [
|
||||
{key: "userId", title: "发布人ID", type: "text", width: 160, mode: "="},
|
||||
]
|
||||
},
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/old/kh/getList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/index/old/detail?id=' + item._id);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('如果你要删除此条信息,之前其他客户填写的留言将无法查看', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/old/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
},
|
||||
show: (item) => {
|
||||
console.log(item.status)
|
||||
return item.status === 0
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
width: 280
|
||||
},
|
||||
{
|
||||
key: "addressRegion",
|
||||
title: "所在地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
if (row.type === 1) str = (row.deliverAddressRegion && row.deliverAddressRegion.city) ? (row.deliverAddressRegion.province.name + "-" + row.deliverAddressRegion.city.name) : ''
|
||||
else str = (row.addressRegion && row.addressRegion.city) ? (row.addressRegion.province.name + "-" + row.addressRegion.city.name) : ''
|
||||
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/old/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "标题",
|
||||
title: "title",
|
||||
type: "text",
|
||||
width: 280
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "所在地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
str = val.map(item=>{
|
||||
return item.addressRegion[0].name + "-" + item.addressRegion[1].name
|
||||
}).join("/")
|
||||
} catch(err){
|
||||
str = ""
|
||||
}
|
||||
// if (row.type === 2) {
|
||||
// str = row.offerAddressRegion.province.name + row.offerAddressRegion.city.name + row.offerAddressRegion.area.name
|
||||
// } else if (row.type === 1) {
|
||||
// str = row.deliverAddressRegion.province.name + row.deliverAddressRegion.city.name + row.deliverAddressRegion.area.name
|
||||
// } else {
|
||||
// str = val.province.name + val.city.name + val.area.name
|
||||
// }
|
||||
} catch (err) {
|
||||
str = ""
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "supplier.companyName",
|
||||
title: "供应商",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_srt",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
return str
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "quoteNum",
|
||||
title: "报价数",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}家已报价`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "type",
|
||||
title: "类型",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '拍卖'},
|
||||
{value: 1, label: '采购'},
|
||||
{value: 2, label: '租赁'},
|
||||
{value: 3, label: '物资回收'},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// key: "supplier",
|
||||
// title: "供应商",
|
||||
// type: "text",
|
||||
// formatter: (val, row, column, index) => {
|
||||
// console.log(val.companyName, val.companyName === '')
|
||||
// if (val.companyName && val.companyName !== '') return val.companyName
|
||||
// else return val.personName
|
||||
// // console.log((val.companyName && val.companyName !== ''), val.companyName)
|
||||
// // return ((val.companyName && val.companyName !== '') ? val.companyName : val.personName)
|
||||
// }
|
||||
// },
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
},
|
||||
methods: {
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/index/old/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/old/release'
|
||||
})
|
||||
}
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+585
-490
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,429 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/index/old/old">旧货交易</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="old" :id="id"/>
|
||||
<template v-if="sheet.type === 1">
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
采购商信息
|
||||
</view>
|
||||
<text class="tip-text ml-10">(注册可查看信息)</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="isLoggedIn && (sheet.isMine || sheet.hasQuote || userInfo.userLevel > 0)">
|
||||
<view class="mt-15" v-if="sheet.buyer.companyName">公司信息:{{
|
||||
sheet.buyer.companyName ? sheet.buyer.companyName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.contract">公司联系方式:{{
|
||||
sheet.buyer.contract ? sheet.buyer.contract : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.personalName">个人信息:{{
|
||||
sheet.buyer.personalName ? sheet.buyer.personalName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.personalContract">个人联系方式:{{
|
||||
sheet.buyer.personalContract ? sheet.buyer.personalContract : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.managerName">授权人姓名:{{
|
||||
sheet.buyer.managerName ? sheet.buyer.managerName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.managerContract">授权联系方式:{{
|
||||
sheet.buyer.managerContract ? sheet.buyer.managerContract : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="mt-15" v-if="sheet.buyer.companyName">公司信息:{{
|
||||
sheet.buyer.companyName ? sheet.buyer.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.contract">公司联系方式:{{
|
||||
sheet.buyer.contract ? (sheet.buyer.contract.slice(0, 3) + '*'.repeat(sheet.buyer.contract.length - 7) + sheet.buyer.contract.slice(-4)) : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.personalName">个人信息:{{
|
||||
sheet.buyer.personalName ? sheet.buyer.personalName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.personalContract">个人联系方式:{{
|
||||
sheet.buyer.personalContract ? sheet.buyer.personalContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.managerName">授权人姓名:{{
|
||||
sheet.buyer.managerName ? sheet.buyer.managerName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.buyer.managerContract">授权联系方式:{{
|
||||
sheet.buyer.managerContract ? sheet.buyer.managerContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
{{ sheet.type === 3 ? '回收单位信息' : '供货商信息' }}
|
||||
</view>
|
||||
<text class="tip-text ml-10">(注册可查看信息)</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="isLoggedIn && (sheet.isMine || sheet.hasQuote || userInfo.userLevel > 0)">
|
||||
<view class="mt-15" v-if="sheet.supplier.companyName">公司信息:{{
|
||||
sheet.supplier.companyName ? sheet.supplier.companyName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.contract">公司联系方式:{{
|
||||
sheet.supplier.contract ? sheet.supplier.contract : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.personalName">个人信息:{{
|
||||
sheet.supplier.personalName ? sheet.supplier.personalName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.personalContract">
|
||||
个人联系方式:{{
|
||||
sheet.supplier.personalContract ? sheet.supplier.personalContract : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.managerName">授权人姓名:{{
|
||||
sheet.supplier.managerName ? sheet.supplier.managerName : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.managerContract">授权联系方式:{{
|
||||
sheet.supplier.managerContract ? sheet.supplier.managerContract : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="mt-15" v-if="sheet.supplier.companyName">公司信息:{{
|
||||
sheet.supplier.companyName ? sheet.supplier.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.contract">公司联系方式:{{
|
||||
sheet.supplier.contract ? (sheet.supplier.contract.slice(0, 3) + '*'.repeat(sheet.supplier.contract.length - 7) + sheet.supplier.contract.slice(-4)) : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.personalName">个人信息:{{
|
||||
sheet.supplier.personalName ? sheet.supplier.personalName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.personalContract">
|
||||
个人联系方式:{{
|
||||
sheet.supplier.personalContract ? sheet.supplier.personalContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.managerName">授权人姓名:{{
|
||||
sheet.supplier.managerName ? sheet.supplier.managerName.replace(/^(.).*(.)$/, "$1***$2") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="sheet.supplier.managerContract">授权联系方式:{{
|
||||
sheet.supplier.managerContract ? sheet.supplier.managerContract.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="false"
|
||||
label-width="140px"
|
||||
:show-cancel="false"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<template v-slot:totalPrice>
|
||||
<el-input v-if="sheet.type === 2 && sheet.rentType === 1" v-model="form1.data.totalPrice"
|
||||
placeholder="请输入询价内容"/>
|
||||
<el-input v-else v-model="form1.data.totalPrice" placeholder="请输入总价"
|
||||
@change="formatNumber"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
userInfo: {
|
||||
userLevel: -1
|
||||
},
|
||||
sheet: {
|
||||
buyer: {},
|
||||
supplier: {}
|
||||
},
|
||||
reloaded: false,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null,
|
||||
files: []
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/old/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "totalPrice", title: "总价(人民币:元)", type: "number", showRule: () => {
|
||||
return this.sheet.type !== 0 && (this.sheet.type !== 2 || (this.sheet.type === 2 && this.sheet.rentType === 0))
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "unit", title: "计价单位", type: "text", showRule: () => {
|
||||
return this.sheet.type === 0
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "totalPrice", title: "单价(人民币:元)", type: "number", showRule: () => {
|
||||
return this.sheet.type === 0
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "totalPrice", title: '简述询价内容', type: "number", showRule: () => {
|
||||
return this.sheet.type === 2 && this.sheet.rentType === 1
|
||||
}
|
||||
},
|
||||
{key: "files", title: "附件", type: "file", accept: '.pdf', tips: '仅支持纵向PDF文档,报价附件将生成标准合同附件,请认真审阅。'},
|
||||
{
|
||||
key: "remark", title: "报价单详情", type: "textarea", showRule: () => {
|
||||
return this.sheet.type !== 2 || (this.sheet.type === 2 && this.sheet.rentType === 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "remark", title: "询价详情", type: "textarea", showRule: () => {
|
||||
return this.sheet.type === 2 && this.sheet.rentType === 1
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "supplierExt", title: "报价补充条款", type: "textarea", showRule: () => {
|
||||
return this.sheet.type !== 2 || (this.sheet.type === 2 && this.sheet.rentType === 0)
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
totalPrice: [
|
||||
{required: true, message: "总价不能为空", trigger: "change,blur"},
|
||||
],
|
||||
unit: [
|
||||
{required: true, message: "计价单位不能为空", trigger: "change,blur"},
|
||||
],
|
||||
files: [
|
||||
{required: true, message: "附件不能为空", trigger: "change,blur"},
|
||||
],
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
async onLoad(options = {}) {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
if (!id) {
|
||||
vk.navigateTo('/pages/index/old/old');
|
||||
return
|
||||
}
|
||||
|
||||
this.id = id
|
||||
this.form1.data.sheetId = id
|
||||
if (this.isLoggedIn) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
this.userInfo = userInfo
|
||||
}
|
||||
this.getDetail()
|
||||
},
|
||||
computed: {
|
||||
isLoggedIn() {
|
||||
return !!vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice === 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.reloaded = false
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res
|
||||
this.reloaded = true
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
if (err.code === -1) {
|
||||
setTimeout(() => {
|
||||
vk.navigateBack()
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
},
|
||||
formatNumber(e) {
|
||||
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
|
||||
},
|
||||
onFormSuccess() {
|
||||
vk.redirectTo({url: `/pages/index/old/detail?id=${this.id}`})
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.quoteTimes > 3) {
|
||||
|
||||
}
|
||||
|
||||
// this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning',
|
||||
// center: true
|
||||
// }).then(res => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
// })
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.item-wrap + .el-form {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.quote-form {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布旧货交易</el-button>
|
||||
<!-- <el-button type="primary" round plain>我发布的询价单</el-button> -->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: "client/old/kh/getMyQuoteList",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/index/old/detail?id=' + item.sheetId);
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "sheet.title",
|
||||
title: "旧货标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "sheet.type",
|
||||
title: "旧货类型",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '拍卖'},
|
||||
{value: 1, label: '采购'},
|
||||
{value: 2, label: '租赁'},
|
||||
{value: 3, label: '物资回收'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}元`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
title: "状态",
|
||||
type: "select",
|
||||
data: [
|
||||
{value: 0, label: '待选商'},
|
||||
{value: 1, label: '已被选商'},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/old/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+136
-32
@@ -1,30 +1,37 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white">
|
||||
<image src="/static/images/old/liucheng2.png" class="w-full" mode="widthFix"/>
|
||||
<view class="p-20">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="拍卖信息发布" name="0">
|
||||
<type_0/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购信息发布" name="1">
|
||||
<type_1/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="承租信息发布" name="2">
|
||||
<type_2/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物资回收信息发布" name="3">
|
||||
<type_3/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white">
|
||||
<image src="/static/images/old/liucheng2.png" class="w-full" mode="widthFix"/>
|
||||
<view class="p-20">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="拍卖信息发布" name="0">
|
||||
<type_0 v-if="parseInt(activeName) === 0" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" :unitList="unitList"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购信息发布" name="1">
|
||||
<type_1 v-if="parseInt(activeName) === 1" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="承租、租赁信息发布" name="2">
|
||||
<type_2 v-if="parseInt(activeName) === 2" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物资回收信息发布" name="3">
|
||||
<type_3 v-if="parseInt(activeName) === 3" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -34,13 +41,110 @@ import Type_2 from "./release/type_2.vue";
|
||||
import Type_3 from "./release/type_3.vue";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
components: {Type_3, Type_2, Type_1, Type_0},
|
||||
data() {
|
||||
return {
|
||||
activeName: '0'
|
||||
}
|
||||
name: "list",
|
||||
components: {Type_3, Type_2, Type_1, Type_0},
|
||||
data() {
|
||||
return {
|
||||
activeName: '0',
|
||||
urgentAmount: 1,
|
||||
remainOldNum: vk.getVuex('$user.userInfo.remainOldNum') ? parseInt(vk.getVuex('$user.userInfo.remainOldNum')) : 0,
|
||||
buyOldNumAmount: 5,
|
||||
agreement: '',
|
||||
commonContractUrl: '',
|
||||
contactList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUrgentAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587dd2fe0ec19027452c5b5'
|
||||
},
|
||||
})
|
||||
this.urgentAmount = res.content
|
||||
},
|
||||
methods: {}
|
||||
async getBuyOldAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587dd54189f86d49b3d5ff5'
|
||||
},
|
||||
})
|
||||
this.buyOldNumAmount = res.content
|
||||
},
|
||||
async getUnitList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'a45325976635f10600341a7f2f472cd1'
|
||||
},
|
||||
})
|
||||
this.unitList = res.content.split(',')
|
||||
},
|
||||
async getAgreement() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '65885d5b862066f18a4e4a36'
|
||||
},
|
||||
})
|
||||
this.agreement = res.content
|
||||
},
|
||||
async getCommonContractUrl() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d36befe975f63af1f24e7'
|
||||
},
|
||||
})
|
||||
this.commonContractUrl = res.content
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e && e.type) this.activeName = e.type
|
||||
this.getUnitList()
|
||||
this.getUrgentAmount()
|
||||
this.getBuyOldAmount()
|
||||
this.getAgreement()
|
||||
this.getCommonContractUrl()
|
||||
this.getContactList()
|
||||
},
|
||||
onShow() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.remainOldNum = data.userInfo.remainOldNum ? parseInt(data.userInfo.remainOldNum) : 0
|
||||
if (this.remainOldNum === 0) {
|
||||
this.$confirm('您的旧货发布次数已用完,是否立即购买?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}).catch(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
::v-deep .el-tabs__item{
|
||||
font-size: 1.2rem!important;
|
||||
}
|
||||
</style>
|
||||
+754
-418
File diff suppressed because it is too large
Load Diff
+809
-482
File diff suppressed because it is too large
Load Diff
+790
-482
File diff suppressed because it is too large
Load Diff
+388
-200
@@ -1,135 +1,162 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的回收信息</text>
|
||||
<text class="text-gray">回收信息越完整,成功交易越容易</text>
|
||||
<el-form ref="form" :model="form" label-width="140px" class="mt-20">
|
||||
<el-form-item label="信息失效时间:">
|
||||
<el-date-picker
|
||||
v-model="form.expiredTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资分类:">
|
||||
<el-radio-group v-model="form.category" size="small">
|
||||
<el-radio label="机械设备">
|
||||
<text>机械设备</text>
|
||||
</el-radio>
|
||||
<el-radio label="成品钢材">
|
||||
<text>成品钢材</text>
|
||||
</el-radio>
|
||||
<el-radio label="废旧钢材">
|
||||
<text>废旧钢材</text>
|
||||
</el-radio>
|
||||
<el-radio label="旧架子管">
|
||||
<text>旧架子管</text>
|
||||
</el-radio>
|
||||
<el-radio label="旧扣件">
|
||||
<text>旧扣件</text>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息标题:">
|
||||
<el-input v-model="form.title" placeholder="一句话简介物资,如拍卖直缝钢管200吨等"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收方简述:">
|
||||
<el-input v-model="form.desc" placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
type="textarea" show-word-limit maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收物实景照片:">
|
||||
<vk-data-upload v-model="form.files"
|
||||
accept="image/*">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收单位地址" class="ml-10">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
|
||||
<template v-if="provinceIndex !== null && cityIndex !== null">
|
||||
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
|
||||
:key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
回收单位信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司信息">
|
||||
<el-input v-model="form.supplier.companyName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司联系方式">
|
||||
<el-input v-model="form.supplier.contract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人信息">
|
||||
<el-input v-model="form.supplier.personalName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人联系方式">
|
||||
<el-input v-model="form.supplier.personalContract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授权人姓名">
|
||||
<el-input v-model="form.supplier.managerName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授权联系方式">
|
||||
<el-input v-model="form.supplier.managerContract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a">
|
||||
<el-button type="primary" :disabled="checked === '否'" @click="publish">立即发布</el-button>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<text class="text-50">发布我的回收信息</text>
|
||||
<text class="text-gray">回收信息越完整,成功交易越容易</text>
|
||||
<el-form ref="form" :model="form" label-width="140px" class="mt-20">
|
||||
<el-form-item label="信息失效时间:" required>
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="form.expiredTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
<div class="text-main text-25 mt-10">温馨提示:为保证信息有效性发布最长时限为1年(12个月)到期后需重新发布。</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资分类:" required>
|
||||
<div class="flex justify-start items-center">
|
||||
<el-cascader :options="cateData" v-model="form.category" :disabled="form.otherCate"
|
||||
:props="{'label': 'name', 'value': 'name'}"/>
|
||||
<el-checkbox v-model="form.otherCate" class="mx-20">其他分类</el-checkbox>
|
||||
<el-input v-model="form.otherCateName" :disabled="!form.otherCate" placeholder="如物资分类选项中不能描述您的信息物资主要内容,请在此用专业或通用术语填写"
|
||||
class="ml-20"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息标题:" required>
|
||||
<el-input v-model="form.title" placeholder="一句话简介回收内容,如 常年回收 二手、废旧螺纹钢、型材等"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收方简述:">
|
||||
<el-input v-model="form.desc" placeholder="请详细描述物资信息,描述内容:材料名称、材质......(限300字以内)"
|
||||
type="textarea" show-word-limit maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收物实景照片:">
|
||||
<vk-data-upload v-model="form.files" list-type="text"
|
||||
accept="image/*">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="回收单位地址" class="ml-10" required>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="5">
|
||||
<el-select v-model="provinceIndex" placeholder="省" @change="selectProvince">
|
||||
<el-option v-for="(item, index) in provinceData" :key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="cityIndex" placeholder="市" @change="selectCity">
|
||||
<template v-if="provinceIndex !== null">
|
||||
<el-option v-for="(item, index) in cityData[provinceIndex]" :key="index"
|
||||
:value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="areaIndex" placeholder="区/县" @change="selectArea">
|
||||
<template v-if="provinceIndex !== null && cityIndex !== null">
|
||||
<el-option v-for="(item, index) in areaData[provinceIndex][cityIndex]"
|
||||
:key="index" :value="index"
|
||||
:label="item.name"/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
回收单位信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<el-row :gutter="10" v-if="vk.getVuex('$user.userInfo.accountType') === 2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司信息">
|
||||
<el-input v-model="form.supplier.companyName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司联系方式">
|
||||
<el-input v-model="form.supplier.contract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="vk.getVuex('$user.userInfo.accountType') === 1">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人信息">
|
||||
<el-input v-model="form.supplier.personalName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人联系方式">
|
||||
<el-input v-model="form.supplier.personalContract"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12" class="flex justify-start items-center">
|
||||
<el-form-item label="授权业务咨询人">
|
||||
<el-select v-model="form.supplier.managerName" placeholder="点击选择业务联系人"
|
||||
class="w-100p" @change="selectContact">
|
||||
<el-option
|
||||
v-for="(item, index) in contactList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
<view slot="empty" class="text-gray pointer p-20">
|
||||
<text>无业务联系人,请到</text>
|
||||
<text class="text-main mx-15" @click="navTo">个人中心</text>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="flex justify-start items-center">
|
||||
<el-form-item label="业务咨询联系方式">
|
||||
<el-input v-model="form.supplier.managerContract" type="number" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">您是否对以上信息进行了详细核实:</text>
|
||||
<el-radio label="是" v-model="checked">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio label="否" v-model="checked">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<text class="mr-25">是否加急({{ urgentAmount }}元/次,将在旧货交易页面加急展示区展示):</text>
|
||||
<el-radio :label="true" v-model="form.isUrgent">
|
||||
<text>是</text>
|
||||
</el-radio>
|
||||
<el-radio :label="false" v-model="form.isUrgent">
|
||||
<text>否</text>
|
||||
</el-radio>
|
||||
</view>
|
||||
<view class="my-25 text-main font-bold">本月剩余旧货发布次数:{{ remainOldNum }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox v-model="agree">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="showAgreement">《金久信旧货交易协议》</span>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-30 m-a">
|
||||
<el-button type="primary" :disabled="checked === '否' || !agree" @click="publish">立即发布</el-button>
|
||||
</view>
|
||||
<el-dialog title="金久信旧货交易协议" :visible.sync="dialogVisible" width="70%" close-on-press-escape
|
||||
close-on-click-modal show-close
|
||||
>
|
||||
<div v-html="agreement"></div>
|
||||
<div class="flex justify-end items-center">
|
||||
<el-button type="primary" @click="agreeNClose">已阅读并同意</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -138,98 +165,259 @@ import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
export default {
|
||||
name: "type_3",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
form: {
|
||||
type: 3,
|
||||
category: 0,
|
||||
files: [],
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: [],
|
||||
addressDetail: '',
|
||||
expiredTime: '',
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
checked: '否'
|
||||
}
|
||||
name: "type_3",
|
||||
props: {
|
||||
urgentAmount: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
methods: {
|
||||
selectProvince(index) {
|
||||
this.form.addressRegion[0] = this.provinceData[index]
|
||||
remainOldNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
agreement: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
contactList: {
|
||||
type: Array,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
const maxDate = new Date();
|
||||
maxDate.setFullYear(maxDate.getFullYear() + 1);
|
||||
return time.getTime() < Date.now() || time.getTime() > maxDate.getTime();
|
||||
},
|
||||
selectCity(index) {
|
||||
this.form.addressRegion[1] = this.cityData[this.provinceIndex][index]
|
||||
},
|
||||
agree: false,
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
allChildCate: [],
|
||||
cateData: [],
|
||||
form: {
|
||||
otherCate: false,
|
||||
otherCateName: '',
|
||||
type: 3,
|
||||
category: 0,
|
||||
files: [],
|
||||
title: '',
|
||||
desc: '',
|
||||
addressRegion: {},
|
||||
addressDetail: '',
|
||||
expiredTime: '',
|
||||
supplier: {
|
||||
companyName: '',
|
||||
contract: '',
|
||||
personalName: '',
|
||||
personalContract: '',
|
||||
managerName: '',
|
||||
managerContract: '',
|
||||
},
|
||||
selectArea(index) {
|
||||
this.form.addressRegion[2] = this.areaData[this.provinceIndex][this.cityIndex][index]
|
||||
},
|
||||
async publish() {
|
||||
await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
this.$message({
|
||||
message: "提交成功",
|
||||
type: 'success'
|
||||
})
|
||||
vk.navigateBack()
|
||||
}
|
||||
isUrgent: false
|
||||
},
|
||||
provinceIndex: null,
|
||||
cityIndex: null,
|
||||
areaIndex: null,
|
||||
checked: '否',
|
||||
dialogVisible: false
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectProvince(index) {
|
||||
this.form.addressRegion.province = this.provinceData[index]
|
||||
},
|
||||
selectCity(index) {
|
||||
this.form.addressRegion.city = this.cityData[this.provinceIndex][index]
|
||||
},
|
||||
selectArea(index) {
|
||||
this.form.addressRegion.area = this.areaData[this.provinceIndex][this.cityIndex][index]
|
||||
},
|
||||
async publish() {
|
||||
if (this.remainOldNum === 0) {
|
||||
this.$confirm('您的旧货发布次数已用完,是否立即购买?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async ({confirm}) => {
|
||||
if (confirm) {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.provinceIndex === null || this.cityIndex === null || this.areaIndex === null) return this.$message({
|
||||
message: "请选择完整的地址",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.addressDetail) return this.$message({
|
||||
message: "请填写详细地址",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.title) return this.$message({
|
||||
message: "请填写标题",
|
||||
type: 'warning'
|
||||
})
|
||||
if (!this.form.otherCate) {
|
||||
if (!this.form.category) return this.$message({
|
||||
message: "请选择分类",
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
if (!this.form.otherCateName) return this.$message({
|
||||
message: "请输入其他分类",
|
||||
type: 'warning'
|
||||
})
|
||||
this.form.category = ['', this.form.otherCateName]
|
||||
}
|
||||
if (!this.form.expiredTime) return this.$message({
|
||||
message: "请选择失效时间",
|
||||
type: 'warning'
|
||||
})
|
||||
const maxExpiredTime = new Date();
|
||||
maxExpiredTime.setFullYear(maxExpiredTime.getFullYear() + 1);
|
||||
if (new Date(this.form.expiredTime).getTime() > maxExpiredTime.getTime()) return this.$message({
|
||||
message: "为保证信息有效性发布最长时限为1年(12个月)",
|
||||
type: 'warning'
|
||||
})
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/old/kh/add',
|
||||
data: this.form
|
||||
})
|
||||
localStorage.removeItem("old_3")
|
||||
this.$message({
|
||||
message: "您的信息已经提交,等待管理员审核,请您耐心等待!",
|
||||
type: 'success'
|
||||
})
|
||||
if (this.form.isUrgent) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${res.data}`
|
||||
})
|
||||
} else {
|
||||
vk.redirectTo({url: '/pages/index/old/old'});
|
||||
}
|
||||
},
|
||||
showAgreement() {
|
||||
// this.$confirm(this.agreement, '金久信旧货交易协议', {
|
||||
// cancelButtonText: '关闭',
|
||||
// showConfirmButton: false,
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// customClass: 'confirm-box'
|
||||
// })
|
||||
this.dialogVisible = true
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
selectContact(name) {
|
||||
const contact = this.contactList.find(item => item.name === name)
|
||||
this.form.supplier.managerContract = contact.phone
|
||||
},
|
||||
save() {
|
||||
localStorage.setItem("old_3", JSON.stringify({
|
||||
form: this.form,
|
||||
provinceIndex: this.provinceIndex,
|
||||
cityIndex: this.cityIndex,
|
||||
areaIndex: this.areaIndex,
|
||||
}))
|
||||
this.$message({
|
||||
message: "已保存",
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
agreeNClose(){
|
||||
this.dialogVisible = false
|
||||
this.agree = true
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {type: 3},
|
||||
success: (data) => {
|
||||
this.cateData = data.rows.map(item => {
|
||||
item.children.forEach(child => {
|
||||
delete child.children
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
if (vk.getVuex('$user.userInfo.accountType') === 2) {
|
||||
this.form.supplier.companyName = vk.getVuex('$user.userInfo.company.companyName')
|
||||
this.form.supplier.contract = vk.getVuex('$user.userInfo.company.mobile')
|
||||
} else {
|
||||
this.form.supplier.personalName = vk.getVuex('$user.userInfo.person.personName')
|
||||
this.form.supplier.personalContract = vk.getVuex('$user.userInfo.person.mobile')
|
||||
}
|
||||
if (!!localStorage.getItem("old_3")) {
|
||||
this.$confirm('您有一份暂存数据,是否恢复?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const savedData = JSON.parse(localStorage.getItem("old_3"))
|
||||
this.form = savedData.form
|
||||
this.provinceIndex = savedData.provinceIndex
|
||||
this.cityIndex = savedData.cityIndex
|
||||
this.areaIndex = savedData.areaIndex
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/common/css/app.scss";
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: $--color-primary;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid $--color-primary;
|
||||
}
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sign-method-header {
|
||||
width: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/deep/ .input-with-select{
|
||||
width: 200px;
|
||||
::v-deep .input-with-select {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
/deep/ .input-with-select .el-input-group__append {
|
||||
background-color: #fff !important;
|
||||
width: 80px !important;
|
||||
::v-deep .input-with-select .el-input-group__append {
|
||||
background-color: #fff !important;
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
.confirm-box .el-dialog {
|
||||
width: 70%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,191 +1,257 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<u-swiper :list="list" :height="380" borderRadius="0"></u-swiper>
|
||||
<view class="bg-white p-40">
|
||||
<view v-for="(item, index) in configList" :key="index"
|
||||
class="my-20 flex flex-col justify-start items-start">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<text>服务内容:{{ item.name }}</text>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
class="mb-40 flex justify-start items-center">
|
||||
<view class="ml-35">
|
||||
<text>业务编号:</text>
|
||||
<text>{{ content.code }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="ml-35">服务服务项目:</text>
|
||||
<el-checkbox v-model="configList[index].contents[contentIndex].checked"
|
||||
:disabled="!content.amountList || content.amountList.length === 0">
|
||||
{{ content.title }}
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<view class="flex justify-start items-center ml-35">
|
||||
<el-select v-model="configList[index].contents[contentIndex].amountIndex"
|
||||
clearable @change="selectAmount(index, contentIndex, $event)"
|
||||
:disabled="!content.amountList || content.amountList.length === 0">
|
||||
<el-option v-for="(amount, amountIndex) in content.amountList"
|
||||
:key="amountIndex"
|
||||
:label="amount.title" :value="amountIndex"/>
|
||||
</el-select>
|
||||
<text class="ml-35" v-if="content.amountIndex !== null">
|
||||
{{ content.amountList[content.amountIndex].amount }}元/次
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<common-swiper page="self-support-company-swiper"/>
|
||||
<view class="flex justify-end items-center text-main pointer my-20 " @click="demoDownload">示例下载</view>
|
||||
<view class="bg-white p-40">
|
||||
<view v-for="(item, index) in configList" :key="index"
|
||||
class="server-item my-20 flex flex-col justify-start items-start">
|
||||
<el-checkbox v-model="configList[index].checked" @change="changeCheck(index, item.name, $event)">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<view class="name">{{ item.name }}</view>
|
||||
<view class="ml-15">
|
||||
<text>业务编号:</text>
|
||||
<text v-if="item.contentIndex !== null">{{
|
||||
item.contents[item.contentIndex].code
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, companyIndex) in companyList" :key="companyIndex">
|
||||
<el-form-item label="考察对象(个人/企业全称):" required>
|
||||
<el-input v-model="companyList[companyIndex].name"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考察对象(个人身份证/企业信用代码):">
|
||||
<el-input v-model="companyList[companyIndex].code"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考察对象(个人/单位)所在地:">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[companyIndex][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[companyIndex][1]" placeholder="请选择市"
|
||||
:disabled="addressIndex[companyIndex].length === 0">
|
||||
<template v-if="addressIndex[companyIndex][0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[companyIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[companyIndex][2]" placeholder="请选择区"
|
||||
:disabled="addressIndex[companyIndex].length === 1">
|
||||
<template
|
||||
v-if="addressIndex[companyIndex][0] !== null && addressIndex[companyIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[companyIndex][0]][addressIndex[companyIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="companyList[companyIndex].address" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件电子邮箱:">
|
||||
<el-input v-model="companyList[companyIndex].email"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件微信:">
|
||||
<el-input v-model="companyList[companyIndex].wechat"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件寄件地址">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[companyIndex][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="receiveAddressIndex[companyIndex][1]" placeholder="请选择市"
|
||||
:disabled="receiveAddressIndex[companyIndex].length === 0">
|
||||
<template v-if="receiveAddressIndex[companyIndex][0] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in cityData[receiveAddressIndex[companyIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[companyIndex][2]" placeholder="请选择区"
|
||||
:disabled="receiveAddressIndex[companyIndex].length === 1">
|
||||
<template
|
||||
v-if="receiveAddressIndex[companyIndex][0] !== null && receiveAddressIndex[companyIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[receiveAddressIndex[companyIndex][0]][receiveAddressIndex[companyIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="companyList[companyIndex].receiveAddress" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人:">
|
||||
<el-input v-model="companyList[companyIndex].requestName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人:">
|
||||
<el-input v-model="companyList[companyIndex].contactName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式:">
|
||||
<el-input v-model="companyList[companyIndex].contact"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="本次服务费用小计:">
|
||||
<view class="flex justify-between items-start mb-20 w-100p">
|
||||
<view class="flex justify-start items-center">
|
||||
<el-input v-model="amount" disabled/>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" @click.native="addCompany">增加考察对象
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" plain @click.native="removeCompany(companyIndex)"
|
||||
class="ml-20"
|
||||
:disabled="companyList.length === 1">删除该对象
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</view>
|
||||
</el-form>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<view class="flex justify-center items-center">
|
||||
<text>总价:</text>
|
||||
<text class="text-main font-bold text-35">{{ totalAmount }}元</text>
|
||||
</view>
|
||||
<view class="ml-35">客服联系方式: 0771-3923001</view>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<el-button type="primary" @click="newOrder"
|
||||
:disabled="companyList.length === 0 || !companyList[0].name">
|
||||
立即支付
|
||||
</el-button>
|
||||
<view class="server-item-content">
|
||||
<view class="server-select-row">
|
||||
<text class="ml-15 nowrap-label">服务项目:</text>
|
||||
<el-select v-model="configList[index].contentIndex" clearable
|
||||
class="server-select"
|
||||
:disabled="!contentList.includes(index)">
|
||||
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
:label="content.title" :value="contentIndex"/>
|
||||
</el-select>
|
||||
<template v-if="item.contentIndex !== null">
|
||||
<text class="ml-15 nowrap-label">金额:</text>
|
||||
<el-select v-model="configList[index].amountIndex"
|
||||
clearable class="server-select ml-15">
|
||||
<el-option
|
||||
v-for="(amount, amountIndex) in item.contents[item.contentIndex].amountList"
|
||||
:key="amountIndex"
|
||||
:label="amount.title" :value="amountIndex"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</view>
|
||||
<view class="server-amount-text" v-if="item.contentIndex !== null && item.amountIndex!== null">
|
||||
{{ item.contents[item.contentIndex].amountList[item.amountIndex].amount }}元/次
|
||||
</view>
|
||||
<view class="server-amount-text" v-else>
|
||||
元/次
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remark">备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<gap/>
|
||||
<common-footer></common-footer>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, companyIndex) in companyList" :key="companyIndex">
|
||||
<el-divider>{{ item.name }}</el-divider>
|
||||
<el-form-item label="考察对象类型:" required>
|
||||
<el-select v-model="companyList[companyIndex].type" placeholder="请选择考察对象类型">
|
||||
<el-option label="企业" value="企业"></el-option>
|
||||
<!-- <el-option label="个人" value="个人"></el-option>-->
|
||||
<el-option label="项目" value="项目"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`考察对象(全称):`" required>
|
||||
<el-input v-model="companyList[companyIndex].name"/>
|
||||
</el-form-item>
|
||||
<template v-if="item.type === '个人'">
|
||||
<el-form-item label="考察对象(全称): " required>
|
||||
<el-input v-model="companyList[companyIndex].code"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考察对象所在地:" required>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[companyIndex][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[companyIndex][1]" placeholder="请选择市"
|
||||
:disabled="addressIndex[companyIndex].length === 0">
|
||||
<template v-if="addressIndex[companyIndex][0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[companyIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[companyIndex][2]" placeholder="请选择区"
|
||||
:disabled="addressIndex[companyIndex].length === 1">
|
||||
<template
|
||||
v-if="addressIndex[companyIndex][0] !== null && addressIndex[companyIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[companyIndex][0]][addressIndex[companyIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="companyList[companyIndex].address" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="本次服务费用小计:">
|
||||
<view class="flex justify-between items-start mb-20 w-100p">
|
||||
<view class="flex justify-start items-center">
|
||||
<el-input v-model="amount" disabled/>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" plain @click.native="removeCompany(companyIndex)"
|
||||
class="ml-20"
|
||||
:disabled="companyList.length === 1">删除该对象
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
|
||||
</view>
|
||||
<el-divider/>
|
||||
<el-button type="primary" @click.native="addCompany">增加考察对象
|
||||
</el-button>
|
||||
<el-form-item label="接收文件电子邮箱:" required>
|
||||
<el-input v-model="email"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件微信:" required>
|
||||
<el-input v-model="wechat"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件寄件地址" required>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[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="receiveAddressIndex[1]" placeholder="请选择市"
|
||||
:disabled="receiveAddressIndex.length === 0">
|
||||
<template v-if="receiveAddressIndex[0] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in cityData[receiveAddressIndex[0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[2]" placeholder="请选择区"
|
||||
:disabled="receiveAddressIndex.length === 1">
|
||||
<template
|
||||
v-if="receiveAddressIndex[0] !== null && receiveAddressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[receiveAddressIndex[0]][receiveAddressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="receiveAddress"
|
||||
placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<p class="text-main text-25 text-center" style="margin-bottom: 80rpx">接收文件电子邮箱/ 接收文件微信/
|
||||
接收文件寄件地址,以上三项选填一项即可</p>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="申请人:" required>
|
||||
<el-input v-model="requestName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="业务联系人:" required>
|
||||
<el-input v-model="contactName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="业务咨询联系方式:" required>
|
||||
<el-input v-model="contact"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8" class="flex justify-start items-center">-->
|
||||
<!-- <el-form-item label="业务联系人:" required>-->
|
||||
<!-- <el-select v-model="contactName" placeholder="点击选择业务联系人"-->
|
||||
<!-- class="w-100p" @change="selectContact">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="(item, index) in contactList"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.name">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- <view slot="empty" class="text-gray pointer p-20">-->
|
||||
<!-- <text>无业务联系人,请到</text>-->
|
||||
<!-- <text class="text-main mx-15" @click="navTo">个人中心</text>-->
|
||||
<!-- <text>添加</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="8" class="flex justify-start items-center">-->
|
||||
<!-- <el-form-item label="业务咨询联系方式:" required>-->
|
||||
<!-- <el-input v-model="contact" type="number" disabled/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<!-- <el-form-item label="联系方式:" required>-->
|
||||
<!-- <el-input v-model="contact" disabled/>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<view class="flex justify-center items-center">
|
||||
<text>总价:</text>
|
||||
<text class="text-main font-bold text-35">{{ totalAmount }}元</text>
|
||||
</view>
|
||||
<view class="ml-35">客服联系方式: 400-686-5559</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox v-model="agree">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="dialogVisible = true">《金久信自营交易协议》</span>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<el-button type="primary" @click="newOrder"
|
||||
:disabled="companyList.length === 0 || !companyList[0].name || !agree">
|
||||
立即支付
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<gap/>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog
|
||||
title="金久信自营交易协议"
|
||||
:visible.sync="dialogVisible"
|
||||
width="70%">
|
||||
<div v-html="agreement"></div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -195,167 +261,352 @@ import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import Gap from "../../../components/gap/gap.vue";
|
||||
|
||||
export default {
|
||||
name: "companyQuote",
|
||||
components: {Gap},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
list: [
|
||||
{
|
||||
image: '/static/images/selfSupport/swiper.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
],
|
||||
form: {},
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
addressIndex: [[null, null, null]],
|
||||
addressDetail: '',
|
||||
receiveAddressIndex: [[null, null, null]],
|
||||
receiveAddressDetail: '',
|
||||
companyList: [
|
||||
{
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getConfigList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/coop/config/pub/getList',
|
||||
data: {type: 0}
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contents.map(content => {
|
||||
content.checked = false
|
||||
content.amountIndex = null
|
||||
return content
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
addCompany() {
|
||||
this.companyList.push({
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
})
|
||||
this.addressIndex.push([null, null, null])
|
||||
this.receiveAddressIndex.push([null, null, null])
|
||||
},
|
||||
removeCompany(index) {
|
||||
this.companyList.splice(index, 1)
|
||||
this.addressIndex.splice(index, 1)
|
||||
this.receiveAddressIndex.splice(index, 1)
|
||||
},
|
||||
async newOrder() {
|
||||
const amountList = []
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.checked && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === content.amountIndex) {
|
||||
amountList.push(amount._index)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
if (amountList.length === 0) return this.$message({
|
||||
message: '请至少选择一项服务',
|
||||
type: 'error'
|
||||
})
|
||||
this.companyList.forEach((item, index) => {
|
||||
this.companyList[index].addressRegion = {
|
||||
province: this.provinceData[this.addressIndex[index][0]],
|
||||
city: this.cityData[this.addressIndex[index][0]][this.addressIndex[index][1]],
|
||||
area: this.areaData[this.addressIndex[index][0]][this.addressIndex[index][1]][this.addressIndex[index][2]],
|
||||
}
|
||||
this.companyList[index].receiveAddressRegion = {
|
||||
province: this.provinceData[this.receiveAddressIndex[index][0]],
|
||||
city: this.cityData[this.receiveAddressIndex[index][0]][this.receiveAddressIndex[index][1]],
|
||||
area: this.areaData[this.receiveAddressIndex[index][0]][this.receiveAddressIndex[index][1]][this.receiveAddressIndex[index][2]],
|
||||
}
|
||||
})
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/addOrder',
|
||||
data: {
|
||||
type: 0,
|
||||
amountList,
|
||||
contentList: this.companyList
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
selectAmount(index, contentIndex, e) {
|
||||
console.log(index, contentIndex, e)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getConfigList()
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.checked && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === content.amountIndex) {
|
||||
tmpAmount += parseFloat(amount.amount)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
totalAmount() {
|
||||
return this.amount * this.companyList.length
|
||||
name: "companyQuote",
|
||||
components: {Gap},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
form: {},
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
addressIndex: [[null, null, null]],
|
||||
addressDetail: '',
|
||||
receiveAddressIndex: [null, null, null],
|
||||
receiveAddressDetail: '',
|
||||
companyList: [
|
||||
{
|
||||
name: '',
|
||||
code: '',
|
||||
type: '企业',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
}
|
||||
],
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
agreement: '',
|
||||
agree: false,
|
||||
dialogVisible: false,
|
||||
contactList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async getConfigList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/coop/config/pub/getList',
|
||||
data: {type: 0}
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.checked = false
|
||||
item.contentIndex = null
|
||||
item.amountIndex = null
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
changeCheck(itemIndex, name, checked) {
|
||||
this.configList.forEach((item, index) => {
|
||||
item.checked = checked && index === itemIndex
|
||||
if (index !== itemIndex || !checked) {
|
||||
item.contentIndex = null
|
||||
item.amountIndex = null
|
||||
}
|
||||
})
|
||||
this.contentList = checked ? [itemIndex] : []
|
||||
this.contentNameList = checked ? [name] : []
|
||||
},
|
||||
addCompany() {
|
||||
this.companyList.push({
|
||||
name: '',
|
||||
code: '',
|
||||
type: '企业',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
})
|
||||
this.addressIndex.push([null, null, null])
|
||||
this.receiveAddressIndex.push([null, null, null])
|
||||
},
|
||||
removeCompany(index) {
|
||||
this.companyList.splice(index, 1)
|
||||
this.addressIndex.splice(index, 1)
|
||||
this.receiveAddressIndex.splice(index, 1)
|
||||
},
|
||||
async newOrder() {
|
||||
const amountList = []
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach((content, contentIndex) => {
|
||||
if (contentIndex === item.contentIndex && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === item.amountIndex) {
|
||||
amountList.push(`${content._index},${amount._index}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
if (amountList.length === 0) return this.$message({
|
||||
message: '请至少选择一项服务',
|
||||
type: 'error'
|
||||
})
|
||||
// if (this.addressIndex[0][2] === null) return this.$message({
|
||||
// message: '请选择地址',
|
||||
// type: 'error'
|
||||
// })
|
||||
if (!this.email && !this.wechat && this.receiveAddressIndex[0][2] === null) return this.$message({
|
||||
message: '请选择接收文件地址/微信/邮箱',
|
||||
type: 'error'
|
||||
})
|
||||
this.companyList.forEach((item, index) => {
|
||||
if (this.addressIndex[index][2]) {
|
||||
const companyProvince = this.provinceData[this.addressIndex[index][0]]
|
||||
const companyCity = this.cityData[this.addressIndex[index][0]][this.addressIndex[index][1]]
|
||||
const companyArea = this.areaData[this.addressIndex[index][0]][this.addressIndex[index][1]][this.addressIndex[index][2]]
|
||||
this.companyList[index].addressRegion = {
|
||||
province: {code: companyProvince.code, name: companyProvince.name},
|
||||
city: {code: companyCity.code, name: companyCity.name},
|
||||
area: {code: companyArea.code, name: companyArea.name},
|
||||
}
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < this.companyList.length; i++) {
|
||||
if (!this.companyList[i].name) return this.$message({
|
||||
message: '请填写考察对象名称',
|
||||
type: 'error'
|
||||
})
|
||||
if (this.companyList[i].type === '个人') {
|
||||
if (!this.companyList[i].code) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写考察个人身份证号',
|
||||
})
|
||||
if (!this.companyList[i].address) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写个人地址',
|
||||
})
|
||||
if (this.addressIndex[i][2] === null) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写个人地址',
|
||||
})
|
||||
}
|
||||
}
|
||||
if (!this.requestName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写申请人',
|
||||
})
|
||||
if (!this.contactName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写业务联系人姓名',
|
||||
})
|
||||
if (!this.contact) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写联系人电话',
|
||||
})
|
||||
if (this.receiveAddressIndex.length > 0 && this.receiveAddressIndex[2] !== null) {
|
||||
const province = this.provinceData[this.receiveAddressIndex[0]]
|
||||
const city = this.cityData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]]
|
||||
const area = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]][this.receiveAddressIndex[2]]
|
||||
this.receiveAddressRegion = {
|
||||
province: {code: province.code, name: province.name},
|
||||
city: {code: city.code, name: city.name},
|
||||
area: {code: area.code, name: area.name},
|
||||
}
|
||||
}
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/addOrder',
|
||||
title: '提交中...',
|
||||
data: {
|
||||
type: 0,
|
||||
amountList,
|
||||
contentList: this.companyList,
|
||||
receiveAddressRegion: this.receiveAddressRegion,
|
||||
email: this.email,
|
||||
wechat: this.wechat,
|
||||
receiveAddress: this.receiveAddress,
|
||||
requestName: this.requestName,
|
||||
contactName: this.contactName,
|
||||
contact: this.contact,
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
showAgreement() {
|
||||
this.$confirm(this.agreement, '金久信自营交易协议', {
|
||||
cancelButtonText: '关闭',
|
||||
showConfirmButton: false,
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
},
|
||||
async getAgreement() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '65885d4c09664c1c8d8e8476'
|
||||
},
|
||||
})
|
||||
this.agreement = res.content
|
||||
},
|
||||
demoDownload() {
|
||||
vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6588642a99c624e89199fbb4'
|
||||
},
|
||||
success: res => {
|
||||
window.open(res.content)
|
||||
}
|
||||
})
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
selectContact(name) {
|
||||
const contact = this.contactList.find(item => item.name === name)
|
||||
this.contact = contact.phone
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const userInfo = vk.getVuex('$user.userInfo')
|
||||
if (parseInt(userInfo.accountType) === 2) {
|
||||
this.email = userInfo.company.contactEmail
|
||||
this.requestName = userInfo.manager.personName
|
||||
this.contactName = userInfo.manager.personName
|
||||
this.contact = userInfo.company.mobile
|
||||
if (userInfo.company && userInfo.company.addressRegion) {
|
||||
this.receiveAddressIndex[0] = this.provinceData.findIndex(item => item.name === userInfo.company.addressRegion.province.name)
|
||||
this.receiveAddressIndex[1] = this.cityData[this.receiveAddressIndex[0]].findIndex(item => item.name === userInfo.company.addressRegion.city.name)
|
||||
this.receiveAddressIndex[2] = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]].findIndex(item => item.name === userInfo.company.addressRegion.area.name)
|
||||
}
|
||||
if (userInfo.company.addressDetail) this.receiveAddress = userInfo.company.addressDetail
|
||||
} else {
|
||||
if (userInfo.businessCard && userInfo.businessCard.email) this.email = userInfo.businessCard.email
|
||||
this.requestName = userInfo.person.personName
|
||||
this.contactName = userInfo.person.personName
|
||||
this.contact = userInfo.person.mobile
|
||||
if (userInfo.person && userInfo.person.addressRegion) {
|
||||
this.receiveAddressIndex[0] = this.provinceData.findIndex(item => item.name === userInfo.person.addressRegion.province.name)
|
||||
this.receiveAddressIndex[1] = this.cityData[this.receiveAddressIndex[0]].findIndex(item => item.name === userInfo.person.addressRegion.city.name)
|
||||
this.receiveAddressIndex[2] = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]].findIndex(item => item.name === userInfo.person.addressRegion.area.name)
|
||||
}
|
||||
if (userInfo.person.addressDetail) this.receiveAddress = userInfo.person.addressDetail
|
||||
}
|
||||
this.getAgreement()
|
||||
this.getConfigList()
|
||||
// this.getContactList()
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach((content, contentIndex) => {
|
||||
if (contentIndex === item.contentIndex && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === item.amountIndex) {
|
||||
tmpAmount += parseFloat(amount.amount)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
totalAmount() {
|
||||
return this.amount * this.companyList.length
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.server-item {
|
||||
background-color: #fbf8f8;
|
||||
border: 2px solid #fbebf1;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.items-center {
|
||||
width: 1100px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
|
||||
view {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.ml-35 {
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.server-item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 600px !important;
|
||||
}
|
||||
|
||||
.server-select-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: auto !important;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.server-select {
|
||||
width: 180px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.server-amount-text {
|
||||
width: 80px !important;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.nowrap-label {
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.remark {
|
||||
color: #999999;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.divider-title {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,532 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<common-swiper page="self-support-quote-swiper"/>
|
||||
<view class="flex justify-end items-center text-main pointer my-20 " @click="demoDownload">示例下载</view>
|
||||
<view class="bg-white p-40">
|
||||
<view v-for="(item, index) in configList" :key="index"
|
||||
class="server-item my-20 flex flex-col justify-start items-start">
|
||||
<el-checkbox @change="changeCheck(index, item.name)">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<view class="name" style="width: 120px;">{{ item.name }}</view>
|
||||
<view class="ml-15" style="width: 120px;">
|
||||
<text>业务编号:</text>
|
||||
<text v-if="item.contentIndex !== null">{{
|
||||
item.contents[item.contentIndex].code
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="server-item-content">
|
||||
<text class="ml-15">服务项目:</text>
|
||||
<el-select v-model="configList[index].contentIndex" clearable style="width: 200px"
|
||||
:disabled="!contentList.includes(index)">
|
||||
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
:label="content.title" :value="contentIndex"/>
|
||||
</el-select>
|
||||
<template v-if="item.contentIndex !== null">
|
||||
<el-select v-model="configList[index].amountIndex" @change="changeAmountIndex(index)"
|
||||
clearable class="ml-15" style="width: 300px">
|
||||
<el-option
|
||||
v-for="(amount, amountIndex) in item.contents[item.contentIndex].amountList"
|
||||
:key="amountIndex"
|
||||
:label="amount.title" :value="amountIndex"/>
|
||||
</el-select>
|
||||
<template v-if="configList[index].amountIndex !== null">
|
||||
<text class="ml-15">清单单品项数:</text>
|
||||
<el-input v-model="configList[index].num" style="width: 200px"/>
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="remark">备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, companyIndex) in companyList" :key="companyIndex">
|
||||
<el-divider>{{ item.name }}</el-divider>
|
||||
<el-form-item label="产品明细:" required>
|
||||
<vk-data-upload v-model="companyList[companyIndex].files" list-type="text"
|
||||
:on-preview="previewUpload"
|
||||
accept=".jpg,.jpeg,.png,.xlsx,.doc,.docx,.pdf">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品应用地址:" required>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[companyIndex][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[companyIndex][1]" placeholder="请选择市"
|
||||
:disabled="addressIndex[companyIndex].length === 0">
|
||||
<template v-if="addressIndex[companyIndex][0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[companyIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[companyIndex][2]" placeholder="请选择区"
|
||||
:disabled="addressIndex[companyIndex].length === 1">
|
||||
<template
|
||||
v-if="addressIndex[companyIndex][0] !== null && addressIndex[companyIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[companyIndex][0]][addressIndex[companyIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="companyList[companyIndex].address" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</view>
|
||||
<el-divider/>
|
||||
<el-form-item label="接收文件电子邮箱:" required>
|
||||
<el-input v-model="email"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件微信:" required>
|
||||
<el-input v-model="wechat"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件寄件地址" required>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[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="receiveAddressIndex[1]" placeholder="请选择市"
|
||||
:disabled="receiveAddressIndex.length === 0">
|
||||
<template v-if="receiveAddressIndex[0] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in cityData[receiveAddressIndex[0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[2]" placeholder="请选择区"
|
||||
:disabled="receiveAddressIndex.length === 1">
|
||||
<template
|
||||
v-if="receiveAddressIndex[0] !== null && receiveAddressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[receiveAddressIndex[0]][receiveAddressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="receiveAddress" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<p class="text-main text-25 text-center" style="margin-bottom: 80rpx">接收文件电子邮箱/ 接收文件微信/
|
||||
接收文件寄件地址,以上三项选填一项即可</p>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="申请人:" required>
|
||||
<el-input v-model="requestName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="业务联系人:" required>
|
||||
<el-input v-model="contactName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="业务咨询联系方式:" required>
|
||||
<el-input v-model="contact"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<view class="ml-35">客服联系方式: 400-686-5559</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox v-model="agree">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="dialogVisible = true">《金久信自营交易协议》</span>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<el-button type="primary" @click="newOrder"
|
||||
:disabled="companyList.length === 0 || !agree">
|
||||
立即提交
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<gap/>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog
|
||||
title="金久信自营交易协议"
|
||||
:visible.sync="dialogVisible"
|
||||
width="70%">
|
||||
<div v-html="agreement"></div>
|
||||
</el-dialog>
|
||||
</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 Gap from "../../../components/gap/gap.vue";
|
||||
|
||||
export default {
|
||||
name: "companyQuote",
|
||||
components: {Gap},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
form: {},
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
addressIndex: [[null, null, null]],
|
||||
addressDetail: '',
|
||||
receiveAddressIndex: [null, null, null],
|
||||
receiveAddressDetail: '',
|
||||
companyList: [
|
||||
{
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
}
|
||||
],
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
agreement: '',
|
||||
agree: false,
|
||||
dialogVisible: false,
|
||||
contactList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async getConfigList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/coop/config/pub/getList',
|
||||
data: {type: 2}
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contentIndex = null
|
||||
item.amountIndex = null
|
||||
item.num = null
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
changeCheck(itemIndex, name) {
|
||||
const index = this.contentList.indexOf(itemIndex)
|
||||
if (index === -1) {
|
||||
this.contentList.push(itemIndex)
|
||||
this.contentNameList.push(name)
|
||||
} else {
|
||||
this.contentList.splice(index, 1)
|
||||
this.contentNameList.splice(index, 1)
|
||||
this.configList[itemIndex].contentIndex = null
|
||||
this.configList[itemIndex].amountIndex = null
|
||||
}
|
||||
},
|
||||
addCompany() {
|
||||
this.companyList.push({
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
})
|
||||
this.addressIndex.push([null, null, null])
|
||||
this.receiveAddressIndex.push([null, null, null])
|
||||
},
|
||||
removeCompany(index) {
|
||||
this.companyList.splice(index, 1)
|
||||
this.addressIndex.splice(index, 1)
|
||||
this.receiveAddressIndex.splice(index, 1)
|
||||
},
|
||||
async newOrder() {
|
||||
const amountList = []
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach((content, contentIndex) => {
|
||||
if (contentIndex === item.contentIndex && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === item.amountIndex) {
|
||||
amountList.push(`${content._index},${amount._index},${item.num}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
if (amountList.length === 0) return this.$message({
|
||||
message: '请至少选择一项服务',
|
||||
type: 'error'
|
||||
})
|
||||
if (this.addressIndex[0][2] === null) return this.$message({
|
||||
message: '请选择地址',
|
||||
type: 'error'
|
||||
})
|
||||
if (!this.email && !this.wechat && this.receiveAddressIndex[0][2] === null) return this.$message({
|
||||
message: '请选择接收文件地址/微信/邮箱',
|
||||
type: 'error'
|
||||
})
|
||||
this.companyList.forEach((item, index) => {
|
||||
const companyProvince = this.provinceData[this.addressIndex[index][0]]
|
||||
const companyCity = this.cityData[this.addressIndex[index][0]][this.addressIndex[index][1]]
|
||||
const companyArea = this.areaData[this.addressIndex[index][0]][this.addressIndex[index][1]][this.addressIndex[index][2]]
|
||||
this.companyList[index].addressRegion = {
|
||||
province: {code: companyProvince.code, name: companyProvince.name},
|
||||
city: {code: companyCity.code, name: companyCity.name},
|
||||
area: {code: companyArea.code, name: companyArea.name},
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < this.companyList.length; i++) {
|
||||
if (!this.companyList[i].files || this.companyList[i].files.length === 0) return this.$message({
|
||||
message: '请上传产品明细',
|
||||
type: 'error'
|
||||
})
|
||||
if (!this.companyList[i].address) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写产品应用地址',
|
||||
})
|
||||
if (this.addressIndex[i][2] === null) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写产品应用地址',
|
||||
})
|
||||
}
|
||||
if (!this.requestName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写申请人',
|
||||
})
|
||||
if (!this.contactName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写业务联系人姓名',
|
||||
})
|
||||
if (!this.contact) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写联系人电话',
|
||||
})
|
||||
if (this.receiveAddressIndex.length > 0 && this.receiveAddressIndex[2] !== null) {
|
||||
const province = this.provinceData[this.receiveAddressIndex[0]]
|
||||
const city = this.cityData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]]
|
||||
const area = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]][this.receiveAddressIndex[2]]
|
||||
this.receiveAddressRegion = {
|
||||
province: {code: province.code, name: province.name},
|
||||
city: {code: city.code, name: city.name},
|
||||
area: {code: area.code, name: area.name},
|
||||
}
|
||||
}
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/addOrder',
|
||||
title: '提交中...',
|
||||
data: {
|
||||
type: 2,
|
||||
amountList,
|
||||
contentList: this.companyList,
|
||||
receiveAddressRegion: this.receiveAddressRegion,
|
||||
email: this.email,
|
||||
wechat: this.wechat,
|
||||
receiveAddress: this.receiveAddress,
|
||||
requestName: this.requestName,
|
||||
contactName: this.contactName,
|
||||
contact: this.contact,
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '已提交',
|
||||
})
|
||||
vk.navigateBack()
|
||||
},
|
||||
showAgreement() {
|
||||
this.$confirm(this.agreement, '金久信自营交易协议', {
|
||||
cancelButtonText: '关闭',
|
||||
showConfirmButton: false,
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
},
|
||||
async getAgreement() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '65885d4c09664c1c8d8e8476'
|
||||
},
|
||||
})
|
||||
this.agreement = res.content
|
||||
},
|
||||
demoDownload() {
|
||||
vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6588642a99c624e89199fbb4'
|
||||
},
|
||||
success: res => {
|
||||
window.open(res.content)
|
||||
}
|
||||
})
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
selectContact(name) {
|
||||
const contact = this.contactList.find(item => item.name === name)
|
||||
this.contact = contact.phone
|
||||
},
|
||||
changeAmountIndex(configIndex) {
|
||||
const config = this.configList[configIndex]
|
||||
if (config.contentIndex !== null && config.amountIndex !== null) {
|
||||
this.configList[configIndex].num = config.contents[config.contentIndex].amountList[config.amountIndex].defaultNum
|
||||
}
|
||||
},
|
||||
previewUpload({url}) {
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const userInfo = vk.getVuex('$user.userInfo')
|
||||
// console.log('userInfo', userInfo)
|
||||
if (parseInt(userInfo.accountType) === 2) {
|
||||
this.email = userInfo.company.contactEmail
|
||||
this.requestName = userInfo.manager.personName
|
||||
this.contactName = userInfo.manager.personName
|
||||
this.contact = userInfo.company.mobile
|
||||
if (userInfo.company && userInfo.company.addressRegion) {
|
||||
this.receiveAddressIndex[0] = this.provinceData.findIndex(item => item.name === userInfo.company.addressRegion.province.name)
|
||||
this.receiveAddressIndex[1] = this.cityData[this.receiveAddressIndex[0]].findIndex(item => item.name === userInfo.company.addressRegion.city.name)
|
||||
this.receiveAddressIndex[2] = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]].findIndex(item => item.name === userInfo.company.addressRegion.area.name)
|
||||
}
|
||||
if (userInfo.company.addressDetail) this.receiveAddress = userInfo.company.addressDetail
|
||||
} else {
|
||||
if (userInfo.businessCard && userInfo.businessCard.email) this.email = userInfo.businessCard.email
|
||||
this.requestName = userInfo.person.personName
|
||||
this.contactName = userInfo.person.personName
|
||||
this.contact = userInfo.person.mobile
|
||||
if (userInfo.person && userInfo.person.addressRegion) {
|
||||
this.receiveAddressIndex[0] = this.provinceData.findIndex(item => item.name === userInfo.person.addressRegion.province.name)
|
||||
this.receiveAddressIndex[1] = this.cityData[this.receiveAddressIndex[0]].findIndex(item => item.name === userInfo.person.addressRegion.city.name)
|
||||
this.receiveAddressIndex[2] = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]].findIndex(item => item.name === userInfo.person.addressRegion.area.name)
|
||||
}
|
||||
if (userInfo.person.addressDetail) this.receiveAddress = userInfo.person.addressDetail
|
||||
}
|
||||
this.getAgreement()
|
||||
this.getConfigList()
|
||||
// this.getContactList()
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach((content, contentIndex) => {
|
||||
if (contentIndex === item.contentIndex && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === item.amountIndex) {
|
||||
tmpAmount += parseFloat(amount.amount)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
totalAmount() {
|
||||
return this.amount * this.companyList.length
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.server-item {
|
||||
background-color: #fbf8f8;
|
||||
border: 2px solid #fbebf1;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.items-center {
|
||||
width: 1100px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
|
||||
view {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.ml-35 {
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.server-item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
//width: 600px !important;
|
||||
}
|
||||
|
||||
.remark {
|
||||
color: #999999;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.divider-title {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -1,193 +1,276 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<u-swiper :list="list" :height="380" borderRadius="0"></u-swiper>
|
||||
<view class="bg-white p-40">
|
||||
<view v-for="(item, index) in configList" :key="index"
|
||||
class="my-20 flex flex-col justify-start items-start">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<text>服务内容:{{ item.name }}</text>
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
class="mb-40 flex justify-start items-center">
|
||||
<view class="ml-35">
|
||||
<text>业务编号:</text>
|
||||
<text>{{ content.code }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="ml-35">服务服务项目:</text>
|
||||
<el-checkbox v-model="configList[index].contents[contentIndex].checked"
|
||||
@change="selectContent(content)"
|
||||
:disabled="!content.amountList || content.amountList.length === 0">
|
||||
{{ content.title }}
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<view class="flex justify-start items-center ml-35">
|
||||
<el-select v-model="configList[index].contents[contentIndex].amountIndex"
|
||||
clearable
|
||||
:disabled="!content.amountList || content.amountList.length === 0">
|
||||
<el-option v-for="(amount, amountIndex) in content.amountList"
|
||||
:key="amountIndex"
|
||||
:label="amount.title" :value="amountIndex"/>
|
||||
</el-select>
|
||||
<text class="ml-35" v-if="content.amountIndex !== null">
|
||||
{{ content.amountList[content.amountIndex].amount }}元/次
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<common-swiper page="self-support-product-swiper"/>
|
||||
<view class="flex justify-end items-center text-main pointer my-20 " @click="demoDownload">示例下载</view>
|
||||
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
<view class="bg-white p-40">
|
||||
<view v-for="(item, index) in configList" :key="index"
|
||||
class="server-item my-20 flex flex-col justify-start items-start">
|
||||
<el-checkbox @change="changeCheck(index, item.name)">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<view class="name">{{ item.name }}</view>
|
||||
<view class="ml-15">
|
||||
<text>业务编号:</text>
|
||||
<text v-if="item.contentIndex !== null">{{
|
||||
item.contents[item.contentIndex].code
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, productIndex) in productList" :key="productIndex">
|
||||
<el-form-item label="检测产品:" required>
|
||||
<el-input v-model="productList[productIndex].name"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测内容">
|
||||
{{ contentNameList.join() }}
|
||||
</el-form-item>
|
||||
<el-form-item label="取样所在地">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[productIndex][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[productIndex][1]" placeholder="请选择市"
|
||||
:disabled="addressIndex[productIndex].length === 0">
|
||||
<template v-if="addressIndex[productIndex][0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[productIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[productIndex][2]" placeholder="请选择区"
|
||||
:disabled="addressIndex[productIndex].length === 1">
|
||||
<template
|
||||
v-if="addressIndex[productIndex][0] !== null && addressIndex[productIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[productIndex][0]][addressIndex[productIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="productList[productIndex].address" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件电子邮箱:">
|
||||
<el-input v-model="productList[productIndex].email"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件微信:">
|
||||
<el-input v-model="productList[productIndex].wechat"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件寄件地址">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[productIndex][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="receiveAddressIndex[productIndex][1]" placeholder="请选择市"
|
||||
:disabled="receiveAddressIndex[productIndex].length === 0">
|
||||
<template v-if="receiveAddressIndex[productIndex][0] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in cityData[receiveAddressIndex[productIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[productIndex][2]" placeholder="请选择区"
|
||||
:disabled="receiveAddressIndex[productIndex].length === 1">
|
||||
<template
|
||||
v-if="receiveAddressIndex[productIndex][0] !== null && receiveAddressIndex[productIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[receiveAddressIndex[productIndex][0]][receiveAddressIndex[productIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="productList[productIndex].receiveAddress" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人:">
|
||||
<el-input v-model="productList[productIndex].requestName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人:">
|
||||
<el-input v-model="productList[productIndex].contactName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式:">
|
||||
<el-input v-model="productList[productIndex].contact"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="本次服务费用小计:">
|
||||
<view class="flex justify-between items-start mb-20 w-100p">
|
||||
<view class="flex justify-start items-center">
|
||||
<el-input v-model="amount" disabled/>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" @click.native="addProduct">增加考察对象
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" plain @click.native="removeProduct(productIndex)"
|
||||
class="ml-20"
|
||||
:disabled="productList.length === 1">删除该对象
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</view>
|
||||
</el-form>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<view class="flex justify-center items-center">
|
||||
<text>总价:</text>
|
||||
<text class="text-main font-bold text-35">{{ totalAmount }}元</text>
|
||||
</view>
|
||||
<view class="ml-35">客服联系方式: 0771-3923001</view>
|
||||
<view class="server-item-content">
|
||||
<text class="ml-15">服务项目:</text>
|
||||
<el-select v-model="configList[index].contentIndex" clearable
|
||||
:disabled="!contentList.includes(index)">
|
||||
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
:label="content.title" :value="contentIndex"/>
|
||||
</el-select>
|
||||
|
||||
<template v-if="item.contentIndex !== null">
|
||||
<el-select v-model="configList[index].amountIndex"
|
||||
clearable class="ml-15">
|
||||
<el-option
|
||||
v-for="(amount, amountIndex) in item.contents[item.contentIndex].amountList"
|
||||
:key="amountIndex"
|
||||
:label="amount.title" :value="amountIndex"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<el-button type="primary" @click.native="newOrder"
|
||||
:disabled="productList.length === 0 || !productList[0].name">
|
||||
立即支付
|
||||
</el-button>
|
||||
<text>金额:</text>
|
||||
<view class="ml-15" v-if="item.contentIndex !== null && item.amountIndex !== null">
|
||||
{{ item.contents[item.contentIndex].amountList[item.amountIndex].amount }}元/次
|
||||
</view>
|
||||
<view class="ml-15" v-else>
|
||||
元/次
|
||||
</view>
|
||||
<el-button type="primary" size="small"
|
||||
@click="addToAmountList(index, configList[index].contentIndex, item.amountIndex)"
|
||||
:disabled="item.amountIndex === null">
|
||||
添加
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="remark">备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<gap/>
|
||||
<common-footer></common-footer>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, productIndex) in productList" :key="productIndex">
|
||||
<el-form-item label="检测产品:" required>
|
||||
<el-input v-model="productList[productIndex].name"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="文档上传:">
|
||||
<vk-data-upload v-model="productList[productIndex].files" list-type="text"
|
||||
:on-preview="previewUpload"
|
||||
accept=".jpg,.jpeg,.png,.xlsx,.doc,.docx,.pdf">
|
||||
</vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测内容">
|
||||
{{ contentNameList.join() }}
|
||||
</el-form-item>
|
||||
<el-form-item label="取样所在地">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[productIndex][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[productIndex][1]" placeholder="请选择市"
|
||||
:disabled="addressIndex[productIndex].length === 0">
|
||||
<template v-if="addressIndex[productIndex][0] !== null">
|
||||
<el-option v-for="(item, index) in cityData[addressIndex[productIndex][0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="addressIndex[productIndex][2]" placeholder="请选择区"
|
||||
:disabled="addressIndex[productIndex].length === 1">
|
||||
<template
|
||||
v-if="addressIndex[productIndex][0] !== null && addressIndex[productIndex][1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[addressIndex[productIndex][0]][addressIndex[productIndex][1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="productList[productIndex].address" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="本次服务费用小计:">
|
||||
<view class="flex justify-between items-start mb-20 w-100p">
|
||||
<view class="flex justify-start items-center">
|
||||
<el-input v-model="amount" disabled/>
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" plain @click.native="removeProduct(productIndex)"
|
||||
class="ml-20"
|
||||
:disabled="productList.length === 1">删除该对象
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-divider/>
|
||||
</view>
|
||||
<el-form-item label="接收文件电子邮箱:">
|
||||
<el-input v-model="email"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件微信:">
|
||||
<el-input v-model="wechat"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件寄件地址">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[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="receiveAddressIndex[1]" placeholder="请选择市"
|
||||
:disabled="receiveAddressIndex.length === 0">
|
||||
<template v-if="receiveAddressIndex[0] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in cityData[receiveAddressIndex[0]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="receiveAddressIndex[2]" placeholder="请选择区"
|
||||
:disabled="receiveAddressIndex.length === 1">
|
||||
<template
|
||||
v-if="receiveAddressIndex[0] !== null && receiveAddressIndex[1] !== null">
|
||||
<el-option
|
||||
v-for="(item, index) in areaData[receiveAddressIndex[0]][receiveAddressIndex[1]]"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="index">
|
||||
</el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="receiveAddress"
|
||||
placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<p class="text-main text-25 text-center" style="margin-bottom: 80rpx">接收文件电子邮箱/ 接收文件微信/
|
||||
接收文件寄件地址,以上三项选填一项即可</p>
|
||||
<!-- <el-form-item label="申请人:">-->
|
||||
<!-- <el-input v-model="requestName"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="联系人:">-->
|
||||
<!-- <el-input v-model="contactName"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="联系方式:">-->
|
||||
<!-- <el-input v-model="contact"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="申请人:" required>
|
||||
<el-input v-model="requestName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="业务联系人:" required>
|
||||
<el-input v-model="contactName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="flex justify-start items-center">
|
||||
<el-form-item label="业务咨询联系方式:" required>
|
||||
<el-input v-model="contact"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8" class="flex justify-start items-center">-->
|
||||
<!-- <el-form-item label="联系人:" required>-->
|
||||
<!-- <el-select v-model="contactName" placeholder="点击选择业务联系人"-->
|
||||
<!-- class="w-100p" @change="selectContact">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="(item, index) in contactList"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.name">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- <view slot="empty" class="text-gray pointer p-20">-->
|
||||
<!-- <text>无业务联系人,请到</text>-->
|
||||
<!-- <text class="text-main mx-15" @click="navTo">个人中心</text>-->
|
||||
<!-- <text>添加</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="8" class="flex justify-start items-center">-->
|
||||
<!-- <el-form-item label="业务咨询联系方式:" required>-->
|
||||
<!-- <el-input v-model="contact" type="number" disabled/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="remark"/>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click.native="addProduct">增加考察对象
|
||||
</el-button>
|
||||
</el-form>
|
||||
<view class="mt-20">
|
||||
<view>已选项目:</view>
|
||||
<view v-for="(item, index) in amountList" :key="index" class="mt-20 flex justify-start items-center">
|
||||
<el-button type="primary" size="small" @click="removeFromAmountList(index)">删除</el-button>
|
||||
<p class="ml-20">{{ configList[item.index].name }} -- {{ configList[item.index].contents[item.contentIndex].title }} --
|
||||
{{
|
||||
configList[item.index].contents[item.contentIndex].amountList[item.amountIndex].title
|
||||
}},{{ configList[item.index].contents[item.contentIndex].amountList[item.amountIndex].amount }}元</p>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<view class="flex justify-center items-center">
|
||||
<text>总价:</text>
|
||||
<text class="text-main font-bold text-35">{{ totalAmount }}元</text>
|
||||
</view>
|
||||
<view class="ml-35">客服联系方式: 400-686-5559</view>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<el-checkbox v-model="agree">我已阅读并同意</el-checkbox>
|
||||
<span class="text-main pointer font-bold" @click="dialogVisible = true">《金久信自营交易协议》</span>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<el-button type="primary" @click.native="newOrder"
|
||||
:disabled="productList.length === 0 || !productList[0].name || !agree">
|
||||
立即支付
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<gap/>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog
|
||||
title="金久信自营交易协议"
|
||||
:visible.sync="dialogVisible"
|
||||
width="70%">
|
||||
<div v-html="agreement"></div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -196,168 +279,341 @@ import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
|
||||
export default {
|
||||
name: "productQuote",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
list: [
|
||||
{
|
||||
image: '/static/images/selfSupport/swiper.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
],
|
||||
form: {},
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
addressIndex: [[null, null, null]],
|
||||
addressDetail: '',
|
||||
receiveAddressIndex: [[null, null, null]],
|
||||
receiveAddressDetail: '',
|
||||
productList: [
|
||||
{
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getConfigList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/coop/config/pub/getList',
|
||||
data: {type: 1}
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contents.map(content => {
|
||||
content.checked = false
|
||||
content.amountIndex = null
|
||||
return content
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
addProduct() {
|
||||
this.productList.push({
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
})
|
||||
this.addressIndex.push([null, null, null])
|
||||
this.receiveAddressIndex.push([null, null, null])
|
||||
},
|
||||
removeProduct(index) {
|
||||
this.productList.splice(index, 1)
|
||||
this.addressIndex.splice(index, 1)
|
||||
this.receiveAddressIndex.splice(index, 1)
|
||||
},
|
||||
selectContent(content) {
|
||||
const index = this.contentNameList.indexOf(content.title)
|
||||
if (index === -1) this.contentNameList.push(content.title)
|
||||
else this.contentNameList.splice(index, 1)
|
||||
},
|
||||
async newOrder() {
|
||||
const amountList = []
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.checked && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === content.amountIndex) {
|
||||
amountList.push(amount._index)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
if (amountList.length === 0) return this.$message({
|
||||
message: '请至少选择一项服务',
|
||||
type: 'error'
|
||||
})
|
||||
this.productList.forEach((item, index) => {
|
||||
this.productList[index].addressRegion = {
|
||||
province: this.provinceData[this.addressIndex[index][0]],
|
||||
city: this.cityData[this.addressIndex[index][0]][this.addressIndex[index][1]],
|
||||
area: this.areaData[this.addressIndex[index][0]][this.addressIndex[index][1]][this.addressIndex[index][2]],
|
||||
}
|
||||
this.productList[index].receiveAddressRegion = {
|
||||
province: this.provinceData[this.receiveAddressIndex[index][0]],
|
||||
city: this.cityData[this.receiveAddressIndex[index][0]][this.receiveAddressIndex[index][1]],
|
||||
area: this.areaData[this.receiveAddressIndex[index][0]][this.receiveAddressIndex[index][1]][this.receiveAddressIndex[index][2]],
|
||||
}
|
||||
})
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/addOrder',
|
||||
data: {
|
||||
type: 1,
|
||||
amountList,
|
||||
contentList: this.productList
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.getConfigList()
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.checked && content.amountList.length > 0) {
|
||||
content.amountList.forEach((amount, amountIndex) => {
|
||||
if (amountIndex === content.amountIndex) {
|
||||
tmpAmount += parseFloat(amount.amount)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
totalAmount() {
|
||||
return this.amount * this.productList.length
|
||||
name: "productQuote",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
form: {},
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
addressIndex: [[null, null, null]],
|
||||
addressDetail: '',
|
||||
receiveAddressIndex: [null, null, null],
|
||||
receiveAddressDetail: '',
|
||||
productList: [
|
||||
{
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
}
|
||||
],
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
remark: '',
|
||||
agreement: '',
|
||||
agree: false,
|
||||
dialogVisible: false,
|
||||
contactList: [],
|
||||
files: [],
|
||||
amountList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getConfigList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/coop/config/pub/getList',
|
||||
data: {type: 1}
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contentIndex = null
|
||||
item.amountIndex = null
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
addProduct() {
|
||||
this.productList.push({
|
||||
name: '',
|
||||
code: '',
|
||||
addressRegion: {
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
},
|
||||
address: '',
|
||||
})
|
||||
this.addressIndex.push([null, null, null])
|
||||
},
|
||||
removeProduct(index) {
|
||||
this.productList.splice(index, 1)
|
||||
this.addressIndex.splice(index, 1)
|
||||
},
|
||||
addToAmountList(index, contentIndex, amountIndex) {
|
||||
this.amountList.push({
|
||||
index,
|
||||
contentIndex,
|
||||
amountIndex,
|
||||
contentIndexVal: this.configList[index].contents[contentIndex]._index,
|
||||
amountIndexVal: this.configList[index].contents[contentIndex].amountList[amountIndex]._index,
|
||||
amount: this.configList[index].contents[contentIndex].amountList[amountIndex].amount
|
||||
})
|
||||
this.configList[index].contentIndex = null
|
||||
this.configList[index].amountIndex = null
|
||||
},
|
||||
removeFromAmountList(index) {
|
||||
this.amountList.splice(index, 1)
|
||||
},
|
||||
async newOrder() {
|
||||
// const amountList = []
|
||||
// this.configList.forEach(item => {
|
||||
// item.contents.forEach((content, contentIndex) => {
|
||||
// if (contentIndex === item.contentIndex && content.amountList.length > 0) {
|
||||
// content.amountList.forEach((amount, amountIndex) => {
|
||||
// if (amountIndex === item.amountIndex) {
|
||||
// amountList.push(`${content._index},${amount._index}`)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
if (this.amountList.length === 0) return this.$message({
|
||||
message: '请至少选择一项服务',
|
||||
type: 'error'
|
||||
})
|
||||
if (!this.email && !this.wechat && this.receiveAddressIndex[0][2] === null) return this.$message({
|
||||
message: '请选择接收文件地址/微信/邮箱',
|
||||
type: 'error'
|
||||
})
|
||||
if (!this.requestName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写申请人',
|
||||
})
|
||||
if (!this.contactName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写联系人姓名',
|
||||
})
|
||||
if (!this.contact) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写联系人电话',
|
||||
})
|
||||
for (let i = 0; i < this.productList.length; i++) {
|
||||
if (!this.productList[i].name) return this.$message({
|
||||
message: '请填写考察产品名称',
|
||||
type: 'error'
|
||||
})
|
||||
if (!this.productList[i].address) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写考察产品地址',
|
||||
})
|
||||
if (this.addressIndex[i][2] === null) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写考察产品地址',
|
||||
})
|
||||
}
|
||||
if (this.receiveAddressIndex.length > 0 && this.receiveAddressIndex[2] !== null) {
|
||||
const province = this.provinceData[this.receiveAddressIndex[0]]
|
||||
const city = this.cityData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]]
|
||||
const area = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]][this.receiveAddressIndex[2]]
|
||||
this.receiveAddressRegion = {
|
||||
province: {code: province.code, name: province.name},
|
||||
city: {code: city.code, name: city.name},
|
||||
area: {code: area.code, name: area.name},
|
||||
}
|
||||
}
|
||||
this.productList.forEach((item, index) => {
|
||||
const companyProvince = this.provinceData[this.addressIndex[index][0]]
|
||||
const companyCity = this.cityData[this.addressIndex[index][0]][this.addressIndex[index][1]]
|
||||
const companyArea = this.areaData[this.addressIndex[index][0]][this.addressIndex[index][1]][this.addressIndex[index][2]]
|
||||
this.productList[index].addressRegion = {
|
||||
province: {code: companyProvince.code, name: companyProvince.name},
|
||||
city: {code: companyCity.code, name: companyCity.name},
|
||||
area: {code: companyArea.code, name: companyArea.name},
|
||||
}
|
||||
})
|
||||
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/addOrder',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
type: 1,
|
||||
amountList: this.amountList.map(item => `${item.contentIndexVal},${item.amountIndexVal}`),
|
||||
contentList: this.productList,
|
||||
receiveAddressRegion: this.receiveAddressRegion,
|
||||
email: this.email,
|
||||
wechat: this.wechat,
|
||||
receiveAddress: this.receiveAddress,
|
||||
requestName: this.requestName,
|
||||
contactName: this.contactName,
|
||||
contact: this.contact,
|
||||
remark: this.remark,
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
changeCheck(itemIndex, name) {
|
||||
const index = this.contentList.indexOf(itemIndex)
|
||||
if (index === -1) {
|
||||
this.contentList.push(itemIndex)
|
||||
this.contentNameList.push(name)
|
||||
} else {
|
||||
this.contentList.splice(index, 1)
|
||||
this.contentNameList.splice(index, 1)
|
||||
this.configList[itemIndex].contentIndex = null
|
||||
this.configList[itemIndex].amountIndex = null
|
||||
}
|
||||
},
|
||||
showAgreement() {
|
||||
this.$confirm(this.agreement, '金久信自营交易协议', {
|
||||
cancelButtonText: '关闭',
|
||||
showConfirmButton: false,
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
},
|
||||
async getAgreement() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '65885d4c09664c1c8d8e8476'
|
||||
},
|
||||
})
|
||||
this.agreement = res.content
|
||||
},
|
||||
demoDownload() {
|
||||
vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6588648da7c432e4a360bb34'
|
||||
},
|
||||
success: res => {
|
||||
window.open(res.content)
|
||||
}
|
||||
})
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
navTo() {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
selectContact(name) {
|
||||
const contact = this.contactList.find(item => item.name === name)
|
||||
this.contact = contact.phone
|
||||
},
|
||||
previewUpload({url}) {
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const userInfo = vk.getVuex('$user.userInfo')
|
||||
// console.log('userInfo', userInfo)
|
||||
if (parseInt(userInfo.accountType) === 2) {
|
||||
this.email = userInfo.company.contactEmail
|
||||
this.requestName = userInfo.manager.personName
|
||||
this.contactName = userInfo.manager.personName
|
||||
this.contact = userInfo.company.mobile
|
||||
if (userInfo.company && userInfo.company.addressRegion) {
|
||||
this.receiveAddressIndex[0] = this.provinceData.findIndex(item => item.name === userInfo.company.addressRegion.province.name)
|
||||
this.receiveAddressIndex[1] = this.cityData[this.receiveAddressIndex[0]].findIndex(item => item.name === userInfo.company.addressRegion.city.name)
|
||||
this.receiveAddressIndex[2] = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]].findIndex(item => item.name === userInfo.company.addressRegion.area.name)
|
||||
}
|
||||
if (userInfo.company.addressDetail) this.receiveAddress = userInfo.company.addressDetail
|
||||
} else {
|
||||
if (userInfo.businessCard && userInfo.businessCard.email) this.email = userInfo.businessCard.email
|
||||
this.requestName = userInfo.person.personName
|
||||
this.contactName = userInfo.person.personName
|
||||
this.contact = userInfo.person.mobile
|
||||
if (userInfo.person && userInfo.person.addressRegion) {
|
||||
this.receiveAddressIndex[0] = this.provinceData.findIndex(item => item.name === userInfo.person.addressRegion.province.name)
|
||||
this.receiveAddressIndex[1] = this.cityData[this.receiveAddressIndex[0]].findIndex(item => item.name === userInfo.person.addressRegion.city.name)
|
||||
this.receiveAddressIndex[2] = this.areaData[this.receiveAddressIndex[0]][this.receiveAddressIndex[1]].findIndex(item => item.name === userInfo.person.addressRegion.area.name)
|
||||
}
|
||||
if (userInfo.person.addressDetail) this.receiveAddress = userInfo.person.addressDetail
|
||||
}
|
||||
this.getConfigList()
|
||||
this.getAgreement()
|
||||
// this.getContactList()
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
// this.configList.forEach(item => {
|
||||
// item.contents.forEach((content, contentIndex) => {
|
||||
// if (contentIndex === item.contentIndex && content.amountList.length > 0) {
|
||||
// content.amountList.forEach((amount, amountIndex) => {
|
||||
// if (amountIndex === item.amountIndex) {
|
||||
// tmpAmount += parseFloat(amount.amount)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
this.amountList.forEach(item => {
|
||||
tmpAmount += item.amount
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
totalAmount() {
|
||||
return this.amount * this.productList.length
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.server-item {
|
||||
background-color: #fbf8f8;
|
||||
border: 2px solid #fbebf1;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.items-center {
|
||||
width: 1100px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
|
||||
view {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.ml-35 {
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.server-item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 600px !important;
|
||||
}
|
||||
|
||||
.remark {
|
||||
color: #999999;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.divider-title {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/self-support/self-support">金久信自营</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>填写报价信息</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<quote-remain-num v-if="reloaded"/>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
:action="form1.props.action"
|
||||
:columns="form1.props.columns"
|
||||
:rules="form1.props.rules"
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="false"
|
||||
:show-cancel="false"
|
||||
label-width="160px"
|
||||
@success="onFormSuccess"
|
||||
>
|
||||
<template v-slot:desc>
|
||||
<span>{{ sheet.desc }}</span>
|
||||
</template>
|
||||
<template v-slot:amount>
|
||||
<el-input v-model="form1.data.amount" placeholder="请输入货款总价" @change="formatNumber"></el-input>
|
||||
</template>
|
||||
<template v-slot:sheetFile="{ row, column, index }">
|
||||
<p v-for="(item, index) in sheet.files" :key="index" class="text-main">
|
||||
<a :href="item" target="_blank">预览:文件{{index + 1}}</a>
|
||||
</p>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
reloaded: false,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null,
|
||||
amount: null,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/selfSupport/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "sheetFile", title: "询价文件", type: "html"},
|
||||
{key: "desc", title: "产品描述", type: "html"},
|
||||
{key: "amount", title: "货款总价(人民币:元)", type: "html"},
|
||||
{key: "files", title: "附件", type: "file", accept: '.pdf'},
|
||||
{key: "remark", title: "报价单详情", type: "textarea"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
amount: [
|
||||
{required: true, message: "货款总价不能为空", trigger: "change,blur"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
sheet: null
|
||||
};
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
console.log(options)
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
if (!id) {
|
||||
vk.navigateTo('/pages/self-support/self-support');
|
||||
return
|
||||
}
|
||||
|
||||
this.enquiryId = id
|
||||
this.form1.data.sheetId = id
|
||||
this.getEnquiryDetail()
|
||||
},
|
||||
computed: {
|
||||
totalPriceStr() {
|
||||
if (this.totalPrice == 0) {
|
||||
return "零元"
|
||||
}
|
||||
return vk.myfn.convertCurrency(this.totalPrice / 100)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.redirectTo({url: `/pages/index/index`})
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
const data = await vk.userCenter.getCurrentUserInfo();
|
||||
const {userInfo} = data
|
||||
if (userInfo.remainQuoteNum === 0 || !userInfo.remainQuoteNum) {
|
||||
|
||||
}
|
||||
|
||||
// this.$confirm(`今日报价次数${userInfo.quoteTimes || 0}, 是否继续?`, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning',
|
||||
// center: true
|
||||
// }).then(res => {
|
||||
//
|
||||
// })
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/quote/kh/addQuote',
|
||||
title: '请求中...',
|
||||
// data: {
|
||||
// sheet: this.sheet,
|
||||
// totalPrice: this.totalPrice
|
||||
// },
|
||||
success: (data) => {
|
||||
this.$message({
|
||||
message: "报价成功",
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
getEnquiryDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: this.enquiryId
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res
|
||||
}
|
||||
});
|
||||
},
|
||||
formatNumber(e){
|
||||
this.form1.data.amount = parseFloat(this.form1.data.amount).toFixed(2)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 40px;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.quote-form {
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
@@ -1,38 +1,89 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<u-swiper :list="list" :height="380" borderRadius="0"></u-swiper>
|
||||
<view class="flex flex-col">
|
||||
<image src="/static/images/selfSupport/company.jpg" class="w-100p pointer" mode="widthFix"
|
||||
@click="navTo('/pages/index/self-support/companyQuote')"/>
|
||||
<image src="/static/images/selfSupport/product.jpg" class="w-100p pointer mt-20" mode="widthFix"
|
||||
@click="navTo('/pages/index/self-support/productQuote')"/>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<!-- <el-carousel :height="`500px`" :style="{width: '1200px'}" class="m-a">-->
|
||||
<!-- <el-carousel-item v-for="(item, index) in list" :key="index" :style="{width: '1200px'}">-->
|
||||
<!-- <image :src="item.image" mode="scaleToFill" :style="{width: '1200px', height: '500px'}"/>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="self-support-main"/>
|
||||
<view class="flex flex-col">
|
||||
<image :src="companyImg" class="w-100p pointer"
|
||||
style="height: 150px"
|
||||
@click="navTo('/pages/index/self-support/companyQuote')"/>
|
||||
<image :src="productImg" class="w-100p pointer mt-20"
|
||||
style="height: 150px"
|
||||
@click="navTo('/pages/index/self-support/productQuote')"/>
|
||||
<image :src="costImg" class="w-100p pointer mt-20"
|
||||
style="height: 150px"
|
||||
@click="navTo('/pages/index/self-support/costQuote')"/>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "selectType",
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
image: '/static/images/selfSupport/swiper.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
name: "selectType",
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
image: '/static/images/selfSupport/swiper.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
],
|
||||
companyImg: '',
|
||||
productImg: '',
|
||||
costImg: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
async getCompanyImg(){
|
||||
vk.callFunction({
|
||||
url: 'client/album/pub/list',
|
||||
data: {
|
||||
page: 'self-support-company'
|
||||
},
|
||||
success: ({swiper}) => {
|
||||
this.companyImg = swiper[0]
|
||||
}
|
||||
})
|
||||
},
|
||||
async getProductImg(){
|
||||
vk.callFunction({
|
||||
url: 'client/album/pub/list',
|
||||
data: {
|
||||
page: 'self-support-product'
|
||||
},
|
||||
success: ({swiper}) => {
|
||||
this.productImg = swiper[0]
|
||||
}
|
||||
})
|
||||
},
|
||||
async getCostImg(){
|
||||
vk.callFunction({
|
||||
url: 'client/album/pub/list',
|
||||
data: {
|
||||
page: 'self-support-quote'
|
||||
},
|
||||
success: ({swiper}) => {
|
||||
this.costImg = swiper[0]
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(){
|
||||
this.getCompanyImg()
|
||||
this.getProductImg()
|
||||
this.getCostImg()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,215 +1,514 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200">
|
||||
<u-swiper :list="list" :height="380" borderRadius="0"></u-swiper>
|
||||
<view class="test">
|
||||
<text class="pointer" @click="navTo('/pages/index/self-support/self-support')">自营钢城</text>
|
||||
<text class="pointer" @click="navTo('/pages/index/self-support/selectType')">平台服务</text>
|
||||
<text class="pointer" @click="navTo('/pages/index/shop/shop')">特产商城</text>
|
||||
</view>
|
||||
<view class="tool-bar">
|
||||
<view class="search">
|
||||
<text>交易区域:</text>
|
||||
<el-cascader :options="options" :props="{label: 'name', value: 'code'}" v-model="address"
|
||||
@change="getCompanyList" clearable/>
|
||||
</view>
|
||||
<view class="buy-btn">
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn" :disabled="address.length === 0"
|
||||
@click.native="dialogVisible = true">
|
||||
下单询价>
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 合作单位/联营单位-->
|
||||
<view class="cooperate">
|
||||
<view class="title">合作单位/联营单位</view>
|
||||
<u-gap height="5" bg-color="#f3f3f3"/>
|
||||
<view class="flex justify-start items-start flex-wrap">
|
||||
<view class="w-25p pointer" v-for="(item, index) in companyList" :key="index">
|
||||
<view class="border bg-white flex flex-col justify-center items-center p-20">
|
||||
<image :src="item.businessCard.logo" class="logo"/>
|
||||
<span class="mt-20 line-1 w-100p text-center">
|
||||
主营: {{ item.businessCard.mainBusiness }}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#f3f3f3"/>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="w-1200">
|
||||
<view class="test">
|
||||
<text class="pointer active" @click="navTo('/pages/index/self-support/self-support')">自营钢城</text>
|
||||
<text class="pointer" @click="navTo('/pages/index/self-support/selectType')">平台服务</text>
|
||||
<text class="pointer" @click="navTo('/pages/index/shop/shop')">特产商城</text>
|
||||
</view>
|
||||
<common-swiper page="self-support-index"/>
|
||||
<div class="flex justify-between items-center w-1200 m-a">
|
||||
<template v-if="ad32.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad33.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad32" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
<template v-if="ad33.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad34.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad33" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
<div class="flex justify-between items-center w-1200 m-a">
|
||||
<template v-if="ad34.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad35.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad34" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
<template v-if="ad35.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad35.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad35" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
<view class="tool-bar">
|
||||
<view class="search">
|
||||
<text>交易区域:</text>
|
||||
<el-cascader :options="options" :props="{label: 'name', value: 'code'}" v-model="address"
|
||||
clearable @change="getCompanyList"/>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog
|
||||
title="下询价单"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%">
|
||||
<vk-data-upload v-model="files" accept="*">
|
||||
</vk-data-upload>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addFiles">确 定</el-button>
|
||||
</el-dialog>
|
||||
<view class="flex justify-end items-start">
|
||||
<view class="flex flex-col justify-center items-center mr-10">
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn" :disabled="address.length === 0"
|
||||
@mouseenter.native="showTips = true"
|
||||
@mouseleave.native="showTips = false"
|
||||
@click.native="openDialog">
|
||||
下单询价>
|
||||
</el-button>
|
||||
<text class="text-main mt-10 text-20" v-if="showTips && address.length === 0">请先选择交易区域</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="getList">
|
||||
我的询价
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 合作单位/联营单位-->
|
||||
<view class="cooperate">
|
||||
<view class="title">合作单位/联营单位</view>
|
||||
<u-gap height="5" bg-color="#f3f3f3"/>
|
||||
<view class="flex justify-start items-start flex-wrap">
|
||||
<view class="w-25p pointer" v-for="(item, index) in companyList" :key="index"
|
||||
@click="navToWithAuth(`/pages/yellowPage/info?id=${item.uid}`)">
|
||||
<view class="border bg-white flex justify-start items-center p-20">
|
||||
<image v-if="item.businessCard" :src="item.businessCard.logo" class="logo"/>
|
||||
<image v-else src="/static/images/no-logo.jpg" class="logo" mode="aspectFill"/>
|
||||
<div class="flex flex-col justify-start items-start ml-20 w-67p">
|
||||
<span class="text-30 font-bold mb-25">{{ item.company.companyName }}</span>
|
||||
<span class="mt-20 line-2 w-100p">
|
||||
主营: {{
|
||||
(item.mainSpotCategory && item.mainSpotCategory.length > 0) ? item.mainSpotCategory.join() : ''
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-gap height="5" bg-color="#f3f3f3"/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog
|
||||
title="下询价单"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%">
|
||||
<el-form ref="form" label-width="140px">
|
||||
<el-form-item label="联系人" required>
|
||||
<el-select v-model="name" placeholder="点击选择业务联系人"
|
||||
class="w-100p" @change="selectContact">
|
||||
<el-option
|
||||
v-for="(item, index) in contactList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
<view slot="empty" class="text-gray pointer p-20">
|
||||
<text>无业务联系人,请到</text>
|
||||
<text class="text-main mx-15" @click="navToContact">个人中心</text>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" required>
|
||||
<el-input v-model="phone" placeholder="请输入联系方式" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称" required>
|
||||
<el-input v-model="company" placeholder="请输入您的名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="询价单附件" required>
|
||||
<vk-data-upload v-model="files" list-type="text" accept="*" :on-preview="previewUpload">
|
||||
</vk-data-upload>
|
||||
<!-- <p class="text-main text-25">平台目前仅支持PDF文档上传,请你谅解!</p>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex justify-start items-start">
|
||||
<span>金久信自营说明:</span>
|
||||
<div>
|
||||
<p>1、金久信自营目前以不垫资交易方式为主,询价单请备注付款方式,期限和项目名称;</p>
|
||||
<p>2、你未收到报价可能是你的信用风险评分未达到平台审核标准;</p>
|
||||
<p>3、提交成功后请您注意接听电话和查看平台信息便于快速准确报价和成交签约。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addFiles">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="我的询价单" :visible.sync="showList" width="60%">
|
||||
<el-table :data="list" style="width: 100%">
|
||||
<el-table-column prop="name" label="联系人"/>
|
||||
<el-table-column label="询价区域">
|
||||
<template #default="{row}">
|
||||
{{ row.province.name }}{{ row.city.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="联系方式"/>
|
||||
<el-table-column prop="company" label="企业名称"/>
|
||||
<el-table-column label="附件">
|
||||
<template #default="{row}">
|
||||
<file-type v-for="(item, index) in row.files" :key="index" :item="item"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="_add_time_str" label="询价日期"/>
|
||||
</el-table>
|
||||
<div class="mt-20 text-center">
|
||||
<el-button @click="showList = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UGap from "@/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue";
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
components: {UGap},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
address: [],
|
||||
files: [],
|
||||
list: [
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
|
||||
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
],
|
||||
options: [],
|
||||
companyList: []
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.menu) {
|
||||
this.currMenu = options.menu
|
||||
}
|
||||
this.getCompanyList()
|
||||
this.options = provinces.map(item => {
|
||||
item.children = [];
|
||||
return item
|
||||
})
|
||||
this.options.forEach((province, index) => {
|
||||
citys[index].forEach(city => {
|
||||
this.options[index].children.push(city)
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.currMenu = e
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
async getCompanyList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
data: {
|
||||
isCoop: 1,
|
||||
city: this.address.length > 0 ? [this.address[1]] : []
|
||||
}
|
||||
})
|
||||
this.companyList = rows
|
||||
},
|
||||
async addFiles() {
|
||||
await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/add',
|
||||
data: {
|
||||
files: this.files,
|
||||
city: this.address.length > 0 ? this.address[1] : []
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
message: '下单成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogVisible = false
|
||||
}
|
||||
components: {FileType, UGap},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
address: [],
|
||||
files: [],
|
||||
options: [],
|
||||
companyList: [],
|
||||
name: null,
|
||||
phone: null,
|
||||
company: null,
|
||||
showList: false,
|
||||
list: [],
|
||||
allChildCate: [],
|
||||
contactList: [],
|
||||
showTips: false,
|
||||
ad32: [],
|
||||
ad33: [],
|
||||
ad34: [],
|
||||
ad35: [],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.menu) {
|
||||
this.currMenu = options.menu
|
||||
}
|
||||
this.getCategoryTreeData()
|
||||
this.options = provinces.map(item => {
|
||||
item.children = [];
|
||||
return item
|
||||
})
|
||||
this.options.forEach((province, index) => {
|
||||
citys[index].forEach(city => {
|
||||
city.children = []
|
||||
this.options[index].children.push(city)
|
||||
})
|
||||
})
|
||||
this.options.forEach((province, index) => {
|
||||
citys[index].forEach((city, cityIndex) => {
|
||||
areas[index][cityIndex].forEach(area => {
|
||||
this.options[index].children[cityIndex].children.push(area)
|
||||
})
|
||||
})
|
||||
})
|
||||
this.getContactList()
|
||||
const user = vk.getVuex('$user.userInfo')
|
||||
this.company = user.accountType === 2 ? user.company.companyName : user.person.personName
|
||||
this.getUserInfo()
|
||||
this.getAd32()
|
||||
this.getAd33()
|
||||
this.getAd34()
|
||||
this.getAd35()
|
||||
},
|
||||
methods: {
|
||||
getCategoryTreeData() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.allChildCate = []
|
||||
data.rows.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
this.getCompanyList()
|
||||
}
|
||||
});
|
||||
},
|
||||
menuSelect(e) {
|
||||
this.currMenu = e
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
async getUserInfo() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
this.userInfo = userInfo
|
||||
this.accountNum = accountNum
|
||||
},
|
||||
navToWithAuth(url) {
|
||||
if (!this.userInfo.fadadaConfirm || [-1, 2].includes(this.userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo(url);
|
||||
}
|
||||
},
|
||||
openDialog() {
|
||||
if (!this.userInfo.fadadaConfirm || [-1, 2].includes(this.userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else {
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
async getCompanyList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
data: {
|
||||
isCoop: 1,
|
||||
province: this.address.length > 0 ? [this.address[0]] : []
|
||||
}
|
||||
})
|
||||
this.companyList = rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
item.mainSpotCategory = []
|
||||
if (item.company && item.company.mainSpotCategoryIds) {
|
||||
this.allChildCate.forEach(child => {
|
||||
if (item.company.mainSpotCategoryIds.includes(child._id)) {
|
||||
item.mainSpotCategory.push(child.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
async addFiles() {
|
||||
if (!this.name) return this.$message({type: 'error', message: '请输入联系人'})
|
||||
if (!this.phone) return this.$message({type: 'error', message: '请输入联系方式'})
|
||||
if (!this.company) return this.$message({type: 'error', message: '请输入您的企业名称'})
|
||||
if (this.files.length === 0) return this.$message({type: 'error', message: '请上传询价单附件'})
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm') || [-1, 2].includes(vk.getVuex('$user.userInfo.authStatus'))) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
this.dialogVisible = false
|
||||
return
|
||||
}
|
||||
let city, province
|
||||
this.options.forEach((provinceItem, index) => {
|
||||
provinceItem.children.forEach(cityItem => {
|
||||
if (cityItem.code === this.address[1]) {
|
||||
city = cityItem
|
||||
province = {code: provinceItem.code, name: provinceItem.name}
|
||||
}
|
||||
})
|
||||
})
|
||||
await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/add',
|
||||
data: {
|
||||
files: this.files,
|
||||
city,
|
||||
province,
|
||||
name: this.name,
|
||||
phone: this.phone,
|
||||
company: this.company,
|
||||
}
|
||||
})
|
||||
await this.$alert('<p style="text-align: center">您已下单成功,感谢您选择金久信</p><p style="text-align: center">请待平台为您提供竭诚服务!</p><p style="text-align: center; color: red">客服电话:400-686-5559</p>', '', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
|
||||
this.dialogVisible = false
|
||||
},
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getList',
|
||||
})
|
||||
this.list = rows
|
||||
this.showList = true
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
navToContact() {
|
||||
this.dialogVisible = false
|
||||
this.showList = false
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-contact'})
|
||||
},
|
||||
selectContact(name) {
|
||||
const contact = this.contactList.find(item => item.name === name)
|
||||
this.phone = contact.phone
|
||||
},
|
||||
previewUpload({url}) {
|
||||
window.open(url)
|
||||
},
|
||||
async getAd32() {
|
||||
this.ad32 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 32,
|
||||
region: this.address ?? null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad32 = res.data
|
||||
},
|
||||
async getAd33() {
|
||||
this.ad33 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 33,
|
||||
region: this.address ?? null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad33 = res.data
|
||||
},
|
||||
async getAd34() {
|
||||
this.ad34 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 34,
|
||||
region: this.address ?? null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad34 = res.data
|
||||
},
|
||||
async getAd35() {
|
||||
this.ad35 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 35,
|
||||
region: this.address ?? null
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad35 = res.data
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #fff;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #fff;
|
||||
|
||||
.test {
|
||||
height: 50px;
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
background-color: #bf2b28;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.test {
|
||||
height: 50px;
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
background-color: #bf2b28;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
text {
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
text:hover {
|
||||
color: #F2CFCE;
|
||||
}
|
||||
text {
|
||||
padding: 0 20px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tool-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
text:hover {
|
||||
background-color: #690503
|
||||
}
|
||||
|
||||
.cooperate {
|
||||
.title {
|
||||
text-align: center;
|
||||
color: #bf2b28;
|
||||
font-size: 28px;
|
||||
line-height: 3em;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
flex-direction: column;
|
||||
|
||||
.comments {
|
||||
line-height: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-purple {
|
||||
border-top: 1px solid #f3f3f3;
|
||||
border-right: 1px solid #f3f3f3;
|
||||
|
||||
.image {
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
.active {
|
||||
background-color: #941411
|
||||
}
|
||||
}
|
||||
|
||||
.tool-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.cooperate {
|
||||
.title {
|
||||
text-align: center;
|
||||
color: #bf2b28;
|
||||
font-size: 28px;
|
||||
line-height: 3em;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
flex-direction: column;
|
||||
|
||||
.comments {
|
||||
line-height: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-purple {
|
||||
border-top: 1px solid #f3f3f3;
|
||||
border-right: 1px solid #f3f3f3;
|
||||
|
||||
.image {
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -244,15 +244,15 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: [{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
image: '/static/images/swiper_5.png',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
||||
image: '/static/images/swiper_5.png',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
|
||||
image: '/static/images/swiper_5.png',
|
||||
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
],
|
||||
|
||||
+51
-19
@@ -9,11 +9,11 @@
|
||||
<text class="font-bold text-40">
|
||||
购物车(全部{{ list.length }})
|
||||
</text>
|
||||
<view class="flex justify-end items-center">
|
||||
<text>已选商品(不含运费)</text>
|
||||
<text class="text-main text-40 font-bold mx-20">¥{{ amount }}</text>
|
||||
<el-button type="primary" round>结算</el-button>
|
||||
</view>
|
||||
<!-- <view class="flex justify-end items-center">-->
|
||||
<!-- <text>已选商品(不含运费)</text>-->
|
||||
<!-- <text class="text-main text-40 font-bold mx-20">¥{{ amount }}</text>-->
|
||||
<!-- <el-button type="primary" round @click.native="addFromCart">结算</el-button>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<view class="py-20">
|
||||
<el-row :gutter="10">
|
||||
@@ -46,23 +46,24 @@
|
||||
<view class="flex justify-start items-start">
|
||||
<el-checkbox v-model="list[index].checked" @change="changeCheck($event, item._id)">
|
||||
</el-checkbox>
|
||||
<el-image :src="item.goods.cover" class="cover ml-20" fit="fit"/>
|
||||
<el-image :src="item.goods.cover" class="cover ml-20" fit="fit"/>
|
||||
<view class="flex flex-col justify-start items-start ml-20">
|
||||
{{ item.goods.name }}
|
||||
<text class="font-bold mb-15">{{ item.goods.name }}</text>
|
||||
<text class="text-gray">{{ item.sku.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<text class="text-35 font-bold flex-1">¥{{ item.goods.amount }}</text>
|
||||
<text class="text-35 font-bold flex-1">¥{{ item.sku.values }}</text>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<text class="text-35 font-bold flex-1">
|
||||
<el-input-number v-model="list[index].num" @change="changeNum" :min="1" size="small"/>
|
||||
<el-input-number v-model="list[index].num" @change="changeNum(index)" :min="1" size="small"/>
|
||||
</text>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<text class="text-35 font-bold flex-1 text-main">¥{{
|
||||
parseFloat(item.goods.amount) * item.num
|
||||
parseFloat(item.sku.values) * item.num
|
||||
}}
|
||||
</text>
|
||||
</el-col>
|
||||
@@ -72,16 +73,16 @@
|
||||
</el-row>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-between items-center">
|
||||
<el-button type="text">移出购物车</el-button>
|
||||
<el-button type="text" @click.native="removeMulti" :disabled="selectedList.length === 0">移出购物车</el-button>
|
||||
<view class="flex justify-end items-center">
|
||||
<view>
|
||||
<text>已选商品</text>
|
||||
<text class="mx-15 font-bold text-35 text-main">{{ selectedList.length }}</text>
|
||||
<text>件</text>
|
||||
</view>
|
||||
<text class="ml-35">合计(不含运费):</text>
|
||||
<text class="ml-35">合计:</text>
|
||||
<text class="mx-15 font-bold text-40 text-main">¥{{ amount }}</text>
|
||||
<el-button type="primary" round :disabled="selectedList.length === 0">结算</el-button>
|
||||
<el-button type="primary" round :disabled="selectedList.length === 0" @click.native="addFromCart">结算</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -106,18 +107,27 @@ export default {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: "client/cart/kh/getList"
|
||||
})
|
||||
this.selectedAll = false
|
||||
this.list = rows.map(item => {
|
||||
item.checked = false
|
||||
return item
|
||||
})
|
||||
},
|
||||
doSelectAll() {
|
||||
this.selectedList = []
|
||||
this.list.forEach((item, index) => {
|
||||
this.list[index].checked = this.selectedAll
|
||||
if (this.selectedAll) this.selectedList.push(item._id)
|
||||
})
|
||||
},
|
||||
changeNum(e) {
|
||||
console.log(e)
|
||||
changeNum(index) {
|
||||
vk.callFunction({
|
||||
url: "client/cart/kh/changeNum",
|
||||
data: {
|
||||
id: this.list[index]._id,
|
||||
num: this.list[index].num
|
||||
}
|
||||
})
|
||||
},
|
||||
changeCheck(e, id) {
|
||||
const index = this.selectedList.indexOf(id)
|
||||
@@ -126,15 +136,38 @@ export default {
|
||||
this.selectedAll = this.selectedList.length === this.list.length
|
||||
},
|
||||
remove(index) {
|
||||
this.list.splice(index, 1)
|
||||
vk.callFunction({
|
||||
url: "client/cart/kh/delete",
|
||||
data: {
|
||||
ids: [this.list[index]._id]
|
||||
}
|
||||
})
|
||||
this.list.splice(index, 1)
|
||||
},
|
||||
async removeMulti() {
|
||||
if (this.selectedList.length === 0) return
|
||||
await vk.callFunction({
|
||||
url: "client/cart/kh/delete",
|
||||
data: {
|
||||
ids: this.selectedList
|
||||
}
|
||||
})
|
||||
this.selectedList = []
|
||||
await this.getList()
|
||||
},
|
||||
async addFromCart(){
|
||||
const {data} = await vk.callFunction({
|
||||
url: "client/order/kh/addFromList",
|
||||
data: {
|
||||
type: 0,
|
||||
ids: this.selectedList
|
||||
}
|
||||
})
|
||||
this.selectedAll = false
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getList()
|
||||
@@ -143,8 +176,7 @@ export default {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.list.forEach(item => {
|
||||
console.log(item.checked)
|
||||
if (item.checked) tmpAmount += parseFloat(item.goods.amount) * parseInt(item.num)
|
||||
if (item.checked) tmpAmount += parseFloat(item.sku.values) * parseInt(item.num)
|
||||
})
|
||||
return tmpAmount
|
||||
}
|
||||
|
||||
+212
-112
@@ -1,142 +1,242 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/index/shop/shop">特产商城</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-main">{{ info.name }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
<view class="bg-white p-40 flex justify-start items-start">
|
||||
<el-carousel height="400px" class="album">
|
||||
<el-carousel-item v-for="(item, index) in info.album" :key="index">
|
||||
<image :src="item" class="album-item" mode="aspectFill"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="ml-35 flex flex-col justify-start items-start flex-1">
|
||||
<view class="font-bold text-40 mb-20">{{ info.name }}</view>
|
||||
<view class="flex flex-col justify-start items-start flex-1">
|
||||
<text>产品介绍:</text>
|
||||
<view class="desc p-20 mt-20">{{ info.desc }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-center w-100p mt-20">
|
||||
<view class="flex justify-start items-center">
|
||||
<text>零售价:</text>
|
||||
<text class="font-bold text-main">¥{{ info.amount }}</text>
|
||||
</view>
|
||||
<view class="flex justify-end is-center">
|
||||
<el-button type="danger" round class="add-to-cart-btn" @click.native="addToCart">加入购物车</el-button>
|
||||
<el-button type="primary" round class="ml-35" @click.native="newOrder">立即购买</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/index/shop/shop">特产商城</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-main">{{ info.name }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
<view class="bg-white p-40 flex justify-start items-start">
|
||||
<el-carousel height="500px" class="album">
|
||||
<el-carousel-item v-for="(item, index) in info.album" :key="index">
|
||||
<image :src="item" class="album-item" mode="aspectFill"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="ml-35 flex flex-col justify-start items-start flex-1">
|
||||
<view class="font-bold text-40 mb-20">{{ info.name }}</view>
|
||||
<view class="flex flex-col justify-start items-start flex-1">
|
||||
<text>产品介绍:</text>
|
||||
<view class="desc p-20 mt-20">{{ info.desc }}</view>
|
||||
</view>
|
||||
<view class="flex flex-col items-start justify-start w-100p mt-20">
|
||||
<view class="flex flex-col justify-start items-start flex-1 mr-25 w-100p">
|
||||
<view class="flex justify-start items-center">
|
||||
<text>零售价:</text>
|
||||
<text class="font-bold text-main">¥{{ info.amount }}</text>
|
||||
</view>
|
||||
<view class="flex-1 w-100p" v-if="info.sku">
|
||||
<view class="w-100p my-25 flex flex-1 justify-center items-center p-15">
|
||||
<text class="flex-1 text-center">规格/分类/说明</text>
|
||||
<text class="flex-1 text-center">数量</text>
|
||||
<text class="flex-1 text-center">价格</text>
|
||||
</view>
|
||||
<view class="border my-25 flex justify-center items-center p-15 pointer sku"
|
||||
v-for="(item, index) in info.sku" :key="index"
|
||||
:class="[selectedSku === item._index ? 'sku-selected' : '']">
|
||||
<el-image v-if="item.image" :src="item.image" style="width: 40px; height: 40px"
|
||||
@click="selectedSku = item._index"/>
|
||||
<text class="flex-1 text-center" @click="selectedSku = item._index">{{
|
||||
item.label
|
||||
}}
|
||||
</text>
|
||||
<view class="flex-1 flex justify-center items-center" style="z-index: 999">
|
||||
<el-input-number v-model="info.sku[index].num" :min="1" size="small"/>
|
||||
</view>
|
||||
<text class="flex-1 text-center" @click="selectedSku = item._index">{{
|
||||
item.values
|
||||
}}元
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-40">
|
||||
<view class="intro-title">商品介绍</view>
|
||||
<view class="intro bg-white" v-html="info.content"></view>
|
||||
<view class="flex justify-center items-center w-100p mt-20">
|
||||
<el-button type="danger" round
|
||||
:class="selectedSku ? 'add-to-cart-btn' : 'add-to-cart-btn-disabled'"
|
||||
@click.native="addToCart" :disabled="!selectedSku">
|
||||
加入购物车
|
||||
</el-button>
|
||||
<el-button type="primary" round class="ml-35" @click.native="newOrder"
|
||||
:disabled="!selectedSku">立即购买
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center">
|
||||
<template v-if="info.express">
|
||||
<transporter theme="outline" size="16" fill="#9b9b9b" strokeLinecap="square"/>
|
||||
<text class="ml-10">快递:{{ info.express }}</text>
|
||||
</template>
|
||||
<text v-if="info.deliverDate" class="ml-35">{{ info.deliverDate }}</text>
|
||||
<text v-if="info.expressAmount !== undefined && info.expressAmount !== null" class="ml-35">
|
||||
运费:{{ info.expressAmount === 0 ? '免运费' : info.expressAmount }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="mt-20 flex justify-start items-center" v-if="info.ensureService">
|
||||
<like theme="outline" size="16" fill="#9b9b9b" strokeLinecap="square"/>
|
||||
<text class="ml-10">{{ info.ensureService }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
|
||||
</view>
|
||||
<view class="mt-40" v-if="info.video">
|
||||
<view class="intro-title">视频介绍</view>
|
||||
<video :src="info.video" autoplay controls style="width: 100%; height: 800px"></video>
|
||||
</view>
|
||||
<view class="mt-40">
|
||||
<view class="intro-title">商品介绍</view>
|
||||
<view class="intro bg-white" v-html="info.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UGap from "@/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue";
|
||||
import {Transporter, Like} from '@icon-park/vue'
|
||||
|
||||
export default {
|
||||
components: {UGap},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
info: {
|
||||
name: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.id) {
|
||||
this.id = options.id;
|
||||
this.getInfo(options.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
async getInfo(id) {
|
||||
this.info = await vk.callFunction({
|
||||
url: 'client/goods/list/pub/getDetail',
|
||||
data: {id}
|
||||
})
|
||||
},
|
||||
addToCart(){
|
||||
vk.callFunction({
|
||||
url: 'client/cart/kh/add',
|
||||
data: {
|
||||
goodsId: this.id,
|
||||
},
|
||||
success: (res) => {
|
||||
this.$message({
|
||||
type:'success',
|
||||
message: '添加成功'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async newOrder(){
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
data: {
|
||||
goodsId: this.id,
|
||||
num: 1,
|
||||
type: 0
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}
|
||||
components: {UGap, Transporter, Like},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
info: {
|
||||
name: ''
|
||||
},
|
||||
num: 1,
|
||||
selectedSku: null
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.id) {
|
||||
this.id = options.id;
|
||||
this.getInfo(options.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
async getInfo(id) {
|
||||
this.info = await vk.callFunction({
|
||||
url: 'client/goods/list/pub/getDetail',
|
||||
data: {id}
|
||||
})
|
||||
if (this.info.sku && this.info.sku.length > 0) {
|
||||
this.info.sku.map((sku, index) => {
|
||||
this.$set(this.info.sku[index], 'num', 1)
|
||||
return sku
|
||||
})
|
||||
this.selectedSku = this.info.sku[0]._index
|
||||
}
|
||||
},
|
||||
addToCart() {
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm') || ([-1, 2].includes(vk.getVuex('$user.userInfo.authStatus')) && !vk.getVuex('$user.userInfo.userType'))) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.callFunction({
|
||||
url: 'client/cart/kh/add',
|
||||
data: {
|
||||
goodsId: this.id,
|
||||
skuId: this.selectedSku,
|
||||
num: this.info.sku.find(item => item._index === this.selectedSku).num,
|
||||
},
|
||||
success: (res) => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '添加成功'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async newOrder() {
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm') || ([-1, 2].includes(vk.getVuex('$user.userInfo.authStatus')) && !vk.getVuex('$user.userInfo.userType'))) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
return
|
||||
}
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/order/kh/add',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
goodsId: this.id,
|
||||
skuId: this.selectedSku,
|
||||
num: this.info.sku.find(item => item._index === this.selectedSku).num,
|
||||
type: 0
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.album {
|
||||
width: 500px;
|
||||
width: 500px;
|
||||
|
||||
.album-item {
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
}
|
||||
.album-item {
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
background-color: #F5E2E3;
|
||||
background-color: #F5E2E3;
|
||||
}
|
||||
|
||||
.add-to-cart-btn{
|
||||
background-color: #FF7300;
|
||||
.add-to-cart-btn {
|
||||
background-color: #FF7300;
|
||||
}
|
||||
|
||||
.intro-title{
|
||||
background-color: #EF0021;
|
||||
padding: 10px 20px;
|
||||
color: white;
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
.add-to-cart-btn-disabled {
|
||||
background-color: #f6aa6b;
|
||||
}
|
||||
|
||||
.intro{
|
||||
border-top: 1px solid #F95F6E;
|
||||
.intro-title {
|
||||
background-color: #EF0021;
|
||||
padding: 10px 20px;
|
||||
color: white;
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.intro {
|
||||
padding: 20px;
|
||||
border-top: 1px solid #F95F6E;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.sku:hover {
|
||||
background-color: #F5E2E3;
|
||||
border: 1px solid #EF0021;
|
||||
}
|
||||
|
||||
.sku-selected {
|
||||
background-color: #F5E2E3;
|
||||
border: 1px solid #EF0021;
|
||||
}
|
||||
</style>
|
||||
|
||||
+542
-198
@@ -1,97 +1,202 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<template v-if="info">
|
||||
<view class="pb-20 border-bottom flex justify-between items-center">
|
||||
<text>订单号: {{ info.orderNo }}</text>
|
||||
<text>下单时间: {{ info._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="my-20">
|
||||
<text class="font-bold text-35">商品详情</text>
|
||||
<view class="flex justify-start items-start my-20">
|
||||
<text class="w-15p" v-if="info.type === 0">封面</text>
|
||||
<text class="w-40p">名称</text>
|
||||
<text class="w-15p">数量</text>
|
||||
<text class="w-15p">单价</text>
|
||||
<text class="w-15p">小计</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-start my-20" v-for="(item, index) in info.goods" :key="index">
|
||||
<text class="w-15p" v-if="info.type === 0">
|
||||
<image :src="item.goodsCover" mode="aspectFit" class="goods-cover"/>
|
||||
</text>
|
||||
<text class="w-40p font-bold text-35">{{ item.goodsName }}</text>
|
||||
<text class="w-15p">x{{ item.num }}</text>
|
||||
<text class="w-15p text-main">¥{{ item.goodsPrice }}</text>
|
||||
<text class="w-15p">{{ item.goodsPrice * item.num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="info.type === 0">
|
||||
<el-row :gutter="10" class="mb-20">
|
||||
<el-col :span="4">
|
||||
<el-input v-model="name" placeholder="请输入收件人姓名"/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model="phone" placeholder="请输入收件人手机号"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="border-bottom pb-20">
|
||||
<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-col :span="12">
|
||||
<el-input v-model="addressDetail" placeholder="请输入详细地址"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<view class="mt-20 w-50p flex flex-col justify-center items-center m-a">
|
||||
<text class="text-main font-bold text-40 mb-20" v-if="info">订单金额:¥{{ info.amount }}</text>
|
||||
<el-button type="primary" round
|
||||
:disabled="(info.type === 0 && (!phone || !name || addressIndex.length < 3))" @click="onPay">
|
||||
立即支付
|
||||
</el-button>
|
||||
</view>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<template v-if="info">
|
||||
<view class="pb-20 border-bottom flex justify-between items-center">
|
||||
<text>订单号: {{ info.orderNo }}</text>
|
||||
<text>下单时间: {{ info._add_time_str }}</text>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
<view class="my-20">
|
||||
<text class="font-bold text-35">商品详情</text>
|
||||
<view class="flex justify-start items-start my-20">
|
||||
<text class="w-15p" v-if="info.type === 0">封面</text>
|
||||
<text class="w-40p">商品详情</text>
|
||||
<text class="w-15p">数量</text>
|
||||
<text class="w-15p">单价</text>
|
||||
<text class="w-15p">小计</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-start my-20" v-for="(item, index) in info.goods" :key="index">
|
||||
<text class="w-15p" v-if="info.type === 0">
|
||||
<image :src="item.goodsCover" mode="aspectFit" class="goods-cover"/>
|
||||
</text>
|
||||
<template v-if="info.type === 0">
|
||||
<view class="flex flex-col justify-start items-start w-40p">
|
||||
<text class=" font-bold text-35">{{ item.goodsName }}</text>
|
||||
<text class="mt-15 text-gray">{{ item.sku.label }}</text>
|
||||
</view>
|
||||
<text class="w-15p">x{{ item.num }}</text>
|
||||
<text class="w-15p text-main">¥{{ item.sku.values }}</text>
|
||||
<text class="w-15p font-bold">¥{{ item.sku.values * item.num }}</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="flex flex-col justify-start items-start w-40p">
|
||||
<text class=" font-bold text-35">{{ item.goodsName }}</text>
|
||||
</view>
|
||||
<text class="w-15p">x{{ item.num }}</text>
|
||||
<text class="w-15p text-main">¥{{ item.goodsPrice }}</text>
|
||||
<text class="w-15p font-bold">¥{{ item.goodsPrice * item.num }}</text>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="info.type === 0">
|
||||
<div class="p-20 rounded border m-30 pointer address" v-if="!address" @click="showAddress">
|
||||
点击选择地址
|
||||
</div>
|
||||
<div v-else
|
||||
class="py-20 flex justify-between items-center">
|
||||
<div class="flex flex-col justify-start items-start">
|
||||
<div class="flex justify-start items-center">
|
||||
<text class="font-bold">{{ address.name }}</text>
|
||||
</div>
|
||||
<text>{{ address.phone }}</text>
|
||||
<text v-if="address.addressRegion && address.addressRegion.province">{{
|
||||
address.addressRegion.province.name
|
||||
}}{{
|
||||
address.addressRegion.city.name
|
||||
}}{{ address.addressRegion.area.name }}{{ address.addressDetail }}
|
||||
</text>
|
||||
<text v-else-if="info.address.province">{{ info.address.province.name }}{{
|
||||
info.address.city.name
|
||||
}}{{ info.address.area.name }}{{ info.addressDetail }}
|
||||
</text>
|
||||
</div>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button type="primary" @click="showAddress">
|
||||
变更
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<view class="mt-40 font-bold text-main">您的会员等级:
|
||||
{{ getUserLevelLabel(vk.getVuex('$user.userInfo.userLevel')) }}
|
||||
{{ info.offRate !== 100 ? `,享受${info.offRate / 10}折优惠,已为您优惠${info.saveAmount}元` : '' }}
|
||||
</view>
|
||||
<div v-if="info.type === 0" class="my-20">
|
||||
<p>备注和要求:</p>
|
||||
<el-input v-model="remark" type="textarea"/>
|
||||
</div>
|
||||
<view class="mt-40 w-50p flex flex-col justify-center items-center m-a">
|
||||
<text class=" mb-20"
|
||||
:class="[info.amount !== info.offAmount ? 'text-line-through text-30' : 'text-main font-bold text-40']"
|
||||
v-if="info">
|
||||
订单金额:¥{{ info.amount }}
|
||||
</text>
|
||||
<text class="text-main font-bold text-40 mb-20" v-if="info && info.amount !== info.offAmount">
|
||||
优惠后金额:¥{{ parseFloat(info.offAmount).toFixed(2) }}
|
||||
</text>
|
||||
<el-button type="primary" round
|
||||
:disabled="(info.type === 0 && !address)" @click="onPay">
|
||||
立即支付
|
||||
</el-button>
|
||||
</view>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">微信、支付宝、云闪付扫码完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
<el-dialog :visible.sync="dialogVisible" :title="dialogTitle" width="50%" :close-on-click-modal="false"
|
||||
@close="dialogVisible = false">
|
||||
<template v-if="dialogVisible && dialogType === 'address-list'">
|
||||
<div v-for="(item, index) in addressList" :key="index"
|
||||
class="py-20 border-bottom flex justify-between items-center">
|
||||
<div class="flex flex-col justify-start items-start">
|
||||
<div class="flex justify-start items-center">
|
||||
<text v-if="item.isDefault" class="default-address">默</text>
|
||||
<text class="font-bold">{{ item.name }}</text>
|
||||
</div>
|
||||
<text>{{ item.phone }}</text>
|
||||
<text>{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.addressDetail }}
|
||||
</text>
|
||||
</div>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button type="primary" @click="address = item; dialogVisible = false" size="small">
|
||||
选择
|
||||
</el-button>
|
||||
<el-button type="warning" @click="addressEdit(item)" plain size="small" class="mt-20">
|
||||
编辑
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center mt-15">
|
||||
<el-button plain @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dialogType = 'address-action'; dialogTitle = '新增地址'">
|
||||
新增地址
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="flex flex-col justify-start" v-else-if="dialogVisible && dialogType === 'address-action'">
|
||||
<el-form ref="form" label-width="100px">
|
||||
<el-row :gutter="10" class="mb-20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收件人姓名">
|
||||
<el-input v-model="name" placeholder="请输入收件人姓名"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收件人手机号">
|
||||
<el-input v-model="phone" placeholder="请输入收件人手机号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="收件人地址">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<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="6">
|
||||
<el-select v-model="addressIndex[1]" placeholder="请选择市" class="w-100p"
|
||||
: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="6">
|
||||
<el-select v-model="addressIndex[2]" placeholder="请选择区" class="w-100p"
|
||||
: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>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址">
|
||||
<el-input v-model="addressDetail" placeholder="请输入详细地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="默认地址">
|
||||
<el-switch v-model="isDefault"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex justify-center items-center">
|
||||
<el-button type="primary" @click="onAddressAction">保存</el-button>
|
||||
<el-button @click="dialogTitle = '地址列表'; dialogType = 'address-list'">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -99,131 +204,370 @@ 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 dayjs from "dayjs";
|
||||
import {Loading} from "element-ui";
|
||||
import {getUserLevelLabel} from "../../../util";
|
||||
|
||||
const OpenSdk = require('../../user/lib/base').default;
|
||||
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
// appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
// appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
// 正式
|
||||
appId: '8a81c1db8fc5238d01910b9e312d0692',
|
||||
appKey: 'a15ceac60f5b464eb758c4fe7800ee9f'
|
||||
// 测试分账
|
||||
// appId: 'f0ec96ad2c3848b5b810e7aadf369e2f',
|
||||
// appKey: '775481e2556e4564985f5439a5e6a277'
|
||||
})
|
||||
|
||||
// 正式
|
||||
// const mid = '8984501521190CF'
|
||||
// const tid = '20713432'
|
||||
// 测试
|
||||
const mid = '898450100002303'
|
||||
const tid = 'G5SBN2XJ'
|
||||
// const mid = '898310060514001'
|
||||
// const tid = '00000001'
|
||||
|
||||
export default {
|
||||
name: "order",
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
info: {
|
||||
type: null
|
||||
},
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
addressDetail: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
billQRCode: null,
|
||||
checkPayInterval: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
this.info = await vk.callFunction({
|
||||
url: 'client/order/kh/getInfo',
|
||||
data: {
|
||||
id: this.id
|
||||
}
|
||||
})
|
||||
if (this.info.orderStatus === 1) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '订单已支付成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$router.push({
|
||||
path: '/pages/user/order',
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
async onPay() {
|
||||
if (this.info.type === 0) {
|
||||
if (this.addressIndex.length > 2 && this.addressIndex[2] === null) {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/updateAddress',
|
||||
data: {
|
||||
id: this.id,
|
||||
address: [provinces[this.addressIndex[0]], citys[this.addressIndex[0]][this.addressIndex[1]], areas[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]]],
|
||||
addressDetail: this.addressDetail,
|
||||
phone: this.phone,
|
||||
name: this.name,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
const goods = []
|
||||
let goodsName = this.info.goods[0].goodsName
|
||||
goods.push({goodsName})
|
||||
if (this.info.goods.length > 1) goodsName += `等${this.info.goods.length - 1}件商品`
|
||||
let data = {
|
||||
queryUrl: 'https://test-api-open.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
billNo: this.info.orderNo,
|
||||
requestTimestamp,
|
||||
mid: '898201612345678',
|
||||
tid: '88880001',
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: 1,
|
||||
notifyUrl: 'https://fc-mp-0737e52b-fffa-4223-bcdf-d4ad3d9968a5.next.bspapp.com/pay_notify',
|
||||
goods
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
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
|
||||
setTimeout(() => {
|
||||
this.checkPayInterval = setInterval(() => {
|
||||
this.getInfo()
|
||||
}, 1000)
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.id) {
|
||||
this.id = options.id
|
||||
this.getInfo()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
if (this.checkPayInterval) clearInterval(this.checkPayInterval)
|
||||
name: "order",
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
info: {
|
||||
type: null,
|
||||
offRate: 100
|
||||
},
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
addressIndex: [null, null, null],
|
||||
addressDetail: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
billQRCode: null,
|
||||
checkPayInterval: null,
|
||||
dialogVisible: false,
|
||||
dialogTitle: '',
|
||||
dialogType: '',
|
||||
address: null,
|
||||
addressList: [],
|
||||
selectedAddressId: null,
|
||||
isDefault: false,
|
||||
remark: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUserLevelLabel,
|
||||
async getInfo(resetOrderNo = false) {
|
||||
this.info = await vk.callFunction({
|
||||
url: 'client/order/kh/getInfo',
|
||||
data: {
|
||||
id: this.id,
|
||||
resetOrderNo
|
||||
}
|
||||
})
|
||||
if (this.info.name && (this.info.address || this.info.addressRegion)) {
|
||||
if (this.info.address) {
|
||||
this.address = {
|
||||
name: this.info.name,
|
||||
phone: this.info.phone,
|
||||
addressDetail: this.info.addressDetail,
|
||||
addressRegion: {
|
||||
province: this.info.address.province,
|
||||
city: this.info.address.city,
|
||||
area: this.info.address.area,
|
||||
},
|
||||
}
|
||||
}else {
|
||||
this.address = {
|
||||
name: this.info.name,
|
||||
phone: this.info.phone,
|
||||
addressDetail: this.info.addressDetail,
|
||||
addressRegion: {
|
||||
province: this.info.addressRegion.province,
|
||||
city: this.info.addressRegion.city,
|
||||
area: this.info.addressRegion.area,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.info.orderStatus === -1) {
|
||||
this.$message.error('订单已取消')
|
||||
if (this.checkPayInterval) clearInterval(this.checkPayInterval)
|
||||
vk.redirectTo({
|
||||
url: '/pages/order/order?menuIndex=1',
|
||||
})
|
||||
}
|
||||
|
||||
if ([1, 4].includes(this.info.orderStatus)) {
|
||||
if (this.checkPayInterval) clearInterval(this.checkPayInterval)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '订单已支付成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if ([7, 11].includes(this.info.type)) {
|
||||
vk.navigateBack()
|
||||
} else if (this.info.type === 10) {
|
||||
vk.redirectTo({
|
||||
url: '/pages/index/old/release',
|
||||
})
|
||||
} else if (this.info.type === 2 || this.info.type === 3) {
|
||||
this.$confirm(`恭喜您已成功支付,点击'确定'返回平台权益核对`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=equity'});
|
||||
})
|
||||
} else if (this.info.type === 13) {
|
||||
vk.redirectTo({
|
||||
url: '/pages/contract/index?tab=sign',
|
||||
})
|
||||
} else {
|
||||
vk.redirectTo({
|
||||
url: '/pages/order/order?menuIndex=1',
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
async onPay() {
|
||||
if (this.info.type === 0) {
|
||||
if (!this.address) return this.$message({type: 'error', message: '请选择地址'})
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/updateAddress',
|
||||
data: {
|
||||
id: this.id,
|
||||
address: {
|
||||
province: this.address.addressRegion.province,
|
||||
city: this.address.addressRegion.city,
|
||||
area: this.address.addressRegion.area,
|
||||
},
|
||||
addressDetail: this.address.addressDetail,
|
||||
phone: this.address.phone,
|
||||
name: this.address.name,
|
||||
remark: this.remark
|
||||
}
|
||||
})
|
||||
}
|
||||
// await vk.callFunction({
|
||||
// url: 'client/user/pub/pay',
|
||||
// data: {
|
||||
// orderNo: this.info.orderNo,
|
||||
// billStatus: 'PAID',
|
||||
// billPayment: JSON.stringify({
|
||||
// payTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// receiptAmount: this.info.offAmount * 100,
|
||||
// paySeqId: 'asdasd'
|
||||
// })Ï
|
||||
// }
|
||||
// })
|
||||
// this.checkPayInterval = setInterval(() => {
|
||||
// this.getInfo()
|
||||
// }, 1000)
|
||||
// return
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
// 平台分账金额
|
||||
let platformAmount = 0
|
||||
const goodsList = []
|
||||
// let goodsName = this.info.goods[0].goodsName
|
||||
// goods.push({goodsName})
|
||||
// if (this.info.goods.length > 1) goodsName += `等${this.info.goods.length - 1}件商品`
|
||||
let subOrderAmount = 0
|
||||
let attachedData = this.info.goods[0].goodsName
|
||||
if (this.info.goods.length > 1) attachedData += `等${this.info.goods.length - 1}件商品`
|
||||
this.info.goods.forEach((goods, index) => {
|
||||
const goodsData = {
|
||||
goodsName: goods.goodsName
|
||||
}
|
||||
if (goods.company && goods.company.mid && goods.company.settleRate) {
|
||||
// subOrderAmount += parseInt((goods.company.settleRate * goods.price).toString())
|
||||
// goodsData['subOrderAmount'] = parseInt((goods.company.settleRate * goods.price).toString())
|
||||
subOrderAmount += 9
|
||||
goodsData['subOrderAmount'] = 9
|
||||
goodsData['subMerchantId'] = goods.company.mid
|
||||
goodsData['merOrderId'] = this.info.orderNo + index
|
||||
}
|
||||
goodsList.push(goodsData)
|
||||
})
|
||||
if (subOrderAmount > 0) platformAmount = this.info.offAmount * 100 - subOrderAmount
|
||||
// let data = {
|
||||
// queryUrl: 'https://test-api-open.chinaums.com/v1/inip/upsp/shop/csb/get-qrcode',
|
||||
// sysSource: 'OPT',
|
||||
// vaMchntNo: mid,
|
||||
// vaTermNo: tid,
|
||||
// timestamp,
|
||||
// nonce: 'rp84ufhfn20yneo3tp',
|
||||
// billNo: this.info.orderNo,
|
||||
// totalAmount: 10,
|
||||
// notifyUrl: 'https://www.jinjiuxinzg.cn/pay_notify',
|
||||
// vaFld:
|
||||
// }
|
||||
let data = {
|
||||
queryUrl: 'https://api-mop.chinaums.com/v1/netpay/bills/get-qrcode',
|
||||
timestamp,
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
billNo: this.info.orderNo,
|
||||
requestTimestamp,
|
||||
mid,
|
||||
tid,
|
||||
instMid: 'QRPAYDEFAULT',
|
||||
totalAmount: parseInt(this.info.offAmount * 100).toFixed(0),
|
||||
notifyUrl: 'https://tcb-n44byxi8bmrfrki-d4bn1c4a206d.service.tcloudbase.com/pay_notify',
|
||||
// notifyUrl: 'https://www.jinjiuxinzg.cn/pay_notify',
|
||||
goods: goodsList,
|
||||
attachedData,
|
||||
billDesc: attachedData,
|
||||
}
|
||||
}
|
||||
if (platformAmount > 0) {
|
||||
data['divisionFlag'] = true
|
||||
data['platformAmount'] = 0
|
||||
}
|
||||
console.log(data)
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
const loadingInstance = Loading.service({fullscreen: true, text: '请求中'});
|
||||
|
||||
sdk.exec(data).then(res => {
|
||||
this.$nextTick(() => {
|
||||
loadingInstance.close();
|
||||
});
|
||||
const h = this.$createElement;
|
||||
const result = JSON.parse(res);
|
||||
if (result.errCode === 'SUCCESS') {
|
||||
this.showQrcode = true
|
||||
this.billQRCode = result.billQRCode
|
||||
setTimeout(() => {
|
||||
this.checkPayInterval = setInterval(() => {
|
||||
this.getInfo()
|
||||
}, 1000)
|
||||
}, 3000)
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$nextTick(() => {
|
||||
loadingInstance.close();
|
||||
});
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '服务器繁忙,请稍后再试或联系平台客服'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.redirectTo({
|
||||
url: '/pages/order/order?activeName=0&menuIndex=1',
|
||||
})
|
||||
}, 1500)
|
||||
})
|
||||
},
|
||||
async onAddressAction() {
|
||||
if (!this.name) return this.$message({type: 'error', message: '请填写收件人姓名'})
|
||||
if (!this.phone) return this.$message({type: 'error', message: '请填写收件人手机号'})
|
||||
if (!this.addressDetail || this.addressIndex[2] === null) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写地址'
|
||||
})
|
||||
const province = this.provinceData[this.addressIndex[0]]
|
||||
const city = this.cityData[this.addressIndex[0]][this.addressIndex[1]]
|
||||
const area = this.areaData[this.addressIndex[0]][this.addressIndex[1]][this.addressIndex[2]]
|
||||
this.addressRegion = {
|
||||
province: {code: province.code, name: province.name},
|
||||
city: {code: city.code, name: city.name},
|
||||
area: {code: area.code, name: area.name},
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/userAddress/kh/addUpdate',
|
||||
data: {
|
||||
id: this.selectedAddressId ?? null,
|
||||
name: this.name,
|
||||
phone: this.phone,
|
||||
addressDetail: this.addressDetail,
|
||||
addressRegion: this.addressRegion,
|
||||
isDefault: this.isDefault
|
||||
}
|
||||
})
|
||||
this.name = ''
|
||||
this.phone = ''
|
||||
this.addressDetail = ''
|
||||
this.addressIndex = [null, null, null,]
|
||||
this.dialogType = 'address-list'
|
||||
this.dialogTitle = '地址列表'
|
||||
await this.getUserAddress()
|
||||
},
|
||||
async getUserAddress() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/userAddress/kh/getList'
|
||||
})
|
||||
this.addressList = rows
|
||||
},
|
||||
showAddress() {
|
||||
this.dialogType = 'address-list'
|
||||
this.dialogTitle = '选择地址'
|
||||
this.dialogVisible = true
|
||||
},
|
||||
addressEdit(item) {
|
||||
this.selectedAddressId = item._id
|
||||
this.name = item.name
|
||||
this.phone = item.phone
|
||||
this.addressDetail = item.addressDetail
|
||||
this.addressIndex[0] = this.provinceData.findIndex(i => i.code === item.addressRegion.province.code)
|
||||
this.addressIndex[1] = this.cityData[this.addressIndex[0]].findIndex(i => i.code === item.addressRegion.city.code)
|
||||
this.addressIndex[2] = this.areaData[this.addressIndex[0]][this.addressIndex[1]].findIndex(i => i.code === item.addressRegion.area.code)
|
||||
this.dialogType = 'address-action';
|
||||
this.dialogTitle = ' 编辑地址'
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.id) {
|
||||
this.id = options.id
|
||||
this.getInfo(true)
|
||||
this.getUserAddress()
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.checkPayInterval) clearInterval(this.checkPayInterval)
|
||||
},
|
||||
onUnload() {
|
||||
if (this.checkPayInterval) clearInterval(this.checkPayInterval)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.goods-cover {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.address:hover {
|
||||
border: 1px solid #a92924;
|
||||
background-color: #f1c7c7;
|
||||
}
|
||||
|
||||
.default-address {
|
||||
background-color: #a92924;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
+300
-208
@@ -1,63 +1,89 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200">
|
||||
<u-swiper :list="list" :height="380" borderRadius="0"></u-swiper>
|
||||
<view class="tool-bar">
|
||||
<view class="search">
|
||||
<text>地区:</text>
|
||||
<el-cascader :options="options" :props="{label: 'name', value: 'code'}" v-model="address"
|
||||
@change="getGoodsList()" clearable/>
|
||||
</view>
|
||||
<view class="buy-btn">
|
||||
<image src="https://oss.wsdns.cn/20231204/bcc976f4396e437abf19deb11c1f06b4.png" mode="widthFix"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tool-bar">
|
||||
<view class="item">分类:</view>
|
||||
<view class="item" @click="selectCate(null)">全部</view>
|
||||
<view class="item" v-for="(item, index) in categoryList" :key="index"
|
||||
@click="selectCate(item._id)"
|
||||
:class="[categoryId === item._id? 'active' : '']">{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200">
|
||||
<common-swiper page="shop"/>
|
||||
<view class="tool-bar">
|
||||
<view class="search">
|
||||
<el-row :gutter="10" flex justify="center" align="center">
|
||||
<el-col :span="8">
|
||||
<el-input v-model="keyword" placeholder="请输入商品名称" clearable @clear="getGoodsList()"
|
||||
@keyup.enter.native="getGoodsList()" class="w-100"/>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-25">特产地区:</text>
|
||||
<el-cascader :options="options" :props="{label: 'name', value: 'code'}"
|
||||
v-model="address"
|
||||
@change="getGoodsList()" clearable/>
|
||||
</view>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<image src="https://oss.wsdns.cn/20231204/bcc976f4396e437abf19deb11c1f06b4.png"
|
||||
mode="widthFix"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</view>
|
||||
|
||||
<view class="goods-list">
|
||||
<view class="flex flex-wrap justify-start is-status">
|
||||
<view class="w-20p" v-for="(item, index) in goodsList" :key="index">
|
||||
<view class="p-20">
|
||||
<view class="grid-content bg-purple pointer"
|
||||
@click="navTo(`/pages/index/shop/detail?id=${item._id}`)">
|
||||
<image :src="item.cover" mode="aspectFill"/>
|
||||
<view class="comments">
|
||||
<view class="goods-name">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<view class="goods-price">¥{{ item.amount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page-size="pageSize"
|
||||
@click="getGoodsList"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</view>
|
||||
<view class="tool-bar">
|
||||
<view class="item">分类:</view>
|
||||
<view class="item" @click="selectCate(null)">全部</view>
|
||||
<view class="item" v-for="(item, index) in categoryList" :key="index"
|
||||
@click="selectCate(item._id)"
|
||||
:class="[categoryId === item._id? 'active' : '']">{{ item.name }}
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</view>
|
||||
<div class="m-a w-1200 flex justify-start items-center flex-wrap" v-if="adLoaded">
|
||||
<div v-for="(ad, adIndex) in adList" :key="adIndex"
|
||||
:style="{width: '600px'}">
|
||||
<template v-if="ad.length > 0">
|
||||
<el-carousel :height="`100px`" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad" :key="index" :style="{width: '600px'}">
|
||||
<image @click="adJump(item)"
|
||||
class="pointer" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%', height: '100px'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<view class="goods-list">
|
||||
<view class="flex flex-wrap justify-start is-status">
|
||||
<view class="w-20p " v-for="(item, index) in goodsList" :key="index">
|
||||
<view class="p-20 ">
|
||||
<view class="grid-content bg-purple pointer pos-r"
|
||||
@click="navTo(`/pages/index/shop/detail?id=${item._id}`)">
|
||||
<text class="recommend" v-if="item.recommend === 1">荐</text>
|
||||
<image :src="item.cover" mode="aspectFill"/>
|
||||
<view class="comments">
|
||||
<view class="goods-name" style="height: 60px">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<view class="goods-price">¥{{ item.amount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
:page-size="pageSize"
|
||||
@click="getGoodsList"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -66,184 +92,250 @@ 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 {
|
||||
components: {UGap},
|
||||
data() {
|
||||
return {
|
||||
categoryList: [],
|
||||
goodsList: [],
|
||||
list: [
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
|
||||
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
],
|
||||
options: [],
|
||||
address: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
categoryId: null
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.menu) {
|
||||
this.currMenu = options.menu
|
||||
}
|
||||
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.getCategoryList()
|
||||
this.getGoodsList()
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.currMenu = e
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
getCategoryList() {
|
||||
vk.callFunction({
|
||||
url: 'client/goods/category/pub/getList'
|
||||
}).then(res => {
|
||||
this.categoryList = res.rows
|
||||
})
|
||||
},
|
||||
getGoodsList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/goods/list/pub/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
city: this.address.length > 1 ? this.address[1] : null,
|
||||
parentId: this.categoryId
|
||||
}
|
||||
}).then(res => {
|
||||
this.goodsList = res.rows
|
||||
})
|
||||
},
|
||||
selectCate(cateId) {
|
||||
if (this.categoryId === cateId) this.categoryId = null
|
||||
else this.categoryId = cateId
|
||||
this.getGoodsList()
|
||||
}
|
||||
components: {UGap},
|
||||
data() {
|
||||
return {
|
||||
categoryList: [],
|
||||
goodsList: [],
|
||||
options: [],
|
||||
address: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
categoryId: null,
|
||||
keyword: null,
|
||||
adList: [],
|
||||
adNum: 0,
|
||||
adLoaded: false
|
||||
};
|
||||
},
|
||||
async onLoad(options) {
|
||||
await this.getCategoryList()
|
||||
if (options && options.menu) this.currMenu = options.menu
|
||||
if (options && options.keyword) this.keyword = options.keyword
|
||||
if (options && options.cateName) {
|
||||
const cate = this.categoryList.find(item => item.name === options.cateName)
|
||||
if (cate) this.categoryId = cate._id
|
||||
}
|
||||
|
||||
this.options = provinces.map(item => {
|
||||
item.children = [];
|
||||
return item
|
||||
})
|
||||
this.options.forEach((province, index) => {
|
||||
citys[index].forEach(city => {
|
||||
this.options[index].children.push(city)
|
||||
})
|
||||
})
|
||||
|
||||
console.error(this.options)
|
||||
|
||||
this.getGoodsList()
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.currMenu = e
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo(url);
|
||||
},
|
||||
async getCategoryList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/goods/category/pub/getList'
|
||||
})
|
||||
this.categoryList = res.rows
|
||||
},
|
||||
getGoodsList(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/goods/list/pub/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
city: this.address.length > 1 ? this.address[1] : null,
|
||||
parentId: this.categoryId,
|
||||
keyword: this.keyword
|
||||
}
|
||||
}).then(res => {
|
||||
this.goodsList = res.rows
|
||||
this.getAdList()
|
||||
})
|
||||
},
|
||||
selectCate(cateId) {
|
||||
if (this.categoryId === cateId) this.categoryId = null
|
||||
else this.categoryId = cateId
|
||||
this.getGoodsList()
|
||||
},
|
||||
adJump(item){
|
||||
if ((item.type === 'company' || !item.type) && item.companyId)
|
||||
vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)
|
||||
else if (item.type === 'goods' && item.goodsId)
|
||||
vk.navigateTo(`/pages/index/shop/detail?id=${item.goodsId}`)
|
||||
},
|
||||
async getAdList() {
|
||||
this.adList = [[], [], [], [], []]
|
||||
if (this.address.length === 0) {
|
||||
if (!this.categoryId) {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 27 + i
|
||||
}
|
||||
})
|
||||
if (res.data) this.adList[i] = res.data
|
||||
}
|
||||
} else {
|
||||
const cate = this.categoryList.find(item => item._id === this.categoryId)
|
||||
if (cate.ad && cate.ad.length > 0) {
|
||||
cate.ad.forEach(item => {
|
||||
this.adList[item.adKey - 27].push(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 27 + i,
|
||||
region: this.address[0]
|
||||
}
|
||||
})
|
||||
if (res.data) this.adList[i] = res.data
|
||||
// rows.forEach(item => {
|
||||
// if (item.businessCard.album && item.businessCard.album.length > 0) {
|
||||
// this.adList[i].push({
|
||||
// swiper: Array.isArray(item.businessCard.album) ? item.businessCard.album[0] : item.businessCard.album,
|
||||
// companyId: item._id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
this.adNum = 0
|
||||
for (let i = 0; i < 5; i++) {
|
||||
if (this.adList[i].length > 0) {
|
||||
this.adNum += 1
|
||||
}
|
||||
}
|
||||
this.adLoaded = true
|
||||
this.$forceUpdate()
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #fff;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #fff;
|
||||
|
||||
.test {
|
||||
height: 50px;
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
background-color: #bf2b28;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.test {
|
||||
height: 50px;
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
background-color: #bf2b28;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
text {
|
||||
margin: 0 20px;
|
||||
}
|
||||
text {
|
||||
margin: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.tool-bar {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tool-bar {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item:hover, .active {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item:hover, .active {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
|
||||
.grid-content {
|
||||
.grid-content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
flex-direction: column;
|
||||
|
||||
.comments {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: start;
|
||||
align-items: flex-start;
|
||||
line-height: 2em;
|
||||
width: 100%;
|
||||
|
||||
.goods-name {
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.comments {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: start;
|
||||
align-items: flex-start;
|
||||
line-height: 2em;
|
||||
width: 100%;
|
||||
|
||||
.goods-name {
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
color: #bf2b28;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.goods-price {
|
||||
color: #bf2b28;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bg-purple {
|
||||
border-top: 1px solid #f3f3f3;
|
||||
border-right: 1px solid #f3f3f3;
|
||||
.bg-purple {
|
||||
border-top: 1px solid #f3f3f3;
|
||||
border-right: 1px solid #f3f3f3;
|
||||
|
||||
image {
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
}
|
||||
image {
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.recommend {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 5px;
|
||||
background-color: #bf2b28;
|
||||
color: white;
|
||||
font-size: 30rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<el-form-item label="物流公司">
|
||||
{{ info.expressName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号">
|
||||
{{ info.expressNo }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发货单">
|
||||
<el-image v-for="(item, index) in info.expressPhoto" :key="index" :src="item"
|
||||
class="mr-10 mb-10"
|
||||
:preview-src-list="info.expressPhoto" style="width: 100px;height: 100px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
{{ info.remark }}
|
||||
</el-form-item>
|
||||
<div class="mt-20 flex justify-center items-center text-center">
|
||||
<el-button type="primary" size="small" plain @click.native="close">关闭</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "expressInfo",
|
||||
props: {
|
||||
info: Object
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="py-20">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<text class="text-35 font-bold">商品信息</text>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<text class="text-35 font-bold flex-1">单价</text>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<text class="text-35 font-bold flex-1">数量</text>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<text class="text-35 font-bold flex-1">金额</text>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</view>
|
||||
<view class="p-20 mb-20" v-for="(item, index) in goods" :key="index">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<view class="flex justify-start items-start">
|
||||
<el-image :src="getGoodsImage(item)" class="cover ml-20" fit="cover" v-if="getGoodsImage(item)"/>
|
||||
<view class="flex flex-col justify-start items-start ml-20">
|
||||
<text class="font-bold mb-15">{{ item.goodsName }}</text>
|
||||
<text class="text-gray" v-if="order.type === 0">{{ item.sku.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<text class="text-35 font-bold flex-1" v-if="order.type === 0">¥{{ item.sku.values }}</text>
|
||||
<text class="text-35 font-bold flex-1" v-else>¥{{ item.goodsPrice }}</text>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<text class="text-35 font-bold flex-1">
|
||||
x{{ item.num }}
|
||||
</text>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<text class="text-35 font-bold flex-1 text-main" v-if="order.type === 0">¥{{
|
||||
parseFloat(item.sku.values) * item.num
|
||||
}}
|
||||
</text>
|
||||
<text class="text-35 font-bold flex-1 text-main" v-else>¥{{
|
||||
parseFloat(item.goodsPrice) * item.num
|
||||
}}
|
||||
</text>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</view>
|
||||
|
||||
<view v-if="order.type === 1">
|
||||
<p class="text-35 font-bold mb-25">服务详情</p>
|
||||
<el-descriptions border :column="2">
|
||||
<el-descriptions-item label="考察对象" v-if="selfProduct.type === 0">
|
||||
<div style="margin-bottom: .5rem" v-for="(item, index) in selfProduct.contentList" :key="index">
|
||||
<span>{{ item.name }}</span>
|
||||
<template v-if="item.type && item.type === '个人'">
|
||||
|
||||
({{
|
||||
item.code
|
||||
}})--{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.address }}
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="考察产品" v-else>
|
||||
<p style="margin-bottom: .5rem" v-for="(item, index) in selfProduct.contentList" :key="index">{{
|
||||
item.name
|
||||
}}--{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.address }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件电子邮箱">
|
||||
<span>{{ selfProduct.email }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件微信">
|
||||
<span>{{ selfProduct.wechat }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件寄件地址">
|
||||
<span v-if="selfProduct.receiveAddressRegion.province">{{
|
||||
selfProduct.receiveAddressRegion.province.name
|
||||
}}{{ selfProduct.receiveAddressRegion.city.name }}{{
|
||||
selfProduct.receiveAddressRegion.area.name
|
||||
}}{{ selfProduct.receiveAddress }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">
|
||||
<span>{{ selfProduct.requestName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务联系人">
|
||||
<span>{{ selfProduct.contactName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务联系方式">
|
||||
<span>{{ selfProduct.contact }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结果文件" v-if="order && order.resultFiles">
|
||||
<div v-for="(item, index) in order.resultFiles" :key="index">
|
||||
<a :href="item"
|
||||
target="_blank">预览:文件{{ index + 1 }}</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发送途径" v-if="order && order.sendMethod">{{ order.sendMethod }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "goods",
|
||||
props: {
|
||||
goods: Array,
|
||||
order: Object,
|
||||
selfProduct: Object,
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
getGoodsImage(item) {
|
||||
if (!item) return ''
|
||||
if (item.sku && item.sku.image) return item.sku.image
|
||||
if (item.goods && item.goods.cover) return item.goods.cover
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cover {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<view>
|
||||
<div class="font-bold">
|
||||
<span>订单编号: {{ orderInfo.orderNo }}</span>
|
||||
<span class="ml-20 text-main" v-if="orderInfo.orderStatus > 1">(已发货)</span>
|
||||
</div>
|
||||
<div class="font-bold my-25">订单总额: {{ orderInfo.amount }}元</div>
|
||||
<div class="text-main text-25 my-25" style="line-height: 1.9;">
|
||||
<p>情况1、如遇有大额多车次,多批次交易,应涉及进度款,如100万合同,前期到两车,可以申请进度款;</p>
|
||||
<p>情况2、如果单次可一次性送达则实行全款。</p>
|
||||
<p>情况3、如为定制产品,双方协商可给协商比例的进度款。</p>
|
||||
<p>情况4、有可能有剩余款项,交易完成可申请平台退款。</p>
|
||||
<p>情况5、有可能实际发货量大于订货量,货款不足。</p>
|
||||
</div>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<el-form-item label="支付类型" required >
|
||||
<el-select v-model="payInfo.type" @change="changeType">
|
||||
<el-option
|
||||
v-for="item in payTypeList"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
:disabled="isPayTypeDisabled(item)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="payInfo.type" required>
|
||||
<el-input v-model="payInfo.amount" placeholder="请输入金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="payInfo.remark"/>
|
||||
</el-form-item>
|
||||
<template v-if="[0, 1].includes(orderInfo.orderStatus)">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否发货">
|
||||
<el-radio-group v-model="payInfo.isExpress"
|
||||
:disabled="['货到付款', '全款'].includes(payInfo.type)">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="物流公司" required>-->
|
||||
<!-- <el-input v-model="payInfo.expressName" placeholder="请输入物流公司"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="物流单号" required>-->
|
||||
<!-- <el-input v-model="payInfo.expressNo" placeholder="请输入物流单号"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-form-item label="凭证" v-if="!payInfo.isExpress">
|
||||
<vk-data-upload v-model="payInfo.photos"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="凭证" v-else required>
|
||||
<vk-data-upload v-model="payInfo.expressPhoto"></vk-data-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="附件">
|
||||
<vk-data-upload v-model="payInfo.ext"></vk-data-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24" class="text-center">
|
||||
<el-button type="primary" size="mini" @click="setPayList">提交</el-button>
|
||||
<el-button type="warning" size="mini" @click="close">取消
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "makePay",
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
payTypeList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
payInfo: {
|
||||
orderId: this.info._id,
|
||||
amount: null,
|
||||
type: null,
|
||||
remark: '',
|
||||
buyerRemark: '',
|
||||
photos: [],
|
||||
payerUid: null,
|
||||
hasPaid: false,
|
||||
paidVoucher: '',
|
||||
paidAt: '',
|
||||
sellerConfirm: false,
|
||||
confirmAt: '',
|
||||
buyerUid: this.info.uid,
|
||||
sellerUid: this.info.sellerUid,
|
||||
status: 0,
|
||||
buyerRefuse: false,
|
||||
refuseReason: null,
|
||||
buyerPhotos: [],
|
||||
expressPhoto: [],
|
||||
isExpress: false,
|
||||
expressName: null,
|
||||
expressNo: null,
|
||||
ext: [],
|
||||
},
|
||||
orderInfo: {
|
||||
payStatus: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit("close")
|
||||
},
|
||||
async getOrderInfo() {
|
||||
this.orderInfo = await vk.callFunction({
|
||||
url: 'client/order/kh/getInfo',
|
||||
data: {
|
||||
id: this.info._id
|
||||
}
|
||||
})
|
||||
},
|
||||
async setPayList() {
|
||||
if (!this.payInfo.type) return this.$message({
|
||||
type: 'error',
|
||||
message: '请选择支付类型'
|
||||
})
|
||||
if (!this.payInfo.amount) return this.$message({
|
||||
type: 'error',
|
||||
message: '请输入支付金额'
|
||||
})
|
||||
if (this.payInfo.isExpress && this.payInfo.expressPhoto.length === 0) return this.$message({
|
||||
type: 'error',
|
||||
message: '请上传凭证'
|
||||
})
|
||||
// if (this.payInfo.isExpress && !this.payInfo.expressName) return this.$message({
|
||||
// type: 'error',
|
||||
// message: '请输入物流公司'
|
||||
// })
|
||||
// if (this.payInfo.isExpress && !this.payInfo.expressNo) return this.$message({
|
||||
// type: 'error',
|
||||
// message: '请输入物流单号'
|
||||
// })
|
||||
if (this.payInfo.isExpress) {
|
||||
this.$confirm('发货状态一旦确定无法修改,请谨慎操作', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/makePay',
|
||||
title: '请求中...',
|
||||
data: {payInfo: this.payInfo}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '支付单创建成功'
|
||||
})
|
||||
this.close()
|
||||
})
|
||||
} else {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/makePay',
|
||||
title: '请求中...',
|
||||
data: {payInfo: this.payInfo}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '支付单创建成功'
|
||||
})
|
||||
this.close()
|
||||
}
|
||||
},
|
||||
changeType() {
|
||||
this.payInfo.isExpress = ['货到付款', '全款'].includes(this.payInfo.type)
|
||||
console.log(this.payInfo.isExpress, this.payInfo.type)
|
||||
},
|
||||
isNotaryPaidOrder() {
|
||||
return Number(this.orderInfo.signMethod) === 0
|
||||
&& Number(this.orderInfo.type) > 3
|
||||
&& Number(this.orderInfo.notaryPayStatus) === 1
|
||||
},
|
||||
isPayTypeDisabled(item) {
|
||||
if (this.isNotaryPaidOrder()) return false
|
||||
return (!['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus === 0)
|
||||
|| (['预付款', '货到付款', '全款'].includes(item) && this.orderInfo.payStatus > 0)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,451 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="margin-bottom: 16px; padding: 12px; background: #fff8e8; color: #8a5a00; line-height: 1.7;">
|
||||
<view>服务提供方(卖家):请于系统确认支付方已依照协议或约定支付对应订单款项后,再启动对应服务。申请款项付款方在系统端完成划款授权确认操作后,款项到账时间约为工作日T+1,请届时查询确认。</view>
|
||||
<view style="margin-top: 8px;">服务需求方(买家):请于依照交易规则和协议完成对应服务验收后,再在系统端完成对应申请款项的授权确认操作,系统默认确认时限为72小时(含工作日,届时系统仅提供信息提醒服务),请及时完成该项确认。若您届时未确认且未提出正当异议,系统将默认您已收货或同意支付申请。</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in payList" :key="index" class="py-20 border-bottom">
|
||||
<el-descriptions :title="item.type" :column="2" border :labelStyle="{width: '120px'}">
|
||||
<template slot="extra">
|
||||
<div class="flex justify-start items-center">
|
||||
<template v-if="!item.buyerRefuse">
|
||||
<template v-if="item.type !== '尾款'">
|
||||
<el-button plain type="primary" size="mini" @click="showNotaryPayWithConfirm(item)"
|
||||
v-if="canShowPayButton(item)">{{ isNotaryOrder() ? '公证支付' : '立即支付' }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button plain type="primary" size="mini" @click="showPayWithConfirm(item)"
|
||||
v-if="item.status === 0 && item.isBuyer && !item.hasPaid">同意授权支付
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button type="primary" size="mini" class="mx-20" @click="confirmPay(item)"
|
||||
v-if="canShowConfirmButton(item)">
|
||||
{{ isNotaryOrder() ? '通过申请' : '确认收款' }}
|
||||
</el-button>
|
||||
<el-button plain type="primary" size="mini" class="mx-20" @click="paidRefuse(item)"
|
||||
v-if="canShowRefuseButton(item)">
|
||||
驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions-item v-if="item.type !== '尾款'" label="支付金额">{{ item.amount }}</el-descriptions-item>
|
||||
<template v-else>
|
||||
<template v-if="item.status === 0">
|
||||
<el-descriptions-item label="卖家申请金额">{{ item.amount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="卖家备注">{{ item.sellerRemark }}</el-descriptions-item>
|
||||
<el-descriptions-item label="买家授权金额">{{ item.amount }}</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="支付金额">{{ item.amount }}</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
<el-descriptions-item label="支付凭证">
|
||||
<template v-if="!item.buyerRefuse">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待买方公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="item.isNotaryApply">{{ item.sellerConfirm ? '买家已通过,已划付' : '无需二次支付,待买家通过申请' }}</span>
|
||||
<span v-else-if="item.isSeller && !item.hasPaid">待买方支付</span>
|
||||
<view v-else-if="item.paidVoucher">
|
||||
<el-image :src="item.paidVoucher[0]" style="width: 80px; height: 80px" fit="cover"
|
||||
:preview-src-list="item.paidVoucher"/>
|
||||
</view>
|
||||
<view v-else-if="!item.paidVoucher">
|
||||
<span>未上传凭证</span>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>
|
||||
<span class="text-main">买家已拒绝: {{ item.refuseReason }}</span>
|
||||
</div>
|
||||
<div class="mt-10" v-if="!item.isNotaryApply">
|
||||
<el-button
|
||||
plain
|
||||
type="warning"
|
||||
size="mini"
|
||||
@click="refundQuery(item)"
|
||||
>
|
||||
退款查询
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交货凭证">
|
||||
<el-image v-for="(photo, photoIndex) in item.expressPhoto" :key="photoIndex" :src="photo"
|
||||
style="width: 80px; height: 80px" fit="cover"
|
||||
:preview-src-list="item.expressPhoto"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<text>{{ item.remark ? item.remark : '无' }}</text>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="买家备注">
|
||||
<text>{{ item.buyerRemark ? item.buyerRemark : '无' }}</text>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="图片">
|
||||
<template v-if="item.photos && item.photos.length > 0">
|
||||
<el-image v-for="(photo, photoIndex) in item.photos" :key="photoIndex" :src="photo"
|
||||
style="width: 80px; height: 80px" fit="cover"
|
||||
:preview-src-list="item.photos"/>
|
||||
</template>
|
||||
<span v-else>无</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="我方状态">
|
||||
<template v-if="item.isSeller">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待买方支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待买家通过申请' : '待确认收款' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
<template v-if="item.isBuyer">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待通过申请' : '完成支付' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对方状态">
|
||||
<!-- 自己是卖家则对方是买家-->
|
||||
<template v-if="item.isSeller">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待通过申请' : '完成支付' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
<template v-if="item.isBuyer">
|
||||
<span v-if="item.isNotaryFullPay && !item.hasPaid">待公证支付</span>
|
||||
<span v-else-if="item.isNotaryFullPay && item.hasPaid">已支付到公证平台</span>
|
||||
<span v-else-if="!item.hasPaid && !item.buyerRefuse">待买方支付</span>
|
||||
<span v-else-if="!item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '待买家通过申请' : '待确认收款' }}</span>
|
||||
<span v-else-if="item.sellerConfirm && item.hasPaid">{{ isNotaryOrder() && item.isNotaryApply ? '已划付' : '已完成' }}</span>
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</view>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="50%" append-to-body="">
|
||||
<template v-if="dialogVisible && dialogType === 'do-pay'">
|
||||
<div class="font-bold">支付金额: {{ payInfo.amount }}元</div>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<el-form-item label="支付凭证" required>
|
||||
<vk-data-upload v-model="payInfo.paidVoucher"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="payInfo.buyerRemark"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片">
|
||||
<vk-data-upload v-model="payInfo.buyerPhotos"></vk-data-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24" class="text-center">
|
||||
<el-button type="primary" size="mini" @click="uploadPayVoucher">提交</el-button>
|
||||
<el-button type="warning" size="mini" @click="dialogVisible = false">取消
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ExpressInfo from "./expressInfo.vue";
|
||||
import Goods from "./goods.vue";
|
||||
import SetExpress from "./setExpress.vue";
|
||||
import MakePay from "./makePay.vue";
|
||||
import {Loading} from "element-ui";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const NOTARY_PAY_CONFIRM_CONTENT = `1、您已充分知悉、了解并认可本订单及合同的全部内容,以及各方的权利义务;<br>2、您需将本订单全部货款支付至金久信平台银联监管账户;<br>3、供货或服务提供方提起付款申请后,在满足双方约定条款的前提下,您应及时批准划付申请款项;若您未及时处理,系统将在7个工作日内自动默认您无异议,并自动同意该付款申请。如您对供货或服务提供存在异议,请及时在供货或服务提供方平台申请单中驳回申请,并说明驳回意见并及时与对方沟通原因;若您支付合同金额与实际交易应付金额存在差额,您可办理补付或申请退款。`
|
||||
|
||||
const OpenSdk = require('../../user/lib/base').default;
|
||||
const sdk = new OpenSdk({
|
||||
// appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
// appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
// 正式
|
||||
appId: '8a81c1db8fc5238d01910b9e312d0692',
|
||||
appKey: 'a15ceac60f5b464eb758c4fe7800ee9f'
|
||||
// 测试分账
|
||||
// appId: 'f0ec96ad2c3848b5b810e7aadf369e2f',
|
||||
// appKey: '775481e2556e4564985f5439a5e6a277'
|
||||
})
|
||||
// 正式
|
||||
// const mid = '898450108428573'
|
||||
// const tid = 'ZDUL21ZA'
|
||||
const mid = '898450100002303'
|
||||
const tid = 'G5SBN2XJ'
|
||||
|
||||
export default {
|
||||
name: "payList",
|
||||
components: {MakePay, SetExpress, Goods, ExpressInfo},
|
||||
props: {
|
||||
payList: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
orderInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogType: '',
|
||||
dialogTitle: '',
|
||||
payInfo: null,
|
||||
rate: 0,
|
||||
subMerchantIdMain: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPlatformRate()
|
||||
this.getSubMerchantIdMain()
|
||||
console.log('this.orderInfo', this.orderInfo)
|
||||
},
|
||||
methods: {
|
||||
isNotaryOrder() {
|
||||
return !!(this.orderInfo && Number(this.orderInfo.signMethod) === 0 && Number(this.orderInfo.type) > 3)
|
||||
},
|
||||
canShowPayButton(item) {
|
||||
console.log('canShowPayButton this.isNotaryOrder()', item.isNotaryFullPay, item.status, item.isBuyer)
|
||||
if (this.isNotaryOrder()) return item.isNotaryFullPay && item.status === 0 && item.isBuyer && !item.hasPaid
|
||||
return item.status === 0 && item.isBuyer && !item.hasPaid
|
||||
},
|
||||
canShowConfirmButton(item) {
|
||||
// console.log('canShowConfirmButton this.isNotaryOrder()', item.isNotaryApply , item.hasPaid , item.isBuyer , !item.sellerConfirm , !item.buyerRefuse)
|
||||
if (this.isNotaryOrder()) return item.isNotaryApply && item.hasPaid && item.isBuyer && !item.sellerConfirm && !item.buyerRefuse
|
||||
return item.hasPaid && item.isSeller && !item.sellerConfirm
|
||||
},
|
||||
canShowRefuseButton(item) {
|
||||
if (this.isNotaryOrder()) return item.isNotaryApply && item.isBuyer && item.status === 0 && !item.sellerConfirm && !item.buyerRefuse
|
||||
return item.isBuyer && item.status === 0 && !item.sellerConfirm && !item.hasPaid
|
||||
},
|
||||
getSellerMid(item) {
|
||||
const seller = (item && item.seller) || (this.orderInfo && this.orderInfo.seller) || {}
|
||||
return String(seller.mid || '').trim()
|
||||
},
|
||||
async getPlatformRate() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'd84694f2696818f20c28f55f36764783'
|
||||
},
|
||||
})
|
||||
this.rate = res.content
|
||||
},
|
||||
async getSubMerchantIdMain() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '345cf9926ab107ad00db527f06fdbb6e'
|
||||
},
|
||||
})
|
||||
this.subMerchantIdMain = String((res && res.content) || '').trim()
|
||||
},
|
||||
async unionPay(item) {
|
||||
const subMerchantId = this.getSellerMid(item)
|
||||
if (!subMerchantId) {
|
||||
return this.$message.error('乙方未配置商户号,无法支付')
|
||||
}
|
||||
if (!this.subMerchantIdMain) {
|
||||
await this.getSubMerchantIdMain()
|
||||
}
|
||||
if (!this.subMerchantIdMain) {
|
||||
return this.$message.error('平台分账商户号未配置,无法支付')
|
||||
}
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/resetPayListOrderNo',
|
||||
data: {
|
||||
id: item._id
|
||||
},
|
||||
})
|
||||
let rate = this.rate
|
||||
if (this.orderInfo.sheet && this.orderInfo.sheet.notaryServiceRate)
|
||||
rate = this.orderInfo.sheet.notaryServiceRate
|
||||
const orderNo = res.data
|
||||
let subAmount = parseInt(item.amount * 100 * ((100 - parseFloat(rate)) / 100)).toFixed(0)
|
||||
let platformAmount = parseInt(item.amount * 100 * (parseFloat(rate) / 100)).toFixed(0)
|
||||
// let subAmount = parseInt(item.amount * (100 - parseFloat(this.rate))).toFixed(0)
|
||||
const requestTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
const timestamp = dayjs().format('YYYYMMDDHHmmss')
|
||||
console.log('subAmount', subAmount, subMerchantId)
|
||||
console.log('subAmountMain', platformAmount, this.subMerchantIdMain)
|
||||
// const goodsList = [{
|
||||
// goodsId: item._id,
|
||||
// goodsName: item.type,
|
||||
// quantity: 1,
|
||||
// price: parseInt(item.amount * 100).toFixed(0),
|
||||
// }]
|
||||
let data = {
|
||||
queryUrl: 'https://api-mop.chinaums.com/v1/netpay/upg/order',
|
||||
timestamp,
|
||||
authorization: 'OPEN-FORM-PARAM',
|
||||
nonce: 'rp84ufhfn20yneo3tp',
|
||||
content: {
|
||||
merOrderId: orderNo,
|
||||
requestTimestamp,
|
||||
mid,
|
||||
tid,
|
||||
instMid: 'WGDEFAULT',
|
||||
chnlType: 'PC',
|
||||
totalAmount: parseInt(item.amount * 100).toFixed(0),
|
||||
notifyUrl: 'https://tcb-n44byxi8bmrfrki-d4bn1c4a206d.service.tcloudbase.com/pay_notify',
|
||||
// transType: vk.getVuex('$user.userInfo.accountType') === 1 ? 'UPG_PERSONAL' : 'UPG_BUSINESS',
|
||||
transType: 'UPG_BUSINESS',
|
||||
bizType: '100003',
|
||||
feeRatio: 'aaa',
|
||||
// notifyUrl: 'https://www.jinjiuxinzg.cn/pay_notify',
|
||||
// goods: goodsList,
|
||||
}
|
||||
}
|
||||
data['content']['divisionFlag'] = true
|
||||
data['content']['platformAmount'] = 0
|
||||
data['content']['subOrders'] = [
|
||||
{
|
||||
mid: subMerchantId,
|
||||
totalAmount: subAmount,
|
||||
},
|
||||
{
|
||||
mid: this.subMerchantIdMain,
|
||||
totalAmount: platformAmount,
|
||||
},
|
||||
]
|
||||
console.log(data)
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
const loadingInstance = Loading.service({fullscreen: true, text: '请求中'});
|
||||
|
||||
// const res = sdk.exec(data)
|
||||
window.open(await sdk.exec(data))
|
||||
loadingInstance.close()
|
||||
this.showPayResultConfirm()
|
||||
},
|
||||
showNotaryPayWithConfirm(item) {
|
||||
if (!this.isNotaryOrder()) return this.unionPay(item)
|
||||
this.$confirm(NOTARY_PAY_CONFIRM_CONTENT, '公证支付', {
|
||||
confirmButtonText: '我已知晓',
|
||||
cancelButtonText: '取消',
|
||||
showCancelButton: true,
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(() => {
|
||||
this.unionPay(item)
|
||||
}).catch(() => {})
|
||||
},
|
||||
showPayResultConfirm() {
|
||||
this.$confirm('您是否已支付成功', '提示', {
|
||||
confirmButtonText: '已支付成功',
|
||||
cancelButtonText: '未支付成功',
|
||||
showCancelButton: true,
|
||||
distinguishCancelAndClose: true,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
}).then(() => {
|
||||
this.$emit('refresh')
|
||||
}).catch(() => {
|
||||
this.$emit('refresh')
|
||||
})
|
||||
},
|
||||
showPay(item) {
|
||||
this.payInfo = item;
|
||||
this.dialogTitle = '支付'
|
||||
this.dialogType = 'do-pay';
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
showPayWithConfirm(item) {
|
||||
this.$confirm('尾款为双方交易最后一次结算,请交易双方协商共同确定最终结算金额后进行,结算完毕将默认此订单结束,无法再次系统发起请款或付款动作,如您已知晓并双方已经协商确认最终结算金额,请进行确认后进入尾款流程',
|
||||
'温馨提示', {
|
||||
showCancelButton: true,
|
||||
}).then(async ({value}) => {
|
||||
this.payInfo = item;
|
||||
this.dialogTitle = '支付'
|
||||
this.dialogType = 'do-pay';
|
||||
this.dialogVisible = true;
|
||||
})
|
||||
|
||||
},
|
||||
async confirmPay({_id, type}) {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/paidConfirm',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: _id
|
||||
}
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: this.isNotaryOrder() ? '确认划付成功' : '确认成功'
|
||||
})
|
||||
if (['尾款', '货到付款'].includes(type)) this.$emit('refresh', '4')
|
||||
else this.$emit('refresh')
|
||||
},
|
||||
paidRefuse({_id}) {
|
||||
this.$prompt('请输入驳回理由', '提示', {
|
||||
showCancelButton: true,
|
||||
showInput: true,
|
||||
}).then(async ({value}) => {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/payRefuse',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: _id,
|
||||
refuseReason: value,
|
||||
}
|
||||
})
|
||||
this.$emit('refresh')
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '驳回成功'
|
||||
})
|
||||
})
|
||||
},
|
||||
async refundQuery(item) {
|
||||
try {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/refundQuery',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: item._id
|
||||
}
|
||||
})
|
||||
const result = res.data || {}
|
||||
const msg = result.errMsg || result.msg || res.msg || '查询完成'
|
||||
this.$alert(
|
||||
`退款单号: ${item.refundApplyPayload && item.refundApplyPayload.refundOrderId ? item.refundApplyPayload.refundOrderId : '无'}\n状态码: ${result.errCode || '无'}\n信息: ${msg}`,
|
||||
'退款查询结果',
|
||||
{
|
||||
confirmButtonText: '确定'
|
||||
}
|
||||
)
|
||||
this.$emit('refresh')
|
||||
} catch (err) {
|
||||
this.$message.error((err && err.message) || '退款查询失败')
|
||||
}
|
||||
},
|
||||
async uploadPayVoucher() {
|
||||
if (this.payInfo.paidVoucher.length === 0) return this.$message.error()
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/uploadPayVoucher',
|
||||
title: '请求中...',
|
||||
data: this.payInfo
|
||||
})
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '上传成功'
|
||||
})
|
||||
this.$emit('refresh')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<el-form-item label="客户信息" required>
|
||||
<p>收件人: {{ info.name }}</p>
|
||||
<p>收件人联系方式: {{ info.phone }}</p>
|
||||
<p>收件地址: {{ info.addressRegion.province.name }}{{ info.addressRegion.city.name }}{{ info.addressRegion.area.name }}{{ info.addressDetail }}</p>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流公司" required>
|
||||
<el-input v-model="expressName" placeholder="请输入物流公司"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号" required>
|
||||
<el-input v-model="expressNo" placeholder="请输入物流单号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货单" required>
|
||||
<vk-data-upload v-model="expressPhoto"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="remark" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
<div class="mt-20 flex justify-center items-center text-center">
|
||||
<el-button type="primary" size="small" plain @click.native="cancel">取消</el-button>
|
||||
<el-button type="primary" size="small" @click.native="confirm">确定</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "setExpress",
|
||||
props: {
|
||||
id: Number | String,
|
||||
info: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
expressName: null,
|
||||
expressNo: null,
|
||||
remark: null,
|
||||
expressPhoto: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
cancel() {
|
||||
this.expressName = null
|
||||
this.expressNo = null
|
||||
this.remark = null
|
||||
this.expressPhoto = []
|
||||
this.$emit('close')
|
||||
},
|
||||
async confirm() {
|
||||
if (!this.expressName) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写物流公司'
|
||||
})
|
||||
if (!this.expressNo) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写物流单号'
|
||||
})
|
||||
if (this.expressPhoto.length === 0) return this.$message({
|
||||
type: 'error',
|
||||
message: '请上传发货单'
|
||||
})
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/setExpress',
|
||||
data: {
|
||||
id: this.id,
|
||||
expressName: this.expressName,
|
||||
expressNo: this.expressNo,
|
||||
remark: this.remark,
|
||||
expressPhoto: this.expressPhoto
|
||||
}
|
||||
})
|
||||
this.$emit('close')
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '发货成功'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<el-form ref="form" label-width="80px">
|
||||
<el-form-item label="退款原因" required>
|
||||
<el-input v-model="refundReason" placeholder="请输入退款原因"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片">
|
||||
<vk-data-upload v-model="refundPhotos"></vk-data-upload>
|
||||
</el-form-item>
|
||||
<div class="mt-20 flex justify-center items-center text-center">
|
||||
<el-button type="primary" size="small" plain @click.native="cancel">取消</el-button>
|
||||
<el-button type="primary" size="small" @click.native="confirm">确定</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "setRefund",
|
||||
props: {
|
||||
id: Number | String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
refundReason: null,
|
||||
refundPhotos: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
cancel() {
|
||||
this.refundReason = null
|
||||
this.refundPhotos = []
|
||||
this.close()
|
||||
},
|
||||
async confirm() {
|
||||
if (!this.refundReason) return this.$message({
|
||||
type: 'error',
|
||||
message: '请填写退款原因'
|
||||
})
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/order/kh/refund',
|
||||
data: {
|
||||
id: this.id,
|
||||
refundReason: this.refundReason,
|
||||
refundPhotos: this.refundPhotos,
|
||||
}
|
||||
}).catch(err => false)
|
||||
if (res) {
|
||||
this.$emit('close')
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '平台将在2个工作日内审核,请您耐心等待'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view>
|
||||
<el-descriptions title="金久信自营订单详情" :column="2" border :labelStyle="{width: '120px'}" v-if="info">
|
||||
<el-descriptions-item label="服务">
|
||||
<p v-for="(item, index) in orderInfo.goods" :key="index">{{ item.goodsName }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="考察对象" v-if="info.type === 0">
|
||||
<div style="margin-bottom: .5rem" v-for="(item, index) in info.contentList" :key="index">
|
||||
<span>{{ item.name }}</span>
|
||||
<template v-if="item.type && item.type === '个人' && item.addressRegion">
|
||||
({{
|
||||
item.code
|
||||
}})--{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.address }}
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="考察产品" v-else>
|
||||
<p style="margin-bottom: .5rem" v-for="(item, index) in info.contentList" :key="index">{{
|
||||
item.name
|
||||
}}--{{ item.addressRegion.province.name }}{{
|
||||
item.addressRegion.city.name
|
||||
}}{{ item.addressRegion.area.name }}{{ item.address }}</p>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="文档">
|
||||
<div v-for="(item, index) in info.contentList" :key="index">
|
||||
<template v-if="item.files">
|
||||
<a v-for="(file, fileIndex) in item.files" :key="fileIndex" :href="file"
|
||||
target="_blank">预览:文件{{ fileIndex + 1 }}</a>
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件电子邮箱">
|
||||
<span>{{ info.email }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件微信">
|
||||
<span>{{ info.wechat }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接收文件寄件地址">
|
||||
<span v-if="info.receiveAddressRegion.province">{{
|
||||
info.receiveAddressRegion.province.name
|
||||
}}{{ info.receiveAddressRegion.city.name }}{{
|
||||
info.receiveAddressRegion.area.name
|
||||
}}{{ info.receiveAddress }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">
|
||||
<span>{{ info.requestName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务联系人">
|
||||
<span>{{ info.contactName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务联系方式">
|
||||
<span>{{ info.contact }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接单公司" v-if="info.companyId">
|
||||
<span>{{ info.company.company.companyName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="文件上传">
|
||||
<vk-data-upload v-model="resultFiles"
|
||||
:limit="9"
|
||||
:on-preview="previewUpload"
|
||||
accept=".jpg,.jpeg,.png,.xlsx,.doc,.docx,.pdf" list-type="text">
|
||||
</vk-data-upload>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发送途径">
|
||||
<el-select v-model="sendMethod" placeholder="请选择发送途径">
|
||||
<el-option label="接收文件电子邮箱" value="接收文件电子邮箱"/>
|
||||
<el-option label="接收文件微信" value="接收文件微信"/>
|
||||
<el-option label="邮寄接收文件地址" value="邮寄接收文件地址"/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<template slot="extra">
|
||||
<div class="flex justify-start items-center">
|
||||
<el-button type="primary" size="mini" @click="setSend">确认完成
|
||||
</el-button>
|
||||
<el-button plain type="primary" size="mini" class="mx-20" @click="close">
|
||||
关闭
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "setSend",
|
||||
props: {
|
||||
orderInfo: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: null,
|
||||
sendMethod: null,
|
||||
resultFiles: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/selfSupport/kh/getDetailByOrder',
|
||||
data: {
|
||||
orderId: this.orderInfo._id
|
||||
}
|
||||
})
|
||||
this.info = data
|
||||
},
|
||||
async setSend() {
|
||||
if (this.resultFiles.length === 0) {
|
||||
vk.toast("请上传文件")
|
||||
return
|
||||
}
|
||||
if (!this.sendMethod) {
|
||||
vk.toast("请选择发送途径")
|
||||
return
|
||||
}
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/changeOrderStatus',
|
||||
data: {
|
||||
id: this.orderInfo._id,
|
||||
orderStatus: 3,
|
||||
sendMethod: this.sendMethod,
|
||||
resultFiles: this.resultFiles,
|
||||
}
|
||||
})
|
||||
this.close()
|
||||
},
|
||||
close() {
|
||||
this.$emit("close")
|
||||
},
|
||||
previewUpload({url}) {
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.orderInfo)
|
||||
this.getInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view>
|
||||
<el-table :data="tableData.rows" 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="tableData.total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "shopOrder",
|
||||
props: {
|
||||
tableData: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
activeIndex: 0,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
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}`
|
||||
})
|
||||
},
|
||||
getOrderList(index){
|
||||
this.$emit('change-page', index)
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
}
|
||||
}
|
||||
</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>
|
||||
+1137
-778
File diff suppressed because it is too large
Load Diff
@@ -1,40 +1,50 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<gap height="50"/>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<view class="text-50 font-bold">{{ info.name }}</view>
|
||||
<view class="mt-20 text-gray text-28 pb-20 border-bottom">{{ info._add_time_str }}</view>
|
||||
<view v-html="info.content" class="mt-20"></view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<gap height="50"/>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<view class="text-50 font-bold">{{ info.name }}</view>
|
||||
<view class="mt-20 text-gray text-28 pb-20 border-bottom">{{ info._update_time ? info._update_time : info._add_time_str }}</view>
|
||||
<view v-html="info.content" class="mt-20"></view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "detail",
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
name: '',
|
||||
content: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.id) this.getInfo(option.id);
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
this.info = await vk.callFunction({
|
||||
url: `client/otherArticle/list/pub/getDetail`,
|
||||
data: {id}
|
||||
});
|
||||
}
|
||||
name: "detail",
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
name: '',
|
||||
content: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.id) {
|
||||
this.getInfo(option.id);
|
||||
this.addViewNum(option.id);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getInfo(id) {
|
||||
const res = await vk.callFunction({
|
||||
url: `client/otherArticle/list/pub/getDetail`,
|
||||
data: {id}
|
||||
});
|
||||
this.info = res
|
||||
},
|
||||
addViewNum(_id){
|
||||
vk.callFunction({
|
||||
url: `client/otherArticle/list/pub/addViewNum`,
|
||||
data: {_id}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,13 +1,66 @@
|
||||
<template>
|
||||
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<gap height="50"/>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<view v-for="(item, index) in list" :key="index"
|
||||
@click="navTo(item._id)"
|
||||
class="py-30 border-bottom flex justify-between items-center pointer">
|
||||
<text class="font-bold">{{ item.name }}</text>
|
||||
<text class="text-gray">{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<el-pagination
|
||||
:page-size="pageSize"
|
||||
@current-change="getList"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "list",
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
list: [],
|
||||
parentId: null,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
getList(pageIndex) {
|
||||
vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
pageSize: this.pageSize,
|
||||
pageIndex,
|
||||
data: {
|
||||
parentId: this.parentId
|
||||
},
|
||||
success: res => {
|
||||
this.list = res.rows;
|
||||
this.total = res.total;
|
||||
}
|
||||
})
|
||||
},
|
||||
navTo(id) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/otherArticle/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options) this.parentId = options.id;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+645
-289
@@ -1,330 +1,686 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="page-main" v-if="info">
|
||||
<view class="flex justify-between items-center">
|
||||
<text class="text-gray">加工询价单编号:{{ info.orderNo }}</text>
|
||||
<text class="text-gray">发布时间:{{ info._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-40 font-bold">{{ info.title }}</text>
|
||||
<view class="ml-20 flex justify-start items-center">
|
||||
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<view class="text-main ">
|
||||
<text class="mx-20">{{ info.quoteList.rows.length }}</text>
|
||||
<text>家已报价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-end"
|
||||
v-if="info.answerEndTime && dayjs().diff(dayjs(info.answerEndTime), 'second') < 0">
|
||||
<text>距离加工结束还有:</text>
|
||||
<view class="border-main countdown text-main">{{
|
||||
dayjs(info.answerEndTime).diff(dayjs(), 'day')
|
||||
}}
|
||||
</view>
|
||||
<text>天</text>
|
||||
<view class="border-main countdown text-main">
|
||||
{{ (dayjs(info.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
|
||||
</view>
|
||||
<text>时</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center pb-20 border-bottom">
|
||||
<view class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<text class="ml-15 text-gray">
|
||||
{{ info.user.accountType === 1 ? info.user.person.personName : info.user.company.companyName }}
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== info.userId && info.status === 0">我要申请加工
|
||||
</el-button>
|
||||
<el-button type="primary" @click.native="showDialog = true"
|
||||
v-else-if="vk.getVuex('$user.userInfo._id') === info.userId">查看收到的申请加工
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
上传的附件
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
加工商其他要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ info.remark }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
纳税和税票
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">是否含税:{{ info.invoice ? '含税' : '不含税' }}</view>
|
||||
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[info.writeInvoiceTime] }}</view>
|
||||
<view class="mt-15">发票种类:{{ INVOICE_TYPE[info.invoiceType] }}</view>
|
||||
<view class="mt-15">其他要求:{{ info.invoiceOther }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
运输要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">随货资料:{{ info.transportDocuments.join() }}</view>
|
||||
<view class="mt-15">其他要求:{{ info.otherTransportDocuments }}</view>
|
||||
<view class="mt-15">运输限制要求:{{ info.transportLimit ? '有' : '无' }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
交易说明
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">付款方式:{{ PROCESS_PAY_METHOD[info.payMethod] }}</view>
|
||||
<view class="mt-15">报价形式:{{ info.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
|
||||
<view class="mt-15">报价期限:
|
||||
<text v-if="info.answerStartTime && info.answerEndTime">{{
|
||||
dayjs(info.answerStartTime).format('YYYY-MM-DD')
|
||||
}}~{{ dayjs(info.answerEndTime).format('YYYY-MM-DD') }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
简易合同备注和其他补充条款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">违约责任:</view>
|
||||
<view class="mt-15">
|
||||
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
|
||||
</view>
|
||||
<view class="mt-15">解决纠纷的方法:</view>
|
||||
<view class="mt-15">
|
||||
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
|
||||
</view>
|
||||
<view class="mt-15">不可抗力:</view>
|
||||
<view class="mt-15">
|
||||
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
|
||||
</view>
|
||||
<view class="mt-15">其他:</view>
|
||||
<view class="mt-15">
|
||||
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
|
||||
</view>
|
||||
<view class="mt-15">采购方补充条款: 供货方逾期供货承担采购方一切损失</view>
|
||||
<view class="mt-15"> 供应方补充条款:</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
已收到的加工申请
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="page-main" v-if="info">
|
||||
<view class="flex justify-between items-center">
|
||||
<text class="text-gray">加工询价单编号:{{ info.orderNo }}</text>
|
||||
<text class="text-gray">发布时间:{{ info._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-40 font-bold">{{ info.title }}</text>
|
||||
<view class="ml-20 flex justify-start items-center">
|
||||
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<view class="text-main ">
|
||||
<text class="mx-20">{{ info.quoteList.rows.length }}</text>
|
||||
<text>家已报价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog :visible.sync="showDialog" width="70%" :show-close="false">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
|
||||
<view class="flex justify-end items-end"
|
||||
v-if="info.answerEndTime && dayjs(info.answerEndTime).diff(dayjs(), 'second') > 0">
|
||||
<text>距离加工结束还有:</text>
|
||||
<view class="border-main countdown text-main">{{
|
||||
dayjs(info.answerEndTime).diff(dayjs(), 'day')
|
||||
}}
|
||||
</view>
|
||||
<text>天</text>
|
||||
<view class="border-main countdown text-main">
|
||||
{{ (dayjs(info.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
|
||||
</view>
|
||||
<text>时</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my-25 flex justify-between items-center pb-20 border-bottom">
|
||||
<view class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<text class="ml-15 text-gray" v-if="info.user">
|
||||
{{ info.user.accountType === 1 ? info.user.person.personName : info.user.company.companyName }}
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote" :disabled="info.disabled"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== info.userId && info.status === 0">{{
|
||||
info.disabled ? '已超时无法报价' : '我要申请合作'
|
||||
}}
|
||||
</el-button>
|
||||
<el-button type="primary" @click.native="showDialog = true"
|
||||
v-else-if="vk.getVuex('$user.userInfo._id') === info.userId">查看收到的申请合作
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
上传的附件
|
||||
</view>
|
||||
<view class="mt-15" v-if="info && info.quoteList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="info.status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 mr-15" v-if="info.files">
|
||||
<file-type :item="item" v-for="(item, index) in info.files" :key="index" @click.native="previewFile(item)"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
加工产品交货地址
|
||||
</view>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{
|
||||
info.addressRegion ? `${info.addressRegion.province.name}${info.addressRegion.city.name}${info.addressRegion.area ? info.addressRegion.area.name : ''}` : ``
|
||||
}}{{
|
||||
info.addressDetail ? info.addressDetail : ''
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
加工商其他要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ info.remark }}</view>
|
||||
<template v-if="info.multiFiles">
|
||||
<file-type :item="item" v-for="(item, index) in info.multiFiles" :key="index"
|
||||
@click.native="previewFile(item)"/>
|
||||
<!-- <el-image :src="item" v-for="(item, index) in info.multiFiles" :key="index" style="width: 100px; height: 100px" fit="cover"-->
|
||||
<!-- :preview-src-list="info.multiFiles"/>-->
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
主要商品
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ info.title }}</view>
|
||||
<view class="mt-15">加工产品简述:{{ info.detail }}</view>
|
||||
<view class="mt-15">加工量:{{ info.num }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
发票要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">是否含税:{{ info.invoice ? '含税' : '不含税' }}</view>
|
||||
<template v-if="info.invoice">
|
||||
<view class="mt-15">开票时间:{{ WRITE_INVOICE_TIME[info.writeInvoiceTime] }}</view>
|
||||
<view class="mt-15" v-if="info.invoiceOther">税票要求:{{ info.invoiceOther }}</view>
|
||||
<template v-else>
|
||||
<view class="mt-15">纳税人身份:{{ info.taxType ? info.taxType : '无' }}</view>
|
||||
<view class="mt-15">发票种类:{{ info.invoiceType ? info.invoiceType : '无' }}</view>
|
||||
<view class="mt-15">税率:{{ info.taxRate ? info.taxRate : '无' }}</view>
|
||||
</template>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
运输要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.transportDocuments && info.transportDocuments.length > 0">
|
||||
随货资料:{{ info.transportDocuments.join() }}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.otherTransportDocuments">其他要求:{{ info.otherTransportDocuments }}</view>
|
||||
<view class="mt-15">运输限制要求:{{ info.transportLimit ? '有' : '无' }}</view>
|
||||
<view class="mt-15" v-if="info.transportLimit && info.otherTransportRequest">
|
||||
运输限制说明:{{ info.otherTransportRequest }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
交易模式
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ info.tradeMethod === 0 ? '自主交易' : '金久信公证' }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
交易说明
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mt-15" v-if="info.payMethod === 0">付款方式:{{ PROCESS_PAY_METHOD[info.payMethod] }}{{-->
|
||||
<!-- info.payMethod === 0 ? `${info.advancePayRate}%货到付全款` : ''-->
|
||||
<!-- }}{{ info.payMethod === 3 ? `${info.reputationPayDay}天` :-->
|
||||
<!-- ( info.payMethod === 4 ? `:${info.otherPayMethod}` : '') }}-->
|
||||
<!-- </view>-->
|
||||
<view class="mt-15" v-if="info.payMethod === 0">付款方式:预付{{ info.advancePayRate }}%货到付全款</view>
|
||||
<view class="mt-15" v-if="info.payMethod === 1">付款方式:加工验收合格后付全款</view>
|
||||
<view class="mt-15" v-if="info.payMethod === 3">付款方式:加工验收合格后{{
|
||||
info.reputationPayDay
|
||||
}}天内支付全款
|
||||
</view>
|
||||
<view class="mt-15">报价形式:{{ info.offerType === 0 ? '整单报价' : '可分项报价' }}</view>
|
||||
<view class="mt-15">报价期限:
|
||||
<text v-if="info.answerStartTime && info.answerEndTime">{{
|
||||
dayjs(info.answerStartTime).format('YYYY-MM-DD')
|
||||
}}~{{ dayjs(info.answerEndTime).format('YYYY-MM-DD') }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
交易保证金要求
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{ info.earnestMoney }}</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
采购商信息
|
||||
</view>
|
||||
<text class="tip-text ml-10">(注册可查看信息)</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="isLoggedIn && userInfo.userLevel > 1">
|
||||
<view class="mt-15" v-if="info.companyName">
|
||||
公司信息:{{ info.companyName }}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.companyMobile">公司联系方式:{{
|
||||
info.companyMobile
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.businessName">
|
||||
授权业务咨询人:{{ info.businessName }}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.businessMobile">业务咨询联系方式:{{
|
||||
info.businessMobile
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="mt-15" v-if="info.companyName">
|
||||
公司信息:{{ info.companyName ? info.companyName.replace(/^(.)(.).*(.)(.)(.)(.)$/, "$1$2***$3$4$5$6") : '' }}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.companyMobile">公司联系方式:{{
|
||||
info.companyMobile ? info.companyMobile.replace(/^(.)(.)(.).*$/, "$1$2$3****") : ''
|
||||
}}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.businessName">
|
||||
授权业务咨询人:{{ info.businessName ? info.businessName.replace(/^(.).*(.)$/, "$1***$2") : '' }}
|
||||
</view>
|
||||
<view class="mt-15" v-if="info.businessMobile">业务咨询联系方式:{{
|
||||
info.businessMobile ? info.businessMobile.replace(/^(.)(.)(.).*$/, "$1$2$3****") : ''
|
||||
}}
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
签约模式
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">{{
|
||||
info.signMethod === 0 ? '线上签约-标准合同' : (info.signMethod !== 1 ? '线上签约-双方协商合同' : '线下签约')
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap" v-if="info.signMethod === 0">
|
||||
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
合同条款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">违约责任:</view>
|
||||
<view class="mt-15">
|
||||
1.乙方所交产品品种、型号、规格、质量不符合规定的,如果甲方同意利用,应当按质论价;如果甲方不能利用的,应根据产品的具体情况,由乙方负责包换或包修,并承担修理、调换或退货而支付的实际费用;2.乙方不予供货违约责任为甲方的实际损失+违约金,如乙方材料符合订货标准,甲方不能退货和不收货,甲方无条件应按实际本合同订货数量支付100%货款,并支付乙方因此产生的实际费用。带有甲乙双方单位相关收货人和发货人签字的本合同的发货清单事项和内容均视为本合同的补充合同,与本合同有相同的法律效力,双方应共同遵照执行。
|
||||
</view>
|
||||
<view class="mt-15">解决纠纷的方法:</view>
|
||||
<view class="mt-15">
|
||||
1、凡因本合同引起的或与本合同有关的任何争议,均可友好协商或仲裁解决,协商或仲裁不成的,双方协商同意在合同签订地人民法院管辖地起诉,违约一方或对合同争议承担主要责任的一方,应承担对方因仲裁和起诉而产生的全部律师代理费、鉴定(检验)费、诉讼保全费、诉讼保险费、公告费、差旅费、执行费、误工費和获取证据产生费用等其他相关费用。2、双方本合同相关权利放弃均应有双方书面作出并加盖公章或授权委托人签字后生效。
|
||||
</view>
|
||||
<view class="mt-15">不可抗力:</view>
|
||||
<view class="mt-15">
|
||||
甲乙双方的任何一方由于不可抗力或突发公共事件的原因不能履行合同时,应及时向对方通报不能履行或不能完全履行的理由,以减轻可能给对方造成的损失,在取得有关机构证明以后,允许延期履行、部分履行或者不履行合同,并根据情况可部分或全部免予承担违约责任。
|
||||
</view>
|
||||
<view class="mt-15">其他:</view>
|
||||
<view class="mt-15">
|
||||
本合同的全部内容由双方平等共同协商一致,共同起草制定,非一方事先拟定,不属于格式条款。本合同自双方签字盖章后生效(包括电子签字、盖章),按本合同内容地址、联系方式寄送的一切文书、函件送达与否,均为视为送达有法律效力,通知途径和本合同内联系方式或地址送达文件双方均予以验证。
|
||||
</view>
|
||||
<view class="mt-15">采购方补充条款: {{ info.supplementary }}</view>
|
||||
</view>
|
||||
|
||||
<template v-else-if="info.signMethod === 2">
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-sheet-title">
|
||||
<view class="form-title">
|
||||
合同附件
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in info.contractAttachment" :key="index" class="mr-25 my-25">
|
||||
<file-type :item="item" @click.native="previewFile(item)"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
已收到的加工申请
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1" v-if="info.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item-wrap" v-if="spotAdList.length > 0">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
相关推荐
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="spot-ad-list">
|
||||
<image v-for="(item, index) in spotAdList" :key="index"
|
||||
@click="adJump(item)"
|
||||
class="spot-ad-item pointer"
|
||||
:src="item.swiper"
|
||||
mode="aspectFill"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
<el-dialog :visible.sync="showDialog" width="70%" :show-close="false">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工合作申请</text>
|
||||
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15" v-if="info && info.quoteList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">补充条款</text>
|
||||
<text class="flex-1">报价详情</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in info.quoteList.rows" :key="index">
|
||||
<text class="flex-1" v-if="info.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<view class="flex-1">
|
||||
<view class="flex-1">
|
||||
<!-- <view class="mt-15 mr-15" v-for="(item, index) in item.files" :key="index">-->
|
||||
<!-- <template v-if="['doc', 'docx'].includes(item.split('.').pop())">-->
|
||||
<!-- <file-word theme="outline" class="pointer" size="40" fill="#4a90e2" strokeLinecap="square"-->
|
||||
<!-- @click.native="openDownload(item)"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">-->
|
||||
<!-- <file-excel theme="outline" class="pointer" size="40" fill="#417505" strokeLinecap="square"-->
|
||||
<!-- @click.native="openDownload(item)"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else-if="['pdf'].includes(item.split('.').pop())">-->
|
||||
<!-- <file-pdf-one theme="outline" class="pointer" size="40" fill="#f5a623"-->
|
||||
<!-- strokeLinecap="square"-->
|
||||
<!-- @click.native="openDownload(item)"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else>-->
|
||||
<!-- <el-image :src="item" style="width: 100px; height: 100px" fit="cover"-->
|
||||
<!-- :preview-src-list="[item]"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </view>-->
|
||||
<file-type :item="file" v-for="(file, fileIndex) in item.files" :key="fileIndex"
|
||||
@click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col justify-start items-start">
|
||||
<text>采购方补充条款:{{ info.supplementary ? info.supplementary : '无' }}</text>
|
||||
<text>加工方补充条款:{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
</view>
|
||||
<text class="flex-1">{{ item.remark }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="info.status === 0">选择
|
||||
</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {BuildingOne, IdCard} from '@icon-park/vue'
|
||||
import {BuildingOne, FileExcel, FilePdfOne, FileWord, IdCard} from '@icon-park/vue'
|
||||
import dayjs from "dayjs";
|
||||
import {WRITE_INVOICE_TIME, INVOICE_TYPE, PROCESS_PAY_METHOD} from '@/util'
|
||||
import FileType from "../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
components: {BuildingOne, IdCard},
|
||||
data() {
|
||||
return {
|
||||
WRITE_INVOICE_TIME,
|
||||
INVOICE_TYPE,
|
||||
PROCESS_PAY_METHOD,
|
||||
id: null,
|
||||
info: null,
|
||||
showDialog: false
|
||||
};
|
||||
components: {FileType, FileWord, FilePdfOne, FileExcel, BuildingOne, IdCard,},
|
||||
data() {
|
||||
return {
|
||||
WRITE_INVOICE_TIME,
|
||||
INVOICE_TYPE,
|
||||
PROCESS_PAY_METHOD,
|
||||
id: null,
|
||||
info: null,
|
||||
showDialog: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
spotAdList: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
userInfo: {
|
||||
userLevel: 0
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
getInfo() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getInfo',
|
||||
data: {
|
||||
id: this.id
|
||||
}
|
||||
}).then((res) => {
|
||||
this.info = res
|
||||
})
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
getInfo() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getInfo',
|
||||
data: {
|
||||
id: this.id
|
||||
}
|
||||
}).then((res) => {
|
||||
this.info = res
|
||||
this.info.disabled = (!this.info.answerEndTime || dayjs(this.info.answerEndTime).isBefore(dayjs()))
|
||||
this.getSpotAd()
|
||||
})
|
||||
},
|
||||
onLoad(option) {
|
||||
if (!option.id) vk.navigateBack()
|
||||
this.id = option.id
|
||||
this.getInfo()
|
||||
async getSpotAd() {
|
||||
this.spotAdList = []
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 38,
|
||||
spotGoodsId: this.id
|
||||
}
|
||||
})
|
||||
if (res.data) this.spotAdList = res.data
|
||||
},
|
||||
adJump(item) {
|
||||
if (item.spotGoodsId) {
|
||||
if (item.spotGoodsId === this.id) return
|
||||
vk.navigateTo(`/pages/process/detail?id=${item.spotGoodsId}`)
|
||||
} else if (item.type === 'goods' && item.goodsId) {
|
||||
vk.navigateTo(`/pages/index/shop/detail?id=${item.goodsId}`)
|
||||
} else if (item.companyId) {
|
||||
vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)
|
||||
}
|
||||
},
|
||||
async toQuote() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (userInfo.factoryStatus !== 1) return this.$message.error('非加工厂,无法报价,请去个人中心申请加工厂')
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.info.earnestMoney && this.info.earnestMoney > 0 && userInfo.paidEnsure < this.info.earnestMoney) {
|
||||
this.$confirm('保证金不足,是否去充值保证金?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=grade'});
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
}
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.showDialog = false
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer?menuIndex=0')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0')
|
||||
}
|
||||
}, 1500)
|
||||
})
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (!option.id) vk.navigateBack()
|
||||
this.id = option.id
|
||||
this.userInfo = vk.getVuex('$user.userInfo') || {userLevel: 0}
|
||||
this.getInfo()
|
||||
},
|
||||
computed: {
|
||||
isLoggedIn() {
|
||||
return !!vk.getVuex('$user.userInfo._id')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/common/css/app.scss";
|
||||
|
||||
.page-main {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.countdown {
|
||||
padding: 2px 5px;
|
||||
margin: 0 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: $--color-primary;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid $--color-primary;
|
||||
}
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.spot-ad-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.spot-ad-item {
|
||||
width: calc(50% - 10px);
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,602 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/index/process/list">找加工</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-main">加工厂列表</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
<view class="w-1200 m-a">
|
||||
<common-swiper page="factory"/>
|
||||
</view>
|
||||
<!-- 筛选表单 -->
|
||||
<view class="w-1200 m-a" style="margin-top: 30rpx">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectCate({name: -1})" class="pointer mr-25"
|
||||
:class="[(checkCategoryList.includes(-1) || checkCategoryList.length === 0) ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="selectCate(item)" class="pointer mr-25"
|
||||
:class="[checkCategoryList.includes(item.name) ? 'text-main selected-cate' : '']">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="地区" class="border-bottom pb-30">
|
||||
<el-cascader :options="areaOptions"
|
||||
:props="{label: 'name', value: 'code', checkStrictly: true}"
|
||||
v-model="area"
|
||||
clearable
|
||||
style="width: 300px;"
|
||||
@change="selectArea"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
<div class="flex justify-between items-center w-1200 m-a">
|
||||
<template v-if="ad12.length">
|
||||
<el-carousel :height="`100px`" :style="{width: '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad12" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
<template v-if="ad122.length">
|
||||
<el-carousel :height="`100px`" :style="{width: '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad122" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in list.rows" :key="index" class="goods">
|
||||
<view class="goods-info" @click="navTo(`/pages/yellowPage/factory?userId=${item.uid}`)">
|
||||
<!-- <el-image src="https://oss.wsdns.cn/20231204/d35332fa6a3b4596b522edf9527ac612.png"-->
|
||||
<!-- class="goods-img"/>-->
|
||||
<view class="info">
|
||||
<view class="field">
|
||||
<view class="desc" style="width: 1000px">
|
||||
<view class="text">加工主体</view>
|
||||
<view class="font-bold" v-if="item.user">{{
|
||||
item.user.accountType === 2 ? item.user.company.companyName : item.user.person.personName
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">所在地区</view>
|
||||
<view>{{ item.addressRegion.province.name }}{{ item.addressRegion.city.name }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">成立年限</view>
|
||||
<view>{{ item.year }}年</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">年产值</view>
|
||||
<view>{{ item.yearsIncome }}万元</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">员工人数</view>
|
||||
<view>{{ item.employeeNum }}人</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">流水线数量</view>
|
||||
<view>{{ item.flowNum }}条</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">厂房归属</view>
|
||||
<view>{{ item.blongTo }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">厂房面积</view>
|
||||
<view>{{ item.size }}㎡</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">服务信息</view>
|
||||
<view>{{ item.serviceInfo }}</view>
|
||||
</view>
|
||||
<view class="desc" v-if="item.mainSpotCategory && item.mainSpotCategory.length > 0">
|
||||
<view class="text">主营类别</view>
|
||||
<view>{{ item.mainSpotCategory.join() }}</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="text">主营工艺和业务范围</view>
|
||||
<view>{{ item.mainProcess }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<button type="default" class="btn" plain @click="doShowContract(index)">查看电话
|
||||
</button>
|
||||
<button type="default" class="btn green mt-20" plain @click="doShowWechat(index)">添加微信
|
||||
</button>
|
||||
<button type="default" class="btn mt-20" plain @click="navTo(`/pages/yellowPage/factory?userId=${item.uid}`)">
|
||||
查看详情
|
||||
</button>
|
||||
<view class="wechat"
|
||||
v-if="item.user && parseInt(item.user.accountType) === 2 && item.user.businessCard && item.user.businessCard.companyWechat && item.showWechat">
|
||||
<el-image :src="item.user.businessCard.companyWechat" style="width: 100%; height: 100%"/>
|
||||
</view>
|
||||
<view class="wechat"
|
||||
v-if="item.user && parseInt(item.user.accountType) === 1 && item.user.businessCard && item.user.businessCard.personalWechat && item.showWechat">
|
||||
<el-image :src="item.user.businessCard.personalWechat" style="width: 100%; height: 100%"/>
|
||||
</view>
|
||||
<view class="mobile" v-if="item.user && item.showContract && item.user.businessCard">
|
||||
<i class="el-icon-phone"></i>
|
||||
<text class="ml-20">{{
|
||||
(item.user.businessCard && item.user.businessCard.companyMobile) ? item.user.businessCard.companyMobile : '暂无电话'
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="paginatio">
|
||||
<el-pagination @current-change="search" background layout="prev, pager, next" :total="list.total"
|
||||
:page-size="pageSize">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</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 dayjs from "dayjs";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checkCategoryList: [],
|
||||
clickedCateIndex: -1,
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
areaOptions: [],
|
||||
area: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
list: {
|
||||
total: 0,
|
||||
rows: []
|
||||
},
|
||||
showAllProvince: false,
|
||||
type: 0,
|
||||
pageSize: 20,
|
||||
ad12: [],
|
||||
ad122: [],
|
||||
categoryTreeData: [],
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.type) this.type = option.type
|
||||
this.areaOptions = provinces.map(item => {
|
||||
item.children = [];
|
||||
return item
|
||||
})
|
||||
this.areaOptions.forEach((province, index) => {
|
||||
citys[index].forEach(city => {
|
||||
city.children = []
|
||||
this.areaOptions[index].children.push(city)
|
||||
})
|
||||
})
|
||||
this.areaOptions.forEach((province, index) => {
|
||||
province.children.forEach((city, cityIndex) => {
|
||||
this.areaOptions[index].children[cityIndex].children.push(...areas[index][cityIndex])
|
||||
})
|
||||
})
|
||||
vk.callFunction({
|
||||
url: 'client/process/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
this.search(1)
|
||||
},
|
||||
methods: {
|
||||
navTo(url) {
|
||||
vk.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
selectCate({name}) {
|
||||
if (name === -1) this.checkCategoryList = []
|
||||
const index = this.checkCategoryList.indexOf(name)
|
||||
if (index === -1) {
|
||||
this.checkCategoryList = [name]
|
||||
} else {
|
||||
this.checkCategoryList = []
|
||||
}
|
||||
console.log(this.checkCategoryList)
|
||||
this.search(1)
|
||||
},
|
||||
selectProvince(code) {
|
||||
if (code === -1) this.checkProvinceList = []
|
||||
else {
|
||||
this.checkProvinceList = [code]
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectArea(e) {
|
||||
this.area = e
|
||||
this.checkProvinceList = e && e.length ? [e[0]] : []
|
||||
this.search(1)
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
search(pageIndex) {
|
||||
// const categoryIds = []
|
||||
// this.allChildCate.map(item => {
|
||||
// if (this.checkCategoryList.indexOf(item._id) > -1) categoryIds.push(item.name)
|
||||
// })
|
||||
vk.callFunction({
|
||||
url: 'client/factory/pub/getList',
|
||||
title: '加载中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
mainSpotCategory: this.checkCategoryList.length ? this.checkCategoryList[0] : null,
|
||||
area: this.area
|
||||
},
|
||||
success: ({data}) => {
|
||||
data.rows.map(item => {
|
||||
item.showWechat = false
|
||||
item.showContract = false
|
||||
return item
|
||||
})
|
||||
this.list = data
|
||||
this.getAd12()
|
||||
this.getAd122()
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
doShowWechat(index) {
|
||||
if (parseInt(this.list.rows[index].user.accountType) === 2 && !this.list.rows[index].user.businessCard.companyWechat)
|
||||
return vk.toast('用户暂未上传')
|
||||
else if (parseInt(this.list.rows[index].user.accountType) === 1 && !this.list.rows[index].user.businessCard.personalWechat)
|
||||
return vk.toast('用户暂未上传')
|
||||
this.list.rows[index].showContract = false
|
||||
this.list.rows[index].showWechat = !this.list.rows[index].showWechat
|
||||
},
|
||||
doShowContract(index) {
|
||||
this.list.rows[index].showWechat = false
|
||||
this.list.rows[index].showContract = !this.list.rows[index].showContract
|
||||
},
|
||||
async getAd12() {
|
||||
this.ad12 = []
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 12,
|
||||
categoryName: this.checkCategoryList.length ? this.checkCategoryList[0] : null,
|
||||
region: this.area && this.area.length ? this.area : (this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null)
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad12 = res.data
|
||||
},
|
||||
async getAd122() {
|
||||
this.ad122 = []
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 122,
|
||||
categoryName: this.checkCategoryList.length ? this.pickValue : null,
|
||||
categoryNames: this.checkCategoryList.length ? [this.pickValue] : null,
|
||||
region: this.area && this.area.length ? this.area : (this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null)
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad122 = res.data
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.page-nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goods-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.goods {
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
width: 1200px;
|
||||
margin: 10px auto;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.goods-img {
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 1000px;
|
||||
text-align: left;
|
||||
margin-left: 20px;
|
||||
|
||||
.goods-name {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
line-height: 2.5em;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
width: 330px;
|
||||
line-height: 2.5em;
|
||||
|
||||
.text {
|
||||
width: 140px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
padding: 0 20px;
|
||||
width: 200px;
|
||||
border-left: 1px solid #f3f3f3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
|
||||
.btn {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #7ec050 !important;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.wechat {
|
||||
position: absolute;
|
||||
left: -140px;
|
||||
top: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 1px 10px 0 #eee
|
||||
}
|
||||
|
||||
.mobile {
|
||||
position: absolute;
|
||||
left: -110px;
|
||||
top: 10px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 1px 10px 0 #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: 15px;
|
||||
color: #101010;
|
||||
height: 62px;
|
||||
padding-top: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&-stock {
|
||||
font-size: 12px;
|
||||
color: #BD3124;
|
||||
}
|
||||
|
||||
&-address {
|
||||
font-size: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 200px;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-company {
|
||||
color: #4F4F4F;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
&-buy {
|
||||
width: 108px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
color: rgba(169, 41, 36, 1);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
font-family: Roboto;
|
||||
border: 1px solid rgba(169, 41, 36, 1);
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
+534
-337
@@ -1,388 +1,585 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="clickedCateIndex = -1" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === -1 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="clickedCateIndex = index" class="pointer mr-25"
|
||||
:class="[clickedCateIndex === index ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="child-cate flex justify-start items-center flex-wrap">
|
||||
<template v-if="clickedCateIndex === -1">
|
||||
<text class="pointer mr-25" @click="selectCate(item)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="pointer mr-25" @click="selectCate(item)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<!-- <text @click="showAllTexture = !showAllTexture" class="pointer mr-25" >查看更多-->
|
||||
<!-- </text>-->
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectCompany(-1)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in companyList" :key="index">
|
||||
<text @click="selectCompany(item._id)" class="pointer mr-25"
|
||||
:class="[checkCompanyList.includes(item._id) ? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllCompany">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllCompany = !showAllCompany" class="pointer mr-25"
|
||||
v-if="companyList.length > 10">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<el-table :data="list.rows" style="width: 100%">
|
||||
<el-table-column align="center" label="标题">
|
||||
<template v-slot="{ row }">
|
||||
<p class="text-main">{{ row.title }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" label="加工量"/>
|
||||
<el-table-column align="center" label="采购企业">
|
||||
<template v-slot="{ row }">
|
||||
<p>{{
|
||||
row.user.accountType === 1 ? row.user.person.personName : row.user.company.companyName
|
||||
}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报价情况">
|
||||
<template v-slot="{ row }">
|
||||
<p>{{ `${row.quoteNum}家已报价` }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="_add_time_srt" label="发布时间"/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)">
|
||||
{{ vk.getVuex('$user.userInfo._id') === row.userId ? '查看' : '申请加工' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt-20 text-center">
|
||||
<el-pagination @current-change="search" background layout="prev, pager, next"
|
||||
:total="list.total" :page-size="pageSize"/>
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
<view class="carousel">
|
||||
<common-swiper page="process"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>
|
||||
<el-button @click="toMyQuote" type="primary" round plain>我的报价</el-button>
|
||||
<el-button @click="navTo('/pages/process/factoryList')" type="success" round plain>加工厂列表</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 筛选表单 -->
|
||||
<view class="filter-outer">
|
||||
<el-form @submit.native.prevent label-width="80px">
|
||||
<el-form-item label="关键词:" class="border-bottom pb-30">
|
||||
<el-input @keyup.enter.native="keywordSearch" clearable placeholder="输入关键字搜索" v-model="keyword">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
<el-button @click="keywordSearch" type="primary" slot="append" style="border-radius: 0">搜索
|
||||
</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectCate({_id: -1})" class="pointer mr-25"
|
||||
:class="[checkCategoryList.length === 0 ? 'text-main selected-cate' : '']">全部
|
||||
</text>
|
||||
<view v-for="(item, index) in categoryTreeData" :key="index">
|
||||
<text @click="selectCate(item)" class="pointer mr-25"
|
||||
:class="[checkCategoryList.length && checkCategoryList.includes(item._id) ? 'text-main selected-cate' : '']">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="child-cate flex justify-start items-center flex-wrap">-->
|
||||
<!-- <template v-if="clickedCateIndex === -1">-->
|
||||
<!-- <text class="pointer mr-25" @click="selectCate(item)"-->
|
||||
<!-- :class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"-->
|
||||
<!-- v-for="(item, index) in allChildCate" :key="index">{{ item.name }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else>-->
|
||||
<!-- <text class="pointer mr-25" @click="selectCate(item)"-->
|
||||
<!-- :class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"-->
|
||||
<!-- v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </template>-->
|
||||
<!-- <!– <text @click="showAllTexture = !showAllTexture" class="pointer mr-25" >查看更多–>-->
|
||||
<!-- <!– </text>–>-->
|
||||
<!-- </view>-->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商:" class="border-bottom pb-30">-->
|
||||
<!-- <view class="flex justify-start items-center flex-wrap">-->
|
||||
<!-- <text @click="selectCompany(-1)" class="pointer mr-25"-->
|
||||
<!-- :class="[checkCompanyList.length === 0 ? 'text-main selected-cate' : '']">全部-->
|
||||
<!-- </text>-->
|
||||
<!-- <view v-for="(item, index) in companyList" :key="index">-->
|
||||
<!-- <text @click="selectCompany(item._id)" class="pointer mr-25"-->
|
||||
<!-- :class="[checkCompanyList.includes(item._id) ? 'text-main selected-cate' : '']"-->
|
||||
<!-- v-if="index < 10 || showAllCompany">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <text @click="showAllCompany = !showAllCompany" class="pointer mr-25"-->
|
||||
<!-- v-if="companyList.length > 10">查看更多-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="地区:" class="border-bottom pb-30">
|
||||
<el-cascader :options="areaOptions"
|
||||
:props="{label: 'name', value: 'code', checkStrictly: true}"
|
||||
v-model="area"
|
||||
clearable
|
||||
style="width: 300px;"
|
||||
@change="selectArea"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
<div class="flex justify-between items-center w-1200 m-a">
|
||||
<template v-if="ad13.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad14.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad13" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
<template v-if="ad14.length">
|
||||
<el-carousel :height="`100px`" :style="{width: ad13.length ? '50%' : '100%'}" class="m-a">
|
||||
<el-carousel-item v-for="(item, index) in ad14" :key="index" :style="{width: '100%'}">
|
||||
<image @click="vk.navigateTo(`/pages/yellowPage/info?id=${item.companyId}`)"
|
||||
class="pointer carousel-img" :src="item.swiper" mode="aspectFill"
|
||||
:style="{width: '100%'}"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<view class="flex justify-start items-center my-20">
|
||||
<el-button @click="changeStatus(0)" type="primary" :plain="status === 1" round>正在询价</el-button>
|
||||
<el-button @click="changeStatus(1)" type="primary" :plain="status === 0" round>合作成交
|
||||
</el-button>
|
||||
</view>
|
||||
<el-table :data="list.rows" style="width: 100%" :loading="loading">
|
||||
<el-table-column align="center" label="标题">
|
||||
<template v-slot="{ row }">
|
||||
<p class="text-main">{{ row.title }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" label="加工量" width="80"/>
|
||||
<el-table-column align="center" label="采购企业" width="260">
|
||||
<template v-slot="{ row }">
|
||||
<p v-if="row.user">{{
|
||||
row.user.accountType === 1 ? row.user.person.personName : row.user.company.companyName
|
||||
}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="加工产品交货地址">
|
||||
<template v-slot="{ row }">
|
||||
<p v-if="row.addressRegion && row.addressRegion.province">{{
|
||||
row.addressRegion.province.name
|
||||
}}{{ row.addressRegion.city.name }}{{
|
||||
row.addressRegion.area.name
|
||||
}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报价情况">
|
||||
<template v-slot="{ row }">
|
||||
<p>{{ `${row.quoteNum}家已报价` }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="_add_time_str" label="发布时间"/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)" v-if="status === 0">
|
||||
{{ vk.getVuex('$user.userInfo._id') === row.userId ? '查看' : '申请合作' }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)" v-if="status === 1">
|
||||
查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt-20 text-center">
|
||||
<el-pagination @current-change="search" background layout="prev, pager, next"
|
||||
:total="list.total" :page-size="pageSize"/>
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
</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";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkProvinceList: [],
|
||||
allChildCate: [],
|
||||
companyList: [],
|
||||
checkCompanyList: [],
|
||||
clickedCateIndex: -1,
|
||||
checkCategoryList: [],
|
||||
checkCategoryNameList: [],
|
||||
showAllCompany: false,
|
||||
keyword: '',
|
||||
queryParam: {},
|
||||
list: {
|
||||
rows: [],
|
||||
total: 0
|
||||
},
|
||||
pageSize: 20
|
||||
};
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkProvinceList: [],
|
||||
allChildCate: [],
|
||||
companyList: [],
|
||||
checkCompanyList: [],
|
||||
clickedCateIndex: -1,
|
||||
checkCategoryList: [],
|
||||
checkCategoryNameList: [],
|
||||
showAllCompany: false,
|
||||
keyword: '',
|
||||
queryParam: {},
|
||||
list: {
|
||||
rows: [],
|
||||
total: 0
|
||||
},
|
||||
pageSize: 20,
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
areaOptions: [],
|
||||
area: [],
|
||||
showAllProvince: true,
|
||||
loading: true,
|
||||
status: 0,
|
||||
ad13: [],
|
||||
ad14: [],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.keyword) this.keyword = options.keyword
|
||||
this.areaOptions = provinces.map(item => {
|
||||
item.children = [];
|
||||
return item
|
||||
})
|
||||
this.areaOptions.forEach((province, index) => {
|
||||
citys[index].forEach(city => {
|
||||
city.children = []
|
||||
this.areaOptions[index].children.push(city)
|
||||
})
|
||||
})
|
||||
this.areaOptions.forEach((province, index) => {
|
||||
province.children.forEach((city, cityIndex) => {
|
||||
this.areaOptions[index].children[cityIndex].children.push(...areas[index][cityIndex])
|
||||
})
|
||||
})
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/process/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
console.log(child)
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.search()
|
||||
this.getCompany()
|
||||
},
|
||||
methods: {
|
||||
keywordSearch() {
|
||||
this.checkCategoryList = []
|
||||
this.checkCategoryNameList = []
|
||||
this.search(1)
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
this.allChildCate = []
|
||||
this.categoryTreeData.forEach(item => {
|
||||
item.children.forEach(child => {
|
||||
this.allChildCate.push(child)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
this.search()
|
||||
this.getCompany()
|
||||
selectCate({_id, name}) {
|
||||
if (_id === -1) {
|
||||
this.checkCategoryList = []
|
||||
this.checkCategoryNameList = []
|
||||
return this.search(1)
|
||||
}
|
||||
const index = this.checkCategoryList.indexOf(_id)
|
||||
if (index === -1) {
|
||||
this.checkCategoryList = [_id]
|
||||
this.checkCategoryNameList = [name]
|
||||
} else {
|
||||
this.checkCategoryList.splice(index, 1)
|
||||
this.checkCategoryNameList.splice(index, 1)
|
||||
}
|
||||
this.keyword = ''
|
||||
this.search(1)
|
||||
},
|
||||
methods: {
|
||||
selectCate({_id, name}) {
|
||||
const index = this.checkCategoryList.indexOf(_id)
|
||||
console.log(_id, name, index)
|
||||
if (index === -1) {
|
||||
this.checkCategoryList.push(_id)
|
||||
this.checkCategoryNameList.push(name)
|
||||
} else {
|
||||
this.checkCategoryList.splice(index, 1)
|
||||
this.checkCategoryNameList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectTexture(id) {
|
||||
if (id === -1) this.checkTextureList = []
|
||||
else {
|
||||
const index = this.checkTextureList.indexOf(id)
|
||||
if (index === -1) this.checkTextureList.push(id)
|
||||
else this.checkTextureList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
selectCompany(id) {
|
||||
if (id === -1) this.checkCompanyList = []
|
||||
else {
|
||||
const index = this.checkCompanyList.indexOf(id)
|
||||
if (index === -1) this.checkCompanyList.push(id)
|
||||
else this.checkCompanyList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
getCompany() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.companyList = data.rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-card'});
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
async toDetail(id) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: `/pages/process/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
companyList: this.checkCompanyList,
|
||||
categoryIds: this.checkCategoryList
|
||||
},
|
||||
success: (data) => {
|
||||
this.list = data
|
||||
console.log(this.list)
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
selectProvince(code) {
|
||||
if (code === -1) this.checkProvinceList = []
|
||||
else {
|
||||
this.checkProvinceList = [code]
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryNameList.forEach(name => {
|
||||
arr.push({name})
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
selectArea(e) {
|
||||
this.area = e
|
||||
this.checkProvinceList = e && e.length ? [e[0]] : []
|
||||
this.search(1)
|
||||
},
|
||||
getCompany() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/pub/getCompany',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.companyList = data.rows.map(item => {
|
||||
item.name = item.company.companyName
|
||||
return item
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/my'
|
||||
})
|
||||
},
|
||||
toMyQuote() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/quote/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
async toDetail(id) {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: `/pages/process/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex = 1) {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.keyword,
|
||||
// companyList: this.checkCompanyList,
|
||||
categoryIds: this.checkCategoryList.length ? this.checkCategoryList : null,
|
||||
area: this.area,
|
||||
provinceCodes: this.checkProvinceList,
|
||||
status: this.status,
|
||||
},
|
||||
success: (data) => {
|
||||
this.list = data
|
||||
this.loading = false
|
||||
this.getAd13()
|
||||
this.getAd14()
|
||||
}
|
||||
});
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
url: 'client/fadada.getVerifyUrl',
|
||||
success: (res) => {
|
||||
location.href = res.data.url
|
||||
}
|
||||
});
|
||||
},
|
||||
navTo(url) {
|
||||
vk.navigateTo({url});
|
||||
},
|
||||
changeStatus(status) {
|
||||
this.status = status
|
||||
this.search(1)
|
||||
},
|
||||
async getAd13() {
|
||||
this.ad13 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 13,
|
||||
categoryIds: this.checkCategoryList.length ? this.checkCategoryList : null,
|
||||
region: this.area && this.area.length ? this.area : (this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null)
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad13 = res.data
|
||||
// } else {
|
||||
// const {rows} = await vk.callFunction({
|
||||
// url: 'client/user/pub/getCompany',
|
||||
// data: {
|
||||
// pageIndex: 1,
|
||||
// pageSize: 5,
|
||||
// isCoop: 1,
|
||||
// province: this.checkProvinceList
|
||||
// }
|
||||
// })
|
||||
// rows.forEach(item => {
|
||||
// if (item.businessCard.album && item.businessCard.album.length > 0) {
|
||||
// this.ad13.push({
|
||||
// swiper: Array.isArray(item.businessCard.album) ? item.businessCard.album[0] : item.businessCard.album,
|
||||
// companyId: item._id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
async getAd14() {
|
||||
this.ad14 = []
|
||||
// if (this.checkProvinceList.length === 0) {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/ad/pub/getList',
|
||||
data: {
|
||||
adKey: 14,
|
||||
categoryIds: this.checkCategoryList.length ? this.checkCategoryList : null,
|
||||
region: this.area && this.area.length ? this.area : (this.checkProvinceList.length > 0 ? this.checkProvinceList[0] : null)
|
||||
}
|
||||
})
|
||||
if (res.data) this.ad14 = res.data
|
||||
// } else {
|
||||
// const {rows} = await vk.callFunction({
|
||||
// url: 'client/user/pub/getCompany',
|
||||
// data: {
|
||||
// pageIndex: 2,
|
||||
// pageSize: 5,
|
||||
// isCoop: 1,
|
||||
// province: this.checkProvinceList
|
||||
// }
|
||||
// })
|
||||
// rows.forEach(item => {
|
||||
// if (item.businessCard.album && item.businessCard.album.length > 0) {
|
||||
// this.ad14.push({
|
||||
// swiper: Array.isArray(item.businessCard.album) ? item.businessCard.album[0] : item.businessCard.album,
|
||||
// companyId: item._id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryNameList.forEach(name => {
|
||||
arr.push({name})
|
||||
})
|
||||
|
||||
this.provinceData.forEach(item => {
|
||||
if (this.checkProvinceList.includes(item.code) && (!this.area || this.area.length <= 1)) {
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
if (this.area && this.area.length > 1) {
|
||||
const province = this.provinceData.find(item => item.code === this.area[0])
|
||||
if (province) {
|
||||
const nameArr = [province.name]
|
||||
if (this.area.length > 1) {
|
||||
const city = province.children && province.children.find(item => item.code === this.area[1])
|
||||
if (city) {
|
||||
nameArr.push(city.name)
|
||||
if (this.area.length > 2) {
|
||||
const area = city.children && city.children.find(item => item.code === this.area[2])
|
||||
if (area) nameArr.push(area.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nameArr.length > 1) arr.push({name: nameArr.join('/')})
|
||||
}
|
||||
}
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
+298
-244
@@ -1,293 +1,347 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<!-- <el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加工单列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<!-- <el-carousel height="170px">-->
|
||||
<!-- <el-carousel-item v-for="item in 4" :key="item">-->
|
||||
<!-- <image class="carousel-img"-->
|
||||
<!-- src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"-->
|
||||
<!-- mode="aspectFill"></image>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="process-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<!-- <el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加工单列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
},],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
minWidth: 200,
|
||||
formatter: (val, row, column, index) => {
|
||||
let str = ""
|
||||
try {
|
||||
str = val.map(item => {
|
||||
const addressStr = item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name
|
||||
return addressStr
|
||||
}).join("/")
|
||||
} catch (err) {
|
||||
str = ""
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
// {
|
||||
// key: "user",
|
||||
// title: "采购单位",
|
||||
// type: "text",
|
||||
// width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// if(val.accountType == 1) {
|
||||
// return val.person.personName
|
||||
// }else {
|
||||
// return val.company.companyName
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// },
|
||||
{
|
||||
key: "_add_time_srt",
|
||||
title: "添加时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/sheet/pub/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id'),
|
||||
isUser: true
|
||||
}
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
})
|
||||
},
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
icon: 'el-icon-delete',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
this.$confirm('如果你要删除此条信息,之前其他客户填写的留言将无法查看', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
},
|
||||
}).then(res => {
|
||||
this.$refs.table1.refresh()
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
})
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "orderNo",
|
||||
title: "单号",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "title",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "quoteNum",
|
||||
title: "报价数",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}家已报价`
|
||||
}
|
||||
},
|
||||
// {
|
||||
// key: "productList",
|
||||
// title: "收货地",
|
||||
// type: "text",
|
||||
// minWidth: 200,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// let str = ""
|
||||
// try {
|
||||
// str = val.map(item => {
|
||||
// const addressStr = item.address.region.province.name + "-" + item.address.region.city.name + "-" + item.address.region.area.name
|
||||
// return addressStr
|
||||
// }).join("/")
|
||||
// } catch (err) {
|
||||
// str = ""
|
||||
// }
|
||||
//
|
||||
// return str
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// key: "user",
|
||||
// title: "采购单位",
|
||||
// type: "text",
|
||||
// width: 280,
|
||||
// formatter: (val, row, column, index) => {
|
||||
// if(val.accountType == 1) {
|
||||
// return val.person.personName
|
||||
// }else {
|
||||
// return val.company.companyName
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// },
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
},
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+63
-33
@@ -15,6 +15,7 @@
|
||||
</view>
|
||||
|
||||
<view class="page-main">
|
||||
<quote-remain-num v-if="reloaded" :amount="sheet.quoteAmount" type="process" :id="sheetId"/>
|
||||
<vk-data-form
|
||||
ref="form1"
|
||||
v-model="form1.data"
|
||||
@@ -24,9 +25,16 @@
|
||||
:form-type="form1.props.formType"
|
||||
:loading.sync="form1.props.loading"
|
||||
:auto-close="true"
|
||||
label-width="140px"
|
||||
label-width="180px"
|
||||
:show-cancel="false"
|
||||
@success="onFormSuccess"
|
||||
></vk-data-form>
|
||||
:need-alert="false"
|
||||
@fail="onFormFail"
|
||||
>
|
||||
<template v-slot:totalPrice>
|
||||
<el-input v-model="form1.data.totalPrice" placeholder="请输入货款总价" @change="formatNumber"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
@@ -37,13 +45,17 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
reloaded: false,
|
||||
sheet: null,
|
||||
sheetId: null,
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
// radio: 1,
|
||||
// checkbox : [1,2]
|
||||
sheetId: null
|
||||
sheetId: null,
|
||||
totalPrice: null,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
@@ -51,14 +63,15 @@ export default {
|
||||
action: "client/process/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "number"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
{key: "totalPrice", title: "加工总价(人民币:元)", type: "html"},
|
||||
{key: "files", title: "附件", type: "file", accept: '.pdf', tips: '仅限PDF格式附件或合同,非协议合同将读取为合同附件,请仔细核查'},
|
||||
{key: "remark", title: "报价单详情", type: "textarea"},
|
||||
{key: "supplierExt", title: "合同补充条款", type: "textarea"},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
text: [
|
||||
{required: true, message: "text不能为空", trigger: "change"},
|
||||
totalPrice: [
|
||||
{required: true, message: "货款总价不能为空", trigger: "change,blur"},
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
@@ -84,7 +97,7 @@ export default {
|
||||
|
||||
this.sheetId = sheetId
|
||||
this.form1.data.sheetId = sheetId
|
||||
// this.getEnquiryDetail()
|
||||
this.getDetail()
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -97,7 +110,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.navigateBack()
|
||||
vk.redirectTo({url: `/pages/process/detail?id=${this.sheetId}`})
|
||||
},
|
||||
onFormFail(data) {
|
||||
if (data.data.code === 12) {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.redirectTo({url: `/pages/user/user?menu=grade`})
|
||||
})
|
||||
}else {
|
||||
this.$confirm(data.data.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
@@ -127,29 +159,27 @@ export default {
|
||||
/**
|
||||
* 获取询价单详情
|
||||
*/
|
||||
// getEnquiryDetail() {
|
||||
// vk.callFunction({
|
||||
// url: 'client/progress/sheet/pub/getDetail',
|
||||
// title: '请求中...',
|
||||
// data: {
|
||||
// _id: this.sheetId
|
||||
// },
|
||||
// success: (res) => {
|
||||
//
|
||||
// res.data.productList.forEach(item => {
|
||||
// item.unitPrice = 0
|
||||
// const keys = Object.keys(item.extraAttributes)
|
||||
// keys.forEach(citem => {
|
||||
// item.extraAttributes[citem] = JSON.parse(item.extraAttributes[
|
||||
// citem])
|
||||
// })
|
||||
// })
|
||||
//
|
||||
//
|
||||
// this.sheet = res.data
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
getDetail() {
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getInfo',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.sheetId
|
||||
},
|
||||
success: (res) => {
|
||||
this.sheet = res
|
||||
}
|
||||
});
|
||||
},
|
||||
formatNumber(e){
|
||||
this.form1.data.totalPrice = parseFloat(this.form1.data.totalPrice).toFixed(2)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.reloaded = false
|
||||
setTimeout(() => {
|
||||
this.reloaded = true
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<!-- <view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view> -->
|
||||
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布加工单</el-button>
|
||||
<!-- <el-button @click="toMyEnquiry" type="primary" round plain>我发布的加工单</el-button>-->
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加工单列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
checkCategoryList: [],
|
||||
checkProvinceList: [],
|
||||
keyword: '',
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
vk.callFunction({
|
||||
url: `client/process/quote/kh/getList`,
|
||||
data: {
|
||||
...data, ...{
|
||||
userId: vk.getVuex('$user.userInfo._id')
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
if (typeof success === "function") {
|
||||
success({
|
||||
rows: res.rows, // 列表数据
|
||||
total: res.total, // 总记录数
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err => {
|
||||
|
||||
}),
|
||||
complete: (res) => {
|
||||
if (typeof complete === "function") complete(res);
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/process/detail?id=' + item.sheetId);
|
||||
}
|
||||
},
|
||||
],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "sheet.title",
|
||||
title: "加工标题",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "sheet.num",
|
||||
title: "加工量",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "totalPrice",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return `${val}元`
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
},
|
||||
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
// 当前高亮的记录
|
||||
selectItem: "",
|
||||
|
||||
},
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
title: '请求中...',
|
||||
data: {},
|
||||
success: (data) => {
|
||||
this.categoryTreeData = data.rows
|
||||
for (var i = 0; i < data.rows.length; i++) {
|
||||
this.checkCategoryList.push([])
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
toMyEnquiry() {
|
||||
vk.navigateTo({
|
||||
url: '/pages/enquiry/my'
|
||||
})
|
||||
},
|
||||
async toRelease() {
|
||||
const {userInfo, accountNum} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (accountNum === 0 ) {
|
||||
this.$confirm('请先到个人中心添加收款账户', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo({url: '/pages/user/user?menu=account'});
|
||||
})
|
||||
} else {
|
||||
if (userInfo.businessCard.status !== 1) {
|
||||
this.$confirm('您的名片信息未审核,请耐心等待', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
vk.navigateTo({
|
||||
url: '/pages/process/release'
|
||||
})
|
||||
}
|
||||
},
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/process/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
let arr = []
|
||||
|
||||
this.checkCategoryList.forEach(item => {
|
||||
arr.push(...item)
|
||||
})
|
||||
|
||||
this.checkProvinceList.forEach(item => {
|
||||
arr.push({
|
||||
...item
|
||||
})
|
||||
})
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.carousel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.carousel-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods-options {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.filter-outer {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
|
||||
.el-tag {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sheet-list {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
// display: flex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+841
-706
File diff suppressed because it is too large
Load Diff
+647
-541
File diff suppressed because it is too large
Load Diff
+610
-357
File diff suppressed because it is too large
Load Diff
+14
-13
@@ -4,13 +4,14 @@
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="carousel">
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<!-- <el-carousel height="170px">-->
|
||||
<!-- <el-carousel-item v-for="item in 4" :key="item">-->
|
||||
<!-- <image class="carousel-img"-->
|
||||
<!-- src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"-->
|
||||
<!-- mode="aspectFill"></image>-->
|
||||
<!-- </el-carousel-item>-->
|
||||
<!-- </el-carousel>-->
|
||||
<common-swiper page="spot-mine" :height="200"/>
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布现货</el-button>
|
||||
@@ -67,7 +68,7 @@
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/kh/delete',
|
||||
url: 'client/spot/goods/kh/delete',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
_id: item._id
|
||||
@@ -101,7 +102,7 @@
|
||||
},
|
||||
|
||||
{
|
||||
key: "_add_time_srt",
|
||||
key: "_add_time_str",
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
width: 160
|
||||
@@ -123,20 +124,20 @@
|
||||
toRelease() {
|
||||
|
||||
if (!vk.getVuex('$user.userInfo.fadadaConfirm')) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
this.$confirm('您尚未认证, 是否前往个人中心认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(vk.getVuex('$user.userInfo.businessCard'))) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
this.$confirm('您尚未认证和完善名片,是否前往个人中心?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
vk.navigateTo('/pages/user/user?menu=fadada');
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
|
||||
+435
-164
@@ -1,177 +1,448 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item><navigator style="display: inline-block;" url="/pages/spot/goods/goods">现货市场</navigator></el-breadcrumb-item>
|
||||
<el-breadcrumb-item>发布现货</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
<view class="page-nav">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<navigator style="display: inline-block;" url="/pages/spot/goods/goods">现货市场</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>发布现货</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
|
||||
<view class="form-view">
|
||||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
|
||||
:rules="form1.props.rules" :form-type="form1.props.formType" :loading.sync="form1.props.loading"
|
||||
:before-action="form1.props.beforeAction" :auto-close="true" label-width="140px"
|
||||
@success="onFormSuccess">
|
||||
<template v-slot:name="{ form, keyName }">
|
||||
<el-input v-model="productName" readonly placeholder="请添加现货分类"></el-input>
|
||||
</template>
|
||||
</vk-data-form>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-view">
|
||||
<!-- <vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"-->
|
||||
<!-- :rules="form1.props.rules" :form-type="form1.props.formType"-->
|
||||
<!-- :loading.sync="form1.props.loading"-->
|
||||
<!-- :before-action="form1.props.beforeAction" :auto-close="true" label-width="140px"-->
|
||||
<!-- :show-cancel="false"-->
|
||||
<!-- @success="onFormSuccess">-->
|
||||
<!-- <template v-slot:name="{ form, keyName }">-->
|
||||
<!-- <el-input v-model="productName" readonly placeholder="请添加现货分类"></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </vk-data-form>-->
|
||||
<el-form ref="form" :model="form1.data" label-width="140px">
|
||||
<el-form-item label="现货名称">
|
||||
<el-input v-model="form1.data.name" placeholder="请输入现货名称" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="现货分类" required>
|
||||
<!-- <el-checkbox-group v-model="form1.data.categoryIds" @change="makeTitle">-->
|
||||
<!-- <el-checkbox v-for="(item, index) in category" :key="index" :label="item._id">{{-->
|
||||
<!-- item.name-->
|
||||
<!-- }}-->
|
||||
<!-- </el-checkbox>-->
|
||||
<!-- </el-checkbox-group>-->
|
||||
<div class="flex justify-center items-start">
|
||||
<div v-for="(item, index) in category" class="flex-1" :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-10 pointer" @click="changeCheck(productItem)"
|
||||
:class="[form1.data.categoryIds.includes(productItem._id) ? 'text-main' : '']"
|
||||
v-for="(productItem, productIndex) in item.children"
|
||||
:key="productIndex"> {{ productItem.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</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 categoryAll.filter(all => form1.data.categoryIds.includes(all._id))"
|
||||
: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.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存(吨)" required>
|
||||
<el-input v-model="form1.data.stock" placeholder="请输入库存(吨)" type="number"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="现货存放地" required>
|
||||
<vk-data-input-address :level="3" v-model="form1.data.address" @change="getAmount()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品规格单价">
|
||||
<vk-data-upload v-model="form1.data.files" list-type="text" :on-preview="previewUpload"
|
||||
accept=".jpg,.jpeg,.png,.xlsx,.doc,.docx,.pdf"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传报价单样板">
|
||||
<span class="text-main pointer" @click="download">下载样板</span>
|
||||
<p class="tips">为平台格式统一性和用户便于对比请尽量使用建议格式</p>
|
||||
</el-form-item>
|
||||
<el-form-item label="报价有效期">
|
||||
<el-date-picker :picker-options="pickerOptions"
|
||||
v-model="form1.data.answerEndTime"
|
||||
type="datetime"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品现场图片">
|
||||
<vk-data-upload v-model="form1.data.images" list-type="text" accept=".jpg,.jpeg,.png"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否购买全国广告位">
|
||||
<el-radio-group v-model="form1.data.buyAll" @change="getAmount(true)">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否购买省份广告位">
|
||||
<p class="tips text-main" v-if="!form1.data.buyAll && JSON.stringify(form1.data.address) === '{}'">
|
||||
请先选择现货存放地</p>
|
||||
<el-radio-group v-model="form1.data.buyTop" @change="getAmount()"
|
||||
:disabled="form1.data.buyAll || JSON.stringify(form1.data.address) === '{}'">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<p class="text-main text-25 my-20" v-if="form1.data.buyAll">
|
||||
您已选择购买全国广告位,无法继续购买省份广告位</p>
|
||||
<el-form-item label="购买时长(月)" v-if="form1.data.buyTop || form1.data.buyAll">
|
||||
<el-input-number v-model="form1.data.buyTopNum" :min="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="广告位价格">
|
||||
{{ totalAmount }}元
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="text-center">
|
||||
<el-button type="primary" @click="add">发布</el-button>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/spot/goods/kh/addUpdate",
|
||||
// 表单字段显示规则
|
||||
columns: [{
|
||||
key: "name",
|
||||
title: "现货名称",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "categoryIds",
|
||||
title: "现货分类",
|
||||
type: "checkbox",
|
||||
action: "client/spot/category/pub/getList",
|
||||
actionData: {
|
||||
whereJson: {
|
||||
level: 2
|
||||
}
|
||||
},
|
||||
props: {
|
||||
list: "data",
|
||||
value: "_id",
|
||||
label: "name"
|
||||
},
|
||||
watch: ({
|
||||
option
|
||||
}) => {
|
||||
console.log('res: ', option)
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
category: [],
|
||||
categoryAll: [],
|
||||
// 表单相关开始-----------------------------------------------------------
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
name: '',
|
||||
stock: '',
|
||||
buyTop: false,
|
||||
buyAll: false,
|
||||
buyTopNum: 1,
|
||||
categoryIds: [],
|
||||
files: [],
|
||||
images: [],
|
||||
address: {},
|
||||
answerEndTime: null,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/spot/goods/kh/addUpdate",
|
||||
// 表单字段显示规则
|
||||
columns: [{
|
||||
key: "name",
|
||||
title: "现货名称",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
key: "categoryIds",
|
||||
title: "现货分类",
|
||||
type: "html",
|
||||
// action: "client/spot/category/pub/getList",
|
||||
// actionData: {
|
||||
// whereJson: {
|
||||
// level: 2
|
||||
// }
|
||||
// },
|
||||
// props: {
|
||||
// list: "data",
|
||||
// value: "_id",
|
||||
// label: "name"
|
||||
// },
|
||||
// watch: ({
|
||||
// option
|
||||
// }) => {
|
||||
// if (this.form1.data.categoryIds.length > 5) {
|
||||
// this.$message.error('最多选择五个分类')
|
||||
// this.form1.data.categoryIds.splice(-1, 1)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// this.form1.data.name = option.map(item => item.name).join('、')
|
||||
// this.productName = option.map(item => item.name).join('、')
|
||||
// },
|
||||
},
|
||||
{
|
||||
key: "stock",
|
||||
title: "库存(吨)",
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "供货地",
|
||||
type: "address"
|
||||
},
|
||||
{
|
||||
key: "files",
|
||||
title: "附件文档",
|
||||
type: "file",
|
||||
buttonText: "点击上传",
|
||||
limit: 9,
|
||||
accept: ".jpg,.jpeg,.png,.xlsx,.doc,.docx,.pdf",
|
||||
tips: '上传自有采购单图片或文档,支持jpg/png/word/excel'
|
||||
},
|
||||
{
|
||||
key: "buyAll",
|
||||
title: "是否购买全国广告位",
|
||||
type: "radio",
|
||||
data: [
|
||||
{
|
||||
value: true,
|
||||
label: "是"
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "否"
|
||||
}
|
||||
],
|
||||
watch: ({value, formData}) => {
|
||||
if (value) {
|
||||
formData.buyTop = false
|
||||
|
||||
this.form1.data.name = option.map(item => item.name).join('、')
|
||||
this.productName = option.map(item => item.name).join('、')
|
||||
console.log(this.form1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "buyTop",
|
||||
title: "是否购买广告位",
|
||||
type: "radio",
|
||||
data: [
|
||||
{
|
||||
value: true,
|
||||
label: "是"
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "否"
|
||||
}
|
||||
],
|
||||
disabled: formData => {
|
||||
return formData.buyAll
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "buyTopNum",
|
||||
title: "购买广告位时长(月)",
|
||||
type: "number",
|
||||
controls: true,
|
||||
precision: 0,
|
||||
min: 1,
|
||||
step: 1,
|
||||
rightText: '月'
|
||||
},
|
||||
{
|
||||
key: "amount",
|
||||
title: "价格",
|
||||
type: "text",
|
||||
readonly: true,
|
||||
placeholder: '请选择供货地'
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
key: "stock",
|
||||
title: "库存(吨)",
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "供货地",
|
||||
type: "address"
|
||||
},
|
||||
{
|
||||
key: "files",
|
||||
title: "附件文档",
|
||||
type: "file",
|
||||
buttonText: "点击上传",
|
||||
limit: 9,
|
||||
accept: ".jpg,.png,.xlsx,.doc,.docx",
|
||||
tips: '上传自有采购单图片或文档,支持jpg/png/word/excel'
|
||||
},
|
||||
|
||||
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
categoryIds: [
|
||||
{
|
||||
required: true,
|
||||
message: "现货名称不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value.length > 5) {
|
||||
callback(new Error('最多选择五个分类'));
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
],
|
||||
stock: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写库存",
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
min: 0,
|
||||
type: 'number',
|
||||
message: "库存不能小于0",
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
],
|
||||
address: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写地址",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "add",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
productName: ''
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/kh/getSelfOne',
|
||||
success: (res) => {
|
||||
if(res.data) {
|
||||
this.$refs.form1.setResetFormData(res.data);
|
||||
this.$refs.form1.resetForm();
|
||||
this.productName = res.data.name
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
vk.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
categoryIds: [
|
||||
{
|
||||
required: true,
|
||||
message: "现货名称不能为空",
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value.length > 5) {
|
||||
callback(new Error('最多选择五个分类'));
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
],
|
||||
stock: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写库存",
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
min: 0,
|
||||
type: 'number',
|
||||
message: "库存不能小于0",
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
],
|
||||
address: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写地址",
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "add",
|
||||
// 表单是否在请求中
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
productName: '',
|
||||
amount: '',
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getCategory()
|
||||
vk.callFunction({
|
||||
url: 'client/spot/goods/kh/getSelfOne',
|
||||
success: (res) => {
|
||||
if (res.data) {
|
||||
this.$refs.form1.setResetFormData(res.data);
|
||||
this.$refs.form1.resetForm();
|
||||
this.productName = res.data.name
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
changeCheck(product) {
|
||||
const index = this.form1.data.categoryIds.findIndex(item => item === product._id)
|
||||
if (index > -1) {
|
||||
this.form1.data.categoryIds.splice(index, 1)
|
||||
} else {
|
||||
if (this.form1.data.categoryIds.length === 5) {
|
||||
return this.$message.error('最多选择五个分类');
|
||||
}
|
||||
this.form1.data.categoryIds.push(product._id)
|
||||
}
|
||||
console.log(this.form1.data.categoryIds)
|
||||
this.form1.data.name = this.categoryAll.filter(item => this.form1.data.categoryIds.includes(item._id)).map(item => item.name).join(',')
|
||||
this.$forceUpdate()
|
||||
},
|
||||
onFormSuccess(res) {
|
||||
if (this.form1.data.buyTop) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${res.data.data}`
|
||||
})
|
||||
} else vk.redirectTo({url: '/pages/spot/goods/goods'});
|
||||
},
|
||||
getCategory() {
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
success: (res) => {
|
||||
this.categoryAll = []
|
||||
this.category = res.rows.map(item => {
|
||||
item.children.map(child => {
|
||||
this.categoryAll.push(child)
|
||||
return child
|
||||
})
|
||||
return item
|
||||
});
|
||||
console.log(this.category)
|
||||
}
|
||||
});
|
||||
},
|
||||
makeTitle(val) {
|
||||
if (val.length > 5) {
|
||||
this.form1.data.categoryIds.splice(-1)
|
||||
return this.$message.error('最多选择五个分类');
|
||||
}
|
||||
this.form1.data.name = this.category.filter(item => val.includes(item._id)).map(item => item.name).join('、')
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getAmount(isAll = false) {
|
||||
if (!this.form1.data.buyTop && !this.form1.data.buyAll) {
|
||||
this.amount = 0
|
||||
return
|
||||
}
|
||||
this.amount = 0
|
||||
if (!isAll && JSON.stringify(this.form1.data.address) === '{}') return
|
||||
vk.callFunction({
|
||||
url: 'client/spot/amount/pub/getDetail',
|
||||
data: {
|
||||
province: isAll ? -1 : this.form1.data.address.province.code,
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data) {
|
||||
this.amount = parseFloat(res.data.amount)
|
||||
} else {
|
||||
if (!isAll) this.form1.data.buyTop = false
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async add() {
|
||||
if (this.form1.data.categoryIds.length === 0) return this.$message.error('请选择分类')
|
||||
if (!this.form1.data.stock) return this.$message.error('请填写库存')
|
||||
if (JSON.stringify(this.form1.data.address) === '{}') return this.$message.error('请选择供货地')
|
||||
const res = await vk.callFunction({
|
||||
title: '请求中...',
|
||||
url: 'client/spot/goods/kh/addUpdate',
|
||||
data: this.form1.data
|
||||
})
|
||||
if (this.form1.data.buyTop || this.form1.data.buyAll) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${res.data}`
|
||||
})
|
||||
} else vk.redirectTo({url: '/pages/spot/goods/goods'});
|
||||
},
|
||||
async download() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '7433728469140dac03352ade6cb069c8'
|
||||
},
|
||||
})
|
||||
let openUrl = res.content
|
||||
const userAgent = window.navigator.userAgent.toLowerCase();
|
||||
if (userAgent.match(/micromessenger/i)) {
|
||||
window.open(`https://www.jinjiuxinzg.cn/pdfjs/web/viewer.html?file=${encodeURIComponent(openUrl)}`)
|
||||
} else {
|
||||
window.open(openUrl)
|
||||
}
|
||||
},
|
||||
previewUpload({url}) {
|
||||
let openUrl = url
|
||||
const userAgent = window.navigator.userAgent.toLowerCase();
|
||||
if (userAgent.match(/micromessenger/i)) {
|
||||
window.open(`https://www.jinjiuxinzg.cn/pdfjs/web/viewer.html?file=${encodeURIComponent(openUrl)}`)
|
||||
} else {
|
||||
window.open(openUrl)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
totalAmount() {
|
||||
let amount = 0
|
||||
if (this.amount) amount = this.amount * this.form1.data.buyTopNum
|
||||
return amount
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.form-view {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.form-view {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="flex justify-center items-center p-20 bg-white" style="overflow: hidden">
|
||||
<iframe src="/static/gangcai-cal/index.html" frameborder="0" scrolling="no"
|
||||
style="width: 500px; height: 600px;overflow: hidden"></iframe>
|
||||
<image src="/static/images/banner@2x.png" class="ml-20" style="width: 406px;height: 512px"/>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "stealCal",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
+932
-572
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<view class="item-wrap">
|
||||
<view class="form-title-wrap">
|
||||
<view class="goods-info-title">
|
||||
<view class="form-title">
|
||||
询价单管理
|
||||
</view>
|
||||
</view>
|
||||
<text class="text-gray text-25 pointer">查看全部 <i class="el-icon-arrow-right"></i></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-center items-center">
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.noQuote }}</text>
|
||||
<text>待报价</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.notPick }}</text>
|
||||
<text>待选商</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.picked }}</text>
|
||||
<text>已选商</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<text class="text-main text-50">{{ enquiry.closed }}</text>
|
||||
<text>已关闭</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "enquiryData",
|
||||
data() {
|
||||
return {
|
||||
enquiry: {
|
||||
noQuote: 0,
|
||||
notPick: 0,
|
||||
picked: 0,
|
||||
closed: 0
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item-wrap {
|
||||
margin: 24px 0;
|
||||
|
||||
.form-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-info-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
padding-left: 10px;
|
||||
color: #A92924;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
border-left: 4px solid #A92924;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,21 +11,36 @@
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">供应商</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">详情</text>
|
||||
<text class="flex-1">供应商合同补充条款</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList" :key="index">
|
||||
<text class="flex-1">{{ item.subjectName }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">{{ item.subjectMobile }}</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item.remark ? item.remark : '无' }}</text>
|
||||
<text class="flex-1">{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" v-if="status === 0" @click.native="confirm(item)">选择</el-button>
|
||||
<template v-if="item.files && item.files.length > 0">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="previewFile(file)"/>
|
||||
</template>
|
||||
<text v-else>无</text>
|
||||
</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" v-if="item.status === 0" @click.native="confirm(item)">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -33,8 +48,11 @@
|
||||
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 FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "enquiryModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
@@ -42,13 +60,16 @@ export default {
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0
|
||||
info: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(status, quoteList) {
|
||||
this.quoteList = quoteList
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.quoteList = info.quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
@@ -72,8 +93,52 @@ export default {
|
||||
type: 'success',
|
||||
message: '报价确认成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
});
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,4 +173,11 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的报价列表</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15" v-if="quoteList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">报价方</text>
|
||||
<text class="flex-1">报价时间</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">详情</text>
|
||||
<text class="flex-1">补充协议</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList" :key="index">
|
||||
<text class="flex-1">{{ item.subjectName }}</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">{{ item.user.mobile }}</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item.remark }}</text>
|
||||
<text class="flex-1">{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
<view class="flex-1">
|
||||
<view class="flex-1">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in item.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item._id)" v-if="status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
<vk-data-dialog
|
||||
v-model="showInfo"
|
||||
title="申请详情"
|
||||
width="600px"
|
||||
top="14vh"
|
||||
center
|
||||
:close-on-click-modal="true"
|
||||
>
|
||||
<vk-data-detail-table
|
||||
:data="info"
|
||||
:columns="infoColumns"
|
||||
size="medium"
|
||||
label-width="150px"
|
||||
></vk-data-detail-table>
|
||||
<template v-slot:footer>
|
||||
<el-button @click="showInfo = false">关闭</el-button>
|
||||
</template>
|
||||
</vk-data-dialog>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</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 {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "oldModal",
|
||||
components: {FileType, FilePdfOne, FileExcel, FileWord},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0,
|
||||
infoColumns: [
|
||||
{key: "company.companyName", title: "申请人", type: "text"},
|
||||
{key: "company.mobile", title: "联系方式", type: "text"},
|
||||
{key: "manager.personName", title: "代理人", type: "text"},
|
||||
{key: "manager.mobile", title: "代理人联系方式", type: "text"},
|
||||
],
|
||||
info: null,
|
||||
showInfo: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
signMethod: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(id, status, quoteList, signMethod) {
|
||||
this.id = id
|
||||
this.status = status
|
||||
this.quoteList = quoteList
|
||||
this.signMethod = signMethod
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
async createContract(quoteId) {
|
||||
await vk.callFunction({
|
||||
url: 'client/old/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId,
|
||||
}
|
||||
});
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: "选择成功",
|
||||
type: 'success'
|
||||
})
|
||||
if (this.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.signMethod === 1) vk.navigateTo('/pages/store/store?menuIndex=2')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0&tradeMethod=0')
|
||||
}
|
||||
},
|
||||
getOldInfo() {
|
||||
vk.callFunction({
|
||||
url: 'client/old/pub/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
id: this.id,
|
||||
}
|
||||
}).then(res => {
|
||||
this.info = res.data
|
||||
})
|
||||
},
|
||||
doShowInfo(info) {
|
||||
this.info = info
|
||||
this.showInfo = true
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,120 +1,189 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15" >
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">申请人</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">补充条款</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList.rows" :key="index">
|
||||
<text class="flex-1" v-if="item.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<view class="flex-1 flex flex-col justify-start items-start">
|
||||
<text>加工方补充条款:{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
</view>
|
||||
<!-- <text class="flex-1">{{ item.remark }}</text>-->
|
||||
<text class="flex-1">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="previewFile(file)"/>
|
||||
</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="item.status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</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 FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "processModal",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(status, quoteList) {
|
||||
console.log(status, quoteList)
|
||||
this.quoteList = quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
}
|
||||
name: "processModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.id = info._id
|
||||
this.quoteList = info.quoteList
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/contract/index?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer')
|
||||
else vk.navigateTo('/pages/contract/index?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="自营询价详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-descriptions border size="small" :column="2">
|
||||
<el-descriptions-item label="询价区域">
|
||||
<span>{{ info.province.name }}{{ info.city.name }} </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span>{{ info.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<span>{{ info.phone }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户名称">
|
||||
<span>{{ info.company }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="询价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
<template v-if="info.quoteList && info.status === 1">
|
||||
<el-descriptions-item label="报价列表">
|
||||
<div class="py-20 border-bottom" v-for="(item, index) in info.quoteList" :key="index">
|
||||
<p>公司:{{ item.user.company.companyName }}</p>
|
||||
<template v-if="item.amount">
|
||||
<p>报价:¥{{ item.amount }}</p>
|
||||
<span v-if="item.remark">备注:{{ item.remark }}</span>
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in item.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</template>
|
||||
<p v-else>未报价</p>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="info.quoteList && info.status === 2">
|
||||
<el-descriptions-item label="报价公司">
|
||||
<div class="py-20 border-bottom" v-for="(item, index) in info.quoteList.filter(q => q.status === 1)"
|
||||
:key="index">
|
||||
<p>{{ item.user.company.companyName }}</p>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="info.quote">
|
||||
<el-descriptions-item label="报价">
|
||||
<span>¥{{ info.quote.amount }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<span>{{ info.quote.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.quote.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</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 FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "selfSupportModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0,
|
||||
quote: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="自营询价详情"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-descriptions border size="small" :column="2">
|
||||
<el-descriptions-item label="询价区域">
|
||||
<span>{{ info.sheet.province.name }}{{ info.sheet.city.name }} </span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span>{{ info.sheet.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<span>{{ info.sheet.phone }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户名称">
|
||||
<span>{{ info.sheet.company }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="询价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价">
|
||||
<span>¥{{ info.amount }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<span>{{ info.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报价单附件">
|
||||
<view class="mt-15 mr-15" v-for="(file, fileIndex) in info.files" :key="fileIndex">
|
||||
<file-type :item="file" @click.native="previewFile(file)"/>
|
||||
</view>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</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 FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "selfSupportQuoteModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
console.log(this.info)
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
},
|
||||
openDownload(url) {
|
||||
this.previewFile(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -12,23 +12,23 @@
|
||||
</view>
|
||||
<view class="mt-15" v-if="cooperateList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">申请人</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">公司名称</text>
|
||||
<text class="flex-1">联系人</text>
|
||||
<text class="flex-1">联系方式</text>
|
||||
<text class="flex-1">操作</text>
|
||||
<text class="flex-1">备注</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in cooperateList" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.user.company.companyName }}</text>
|
||||
<text class="flex-1">{{ item.name }}</text>
|
||||
<text class="flex-1"> {{ item.mobile }}</text>
|
||||
<text class="flex-1">{{ item.remark }}</text>
|
||||
<view class="flex-1">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="previewFile(file)"/>
|
||||
</view>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
{{ item.user.accountType === 1 ? item.user.person.mobile : item.user.company.mobile }}
|
||||
</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="doShowInfo(item)">查看申请详情</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
@@ -50,6 +50,9 @@
|
||||
<el-button @click="showInfo = false">关闭</el-button>
|
||||
</template>
|
||||
</vk-data-dialog>
|
||||
<el-dialog title="图片预览" :visible.sync="showImagePreview" width="80%" append-to-body>
|
||||
<img v-if="previewImageUrl" class="preview-image" :src="previewImageUrl" alt="附件预览"/>
|
||||
</el-dialog>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -57,9 +60,11 @@
|
||||
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 FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "spotModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
@@ -77,6 +82,8 @@ export default {
|
||||
],
|
||||
info: null,
|
||||
showInfo: false,
|
||||
showImagePreview: false,
|
||||
previewImageUrl: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -118,6 +125,40 @@ export default {
|
||||
doShowInfo(info) {
|
||||
this.info = info
|
||||
this.showInfo = true
|
||||
},
|
||||
getFileExt(url = "") {
|
||||
const cleanUrl = String(url).split("?")[0].split("#")[0]
|
||||
const match = cleanUrl.match(/\.([a-z0-9]+)$/i)
|
||||
return match ? match[1].toLowerCase() : ""
|
||||
},
|
||||
isImageFile(url) {
|
||||
return ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"].includes(this.getFileExt(url))
|
||||
},
|
||||
isPdfFile(url) {
|
||||
return this.getFileExt(url) === "pdf"
|
||||
},
|
||||
isOfficeFile(url) {
|
||||
return ["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(this.getFileExt(url))
|
||||
},
|
||||
getOfficePreviewUrl(url) {
|
||||
return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`
|
||||
},
|
||||
previewFile(url) {
|
||||
if (!url) return
|
||||
if (this.isImageFile(url)) {
|
||||
this.previewImageUrl = url
|
||||
this.showImagePreview = true
|
||||
return
|
||||
}
|
||||
if (this.isPdfFile(url)) {
|
||||
window.open(url, "_blank")
|
||||
return
|
||||
}
|
||||
if (this.isOfficeFile(url)) {
|
||||
window.open(this.getOfficePreviewUrl(url), "_blank")
|
||||
return
|
||||
}
|
||||
window.open(url, "_blank")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,4 +193,11 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 75vh;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
+1053
-578
File diff suppressed because it is too large
Load Diff
@@ -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,388 @@
|
||||
<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:tips="{ form, keyName }">
|
||||
<div class="tips">Logo图片标准尺寸:300*300</div>
|
||||
</template>
|
||||
<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:memberFeatureTips="{ form, keyName }">
|
||||
<div class="member-feature-tips">
|
||||
开通会员可开放更多功能和上传更多图片,如:位置地图、公司新闻、报价次数、报价优惠、购物优惠等(详见个人中心-平台权益公示或详询客服)
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<!-- 表单开始 -->
|
||||
<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>
|
||||
</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>
|
||||
<template v-slot:serviceTips="{ form, keyName }">
|
||||
<div class="tips">如需求高标准要求用户,平台提供有偿专业美工设计和修改服务,可拨打客服电话:400-686-5559。</div>
|
||||
</template>
|
||||
</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,
|
||||
tips: '标准尺寸:300*300',
|
||||
},
|
||||
{
|
||||
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: "tips",
|
||||
title: "",
|
||||
type: "html"
|
||||
},
|
||||
{
|
||||
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: "memberFeatureTips",
|
||||
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
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "serviceTips",
|
||||
title: "",
|
||||
type: "html"
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
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;
|
||||
}
|
||||
|
||||
.member-feature-tips {
|
||||
color: #a92924;
|
||||
line-height: 1.8;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,134 @@
|
||||
<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-item label="身份证号" required>
|
||||
<el-input v-model="form.idCard" 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 class="my-20">身份证号:{{ item.idCard }}</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: '',
|
||||
idCard: '',
|
||||
},
|
||||
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
|
||||
}
|
||||
if (!this.form.idCard) {
|
||||
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>
|
||||
+684
-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="近2年产值" required>
|
||||
<el-input v-model="form.yearsIncome" placeholder="请输入近2年产值" 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>
|
||||
+442
-232
@@ -1,51 +1,129 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>会员等级</span>
|
||||
</div>
|
||||
<div class="grade-list">
|
||||
<div class="item pointer" v-for="(item,index) in gradeList" :key="index"
|
||||
:class="gradeIndex === index ? 'active' : ''" @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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>会员等级</span>
|
||||
</div>
|
||||
<div class="grade-list">
|
||||
<div class="item pointer" v-for="(item,index) in gradeList" :key="index"
|
||||
:class="[parseInt(gradeIndex) === index ? 'active' : '', item.disabled ? 'disabled' : '']"
|
||||
@click="onChange(index)">
|
||||
<div class="item-box">
|
||||
<div class="info">
|
||||
<el-image v-if="getIcon(item)" class="level-icon" :src="getIcon(item)"></el-image>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="price-line">
|
||||
<span>{{ item.amount }}元/年</span>
|
||||
<span v-if="parseFloat(item.ensureAmount) > 0">+交易保证金({{ item.ensureAmount }}元)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bzj-readme">
|
||||
<div class="sub-title">保证金说明</div>
|
||||
<div class="content">
|
||||
保证金说明内容...
|
||||
<div class="meta-list">
|
||||
<div class="meta-item">
|
||||
<span class="label">升级交易额</span>
|
||||
<span class="value">{{ formatUpgradeAmount(item.upgradeAmount) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">消息推送模板</span>
|
||||
<span class="value">{{ formatSwitch(item.showMsg) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">报价折扣</span>
|
||||
<span class="value">{{ formatOfferOffRate(item.offerOffRate) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">每月询价次数</span>
|
||||
<span class="value">{{ formatEnquiryNum(item.enquiryNum) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">增值服务折扣</span>
|
||||
<span class="value">{{ formatDiscount(item.valueAddRate) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">广告位折扣</span>
|
||||
<span class="value">{{ formatDiscount(item.adRate) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">推荐升级</span>
|
||||
<span class="value">{{ formatRecommendUpgrade(item.recommendUpgrade) }}</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span class="label">加工厂图片数</span>
|
||||
<span class="value">{{ formatFactoryPicNum(item.factoryPicNum) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="sub-title">支付方式</div>
|
||||
<div class="content">
|
||||
<el-radio-group v-model="paymentIndex" class="ml-4">
|
||||
<el-radio v-for="(item,index) in payment" :key="index" :label="index"
|
||||
size="large">{{ item }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<div class="desc-line" v-if="item.upgradeDesc">
|
||||
<span class="label">邀请说明</span>
|
||||
<span class="value">{{ item.upgradeDesc }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price">
|
||||
<div class="sub-title">支付金额:¥{{ amount }}元</div>
|
||||
<div class="select">
|
||||
<div class="icon">
|
||||
<i class="el-icon-check"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">请打开手机微信,扫一扫完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</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>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
<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 === -999">
|
||||
<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="content" v-html="desc">
|
||||
</div>
|
||||
</div>
|
||||
<div class="payment">
|
||||
<div class="sub-title">支付方式</div>
|
||||
<div class="content">
|
||||
<el-radio-group v-model="paymentIndex" class="ml-4">
|
||||
<el-radio v-for="(item,index) in payment" :key="index" :label="index"
|
||||
size="large">{{ item }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pay-price">
|
||||
<div class="sub-title">支付金额:¥{{ amount }}元</div>
|
||||
</div>
|
||||
<div class="pay-price" v-if="billQRCode">
|
||||
<uv-qrcode ref="qrcode" size="240px" :value="billQRCode"></uv-qrcode>
|
||||
<div class="pay-desc">微信、支付宝、云闪付扫码完成支付</div>
|
||||
<el-button type="success" @click="onPayStatus">已完成支付</el-button>
|
||||
</div>
|
||||
<el-button v-else type="danger" @click="onPay">立即支付</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -56,236 +134,368 @@ const OpenSdk = require('../lib/base').default;
|
||||
// const OpenSdk = require('ums-sdk-nodejs').default;
|
||||
|
||||
const sdk = new OpenSdk({
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
appId: '10037e6f6823b20801682b6a5e5a0006',
|
||||
appKey: '1c4e3b16066244ae9b236a09e5b312e8'
|
||||
})
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
showQrcode: false,
|
||||
billQRCode: '',
|
||||
gradeIndex: 1,
|
||||
gradeList: []
|
||||
}
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
paymentIndex: 0,
|
||||
payment: ["银联支付"],
|
||||
showQrcode: false,
|
||||
billQRCode: '',
|
||||
gradeIndex: null,
|
||||
desc: '',
|
||||
gradeList: [],
|
||||
ensureList: [],
|
||||
ensureAmount: null,
|
||||
ensureIndex: 0
|
||||
}
|
||||
},
|
||||
props: {
|
||||
extra: {
|
||||
type: Number,
|
||||
default() {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserLevelList()
|
||||
this.getDesc()
|
||||
this.getEnsureConfig()
|
||||
},
|
||||
methods: {
|
||||
getIcon(item) {
|
||||
if (Array.isArray(item.icon)) return item.icon[0]
|
||||
return item.icon || ''
|
||||
},
|
||||
created() {
|
||||
this.getUserLevelList()
|
||||
formatSwitch(value) {
|
||||
return parseInt(value) === 1 ? '支持' : '不支持'
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
if (data.userInfo.businessCard) {
|
||||
this.form1.data = data.userInfo.businessCard
|
||||
}
|
||||
// 成功后的逻辑
|
||||
console.log('用户信息: ', data);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onChange(index) {
|
||||
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/#/'
|
||||
}
|
||||
formatOfferOffRate(value) {
|
||||
const rate = parseInt(value)
|
||||
if (rate === 0) return '不限次数,免费'
|
||||
if (rate === 100) return '-'
|
||||
return `${rate / 10}折`
|
||||
},
|
||||
formatDiscount(value) {
|
||||
const rate = parseInt(value)
|
||||
if (!rate || rate === 100) return '-'
|
||||
return `${rate / 10}折`
|
||||
},
|
||||
formatEnquiryNum(value) {
|
||||
const num = parseInt(value)
|
||||
if (!num) return '-'
|
||||
return `${num}次/月`
|
||||
},
|
||||
formatRecommendUpgrade(value) {
|
||||
const num = parseInt(value)
|
||||
if (!num) return '-'
|
||||
return `推荐${num}位黄金会员可升级`
|
||||
},
|
||||
formatFactoryPicNum(value) {
|
||||
const num = parseInt(value)
|
||||
if (!num) return '-'
|
||||
return `${num}张`
|
||||
},
|
||||
formatUpgradeAmount(value) {
|
||||
const amount = parseFloat(value)
|
||||
if (!amount) return '-'
|
||||
return `每${amount / 10000}万升一级,共十级`
|
||||
},
|
||||
getUserInfo() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
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)
|
||||
}
|
||||
/**
|
||||
* 调用函数
|
||||
*/
|
||||
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: `已完成支付`
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
})
|
||||
return item
|
||||
})
|
||||
for (let i in this.gradeList) {
|
||||
if (!this.gradeList[i].disabled) {
|
||||
this.gradeIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
console.log(this.extra)
|
||||
if (this.extra) {
|
||||
for (let i in this.gradeList) {
|
||||
if (this.gradeList[i].level === this.extra) {
|
||||
this.gradeIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onChange(index) {
|
||||
if (index === -2) this.gradeIndex = index
|
||||
else {
|
||||
if (this.gradeList[index].disabled) return
|
||||
this.gradeIndex = index
|
||||
}
|
||||
},
|
||||
async onPay() {
|
||||
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,
|
||||
}
|
||||
})
|
||||
}
|
||||
vk.redirectTo({url: `/pages/index/shop/pay?id=${res.data}`})
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
getUserLevelList() {
|
||||
vk.callFunction({
|
||||
url: 'client/userLevel/pub/getList',
|
||||
data: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200
|
||||
},
|
||||
success: (data) => {
|
||||
this.gradeList = data.rows.filter(item => parseFloat(item.amount) > 0)
|
||||
}
|
||||
});
|
||||
success: (data) => {
|
||||
this.gradeList = data.rows.filter(item => parseFloat(item.amount) > 0)
|
||||
this.getUserInfo()
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
return parseFloat(this.gradeList[this.gradeIndex].amount) + parseFloat(this.gradeList[this.gradeIndex].ensureAmount)
|
||||
}
|
||||
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() {
|
||||
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)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.clearfix {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.grade-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.item {
|
||||
.item {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
margin-bottom: 12px;
|
||||
|
||||
.item-box {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
|
||||
.title {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 180px;
|
||||
min-width: 180px;
|
||||
padding: 16px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-right: 1px solid #eee;
|
||||
text-align: center;
|
||||
|
||||
.level-icon {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.detail {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.price-line {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.meta-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px 20px;
|
||||
}
|
||||
|
||||
.meta-item,
|
||||
.desc-line {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
line-height: 1.6;
|
||||
|
||||
.label {
|
||||
color: #666;
|
||||
min-width: 90px;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.desc-line {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
|
||||
.item-box {
|
||||
.info {
|
||||
.name {
|
||||
color: #bf2b28;
|
||||
}
|
||||
}
|
||||
|
||||
.detail {
|
||||
.price-line,
|
||||
.value {
|
||||
color: #bf2b28;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
|
||||
.item-box {
|
||||
display: flex;
|
||||
|
||||
.title {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 230px;
|
||||
|
||||
.price {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2px solid #bf2b28 !important;
|
||||
|
||||
.item-box {
|
||||
.title {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.info {
|
||||
.price {
|
||||
color: #bf2b28;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-right: 20px solid #bf2b28;
|
||||
border-left: 20px solid transparent;
|
||||
border-bottom: 20px solid #bf2b28;
|
||||
display: flex;
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.el-icon-check {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
color: #bf2b28;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-left: 5px solid #bf2b28;
|
||||
padding-left: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.bzj-readme {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.payment {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-price {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-desc {
|
||||
font-size: 16px;
|
||||
line-height: 2em;
|
||||
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
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user