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>
<view>
<div class="layout layout-fix-tab-narrow" style="right: 0px;">
<div class="mod-fix-tab-narrow" style="display: block; ">
<div class="fix-tab-main">
<ul>
<li class="side-hrd">
<a rel="nofollow" href="/enquiry/add.html" class="DeliveryMyCard">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl1.png"></i>
</div>
<span>下询价单</span>
</a>
</li>
<view>
<div class="layout layout-fix-tab-narrow" style="right: 0px;">
<div class="mod-fix-tab-narrow" style="display: block; ">
<div class="fix-tab-main">
<ul>
<li class="side-hrd">
<a rel="nofollow" href="javascript:;" class="DeliveryMyCard"
@click="navTo('/pages/enquiry/list')">
<div class="item">
<i class="wag-icon"><img src="@/static/images/cl1.png"></i>
</div>
<span>下询价单</span>
</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">-->
<!-- <a rel="nofollow" href="" target="_blank">-->
<!-- <div class="item">-->
<!-- <i class="wag-icon"><img src="@/static/images/cl2.png"></i>-->
<!-- </div>-->
<!-- <span>我要入驻</span>-->
<!-- </a>-->
<!-- </li>-->
<li class="side-add-cart"><a rel="nofollow" href="/support/shopping.html" target="_blank">
<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="/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>
<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>
<script>
export default {
name: "right-bar",
data() {
return {
import {Agreement} from '@icon-park/vue'
};
}
}
export default {
components: {Agreement},
name: "right-bar",
data() {
return {};
},
methods: {
navTo(url) {
vk.navigateTo(url);
}
}
}
</script>
<style lang="scss">
.layout-fix-tab-narrow {
border-left: 1px solid #f1f1f1;
position: fixed;
right: -40px;
top: 0;
width: 40px;
height: 100%;
background: #fff;
z-index: 9999999;
-webkit-transition: right .5s ease;
-moz-transition: right .5s ease;
-ms-transition: right .5s ease;
-o-transition: right .5s ease;
transition: right .5s ease;
line-height: 1.5;
color: #656565;
font-size: 12px;
font-family: -apple-system, BlinkMacSystemFont, Hiragino Sans GB, Microsoft YaHei, sans-serif;
}
.layout-fix-tab-narrow {
border-left: 1px solid #f1f1f1;
position: fixed;
right: -40px;
top: 0;
width: 40px;
height: 100%;
background: #fff;
z-index: 9999999;
-webkit-transition: right .5s ease;
-moz-transition: right .5s ease;
-ms-transition: right .5s ease;
-o-transition: right .5s ease;
transition: right .5s ease;
line-height: 1.5;
color: #656565;
font-size: 12px;
font-family: -apple-system, BlinkMacSystemFont, Hiragino Sans GB, Microsoft YaHei, sans-serif;
}
.mod-fix-tab-narrow li {
width: 40px;
position: relative;
margin: 3px 0;
}
.mod-fix-tab-narrow li {
width: 40px;
position: relative;
margin: 3px 0;
}
.mod-fix-tab-narrow li {
padding: 4px 0;
cursor: pointer;
line-height: 16px;
}
.mod-fix-tab-narrow li {
padding: 4px 0;
cursor: pointer;
line-height: 16px;
}
.layout-fix-tab-narrow a {
color: #656565;
text-decoration: none;
padding: 5px 0px;
}
.layout-fix-tab-narrow a {
color: #656565;
text-decoration: none;
padding: 5px 0px;
}
.mod-fix-tab-narrow li .item {
display: block;
position: relative;
z-index: 99;
text-align: center;
height: 23px;
}
.mod-fix-tab-narrow li .item {
display: block;
position: relative;
z-index: 99;
text-align: center;
height: 23px;
}
.mod-fix-tab-narrow li span {
display: block;
right: 0;
width: 16px;
white-space: inherit;
text-align: center;
word-wrap: break-word;
word-break: break-all;
padding: 0 12px;
line-height: 14px;
z-index: 10;
top: 32px;
transition: inherit;
}
.mod-fix-tab-narrow li span {
display: block;
right: 0;
width: 16px;
white-space: inherit;
text-align: center;
word-wrap: break-word;
word-break: break-all;
padding: 0 12px;
line-height: 14px;
z-index: 10;
top: 32px;
transition: inherit;
}
.wag-icon {
font-size: 16px;
height: 30px;
width: 30px;
font-style: normal;
color: #353535;
.wag-icon {
font-size: 16px;
height: 30px;
width: 30px;
font-style: normal;
color: #353535;
}
}
.mod-fix-tab-narrow li:hover {
box-shadow: 0 0;
color: #a92924
}
.mod-fix-tab-narrow li:hover {
box-shadow: 0 0;
color: #a92924
}
.mod-fix-tab-narrow li:hover {
box-shadow: 0 0 16px 0 hsla(0, 0%, 77%, .5)
}
.mod-fix-tab-narrow li:hover {
box-shadow: 0 0 16px 0 hsla(0, 0%, 77%, .5)
}
.mod-fix-tab-narrow li:hover span {
box-shadow: 0 0;
color: #a92924
}
.mod-fix-tab-narrow li:hover span {
box-shadow: 0 0;
color: #a92924
}
.mod-fix-tab-narrow {
margin-top: 50px;
}
.mod-fix-tab-narrow {
margin-top: 50px;
}
.a-fadeinL {
margin-top: 50px;
-webkit-transition: right .5s ease;
-moz-transition: right .5s ease;
-ms-transition: right .5s ease;
-o-transition: right .5s ease;
transition: right .5s ease;
}
.a-fadeinL {
margin-top: 50px;
-webkit-transition: right .5s ease;
-moz-transition: right .5s ease;
-ms-transition: right .5s ease;
-o-transition: right .5s ease;
transition: right .5s ease;
}
</style>
+16
View File
@@ -233,6 +233,14 @@
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/index/shop/cart",
"style" :
{
"navigationBarTitleText" : "购物车",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/yellowPage/list",
"style" :
@@ -248,6 +256,14 @@
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/user/school",
"style" :
{
"navigationBarTitleText" : "金久信学堂",
"enablePullDownRefresh" : false
}
}
],
"globalStyle": {
+5 -1
View File
@@ -51,7 +51,7 @@
</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">
<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"/>
<view class="content">
<text class="title">{{ item.name }}</text>
@@ -67,6 +67,7 @@
</view>
</view>
</view>
<right-bar></right-bar>
<common-footer></common-footer>
</view>
</template>
@@ -111,6 +112,9 @@ export default {
vk.navigateTo({
url: '/pages/user/school'
})
},
openDownload(url){
window.open(url)
}
},
onLoad() {
+160 -6
View File
@@ -23,9 +23,15 @@
<span slot="title">已作废</span>
</el-menu-item>
</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 :span="18">
<view class="contract-list">
<view class="contract-list" v-if="!isSign">
<view class="trade-method">
<view @click="formData.tradeMethod = 1" class="trade-method-item"
:class="{active: formData.tradeMethod == 1}">自主交易
@@ -43,6 +49,9 @@
<el-tag size="mini" v-else-if="item.contract.type === 'process'" type="warning"
effect="plain">加工单
</el-tag>
<el-tag size="mini" v-else-if="item.contract.type === 'sign'" type="success"
effect="plain">签约宝
</el-tag>
<view class="contract-product">
{{ item.contract.productTitle }}
</view>
@@ -92,8 +101,8 @@
</view> -->
<view class="">
<el-button @click.native="changeContract(item.contract)"
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
size="mini" type="primary">修改合同内容
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
size="mini" type="primary">修改合同内容
</el-button>
</view>
</view>
@@ -105,14 +114,19 @@
:total="tableData.total"></el-pagination>
</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-row>
</view>
<common-footer></common-footer>
<el-dialog :visible.sync="form1.props.show">
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
:rules="form1.props.rules" :form-type="form1.props.formType"
@@ -125,11 +139,15 @@
</template>
<script>
import {Agreement} from "@icon-park/vue";
export default {
components: {Agreement},
data() {
return {
pageIndex: 1,
menuIndex: '0',
isSign: false,
formData: {
status: 0,
tradeMethod: null
@@ -231,6 +249,126 @@ export default {
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) {
this.menuIndex = String(e)
this.formData.status = Number(e)
this.isSign = false
this.query(1)
},
selectSign() {
this.isSign = true
this.menuIndex = ''
},
async query(pageIndex) {
this.tableData = await vk.callFunction({
url: 'client/contract/kh/getList',
@@ -264,7 +407,7 @@ export default {
this.form1.props.action = 'client/contract/kh/launch'
this.form1.props.show = true
},
async changeContract(contract){
async changeContract(contract) {
this.form1.data.contractId = contract._id
const res = await vk.callFunction({
url: 'client/contract/kh/getDetail',
@@ -286,6 +429,8 @@ export default {
this.form1.data.contractId = null
this.formData.status = 1
this.menuIndex = '1'
this.isSign = false
this.$refs.form2.resetForm()
this.query(1)
},
/**
@@ -405,4 +550,13 @@ export default {
.contract-status-tag {
margin-left: 2px;
}
.sign {
padding: 20px 20px 20px 25px;
font-size: 14px;
.icon {
line-height: 18px;
}
}
</style>
+1 -1
View File
@@ -119,7 +119,7 @@
:pagination="true"></vk-data-table>
</view>
<right-bar></right-bar>
<common-footer></common-footer>
</view>
</template>
+1
View File
@@ -127,6 +127,7 @@
<!-- 现货市场 end -->
<gap height="100"/>
<common-footer></common-footer>
<right-bar></right-bar>
</view>
</template>
+39 -30
View File
@@ -8,21 +8,31 @@
<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 v-for="(content, contentIndex) in item.contents" :key="contentIndex" class="mb-20 ">
<el-checkbox @change="changeCheck(index, content, contentIndex)">
<view class="flex flex-col justify-start items-start">
<view class="flex justify-start items-center text-35 mb-20">
<text>服务内容:{{ item.name }}</text>
<text class="ml-35">
业务编号:{{ content.code }}
<el-checkbox @change="changeCheck(index)">
<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="ml-35">
<text>业务编号:</text>
<text v-if="item.contentIndex !== null">{{
item.contents[item.contentIndex].code
}}
</text>
<text class="ml-35">服务服务项目: {{ content.title }}</text>
<text class="ml-35"> {{ content.amount }}元/次</text>
</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>
</el-checkbox>
</view>
<view>备注: {{ item.remark }}</view>
</view>
</el-checkbox>
</view>
<el-form ref="form" :model="form" label-width="200px">
<view v-for="(item, index) in companyList" :key="index">
@@ -80,18 +90,24 @@
<view class="ml-35">客服联系方式: 0771-3923001</view>
</view>
<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>
</view>
</view>
</view>
<gap></gap>
<common-footer></common-footer>
</view>
</template>
<script>
import Gap from "../../../components/gap/gap.vue";
export default {
name: "companyQuote",
components: {Gap},
data() {
return {
list: [
@@ -104,6 +120,7 @@ export default {
configList: [],
checkList: [],
contentList: [],
contentNameList: [],
companyList: [
{
name: '',
@@ -127,24 +144,18 @@ export default {
})
if (rows) {
this.configList = rows.map(item => {
item.contents.map(content => {
content.selected = false
})
item.contentIndex = null
return item
})
}
},
changeCheck(itemIndex, content, contentIndex) {
const index = this.contentList.indexOf(content._index)
changeCheck(itemIndex) {
const index = this.contentList.indexOf(itemIndex)
if (index === -1) {
this.contentList.push(content._index)
this.contentNameList.push(content.title)
}
else {
this.contentList.push(itemIndex)
} else {
this.contentList.splice(index, 1)
this.contentNameList.splice(index, 1)
}
this.configList[itemIndex].contents[contentIndex].selected = index === -1
},
addCompany() {
this.companyList.push({
@@ -169,12 +180,10 @@ export default {
computed: {
amount() {
let tmpAmount = 0
this.configList.forEach(item => {
item.contents.forEach(content => {
if (content.selected) {
tmpAmount += parseFloat(content.amount)
}
})
this.configList.forEach((item, index) => {
if (this.contentList.indexOf(index) !== -1 && item.contentIndex !== null) {
tmpAmount += parseFloat(item.contents[item.contentIndex].amount)
}
})
return tmpAmount
},
+31 -29
View File
@@ -8,21 +8,31 @@
<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 v-for="(content, contentIndex) in item.contents" :key="contentIndex" class="mb-20 ">
<el-checkbox @change="changeCheck(index, content, contentIndex)">
<view class="flex flex-col justify-start items-start">
<view class="flex justify-start items-center text-35 mb-20">
<text>服务内容:{{ item.name }}</text>
<text class="ml-35">
业务编号:{{ content.code }}
<el-checkbox @change="changeCheck(index)">
<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="ml-35">
<text>业务编号:</text>
<text v-if="item.contentIndex !== null">{{
item.contents[item.contentIndex].code
}}
</text>
<text class="ml-35">服务服务项目: {{ content.title }}</text>
<text class="ml-35"> {{ content.amount }}元/次</text>
</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>
</el-checkbox>
</view>
<view>备注: {{ item.remark }}</view>
</view>
</el-checkbox>
</view>
<el-form ref="form" :model="form" label-width="200px">
<view v-for="(item, index) in productList" :key="index">
@@ -128,24 +138,18 @@ export default {
})
if (rows) {
this.configList = rows.map(item => {
item.contents.map(content => {
content.selected = false
})
item.contentIndex = null
return item
})
}
},
changeCheck(itemIndex, content, contentIndex) {
const index = this.contentList.indexOf(content._index)
changeCheck(itemIndex) {
const index = this.contentList.indexOf(itemIndex)
if (index === -1) {
this.contentList.push(content._index)
this.contentNameList.push(content.title)
}
else {
this.contentList.push(itemIndex)
} else {
this.contentList.splice(index, 1)
this.contentNameList.splice(index, 1)
}
this.configList[itemIndex].contents[contentIndex].selected = index === -1
},
addCompany() {
this.productList.push({
@@ -170,12 +174,10 @@ export default {
computed: {
amount() {
let tmpAmount = 0
this.configList.forEach(item => {
item.contents.forEach(content => {
if (content.selected) {
tmpAmount += parseFloat(content.amount)
}
})
this.configList.forEach((item, index) => {
if (this.contentList.indexOf(index) !== -1 && item.contentIndex !== null) {
tmpAmount += parseFloat(item.contents[item.contentIndex].amount)
}
})
return tmpAmount
},
@@ -38,6 +38,7 @@
</view>
<!-- 现货市场 end -->
<gap height="50"/>
<right-bar></right-bar>
<common-footer></common-footer>
</view>
</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>
</view>
<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>
</view>
</view>
@@ -55,6 +55,7 @@ export default {
components: {UGap},
data() {
return {
id: null,
info: {
name: ''
}
@@ -62,6 +63,7 @@ export default {
},
onLoad(options) {
if (options && options.id) {
this.id = options.id;
this.getInfo(options.id)
}
},
@@ -74,6 +76,20 @@ export default {
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: '添加成功'
})
}
})
}
}
}
+1
View File
@@ -46,6 +46,7 @@
</view>
<!-- 现货市场 end -->
<gap height="50"/>
<right-bar></right-bar>
<common-footer></common-footer>
</view>
</template>
+1 -1
View File
@@ -105,8 +105,8 @@
</vk-data-table>
</view>
<right-bar></right-bar>
<common-footer></common-footer>
</view>
</template>
+1
View File
@@ -120,6 +120,7 @@
:total="goodsData.total">
</el-pagination>
</view>
<right-bar></right-bar>
<common-footer></common-footer>
</view>
</template>
+17 -5
View File
@@ -55,7 +55,10 @@
<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.amount === 0 ? '免费下载' : `${item.amount}元下载`
}}
</text>
<!-- <text class="item">{{ item._add_time_str }}</text>-->
</view>
</view>
@@ -65,7 +68,16 @@
<template v-else>
<view class="flex justify-start items-center">
<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>
<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"
@@ -223,7 +235,7 @@ export default {
justify-content: flex-start;
flex-direction: column;
.title{
.title {
font-size: 20px;
}
@@ -240,11 +252,11 @@ export default {
border-right: 2px solid #bbb;
}
:first-child{
:first-child {
padding-left: 0;
}
:last-child{
:last-child {
border-right: none
}
}
+73 -73
View File
@@ -1,84 +1,84 @@
<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="w-1200">
<el-row :gutter="20">
<el-col :span="6">
<el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo">
<el-menu-item index="fadada">
<i class="el-icon-menu"></i>
<span slot="title">实名认证</span>
</el-menu-item>
<el-menu-item index="business-card">
<i class="el-icon-setting"></i>
<span slot="title">我的名片</span>
</el-menu-item>
<!-- <el-menu-item index="seal">
<i class="el-icon-s-check"></i>
<span slot="title">我的印章</span>
</el-menu-item> -->
<el-menu-item index="equity">
<i class="el-icon-wallet"></i>
<span slot="title">平台权益</span>
</el-menu-item>
<el-menu-item index="grade">
<i class="el-icon-user"></i>
<span slot="title">会员等级(临时)</span>
</el-menu-item>
<el-menu-item index="added">
<i class="el-icon-medal"></i>
<span slot="title">购买增值服务(临时)</span>
</el-menu-item>
</el-menu>
</el-col>
<el-col :span="18">
<personal v-if="currMenu === 'fadada'"></personal>
<business-card v-else-if="currMenu === 'business-card'"></business-card>
<seal v-else-if="currMenu === 'seal'"></seal>
<equity v-else-if="currMenu === 'equity'"></equity>
<grade v-else-if="currMenu === 'grade'"></grade>
<Added v-else-if="currMenu === 'added'"></Added>
</el-col>
</el-row>
<view class="w-1200">
<el-row :gutter="20">
<el-col :span="6">
<el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo">
<el-menu-item index="fadada">
<i class="el-icon-menu"></i>
<span slot="title">实名认证</span>
</el-menu-item>
<el-menu-item index="business-card">
<i class="el-icon-setting"></i>
<span slot="title">我的名片</span>
</el-menu-item>
<!-- <el-menu-item index="seal">
<i class="el-icon-s-check"></i>
<span slot="title">我的印章</span>
</el-menu-item> -->
<el-menu-item index="equity">
<i class="el-icon-wallet"></i>
<span slot="title">平台权益</span>
</el-menu-item>
<el-menu-item index="grade">
<i class="el-icon-user"></i>
<span slot="title">会员等级(临时)</span>
</el-menu-item>
<el-menu-item index="added">
<i class="el-icon-medal"></i>
<span slot="title">购买增值服务(临时)</span>
</el-menu-item>
</el-menu>
</el-col>
<el-col :span="18">
<personal v-if="currMenu === 'fadada'"></personal>
<business-card v-else-if="currMenu === 'business-card'"></business-card>
<seal v-else-if="currMenu === 'seal'"></seal>
<equity v-else-if="currMenu === 'equity'"></equity>
<grade v-else-if="currMenu === 'grade'"></grade>
<Added v-else-if="currMenu === 'added'"></Added>
</el-col>
</el-row>
</view>
</view>
</view>
</view>
</template>
<script>
import Personal from './components/personal'
import BusinessCard from './components/business-card'
import Seal from './components/seal'
import Equity from './components/equity'
import Grade from './components/grade'
import Added from './components/added'
import Personal from './components/personal'
import BusinessCard from './components/business-card'
import Seal from './components/seal'
import Equity from './components/equity'
import Grade from './components/grade'
import Added from './components/added'
export default {
components: {Personal, BusinessCard, Seal,Equity, Grade, Added},
data() {
return {
currMenu: 'fadada',
};
},
onLoad(options) {
if(options && options.menu) {
this.currMenu = options.menu
}
},
methods: {
menuSelect(e) {
this.currMenu = e
}
}
}
export default {
components: {Personal, BusinessCard, Seal, Equity, Grade, Added},
data() {
return {
currMenu: 'fadada',
};
},
onLoad(options) {
if (options && options.menu) {
this.currMenu = options.menu
}
},
methods: {
menuSelect(e) {
this.currMenu = e
}
}
}
</script>
<style lang="scss" scoped>
.w-1200 {
width: 1200px;
margin: 20px auto;
}
.w-1200 {
width: 1200px;
margin: 20px auto;
}
</style>
+39 -18
View File
@@ -17,9 +17,9 @@
<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-input @keyup.enter.native="getCompany()" clearable placeholder="输入关键字搜索" v-model="keyword">
<i slot="prefix" class="el-input__icon el-icon-getCompany"></i>
<el-button @click="getCompany()" type="primary" slot="append" style="border-radius: 0">搜索
</el-button>
</el-input>
</el-form-item>
@@ -87,43 +87,60 @@
<view class="flex justify-end w-100p">
<image class="authed" src="/static/images/authed.png" mode="aspectFit"
v-if="item.authStatus === 1"/>
<gap height="40" v-else/>
</view>
<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">
<text>{{ item.name }}</text>
<i class="el-icon-star-off text-main my-20"/>
<view class="flex justify-start items-center">
<i class="el-icon-user"/>
<text class="ml-10">{{ item.manager.personName }}</text>
<text class="ml-20 text-28">{{ item.businessCard.position }}</text>
<text class="ml-10" v-if="item.manager">{{ item.manager.personName }}</text>
<text class="ml-20 text-28" v-if="item.businessCard">{{ item.businessCard.position }}</text>
</view>
</view>
</view>
<view class="flex justify-start items-center mt-20">
<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 class="flex justify-start items-center mt-20">
<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 class="flex justify-start items-center mt-20">
<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 class="flex justify-start items-center mt-20">
<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 class="flex justify-start items-center mt-20">
<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 class="flex justify-between items-center w-100p">
<view class="flex justify-start items-center mt-20">
<text class="text-main">主营业务:</text>
<text>{{ item.businessCard.mainBusiness }}</text>
<text v-if="item.businessCard">{{ item.businessCard.mainBusiness }}</text>
</view>
<el-button type="primary" @click="showInfo(item._id)">查看详情</el-button>
</view>
@@ -132,15 +149,18 @@
</view>
</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 Gap from "../../components/gap/gap.vue";
export default {
name: "list",
components: {Gap},
data() {
return {
categoryTreeData: [],
@@ -175,7 +195,7 @@ export default {
const index = this.checkCategoryList.indexOf(id)
if (index === -1) this.checkCategoryList.push(id)
else this.checkCategoryList.splice(index, 1)
this.search(1)
this.getCompany()
},
selectProvince(code) {
if (code === -1) this.checkProvinceList = []
@@ -184,16 +204,17 @@ export default {
if (index === -1) this.checkProvinceList.push(code)
else this.checkProvinceList.splice(index, 1)
}
this.search(1)
},
search() {
this.getCompany()
},
getCompany() {
vk.callFunction({
url: 'client/user/pub/getCompany',
title: '请求中...',
data: {},
data: {
province: this.checkProvinceList,
keyword: this.keyword,
mainSpotCategoryIds: this.checkCategoryList,
},
success: (data) => {
this.companyList = data.rows.map(item => {
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 = {
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 (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({
dbName: dbName.user,