1、新增签约宝

2、调整自营
3、新增购物车(未完善)
This commit is contained in:
2023-12-04 19:25:58 +08:00
parent a92aec2c29
commit aa1df73a53
23 changed files with 857 additions and 323 deletions
+164 -158
View File
@@ -1,180 +1,186 @@
<template> <template>
<view> <view>
<div class="layout layout-fix-tab-narrow" style="right: 0px;"> <div class="layout layout-fix-tab-narrow" style="right: 0px;">
<div class="mod-fix-tab-narrow" style="display: block; "> <div class="mod-fix-tab-narrow" style="display: block; ">
<div class="fix-tab-main"> <div class="fix-tab-main">
<ul> <ul>
<li class="side-hrd"> <li class="side-hrd">
<a rel="nofollow" href="/enquiry/add.html" class="DeliveryMyCard"> <a rel="nofollow" href="javascript:;" class="DeliveryMyCard"
<div class="item"> @click="navTo('/pages/enquiry/list')">
<i class="wag-icon"><img src="@/static/images/cl1.png"></i> <div class="item">
</div> <i class="wag-icon"><img src="@/static/images/cl1.png"></i>
<span>下询价单</span> </div>
</a> <span>下询价单</span>
</li> </a>
</li>
<li class="side-add-cart"><a rel="nofollow" href="javascript:;"
@click="navTo('/pages/index/shop/cart')">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl3.png"></i>
</div>
<span class="txt"> 进货单 </span>
</a>
</li>
<li class="side-steel-kefu">
<a rel="nofollow"
href="http://wpa.qq.com/msgrd?v=3&amp;uin=949419497&amp;site=qq&amp;menu=yes"
target="_blank">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl4.png"></i>
</div>
<span>在线客服</span>
</a>
</li>
<li class="side-steel-counter">
<a rel="nofollow" href="/counter/index.html">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl5.png"></i>
</div>
<span>钢材计算器</span>
</a>
</li>
<li class="side-steel-search">
<a rel="nofollow" href="javascript:;" @click="navTo('/pages/yellowPage/list')">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl6.png"></i>
</div>
<span>金久信黄页</span>
</a>
</li>
<li class="side-steel-search">
<a rel="nofollow" href="javascript:;" @click="navTo('/pages/yellowPage/list')">
<div class="item">
<agreement theme="outline" size="16" fill="#666" strokeLinecap="square"/>
</div>
<span>签约宝</span>
</a>
</li>
<!-- <li class="side-ruzhu">--> <li class="actGotop" style="display: none;">
<!-- <a rel="nofollow" href="" target="_blank">--> <div class="item">
<!-- <div class="item">--> <i class="wag-icon"><img src="@/static/images/cc-top.png"></i>
<!-- <i class="wag-icon"><img src="@/static/images/cl2.png"></i>--> </div>
<!-- </div>--> <span>返回顶部</span>
<!-- <span>我要入驻</span>--> </li>
<!-- </a>--> </ul>
<!-- </li>--> </div>
</div>
<li class="side-add-cart"><a rel="nofollow" href="/support/shopping.html" target="_blank"> </div>
<div class="item"> </view>
<i class="wag-icon"><img src="@/static/images/cl3.png"></i>
</div>
<span class="txt"> 进货单 </span>
</a>
</li>
<li class="side-steel-kefu">
<a rel="nofollow"
href="http://wpa.qq.com/msgrd?v=3&amp;uin=949419497&amp;site=qq&amp;menu=yes"
target="_blank">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl4.png"></i>
</div>
<span>在线客服</span>
</a>
</li>
<li class="side-steel-counter">
<a rel="nofollow" href="/counter/index.html">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl5.png"></i>
</div>
<span>钢材计算器</span>
</a>
</li>
<li class="side-steel-search">
<a rel="nofollow" href="/yellowpage/index.html" target="_blank">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl6.png"></i>
</div>
<span>金久信黄页</span>
</a>
</li>
<li class="actGotop" style="display: none;">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cc-top.png"></i>
</div>
<span>返回顶部</span>
</li>
</ul>
</div>
</div>
</div>
</view>
</template> </template>
<script> <script>
export default { import {Agreement} from '@icon-park/vue'
name: "right-bar",
data() {
return {
}; export default {
} components: {Agreement},
} name: "right-bar",
data() {
return {};
},
methods: {
navTo(url) {
vk.navigateTo(url);
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
.layout-fix-tab-narrow { .layout-fix-tab-narrow {
border-left: 1px solid #f1f1f1; border-left: 1px solid #f1f1f1;
position: fixed; position: fixed;
right: -40px; right: -40px;
top: 0; top: 0;
width: 40px; width: 40px;
height: 100%; height: 100%;
background: #fff; background: #fff;
z-index: 9999999; z-index: 9999999;
-webkit-transition: right .5s ease; -webkit-transition: right .5s ease;
-moz-transition: right .5s ease; -moz-transition: right .5s ease;
-ms-transition: right .5s ease; -ms-transition: right .5s ease;
-o-transition: right .5s ease; -o-transition: right .5s ease;
transition: right .5s ease; transition: right .5s ease;
line-height: 1.5; line-height: 1.5;
color: #656565; color: #656565;
font-size: 12px; font-size: 12px;
font-family: -apple-system, BlinkMacSystemFont, Hiragino Sans GB, Microsoft YaHei, sans-serif; font-family: -apple-system, BlinkMacSystemFont, Hiragino Sans GB, Microsoft YaHei, sans-serif;
} }
.mod-fix-tab-narrow li { .mod-fix-tab-narrow li {
width: 40px; width: 40px;
position: relative; position: relative;
margin: 3px 0; margin: 3px 0;
} }
.mod-fix-tab-narrow li { .mod-fix-tab-narrow li {
padding: 4px 0; padding: 4px 0;
cursor: pointer; cursor: pointer;
line-height: 16px; line-height: 16px;
} }
.layout-fix-tab-narrow a { .layout-fix-tab-narrow a {
color: #656565; color: #656565;
text-decoration: none; text-decoration: none;
padding: 5px 0px; padding: 5px 0px;
} }
.mod-fix-tab-narrow li .item { .mod-fix-tab-narrow li .item {
display: block; display: block;
position: relative; position: relative;
z-index: 99; z-index: 99;
text-align: center; text-align: center;
height: 23px; height: 23px;
} }
.mod-fix-tab-narrow li span { .mod-fix-tab-narrow li span {
display: block; display: block;
right: 0; right: 0;
width: 16px; width: 16px;
white-space: inherit; white-space: inherit;
text-align: center; text-align: center;
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
padding: 0 12px; padding: 0 12px;
line-height: 14px; line-height: 14px;
z-index: 10; z-index: 10;
top: 32px; top: 32px;
transition: inherit; transition: inherit;
} }
.wag-icon { .wag-icon {
font-size: 16px; font-size: 16px;
height: 30px; height: 30px;
width: 30px; width: 30px;
font-style: normal; font-style: normal;
color: #353535; color: #353535;
} }
.mod-fix-tab-narrow li:hover { .mod-fix-tab-narrow li:hover {
box-shadow: 0 0; box-shadow: 0 0;
color: #a92924 color: #a92924
} }
.mod-fix-tab-narrow li:hover { .mod-fix-tab-narrow li:hover {
box-shadow: 0 0 16px 0 hsla(0, 0%, 77%, .5) box-shadow: 0 0 16px 0 hsla(0, 0%, 77%, .5)
} }
.mod-fix-tab-narrow li:hover span { .mod-fix-tab-narrow li:hover span {
box-shadow: 0 0; box-shadow: 0 0;
color: #a92924 color: #a92924
} }
.mod-fix-tab-narrow { .mod-fix-tab-narrow {
margin-top: 50px; margin-top: 50px;
} }
.a-fadeinL { .a-fadeinL {
margin-top: 50px; margin-top: 50px;
-webkit-transition: right .5s ease; -webkit-transition: right .5s ease;
-moz-transition: right .5s ease; -moz-transition: right .5s ease;
-ms-transition: right .5s ease; -ms-transition: right .5s ease;
-o-transition: right .5s ease; -o-transition: right .5s ease;
transition: right .5s ease; transition: right .5s ease;
} }
</style> </style>
+16
View File
@@ -233,6 +233,14 @@
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
}, },
{
"path" : "pages/index/shop/cart",
"style" :
{
"navigationBarTitleText" : "购物车",
"enablePullDownRefresh" : false
}
},
{ {
"path" : "pages/yellowPage/list", "path" : "pages/yellowPage/list",
"style" : "style" :
@@ -248,6 +256,14 @@
"navigationBarTitleText" : "", "navigationBarTitleText" : "",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
},
{
"path" : "pages/user/school",
"style" :
{
"navigationBarTitleText" : "金久信学堂",
"enablePullDownRefresh" : false
}
} }
], ],
"globalStyle": { "globalStyle": {
+5 -1
View File
@@ -51,7 +51,7 @@
</el-button> </el-button>
</el-input> </el-input>
<view class="flex flex-col justify-start items-start pointer w-100p"> <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"> <view v-for="(item, index) in list" :key="index" class="content-item-wrap" @click="openDownload(item.files[0])">
<file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/> <file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/>
<view class="content"> <view class="content">
<text class="title">{{ item.name }}</text> <text class="title">{{ item.name }}</text>
@@ -67,6 +67,7 @@
</view> </view>
</view> </view>
</view> </view>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
@@ -111,6 +112,9 @@ export default {
vk.navigateTo({ vk.navigateTo({
url: '/pages/user/school' url: '/pages/user/school'
}) })
},
openDownload(url){
window.open(url)
} }
}, },
onLoad() { onLoad() {
+160 -6
View File
@@ -23,9 +23,15 @@
<span slot="title">已作废</span> <span slot="title">已作废</span>
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
<view class="mt-20 bg-white flex justify-start items-center sign pointer" @click="selectSign">
<view class="icon">
<agreement theme="outline" size="18" fill="#999" strokeLinecap="square"/>
</view>
<text class="ml-20" :class="[isSign ? 'text-main' : '']">签约宝</text>
</view>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<view class="contract-list"> <view class="contract-list" v-if="!isSign">
<view class="trade-method"> <view class="trade-method">
<view @click="formData.tradeMethod = 1" class="trade-method-item" <view @click="formData.tradeMethod = 1" class="trade-method-item"
:class="{active: formData.tradeMethod == 1}">自主交易 :class="{active: formData.tradeMethod == 1}">自主交易
@@ -43,6 +49,9 @@
<el-tag size="mini" v-else-if="item.contract.type === 'process'" type="warning" <el-tag size="mini" v-else-if="item.contract.type === 'process'" type="warning"
effect="plain">加工单 effect="plain">加工单
</el-tag> </el-tag>
<el-tag size="mini" v-else-if="item.contract.type === 'sign'" type="success"
effect="plain">签约宝
</el-tag>
<view class="contract-product"> <view class="contract-product">
{{ item.contract.productTitle }} {{ item.contract.productTitle }}
</view> </view>
@@ -92,8 +101,8 @@
</view> --> </view> -->
<view class=""> <view class="">
<el-button @click.native="changeContract(item.contract)" <el-button @click.native="changeContract(item.contract)"
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')" v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
size="mini" type="primary">修改合同内容 size="mini" type="primary">修改合同内容
</el-button> </el-button>
</view> </view>
</view> </view>
@@ -105,14 +114,19 @@
:total="tableData.total"></el-pagination> :total="tableData.total"></el-pagination>
</view> </view>
</view> </view>
<view v-else class="bg-white p-20">
<vk-data-form ref="form2" v-model="form2.data" :action="form2.props.action"
:columns="form2.props.columns"
:rules="form2.props.rules" :form-type="form2.props.formType"
:loading.sync="form2.props.loading"
:auto-close="true" label-width="140px" @success="onFormSuccess"></vk-data-form>
</view>
</el-col> </el-col>
</el-row> </el-row>
</view> </view>
<common-footer></common-footer> <common-footer></common-footer>
<el-dialog :visible.sync="form1.props.show"> <el-dialog :visible.sync="form1.props.show">
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns" <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" :rules="form1.props.rules" :form-type="form1.props.formType"
@@ -125,11 +139,15 @@
</template> </template>
<script> <script>
import {Agreement} from "@icon-park/vue";
export default { export default {
components: {Agreement},
data() { data() {
return { return {
pageIndex: 1, pageIndex: 1,
menuIndex: '0', menuIndex: '0',
isSign: false,
formData: { formData: {
status: 0, status: 0,
tradeMethod: null tradeMethod: null
@@ -231,6 +249,126 @@ export default {
show: false show: false
} }
}, },
form2: {
// 表单请求数据,此处可以设置默认值
data: {
contractId: '',
signEndDate: '',
title: '',
contractFile: '',
buyerSignKeyword: '',
sellerSignKeyword: '',
otherFile: '',
},
// 表单属性
props: {
// 表单请求地址
action: 'client/contract/kh/addSign',
// 表单字段显示规则
columns: [
{
key: "title",
title: "标题",
type: "text"
},
{
key: "phone",
title: "对方手机号",
type: "text"
},
{
key: "userType",
title: "对方身份",
type: "select",
data: [
{
value: 1,
label: "买家"
},
{
value: 2,
label: "卖家"
}
]
},
{
key: "signEndDate",
title: "签署截止日期",
type: "date",
pickerOptions: {
disabledDate: (date) => {
const now = new Date()
return now > date
}
}
},
{
key: "contractFile",
title: "签署文档",
type: "file",
limit: 1,
accept: ".pdf",
tips: "仅支持PDF文件",
},
{
key: "buyerSignKeyword",
title: "买家签章关键字",
type: "text",
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
},
{
key: "sellerSignKeyword",
title: "卖家签章关键字",
type: "text",
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
},
{
key: "otherFile",
title: "附件",
type: "file"
},
],
// 表单验证规则
rules: {
title: [{
required: true,
message: "标题不能为空",
trigger: "change"
},],
phone: [{
required: true,
message: "标题不能为空",
trigger: "change"
},],
signEndDate: [{
required: true,
message: "签署截止日期不能为空",
trigger: "change"
}],
buyerSignKeyword: [{
required: true,
message: "买家签章关键字不能为空",
trigger: "change"
}],
sellerSignKeyword: [{
required: true,
message: "卖家签章关键字不能为空",
trigger: "change"
}],
contractFile: [{
required: true,
message: "签署文档不能为空",
trigger: "change"
},]
},
// add 代表添加 update 代表修改
formType: "",
// 表单是否在请求中
loading: false,
// 是否显示表单1 的弹窗
show: false
}
},
// 表单相关结束----------------------------------------------------------- // 表单相关结束-----------------------------------------------------------
} }
}, },
@@ -241,8 +379,13 @@ export default {
menuSelect(e) { menuSelect(e) {
this.menuIndex = String(e) this.menuIndex = String(e)
this.formData.status = Number(e) this.formData.status = Number(e)
this.isSign = false
this.query(1) this.query(1)
}, },
selectSign() {
this.isSign = true
this.menuIndex = ''
},
async query(pageIndex) { async query(pageIndex) {
this.tableData = await vk.callFunction({ this.tableData = await vk.callFunction({
url: 'client/contract/kh/getList', url: 'client/contract/kh/getList',
@@ -264,7 +407,7 @@ export default {
this.form1.props.action = 'client/contract/kh/launch' this.form1.props.action = 'client/contract/kh/launch'
this.form1.props.show = true this.form1.props.show = true
}, },
async changeContract(contract){ async changeContract(contract) {
this.form1.data.contractId = contract._id this.form1.data.contractId = contract._id
const res = await vk.callFunction({ const res = await vk.callFunction({
url: 'client/contract/kh/getDetail', url: 'client/contract/kh/getDetail',
@@ -286,6 +429,8 @@ export default {
this.form1.data.contractId = null this.form1.data.contractId = null
this.formData.status = 1 this.formData.status = 1
this.menuIndex = '1' this.menuIndex = '1'
this.isSign = false
this.$refs.form2.resetForm()
this.query(1) this.query(1)
}, },
/** /**
@@ -405,4 +550,13 @@ export default {
.contract-status-tag { .contract-status-tag {
margin-left: 2px; margin-left: 2px;
} }
.sign {
padding: 20px 20px 20px 25px;
font-size: 14px;
.icon {
line-height: 18px;
}
}
</style> </style>
+1 -1
View File
@@ -119,7 +119,7 @@
:pagination="true"></vk-data-table> :pagination="true"></vk-data-table>
</view> </view>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
+1
View File
@@ -127,6 +127,7 @@
<!-- 现货市场 end --> <!-- 现货市场 end -->
<gap height="100"/> <gap height="100"/>
<common-footer></common-footer> <common-footer></common-footer>
<right-bar></right-bar>
</view> </view>
</template> </template>
+39 -30
View File
@@ -8,21 +8,31 @@
<view class="bg-white p-40"> <view class="bg-white p-40">
<view v-for="(item, index) in configList" :key="index" <view v-for="(item, index) in configList" :key="index"
class="my-20 flex flex-col justify-start items-start"> class="my-20 flex flex-col justify-start items-start">
<view v-for="(content, contentIndex) in item.contents" :key="contentIndex" class="mb-20 "> <el-checkbox @change="changeCheck(index)">
<el-checkbox @change="changeCheck(index, content, contentIndex)"> <view class="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">
<view class="flex justify-start items-center text-35 mb-20"> <text>服务内容:{{ item.name }}</text>
<text>服务内容:{{ item.name }}</text> <view class="ml-35">
<text class="ml-35"> <text>业务编号:</text>
业务编号:{{ content.code }} <text v-if="item.contentIndex !== null">{{
item.contents[item.contentIndex].code
}}
</text> </text>
<text class="ml-35">服务服务项目: {{ content.title }}</text>
<text class="ml-35"> {{ content.amount }}元/次</text>
</view> </view>
<view>备注: {{ item.remark }}</view> <view class="flex justify-start items-center">
<text class="ml-35">服务服务项目:</text>
<el-select v-model="configList[index].contentIndex" clearable>
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
:label="content.title" :value="contentIndex"/>
</el-select>
</view>
<text class="ml-35" v-if="item.contentIndex !== null">
{{ item.contents[item.contentIndex].amount }}元/次
</text>
</view> </view>
</el-checkbox> <view>备注: {{ item.remark }}</view>
</view> </view>
</el-checkbox>
</view> </view>
<el-form ref="form" :model="form" label-width="200px"> <el-form ref="form" :model="form" label-width="200px">
<view v-for="(item, index) in companyList" :key="index"> <view v-for="(item, index) in companyList" :key="index">
@@ -80,18 +90,24 @@
<view class="ml-35">客服联系方式: 0771-3923001</view> <view class="ml-35">客服联系方式: 0771-3923001</view>
</view> </view>
<view class="mt-40 flex justify-center items-center"> <view class="mt-40 flex justify-center items-center">
<el-button type="primary" :disabled="contentList.length === 0 || companyList.length === 0 || !companyList[0].name">立即支付 <el-button type="primary"
:disabled="contentList.length === 0 || companyList.length === 0 || !companyList[0].name">
立即支付
</el-button> </el-button>
</view> </view>
</view> </view>
</view> </view>
<gap></gap>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
<script> <script>
import Gap from "../../../components/gap/gap.vue";
export default { export default {
name: "companyQuote", name: "companyQuote",
components: {Gap},
data() { data() {
return { return {
list: [ list: [
@@ -104,6 +120,7 @@ export default {
configList: [], configList: [],
checkList: [], checkList: [],
contentList: [], contentList: [],
contentNameList: [],
companyList: [ companyList: [
{ {
name: '', name: '',
@@ -127,24 +144,18 @@ export default {
}) })
if (rows) { if (rows) {
this.configList = rows.map(item => { this.configList = rows.map(item => {
item.contents.map(content => { item.contentIndex = null
content.selected = false
})
return item return item
}) })
} }
}, },
changeCheck(itemIndex, content, contentIndex) { changeCheck(itemIndex) {
const index = this.contentList.indexOf(content._index) const index = this.contentList.indexOf(itemIndex)
if (index === -1) { if (index === -1) {
this.contentList.push(content._index) this.contentList.push(itemIndex)
this.contentNameList.push(content.title) } else {
}
else {
this.contentList.splice(index, 1) this.contentList.splice(index, 1)
this.contentNameList.splice(index, 1)
} }
this.configList[itemIndex].contents[contentIndex].selected = index === -1
}, },
addCompany() { addCompany() {
this.companyList.push({ this.companyList.push({
@@ -169,12 +180,10 @@ export default {
computed: { computed: {
amount() { amount() {
let tmpAmount = 0 let tmpAmount = 0
this.configList.forEach(item => { this.configList.forEach((item, index) => {
item.contents.forEach(content => { if (this.contentList.indexOf(index) !== -1 && item.contentIndex !== null) {
if (content.selected) { tmpAmount += parseFloat(item.contents[item.contentIndex].amount)
tmpAmount += parseFloat(content.amount) }
}
})
}) })
return tmpAmount return tmpAmount
}, },
+31 -29
View File
@@ -8,21 +8,31 @@
<view class="bg-white p-40"> <view class="bg-white p-40">
<view v-for="(item, index) in configList" :key="index" <view v-for="(item, index) in configList" :key="index"
class="my-20 flex flex-col justify-start items-start"> class="my-20 flex flex-col justify-start items-start">
<view v-for="(content, contentIndex) in item.contents" :key="contentIndex" class="mb-20 "> <el-checkbox @change="changeCheck(index)">
<el-checkbox @change="changeCheck(index, content, contentIndex)"> <view class="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">
<view class="flex justify-start items-center text-35 mb-20"> <text>服务内容:{{ item.name }}</text>
<text>服务内容:{{ item.name }}</text> <view class="ml-35">
<text class="ml-35"> <text>业务编号:</text>
业务编号:{{ content.code }} <text v-if="item.contentIndex !== null">{{
item.contents[item.contentIndex].code
}}
</text> </text>
<text class="ml-35">服务服务项目: {{ content.title }}</text>
<text class="ml-35"> {{ content.amount }}元/次</text>
</view> </view>
<view>备注: {{ item.remark }}</view> <view class="flex justify-start items-center">
<text class="ml-35">服务服务项目:</text>
<el-select v-model="configList[index].contentIndex" clearable>
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
:label="content.title" :value="contentIndex"/>
</el-select>
</view>
<text class="ml-35" v-if="item.contentIndex !== null">
{{ item.contents[item.contentIndex].amount }}元/次
</text>
</view> </view>
</el-checkbox> <view>备注: {{ item.remark }}</view>
</view> </view>
</el-checkbox>
</view> </view>
<el-form ref="form" :model="form" label-width="200px"> <el-form ref="form" :model="form" label-width="200px">
<view v-for="(item, index) in productList" :key="index"> <view v-for="(item, index) in productList" :key="index">
@@ -128,24 +138,18 @@ export default {
}) })
if (rows) { if (rows) {
this.configList = rows.map(item => { this.configList = rows.map(item => {
item.contents.map(content => { item.contentIndex = null
content.selected = false
})
return item return item
}) })
} }
}, },
changeCheck(itemIndex, content, contentIndex) { changeCheck(itemIndex) {
const index = this.contentList.indexOf(content._index) const index = this.contentList.indexOf(itemIndex)
if (index === -1) { if (index === -1) {
this.contentList.push(content._index) this.contentList.push(itemIndex)
this.contentNameList.push(content.title) } else {
}
else {
this.contentList.splice(index, 1) this.contentList.splice(index, 1)
this.contentNameList.splice(index, 1)
} }
this.configList[itemIndex].contents[contentIndex].selected = index === -1
}, },
addCompany() { addCompany() {
this.productList.push({ this.productList.push({
@@ -170,12 +174,10 @@ export default {
computed: { computed: {
amount() { amount() {
let tmpAmount = 0 let tmpAmount = 0
this.configList.forEach(item => { this.configList.forEach((item, index) => {
item.contents.forEach(content => { if (this.contentList.indexOf(index) !== -1 && item.contentIndex !== null) {
if (content.selected) { tmpAmount += parseFloat(item.contents[item.contentIndex].amount)
tmpAmount += parseFloat(content.amount) }
}
})
}) })
return tmpAmount return tmpAmount
}, },
@@ -38,6 +38,7 @@
</view> </view>
<!-- 现货市场 end --> <!-- 现货市场 end -->
<gap height="50"/> <gap height="50"/>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
+52
View File
@@ -0,0 +1,52 @@
<template>
<view>
<top-bar></top-bar>
<common-header></common-header>
<category-bar></category-bar>
<view class="w-1200 m-a">
<view class="mt-20 bg-white rounded p-20">
<view class="flex justify-between">
<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>
</view>
</view>
<gap height="50"/>
<common-footer></common-footer>
</view>
</template>
<script>
export default {
name: "cart",
data() {
return {
list: [],
selectedList: [],
}
},
methods: {
async getList() {
const {rows} = await vk.callFunction({
url: "client/cart/kh/getList"
})
this.list = rows
}
},
onShow() {
this.getList()
},
computed: {
amount() {
return 0
}
}
}
</script>
+17 -1
View File
@@ -31,7 +31,7 @@
<text class="font-bold text-main">¥{{ info.amount }}</text> <text class="font-bold text-main">¥{{ info.amount }}</text>
</view> </view>
<view class="flex justify-end is-center"> <view class="flex justify-end is-center">
<el-button type="danger" round class="add-to-cart-btn">加入购物车</el-button> <el-button type="danger" round class="add-to-cart-btn" @click.native="addToCart">加入购物车</el-button>
<el-button type="primary" round class="ml-35">立即购买</el-button> <el-button type="primary" round class="ml-35">立即购买</el-button>
</view> </view>
</view> </view>
@@ -55,6 +55,7 @@ export default {
components: {UGap}, components: {UGap},
data() { data() {
return { return {
id: null,
info: { info: {
name: '' name: ''
} }
@@ -62,6 +63,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
if (options && options.id) { if (options && options.id) {
this.id = options.id;
this.getInfo(options.id) this.getInfo(options.id)
} }
}, },
@@ -74,6 +76,20 @@ export default {
url: 'client/goods/list/pub/getDetail', url: 'client/goods/list/pub/getDetail',
data: {id} data: {id}
}) })
},
addToCart(){
vk.callFunction({
url: 'client/cart/kh/add',
data: {
goodsId: this.id,
},
success: (res) => {
this.$message({
type:'success',
message: '添加成功'
})
}
})
} }
} }
} }
+1
View File
@@ -46,6 +46,7 @@
</view> </view>
<!-- 现货市场 end --> <!-- 现货市场 end -->
<gap height="50"/> <gap height="50"/>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
+1 -1
View File
@@ -105,8 +105,8 @@
</vk-data-table> </vk-data-table>
</view> </view>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
+1
View File
@@ -120,6 +120,7 @@
:total="goodsData.total"> :total="goodsData.total">
</el-pagination> </el-pagination>
</view> </view>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
+17 -5
View File
@@ -55,7 +55,10 @@
<text class="item">{{ item._add_time_str }}</text> <text class="item">{{ item._add_time_str }}</text>
<text class="item">{{ item.viewNum }}人浏览</text> <text class="item">{{ item.viewNum }}人浏览</text>
<text class="item">{{ item.downloadNum }}次下载</text> <text class="item">{{ item.downloadNum }}次下载</text>
<text class="item">{{ item.amount === 0 ? '免费下载' : `${item.amount}元下载` }}</text> <text class="item">{{
item.amount === 0 ? '免费下载' : `${item.amount}元下载`
}}
</text>
<!-- <text class="item">{{ item._add_time_str }}</text>--> <!-- <text class="item">{{ item._add_time_str }}</text>-->
</view> </view>
</view> </view>
@@ -65,7 +68,16 @@
<template v-else> <template v-else>
<view class="flex justify-start items-center"> <view class="flex justify-start items-center">
<text class="text-50">上传文档</text> <text class="text-50">上传文档</text>
<vk-data-upload v-model="form1.data.file" accept="image/*,application/pdf"></vk-data-upload> <vk-data-upload v-model="form1.data.files" accept="image/*,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint">
<template>
<el-button type="primary">点击上传</el-button>
</template>
</vk-data-upload>
<!-- <u-upload :custom-btn="true" :show-upload-list="false" :action="">-->
<!-- <template v-slot:addBtn>-->
<!-- <el-button type="primary">点击上传</el-button>-->
<!-- </template>-->
<!-- </u-upload>-->
</view> </view>
<vk-data-form v-model="form1.data" :rules="form1.props.rules" :action="form1.props.action" <vk-data-form v-model="form1.data" :rules="form1.props.rules" :action="form1.props.action"
:form-type="form1.props.formType" :columns='form1.props.columns' label-width="120px" :form-type="form1.props.formType" :columns='form1.props.columns' label-width="120px"
@@ -223,7 +235,7 @@ export default {
justify-content: flex-start; justify-content: flex-start;
flex-direction: column; flex-direction: column;
.title{ .title {
font-size: 20px; font-size: 20px;
} }
@@ -240,11 +252,11 @@ export default {
border-right: 2px solid #bbb; border-right: 2px solid #bbb;
} }
:first-child{ :first-child {
padding-left: 0; padding-left: 0;
} }
:last-child{ :last-child {
border-right: none border-right: none
} }
} }
+73 -73
View File
@@ -1,84 +1,84 @@
<template> <template>
<view> <view>
<top-bar></top-bar> <top-bar></top-bar>
<common-header></common-header> <common-header></common-header>
<category-bar></category-bar> <category-bar></category-bar>
<view class="w-1200"> <view class="w-1200">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo"> <el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo">
<el-menu-item index="fadada"> <el-menu-item index="fadada">
<i class="el-icon-menu"></i> <i class="el-icon-menu"></i>
<span slot="title">实名认证</span> <span slot="title">实名认证</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="business-card"> <el-menu-item index="business-card">
<i class="el-icon-setting"></i> <i class="el-icon-setting"></i>
<span slot="title">我的名片</span> <span slot="title">我的名片</span>
</el-menu-item> </el-menu-item>
<!-- <el-menu-item index="seal"> <!-- <el-menu-item index="seal">
<i class="el-icon-s-check"></i> <i class="el-icon-s-check"></i>
<span slot="title">我的印章</span> <span slot="title">我的印章</span>
</el-menu-item> --> </el-menu-item> -->
<el-menu-item index="equity"> <el-menu-item index="equity">
<i class="el-icon-wallet"></i> <i class="el-icon-wallet"></i>
<span slot="title">平台权益</span> <span slot="title">平台权益</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="grade"> <el-menu-item index="grade">
<i class="el-icon-user"></i> <i class="el-icon-user"></i>
<span slot="title">会员等级(临时)</span> <span slot="title">会员等级(临时)</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="added"> <el-menu-item index="added">
<i class="el-icon-medal"></i> <i class="el-icon-medal"></i>
<span slot="title">购买增值服务(临时)</span> <span slot="title">购买增值服务(临时)</span>
</el-menu-item> </el-menu-item>
</el-menu> </el-menu>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<personal v-if="currMenu === 'fadada'"></personal> <personal v-if="currMenu === 'fadada'"></personal>
<business-card v-else-if="currMenu === 'business-card'"></business-card> <business-card v-else-if="currMenu === 'business-card'"></business-card>
<seal v-else-if="currMenu === 'seal'"></seal> <seal v-else-if="currMenu === 'seal'"></seal>
<equity v-else-if="currMenu === 'equity'"></equity> <equity v-else-if="currMenu === 'equity'"></equity>
<grade v-else-if="currMenu === 'grade'"></grade> <grade v-else-if="currMenu === 'grade'"></grade>
<Added v-else-if="currMenu === 'added'"></Added> <Added v-else-if="currMenu === 'added'"></Added>
</el-col> </el-col>
</el-row> </el-row>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import Personal from './components/personal' import Personal from './components/personal'
import BusinessCard from './components/business-card' import BusinessCard from './components/business-card'
import Seal from './components/seal' import Seal from './components/seal'
import Equity from './components/equity' import Equity from './components/equity'
import Grade from './components/grade' import Grade from './components/grade'
import Added from './components/added' import Added from './components/added'
export default { export default {
components: {Personal, BusinessCard, Seal,Equity, Grade, Added}, components: {Personal, BusinessCard, Seal, Equity, Grade, Added},
data() { data() {
return { return {
currMenu: 'fadada', currMenu: 'fadada',
}; };
}, },
onLoad(options) { onLoad(options) {
if(options && options.menu) { if (options && options.menu) {
this.currMenu = options.menu this.currMenu = options.menu
} }
}, },
methods: { methods: {
menuSelect(e) { menuSelect(e) {
this.currMenu = e this.currMenu = e
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.w-1200 { .w-1200 {
width: 1200px; width: 1200px;
margin: 20px auto; margin: 20px auto;
} }
</style> </style>
+39 -18
View File
@@ -17,9 +17,9 @@
<view class="filter-outer"> <view class="filter-outer">
<el-form @submit.native.prevent label-width="80px"> <el-form @submit.native.prevent label-width="80px">
<el-form-item label="关键词:" class="border-bottom pb-30"> <el-form-item label="关键词:" class="border-bottom pb-30">
<el-input @keyup.enter.native="search(1)" clearable placeholder="输入关键字搜索" v-model="keyword"> <el-input @keyup.enter.native="getCompany()" clearable placeholder="输入关键字搜索" v-model="keyword">
<i slot="prefix" class="el-input__icon el-icon-search"></i> <i slot="prefix" class="el-input__icon el-icon-getCompany"></i>
<el-button @click="search(1)" type="primary" slot="append" style="border-radius: 0">搜索 <el-button @click="getCompany()" type="primary" slot="append" style="border-radius: 0">搜索
</el-button> </el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -87,43 +87,60 @@
<view class="flex justify-end w-100p"> <view class="flex justify-end w-100p">
<image class="authed" src="/static/images/authed.png" mode="aspectFit" <image class="authed" src="/static/images/authed.png" mode="aspectFit"
v-if="item.authStatus === 1"/> v-if="item.authStatus === 1"/>
<gap height="40" v-else/>
</view> </view>
<view class="flex justify-start items-center"> <view class="flex justify-start items-center">
<image :src="item.businessCard.logo" class="logo"/> <image :src="item.businessCard.logo" class="logo" v-if="item.businessCard" mode="aspectFill"/>
<view class="logo" v-else/>
<view class="ml-35 flex flex-col justify-start items-start"> <view class="ml-35 flex flex-col justify-start items-start">
<text>{{ item.name }}</text> <text>{{ item.name }}</text>
<i class="el-icon-star-off text-main my-20"/> <i class="el-icon-star-off text-main my-20"/>
<view class="flex justify-start items-center"> <view class="flex justify-start items-center">
<i class="el-icon-user"/> <i class="el-icon-user"/>
<text class="ml-10">{{ item.manager.personName }}</text> <text class="ml-10" v-if="item.manager">{{ item.manager.personName }}</text>
<text class="ml-20 text-28">{{ item.businessCard.position }}</text> <text class="ml-20 text-28" v-if="item.businessCard">{{ item.businessCard.position }}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="flex justify-start items-center mt-20"> <view class="flex justify-start items-center mt-20">
<i class="el-icon-map-location mr-15"/> <i class="el-icon-map-location mr-15"/>
<text>地址:{{ item.manager.address }}</text> <view class="flex-col justify-start items-center">
<text>地址:</text>
<text v-if="item.manager">{{ item.manager.address }}</text>
</view>
</view> </view>
<view class="flex justify-start items-center mt-20"> <view class="flex justify-start items-center mt-20">
<i class="el-icon-phone mr-15"/> <i class="el-icon-phone mr-15"/>
<text>电话:{{ item.businessCard.phone }}</text> <view class="flex-col justify-start items-center">
<text>电话:</text>
<text v-if="item.businessCard">{{ item.businessCard.phone }}</text>
</view>
</view> </view>
<view class="flex justify-start items-center mt-20"> <view class="flex justify-start items-center mt-20">
<i class="el-icon-mobile mr-15"/> <i class="el-icon-mobile mr-15"/>
<text>手机:{{ item.businessCard.mobile }}</text> <view class="flex-col justify-start items-center">
<text>手机:</text>
<text v-if="item.businessCard">{{ item.businessCard.mobile }}</text>
</view>
</view> </view>
<view class="flex justify-start items-center mt-20"> <view class="flex justify-start items-center mt-20">
<i class="el-icon-message mr-15"/> <i class="el-icon-message mr-15"/>
<text>邮箱:{{ item.businessCard.email }}</text> <view class="flex-col justify-start items-center">
<text>邮箱:</text>
<text v-if="item.businessCard">{{ item.businessCard.email }}</text>
</view>
</view> </view>
<view class="flex justify-start items-center mt-20"> <view class="flex justify-start items-center mt-20">
<i class="el-icon-data-board mr-15"/> <i class="el-icon-data-board mr-15"/>
<text>网址:{{ item.businessCard.website }}</text> <view class="flex-col justify-start items-center">
<text>网址:</text>
<text v-if="item.businessCard">{{ item.businessCard.website }}</text>
</view>
</view> </view>
<view class="flex justify-between items-center w-100p"> <view class="flex justify-between items-center w-100p">
<view class="flex justify-start items-center mt-20"> <view class="flex justify-start items-center mt-20">
<text class="text-main">主营业务:</text> <text class="text-main">主营业务:</text>
<text>{{ item.businessCard.mainBusiness }}</text> <text v-if="item.businessCard">{{ item.businessCard.mainBusiness }}</text>
</view> </view>
<el-button type="primary" @click="showInfo(item._id)">查看详情</el-button> <el-button type="primary" @click="showInfo(item._id)">查看详情</el-button>
</view> </view>
@@ -132,15 +149,18 @@
</view> </view>
</view> </view>
<right-bar></right-bar>
<common-footer></common-footer> <common-footer></common-footer>
</view> </view>
</template> </template>
<script> <script>
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json"; import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
import Gap from "../../components/gap/gap.vue";
export default { export default {
name: "list", name: "list",
components: {Gap},
data() { data() {
return { return {
categoryTreeData: [], categoryTreeData: [],
@@ -175,7 +195,7 @@ export default {
const index = this.checkCategoryList.indexOf(id) const index = this.checkCategoryList.indexOf(id)
if (index === -1) this.checkCategoryList.push(id) if (index === -1) this.checkCategoryList.push(id)
else this.checkCategoryList.splice(index, 1) else this.checkCategoryList.splice(index, 1)
this.search(1) this.getCompany()
}, },
selectProvince(code) { selectProvince(code) {
if (code === -1) this.checkProvinceList = [] if (code === -1) this.checkProvinceList = []
@@ -184,16 +204,17 @@ export default {
if (index === -1) this.checkProvinceList.push(code) if (index === -1) this.checkProvinceList.push(code)
else this.checkProvinceList.splice(index, 1) else this.checkProvinceList.splice(index, 1)
} }
this.search(1) this.getCompany()
},
search() {
}, },
getCompany() { getCompany() {
vk.callFunction({ vk.callFunction({
url: 'client/user/pub/getCompany', url: 'client/user/pub/getCompany',
title: '请求中...', title: '请求中...',
data: {}, data: {
province: this.checkProvinceList,
keyword: this.keyword,
mainSpotCategoryIds: this.checkCategoryList,
},
success: (data) => { success: (data) => {
this.companyList = data.rows.map(item => { this.companyList = data.rows.map(item => {
item.name = item.company.companyName item.name = item.company.companyName
@@ -0,0 +1,47 @@
'use strict';
module.exports = {
/**
* XXXnameXXX
* @url client/cart/kh/add 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let {data = {}, userInfo, util, filterResponse, originalParam} = event;
let {customUtil, uniID, config, pubFun, vk, db, _} = util;
let {uid} = data;
let res = {code: 0, msg: ""};
// 业务逻辑开始-----------------------------------------------------------
const inCart = await vk.baseDao.findByWhereJson({
dbName: "jjx-cart",
whereJson: {
uid,
goodsId: data.goodsId
}
});
if (inCart) {
await vk.baseDao.updateById({
dbName: "jjx-cart",
id: inCart._id,
dataJson: {
num: _.inc(1)
}
})
} else {
await vk.baseDao.add({
dbName: "jjx-cart",
dataJson: {
num: 1,
goodsId: data.goodsId,
uid
}
})
}
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}
@@ -0,0 +1,42 @@
'use strict';
module.exports = {
/**
* XXXnameXXX
* @url client/cart/kh/changeNum 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let {data = {}, userInfo, util, filterResponse, originalParam} = event;
let {customUtil, uniID, config, pubFun, vk, db, _} = util;
let {uid} = data;
let res = {code: 0, msg: ""};
// 业务逻辑开始-----------------------------------------------------------
const info = await vk.baseDao.findByWhereJson({
dbName: "jjx-cart",
whereJson: {
uid,
goodsId: data.goodsId
}
});
if (info.num > 1) {
await vk.baseDao.updateById({
dbName: "jjx-cart",
id: info._id,
dataJson: {
num: _.dec(1)
}
})
} else {
await vk.baseDao.deleteById({
dbName: "jjx-cart",
id: info._id
})
}
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}
@@ -0,0 +1,28 @@
'use strict';
module.exports = {
/**
* XXXnameXXX
* @url client/cart/kh/delete 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let { data = {}, userInfo, util, filterResponse, originalParam } = event;
let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
let { uid } = data;
let res = { code: 0, msg: "" };
// 业务逻辑开始-----------------------------------------------------------
await vk.baseDao.del({
dbName: "jjx-cart",
whereJson:{
uid,
goodsId: data.goodsId
}
})
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}
@@ -0,0 +1,38 @@
'use strict';
module.exports = {
/**
* XXXnameXXX
* @url client/cart/kh/getList 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let {data = {}, userInfo, util, filterResponse, originalParam} = event;
let {customUtil, uniID, config, pubFun, vk, db, _} = util;
let {uid} = data;
let res = {code: 0, msg: ""};
// 业务逻辑开始-----------------------------------------------------------
res = await vk.baseDao.selects({
dbName: "jjx-cart",
whereJson: {
uid
},
pageIndex: 1,
pageSize: 1000000000,
foreignDB: [
{
dbName: "jjx-goods",
localKey: "goodsId",
foreignKey: "_id",
as: "goods",
limit: 1
}
]
})
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}
@@ -0,0 +1,76 @@
'use strict';
module.exports = {
/**
* 新增签约宝合同
* @url client/contract/kh/addSign 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let {data = {}, userInfo, util, filterResponse, originalParam} = event;
let {customUtil, uniID, config, pubFun, vk, db, _} = util;
let {uid} = data;
let res = {code: 0, msg: ""};
// 业务逻辑开始-----------------------------------------------------------
const otherUser = await vk.baseDao.findByWhereJson({
dbName: 'uni-id-users',
whereJson: {
mobile: "1"
}
})
if (JSON.stringify(otherUser) === '{}') return {
code: -1,
msg: '该用户不存在',
data: {
otherUser,
phone: data.phone
}
}
data.transactionId = vk.pubfn.createOrderNo("C", 20)
const uploaddocs = await pubFun.fadada('uploaddocs.api', {
contract_id: data.transactionId,
doc_title: data.title,
doc_url: data.contractFile,
// file: doc_url,
doc_type: '.pdf'
})
if (parseInt(uploaddocs.code) === 1000) {
const contractId = await vk.baseDao.add({
dbName: 'jjx-contract',
dataJson: {
...data, ...{
status: 1,
userId: uid,
changeNum: 0,
productTitle: data.title,
docTitle: data.title,
type: 'sign',
contractBase: data.contractFile,
}
}
})
await vk.daoCenter.userContractDao.adds([
{
transactionId: vk.pubfn.createOrderNo("S", 20),
userId: uid,
role: data.userType === 1 ? 'seller' : 'buyer',
sign: false,
contractId,
},
{
transactionId: vk.pubfn.createOrderNo("S", 20),
userId: otherUser._id,
role: data.userType === 1 ? 'buyer' : 'seller',
sign: false,
contractId,
}
])
}
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}
@@ -15,7 +15,14 @@ module.exports = {
const whereJson = { const whereJson = {
accountType: 2 accountType: 2
} }
if (!vk.pubfn.isNull(data.keyword)) whereJson['company.companyName'] = new RegExp(data.keyword);
if (!vk.pubfn.isNull(data.isCoop)) whereJson.isCoop = data.isCoop; if (!vk.pubfn.isNull(data.isCoop)) whereJson.isCoop = data.isCoop;
if (data.province.length > 0) {
whereJson['businessCard.address.province.code'] = _.in(data.province);
}
if (data.mainSpotCategoryIds.length > 0) {
whereJson['businessCard.mainSpotCategoryIds'] = _.in(data.mainSpotCategoryIds);
}
// 业务逻辑开始----------------------------------------------------------- // 业务逻辑开始-----------------------------------------------------------
res = await vk.baseDao.getTableData({ res = await vk.baseDao.getTableData({
dbName: dbName.user, dbName: dbName.user,