1、新增黄页
2、新增学堂 3、其他调整、修改
This commit is contained in:
+26
-5
@@ -2104,6 +2104,10 @@ input:disabled {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.w-1200 {
|
||||
width: 1200px
|
||||
}
|
||||
|
||||
.empty-bg-plain-btn {
|
||||
background: none !important;
|
||||
}
|
||||
@@ -2386,6 +2390,10 @@ input:disabled {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.p-40 {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.px-20 {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
@@ -2647,6 +2655,11 @@ input:disabled {
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.text-50 {
|
||||
font-size: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.rounded {
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
@@ -2664,23 +2677,31 @@ input:disabled {
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 1rpx solid #bbb;
|
||||
border: 1rpx solid #F1F5F9;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1rpx solid #bbb;
|
||||
border-top: 1rpx solid #F1F5F9;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid #bbb;
|
||||
border-bottom: 1rpx solid #F1F5F9;
|
||||
}
|
||||
|
||||
.border-left {
|
||||
border-left: 1rpx solid #bbb;
|
||||
border-left: 1rpx solid #F1F5F9;
|
||||
}
|
||||
|
||||
.border-right {
|
||||
border-right: 1rpx solid #bbb;
|
||||
border-right: 1rpx solid #F1F5F9;
|
||||
}
|
||||
|
||||
.bg-gray{
|
||||
background-color: #DDD;
|
||||
}
|
||||
|
||||
.bg-gray-light{
|
||||
background-color: #F9F9F9;
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
||||
@@ -81,7 +81,8 @@
|
||||
<li class="nav ">
|
||||
<a href="javascript:;">旧货交易</a>
|
||||
</li>
|
||||
<li class="nav ">
|
||||
<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')"
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
</div>
|
||||
|
||||
<ul class="CenteruserNav-menu">
|
||||
<li class=""><a href="/member/index.html">个人中心</a></li>
|
||||
<li class="active"><a href="/buyer/index.html">买家中心</a></li>
|
||||
<li class=""><a href="/seller/index.html">卖家中心</a></li>
|
||||
<li><a href="/hezuo/my.html">我的合作</a></li>
|
||||
<li class=""><a href="javascript:;" @click="jump('/pages/user/user')">个人中心</a></li>
|
||||
<li class="active"><a href="javascript:;">买家中心</a></li>
|
||||
<li class=""><a href="javascript:;">卖家中心</a></li>
|
||||
<!-- <li><a href="/hezuo/my.html">我的合作</a></li>-->
|
||||
<!-- <li><a href="">金久信黄页</a></li>-->
|
||||
<li><a href="/school/my.html">金久信学堂</a></li>
|
||||
<li><a href="javascript:;">金久信学堂</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,7 +28,14 @@
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
jump(url){
|
||||
vk.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
<el-dropdown-item>买家中心</el-dropdown-item>
|
||||
<el-dropdown-item>卖家中心</el-dropdown-item>
|
||||
<el-dropdown-item>我的加工</el-dropdown-item>
|
||||
<el-dropdown-item>金久信学堂</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<navigator url="/pages/user/school">金久信学堂</navigator>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="contract">合同管理</el-dropdown-item>
|
||||
<el-dropdown-item>订单管理</el-dropdown-item>
|
||||
<el-dropdown-item command="logout">退出登录</el-dropdown-item>
|
||||
|
||||
+166
-163
@@ -1,190 +1,193 @@
|
||||
{
|
||||
"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" :
|
||||
{
|
||||
},
|
||||
{
|
||||
"path": "pages/auth/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/spot/release/release",
|
||||
"style" :
|
||||
{
|
||||
},
|
||||
{
|
||||
"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/spot/goods/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我发布的现货",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"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/company/company",
|
||||
"style": {
|
||||
"navigationBarTitleText": "黄页",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/article/list",
|
||||
"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/checkout/checkout",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/article/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信学堂",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/school",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信学堂",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yellowPage/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "金久信黄页",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yellowPage/info",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="http://jyx.gxwebsoft.com/uploads/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@@ -107,6 +107,11 @@ export default {
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
toMySchool(){
|
||||
vk.navigateTo({
|
||||
url: '/pages/user/school'
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
|
||||
+34
-12
@@ -5,7 +5,7 @@
|
||||
<view class="w-1200">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-menu @select="menuSelect" default-active="0" class="el-menu-vertical-demo">
|
||||
<el-menu @select="menuSelect" :default-active="menuIndex" class="el-menu-vertical-demo">
|
||||
<el-menu-item index="0">
|
||||
<i class="el-icon-edit"></i>
|
||||
<span slot="title">待创建</span>
|
||||
@@ -91,7 +91,7 @@
|
||||
{{item._add_time_str}}到期,到期将无法签署合同
|
||||
</view> -->
|
||||
<view class="">
|
||||
<el-button
|
||||
<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">修改合同内容
|
||||
</el-button>
|
||||
@@ -129,6 +129,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
menuIndex: '0',
|
||||
formData: {
|
||||
status: 0,
|
||||
tradeMethod: null
|
||||
@@ -138,12 +139,18 @@ export default {
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
contractId: ''
|
||||
contractId: '',
|
||||
signEndDate: '',
|
||||
title: '',
|
||||
contractFile: '',
|
||||
buyerSignKeyword: '',
|
||||
sellerSignKeyword: '',
|
||||
otherFile: '',
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/contract/kh/launch",
|
||||
action: 'client/contract/kh/launch',
|
||||
// 表单字段显示规则
|
||||
columns: [{
|
||||
key: "title",
|
||||
@@ -232,11 +239,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
menuSelect(e) {
|
||||
this.menuIndex = String(e)
|
||||
this.formData.status = Number(e)
|
||||
this.query(1)
|
||||
},
|
||||
async query(pageIndex) {
|
||||
const tableData = await vk.callFunction({
|
||||
this.tableData = await vk.callFunction({
|
||||
url: 'client/contract/kh/getList',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
@@ -246,24 +254,38 @@ export default {
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
// tableData.rows.forEach(item => {
|
||||
|
||||
// })
|
||||
|
||||
this.tableData = tableData
|
||||
},
|
||||
/**
|
||||
* @param {Object} item
|
||||
* 创建合同
|
||||
* @param contract
|
||||
*/
|
||||
createContract(contract) {
|
||||
this.form1.data.contractId = contract._id
|
||||
this.form1.props.action = 'client/contract/kh/launch'
|
||||
this.form1.props.show = true
|
||||
},
|
||||
async changeContract(contract){
|
||||
this.form1.data.contractId = contract._id
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/contract/kh/getDetail',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
contractId: contract._id
|
||||
},
|
||||
});
|
||||
this.form1.data.signEndDate = res.signEndDate
|
||||
this.form1.data.title = res.docTitle
|
||||
this.form1.data.contractFile = res.contractBase
|
||||
this.form1.data.buyerSignKeyword = res.buyerSignKeyword
|
||||
this.form1.data.sellerSignKeyword = res.sellerSignKeyword
|
||||
this.form1.data.otherFile = res.otherFile
|
||||
this.form1.props.show = true
|
||||
},
|
||||
onFormSuccess() {
|
||||
this.form1.props.show = false
|
||||
this.form1.data.contractId = null
|
||||
this.formData.status = 1
|
||||
this.menuIndex = '1'
|
||||
this.query(1)
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="form1.data.addressRegion"
|
||||
<el-input v-model="form1.data.addressDetail"
|
||||
placeholder="详细地址或几公里范围内"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<building-one theme="outline" size="24" fill="#a92924" strokeLinecap="square"/>
|
||||
<view class="text-main ">
|
||||
<text class="mx-20">{{
|
||||
(sheet.quoteList && sheet.quoteList.rows && sheet.quoteList.rows.length > 0) ? sheet.quoteList.rows.length : 0
|
||||
(sheet.quoteList && sheet.quoteList.length > 0) ? sheet.quoteList.length : 0
|
||||
}}
|
||||
</text>
|
||||
<text>家已报价</text>
|
||||
@@ -57,10 +57,10 @@
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId">我要申请加工
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== sheet.userId && sheet.status === 0">我要报价
|
||||
</el-button>
|
||||
<el-button type="primary" @click.native="showDialog = true"
|
||||
v-else>查看收到的申请加工
|
||||
v-else-if="vk.getVuex('$user.userInfo._id') === sheet.userId">查看收到的申请报价
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
@@ -190,13 +190,13 @@
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in sheet.quoteList.rows" :key="index">
|
||||
<view class="quote" v-for="(item, index) in sheet.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">
|
||||
<el-button type="primary">选择</el-button>
|
||||
<el-button type="primary" v-if="sheet.status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -312,7 +312,7 @@ export default {
|
||||
url: 'client/enquiry/quote/kh/confirmQuote',
|
||||
title: '请求中...',
|
||||
data: {
|
||||
quoteId: item._id
|
||||
quoteId: item._id,
|
||||
},
|
||||
success: (data) => {
|
||||
vk.navigateTo('/pages/contract/index');
|
||||
@@ -328,7 +328,7 @@ export default {
|
||||
return vk.getVuex('$user.userInfo._id') != this.sheet.userId
|
||||
},
|
||||
onClick: (item) => {
|
||||
vk.toast(`${item._id}-按钮1`);
|
||||
this.showDialog = true
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
+19
-29
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@@ -88,7 +88,7 @@
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center">
|
||||
<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>
|
||||
@@ -115,7 +115,7 @@
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:customRightBtns="table1.customRightBtns" :query-form-param="queryParam"
|
||||
:pagination="true"></vk-data-table>
|
||||
</view>
|
||||
|
||||
@@ -147,11 +147,13 @@ export default {
|
||||
checkCompanyList: [],
|
||||
attributes: [],
|
||||
keyword: '',
|
||||
queryParam: {},
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
action: (obj = {}) => {
|
||||
let {data, success, fail, complete} = obj;
|
||||
console.log(data)
|
||||
vk.callFunction({
|
||||
url: `client/enquiry/sheet/pub/getList`,
|
||||
data: data,
|
||||
@@ -265,7 +267,7 @@ export default {
|
||||
// 表格相关结束 -----------------------------------------------------------
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
// this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
@@ -318,13 +320,13 @@ export default {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
@@ -332,7 +334,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-card'});
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
@@ -345,30 +347,18 @@ export default {
|
||||
search(pageIndex) {
|
||||
const categoryIds = []
|
||||
this.checkCategoryList.forEach(item => {
|
||||
item.forEach(sitem => {
|
||||
categoryIds.push(sitem._id)
|
||||
})
|
||||
// console.log(item)
|
||||
// item.forEach(sitem => {
|
||||
// categoryIds.push(sitem._id)
|
||||
// })
|
||||
categoryIds.push(item)
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
this.queryParam.formData = {
|
||||
keyword: this.keyword,
|
||||
companyList: this.checkCompanyList,
|
||||
categoryIds
|
||||
}
|
||||
|
||||
vk.callFunction({
|
||||
url: 'client/enquiry/sheet/pub/getList',
|
||||
data: {
|
||||
pageIndex: pageIndex,
|
||||
pageSize: 20,
|
||||
keyword: this.keyword,
|
||||
},
|
||||
success: (data) => {
|
||||
console.log('data: ', data);
|
||||
|
||||
this.goodsData = data
|
||||
}
|
||||
});
|
||||
this.$refs.table1.search()
|
||||
},
|
||||
getAttributes() {
|
||||
vk.callFunction({
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
action: "client/enquiry/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "money"},
|
||||
{key: "totalPrice", title: "货款总价", type: "number"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
],
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
|
||||
vk.navigateBack()
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
+18
-16
@@ -9,7 +9,7 @@
|
||||
<el-carousel height="365px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/image/336a76fbf9fe44a07b5cfd4caf6f8bb9.jpg"
|
||||
src="/static/images/336a76fbf9fe44a07b5cfd4caf6f8bb9.jpg"
|
||||
mode="scaleToFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@@ -66,8 +66,9 @@
|
||||
<view class="" style="height: 40px;"></view>
|
||||
<div class="mod-inner2Listcenter clearfix sliper">
|
||||
<ul class="clearfix">
|
||||
<li v-for="(item, index) in enquirySheetData" class="inli-mask" :key="index">
|
||||
<a href="javascript:void(0)" style="display: block;" rel="nofollow" target="_blank">
|
||||
<li v-for="(item, index) in enquirySheetData" class="inli-mask" :key="index"
|
||||
@click="vk.navigateTo('/pages/enquiry/detail?id=' + item._id);">
|
||||
<a href="javascript:void(0)" style="display: block;" rel="nofollow">
|
||||
<div class="detail">
|
||||
<div class="detail-kind clearfix">
|
||||
<div class="tag">报价中</div>
|
||||
@@ -101,18 +102,20 @@
|
||||
</el-divider>
|
||||
<view class="" style="height: 40px;"></view>
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in spotGoodsData" :key="index" class="goods">
|
||||
<view v-for="(item, index) in spotGoodsData" :key="index" class="goods"
|
||||
:style="{marginRight:( index % 4 === 0 && index > 0) ? 0 : '25px'}">
|
||||
<view class="goods-title">{{ item.name }}</view>
|
||||
<view class="goods-stock">库存:{{ item.stock }}吨</view>
|
||||
<view class="goods-address">供货地:{{ item.addressStr }}</view>
|
||||
<view class="goods-image">
|
||||
<image :src="item.user.businessCard.logo" mode="aspectFit"></image>
|
||||
</view>
|
||||
<!-- <view class="goods-image">-->
|
||||
<!-- <image :src="item.user.businessCard.logo" mode="aspectFit"></image>-->
|
||||
<!-- </view>-->
|
||||
<view v-if="item.user.accountType === 1" class="goods-company">{{ item.user.person.personName }}
|
||||
</view>
|
||||
<view v-if="item.user.accountType === 2" class="goods-company">{{ item.user.company.companyName }}
|
||||
</view>
|
||||
<el-button class="empty-bg-plain-btn" @click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);"
|
||||
<el-button class="empty-bg-plain-btn"
|
||||
@click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);"
|
||||
type="primary" plain size="small">立即查看
|
||||
</el-button>
|
||||
</view>
|
||||
@@ -274,18 +277,17 @@ export default {
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
|
||||
display: flex;
|
||||
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.goods {
|
||||
width: 217px;
|
||||
width: 200px;
|
||||
//height: 280px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
margin-right: 20px;
|
||||
//margin-right: 25px;
|
||||
margin-bottom: 25px;
|
||||
padding: 10px 20px;
|
||||
|
||||
@@ -295,6 +297,9 @@ export default {
|
||||
height: 62px;
|
||||
padding-top: 20px;
|
||||
font-weight: bold;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
&-stock {
|
||||
@@ -308,7 +313,7 @@ export default {
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 200px;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -338,9 +343,6 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.goods-image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goods-address {
|
||||
color: gray;
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-end"
|
||||
v-if="info.answerEndTime && dayjs().diff(dayjs(info.answerEndTime), 'second') > 0">
|
||||
v-if="info.answerEndTime && dayjs().diff(dayjs(info.answerEndTime), 'second') < 0">
|
||||
<text>距离加工结束还有:</text>
|
||||
<view class="border-main countdown text-main">{{
|
||||
dayjs().diff(dayjs(info.answerEndTime), 'day')
|
||||
dayjs(info.answerEndTime).diff(dayjs(), 'day')
|
||||
}}
|
||||
</view>
|
||||
<text>天</text>
|
||||
<view class="border-main countdown text-main">
|
||||
{{ (dayjs().diff(dayjs(info.answerEndTime), 'hour')) % 24 }}
|
||||
{{ (dayjs(info.answerEndTime).diff(dayjs(), 'hour')) % 24 }}
|
||||
</view>
|
||||
<text>时</text>
|
||||
</view>
|
||||
@@ -41,10 +41,10 @@
|
||||
</text>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="toQuote"
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== info.userId">我要申请加工
|
||||
v-if="vk.getVuex('$user.userInfo._id') !== info.userId && info.status === 0">我要申请加工
|
||||
</el-button>
|
||||
<el-button type="primary" @click.native="showDialog = true"
|
||||
v-else>查看收到的申请加工
|
||||
v-else-if="vk.getVuex('$user.userInfo._id') === info.userId">查看收到的申请加工
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
@@ -170,7 +170,7 @@
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="showDialog = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="mt-15" v-if="info && info.quoteList">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
@@ -185,7 +185,7 @@
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)">选择</el-button>
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="info.status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -225,14 +225,15 @@ export default {
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid}) {
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
quoteId: this.id,
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
|
||||
+61
-53
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@@ -70,7 +70,7 @@
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center">
|
||||
<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>
|
||||
@@ -97,8 +97,12 @@
|
||||
<!-- 商品列表 -->
|
||||
<view class="sheet-list">
|
||||
<vk-data-table ref="table1" :action="table1.action" :columns="table1.columns"
|
||||
:customRightBtns="table1.customRightBtns"
|
||||
:pagination="true"></vk-data-table>
|
||||
:customRightBtns="table1.customRightBtns" :query-form-param="queryParam"
|
||||
:pagination="true">
|
||||
<template v-slot:action="{ row, column, index }">
|
||||
<el-button size="mini" type="primary" plain @click.native="toDetail(row._id)">{{ vk.getVuex('$user.userInfo._id') === row.userId ? '查看' : '申请加工' }}</el-button>
|
||||
</template>
|
||||
</vk-data-table>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
@@ -126,6 +130,7 @@ export default {
|
||||
checkCategoryList: [],
|
||||
showAllCompany: false,
|
||||
keyword: '',
|
||||
queryParam: {},
|
||||
// 表格相关开始 -----------------------------------------------------------
|
||||
table1: {
|
||||
// 表格数据请求地址
|
||||
@@ -150,16 +155,16 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
customRightBtns: [{
|
||||
title: '申请加工',
|
||||
// icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
plain: true,
|
||||
onClick: ({_id}) => {
|
||||
this.toDetail(_id)
|
||||
// vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
}
|
||||
},],
|
||||
// customRightBtns: [{
|
||||
// title: vk.getVuex('$user.userInfo._id') '申请加工',
|
||||
// // icon: 'el-icon-search',
|
||||
// type: 'primary',
|
||||
// plain: true,
|
||||
// onClick: ({_id}) => {
|
||||
// this.toDetail(_id)
|
||||
// // vk.navigateTo('/pages/process/detail?id=' + item._id);
|
||||
// }
|
||||
// },],
|
||||
// 表格字段显示规则
|
||||
columns: [
|
||||
{
|
||||
@@ -178,23 +183,23 @@ export default {
|
||||
// return val.map(item=>item.procureNumber + item.procureUnit).join("/")
|
||||
// }
|
||||
},
|
||||
{
|
||||
key: "productList",
|
||||
title: "收货地",
|
||||
type: "text",
|
||||
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: "productList",
|
||||
// title: "收货地",
|
||||
// type: "text",
|
||||
// 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: "采购企业",
|
||||
@@ -220,7 +225,9 @@ export default {
|
||||
title: "发布时间",
|
||||
type: "time",
|
||||
},
|
||||
|
||||
{
|
||||
key: "action", title: "操作", type: "html"
|
||||
},
|
||||
],
|
||||
// 多选框选中的值
|
||||
multipleSelection: [],
|
||||
@@ -296,13 +303,13 @@ export default {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
@@ -310,7 +317,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
vk.navigateTo('/pages/user/user?menu=business-card');
|
||||
vk.navigateTo({url: '/pages/user/user?menu=business-card'});
|
||||
})
|
||||
} else {
|
||||
vk.navigateTo({
|
||||
@@ -328,7 +335,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
@@ -352,25 +359,26 @@ export default {
|
||||
})
|
||||
})
|
||||
|
||||
let provinceCodes = this.checkProvinceList.map(item => item.code)
|
||||
|
||||
if (provinceCodes.includes(9999)) {
|
||||
provinceCodes = []
|
||||
this.queryParam.formData = {
|
||||
keyword: this.keyword,
|
||||
companyList: this.checkCompanyList,
|
||||
categoryIds
|
||||
}
|
||||
this.$refs.table1.search()
|
||||
|
||||
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
|
||||
}
|
||||
});
|
||||
// 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
|
||||
// }
|
||||
// });
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-carousel height="170px">
|
||||
<el-carousel-item v-for="item in 4" :key="item">
|
||||
<image class="carousel-img"
|
||||
src="/static/images/20210506/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
src="/static/images/600fc93e6b85324b3ea1373ee264290d.jpg"
|
||||
mode="aspectFill"></image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
action: "client/process/quote/kh/addQuote",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{key: "totalPrice", title: "货款总价", type: "money"},
|
||||
{key: "totalPrice", title: "货款总价", type: "number"},
|
||||
{key: "totalPriceStr", title: "人民币大写", type: "text"},
|
||||
{key: "remark", title: "报价单详情", type: "editor"},
|
||||
],
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {
|
||||
|
||||
vk.navigateBack()
|
||||
},
|
||||
// 提交报价单
|
||||
async submit() {
|
||||
|
||||
+11
-11
@@ -59,15 +59,11 @@
|
||||
<el-input v-model="form1.data.num" type="number"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件内容" required>
|
||||
<el-upload action="#" :on-change="selectFile" :auto-upload="false" ref="uploader">
|
||||
<!-- <el-upload action="#" :before-upload="upload">-->
|
||||
<view class="attachment-upload" v-if="!form1.data.attachment">
|
||||
<i class="el-icon-plus"/>
|
||||
</view>
|
||||
<data-file theme="two-tone" size="24" :fill="['#333' ,'#ffffff']" strokeLinecap="square"
|
||||
v-else/>
|
||||
<!-- <el-image v-else :url="form1.data.attachment" fit="cover"/>-->
|
||||
</el-upload>
|
||||
<!-- <el-upload action="#" :before-upload="upload">-->
|
||||
<vk-data-upload v-model="form1.data.files" v-if="!form1.data.attachment" :limit="1" accept="image/*,application/pdf"/>
|
||||
<data-file theme="two-tone" size="24" :fill="['#333' ,'#ffffff']" strokeLinecap="square"
|
||||
v-else/>
|
||||
<!-- <el-image v-else :url="form1.data.attachment" fit="cover"/>-->
|
||||
|
||||
</el-form-item>
|
||||
</view>
|
||||
@@ -114,13 +110,17 @@
|
||||
<text>开票时间:</text>
|
||||
<el-radio-group v-model="form1.data.writeInvoiceTime">
|
||||
<el-radio v-for="(item, index) in WRITE_INVOICE_TIME" :key="index" :label="index">
|
||||
{{ item }}</el-radio>
|
||||
{{ item }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</view>
|
||||
<view class="mb-20 flex justify-start items-center">
|
||||
<text>发票种类:</text>
|
||||
<el-radio-group v-model="form1.data.invoiceType">
|
||||
<el-radio v-for="(item, index) in INVOICE_TYPE" :key="index" :label="index">{{ item }}</el-radio>
|
||||
<el-radio v-for="(item, index) in INVOICE_TYPE" :key="index" :label="index">{{
|
||||
item
|
||||
}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<view class="ml-20 flex justify-start items-center">
|
||||
<text class="label-width">其他要求:</text>
|
||||
|
||||
+551
-455
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,8 @@
|
||||
<view class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布现货</el-button>
|
||||
<el-button @click="toMy" type="primary" round plain class="empty-bg-plain-btn">我发布的现货</el-button>
|
||||
<el-button @click="toMy" type="primary" round plain class="empty-bg-plain-btn">我发布的现货
|
||||
</el-button>
|
||||
</el-row>
|
||||
</view>
|
||||
</view>
|
||||
@@ -94,13 +95,14 @@
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list">
|
||||
<view v-for="(item, index) in goodsData.rows" :key="index" class="goods">
|
||||
<view v-for="(item, index) in goodsData.rows" :key="index" class="goods"
|
||||
:style="{marginRight:( (index + 1) % 5 === 0 && index > 0) ? 0 : '28px'}">
|
||||
<view class="goods-title">{{ item.name }}</view>
|
||||
<view class="goods-stock mt-40">现货库存:{{ item.stock }}吨</view>
|
||||
<view class="goods-address text-gray">供货地:{{ item.addressStr }}</view>
|
||||
<view class="goods-image">
|
||||
<image :src="item.user.businessCard.logo" mode="aspectFit"></image>
|
||||
</view>
|
||||
<!-- <view class="goods-image">-->
|
||||
<!-- <image :src="item.user.businessCard.logo" mode="aspectFit"></image>-->
|
||||
<!-- </view>-->
|
||||
<view v-if="item.user.accountType == 1" class="goods-company">{{ item.user.person.personName }}</view>
|
||||
<view v-if="item.user.accountType == 2" class="goods-company">{{ item.user.company.companyName }}</view>
|
||||
<el-button @click="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id);" type="primary" plain
|
||||
@@ -118,7 +120,7 @@
|
||||
:total="goodsData.total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -142,7 +144,7 @@ export default {
|
||||
showAllProvince: false
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
this.search(1)
|
||||
vk.callFunction({
|
||||
url: 'client/spot/category/pub/getTree',
|
||||
@@ -179,13 +181,13 @@ export default {
|
||||
const {userInfo} = await vk.callFunction({
|
||||
url: 'user/kh/getMyUserInfo'
|
||||
})
|
||||
if (!userInfo.fadadaConfirm && userInfo.authStatus === 1) {
|
||||
if (!userInfo.fadadaConfirm || [-1, 2].includes(userInfo.authStatus)) {
|
||||
this.$confirm('您尚未认证, 是否前往认证?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.getCertUrl()
|
||||
vk.navigateTo({url: '/pages/user/user?menu=fadada'});
|
||||
})
|
||||
} else if (vk.pubfn.isNull(userInfo.businessCard)) {
|
||||
this.$confirm('请完善名片信息', '提示', {
|
||||
@@ -315,6 +317,7 @@ export default {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
<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 class="goods-options">
|
||||
<el-row class="">
|
||||
<el-button @click="toRelease" type="primary" round>发布现货</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>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
provinces.unshift({
|
||||
code: 9999,
|
||||
name: '全国'
|
||||
})
|
||||
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/spot/goods/kh/getSelfOne",
|
||||
customRightBtns: [
|
||||
{
|
||||
title: '详情',
|
||||
icon: 'el-icon-search',
|
||||
type: 'primary',
|
||||
onClick: (item) => {
|
||||
vk.navigateTo('/pages/spot/goods/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: "name",
|
||||
title: "标题",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "stock",
|
||||
title: "现货库存",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "供货地",
|
||||
type: "text",
|
||||
formatter: (val, row, column, index) => {
|
||||
return val.province.name + "-" + val.city.name + "-" + val.area.name
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
key: "_add_time",
|
||||
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/spot/release/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;
|
||||
}
|
||||
|
||||
.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>
|
||||
@@ -160,7 +160,9 @@
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onFormSuccess() {}
|
||||
onFormSuccess() {
|
||||
vk.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -56,6 +56,16 @@
|
||||
title: "职位",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "phone",
|
||||
title: "联系电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "联系电话",
|
||||
type: "text"
|
||||
},
|
||||
{
|
||||
key: "address",
|
||||
title: "地区",
|
||||
@@ -165,7 +175,8 @@
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
vk.userCenter.updateUser({
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/addAuth',
|
||||
data: {
|
||||
businessCard: formData
|
||||
},
|
||||
|
||||
@@ -8,12 +8,25 @@
|
||||
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 1">个人认证</span>
|
||||
<span class="text-40" v-if="vk.getVuex('$user.userInfo.accountType') === 2">企业认证</span>
|
||||
<div class="ml-20 flex justify-start items-center" v-if="!form1.data.fadadaConfirm">
|
||||
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square" style="height: 18px"/>
|
||||
<span v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
|
||||
<span v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
|
||||
<info theme="outline" size="18" fill="#a92924" strokeLinecap="square"
|
||||
style="height: 18px"/>
|
||||
<template v-if="form1.data.authStatus === null || form1.data.authStatus === -1">
|
||||
<span
|
||||
v-if="vk.getVuex('$user.userInfo.accountType') === 1">您还未提交您的个人资料</span>
|
||||
<span
|
||||
v-if="vk.getVuex('$user.userInfo.accountType') === 2">您还未提交您的企业资料</span>
|
||||
</template>
|
||||
<template v-else-if="form1.data.authStatus === 0">
|
||||
<span>审核中</span>
|
||||
</template>
|
||||
<template v-else-if="form1.data.authStatus === 2">
|
||||
<span>审核不通过:{{ form1.data.refuseReason }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn" size="small">制作我的名片</el-button>
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn" size="small" @click.native="makeCard">
|
||||
制作我的名片
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
|
||||
@@ -24,6 +37,7 @@
|
||||
@success="onFormSuccess1">
|
||||
<template v-slot:toFadada="{form, keyName}">
|
||||
<el-button @click="getCertUrl" type="primary" size="small">去认证</el-button>
|
||||
<el-button @click="getCertRes" type="primary" size="small">获取认证结果</el-button>
|
||||
</template>
|
||||
<template v-slot:accountAuth="{form, keyName}">
|
||||
<div>
|
||||
@@ -39,7 +53,8 @@
|
||||
<div class="flex justify-start items-center">
|
||||
<id-card theme="outline" size="24" fill="#a92924" strokeLinecap="square" style="height: 24px"/>
|
||||
<span class="text-40 mr-35">企业授权人信息</span>
|
||||
<el-button type="primary" size="small" @click.native="addManage" v-if="manageList.length === 0">
|
||||
<el-button type="primary" size="small" @click.native="addManage"
|
||||
v-if="manageList.length === 0 && (JSON.stringify(form.manager) === '{}' || !form.manager)">
|
||||
添加授权人
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -48,7 +63,9 @@
|
||||
<view v-for="(item, index) in manageList" :key="index">
|
||||
<manage-list v-model="manageList[index]"/>
|
||||
</view>
|
||||
<el-button type="primary" @click.native="allSubmit" v-if="form1.data.authType === 2">{{
|
||||
<el-button type="primary" @click.native="allSubmit"
|
||||
v-if="form1.data.authType === 2 && (form1.data.authStatus === null || [-1, 2].includes(form1.data.authStatus))">
|
||||
{{
|
||||
vk.getVuex('$user.userInfo.accountType') === 2 ? '提交企业认证' : '提交个人认证'
|
||||
}}
|
||||
</el-button>
|
||||
@@ -73,31 +90,33 @@ export default {
|
||||
data: {
|
||||
person: {},
|
||||
company: {},
|
||||
manager: {},
|
||||
manager: null,
|
||||
fadadaConfirm: false,
|
||||
authType: 1,
|
||||
authStatus: null,
|
||||
refuseReason: '',
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "user/kh/setCertification",
|
||||
action: "client/user/kh/addAuth",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "authType", title: "认证方式", type: "radio",
|
||||
data: [
|
||||
{value: 1, label: "法大大接口认证"},
|
||||
{value: 2, label: "后台审核认证"},
|
||||
{value: 2, label: "金九信平台审核"},
|
||||
],
|
||||
showRule: ({fadadaConfirm}) => {
|
||||
return fadadaConfirm
|
||||
showRule: ({authStatus}) => {
|
||||
return authStatus === null || [-1, 2].includes(authStatus)
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "toFadada", title: "认证方式", type: "html",
|
||||
showLabel: false,
|
||||
showRule: (formData) => {
|
||||
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm)
|
||||
return formData.authType === 1 && (!formData.hasOwnProperty('fadadaConfirm') || !formData.fadadaConfirm) && (formData.authStatus === null || [-1, 2].includes(formData.authStatus))
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -167,7 +186,7 @@ export default {
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "", title: "", type: "group", justify: "start",
|
||||
key: "address", title: "", type: "group", justify: "start",
|
||||
columns: [
|
||||
{key: "addressRegion", title: "公司所在地", type: "address",},
|
||||
{
|
||||
@@ -179,6 +198,12 @@ export default {
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "mobile",
|
||||
title: "联系方式",
|
||||
type: "text",
|
||||
placeholder: "请输入您的联系方式",
|
||||
},
|
||||
{
|
||||
key: "mailAddress",
|
||||
title: "有效通信地址",
|
||||
@@ -388,19 +413,20 @@ export default {
|
||||
loading: false,
|
||||
// 是否显示表单1 的弹窗
|
||||
show: false,
|
||||
beforeAction: (formData) => {
|
||||
// const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
|
||||
// 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
// ])
|
||||
vk.userCenter.updateUser({
|
||||
data: {...formData, ...{manager: this.manageList[0]}},
|
||||
success: (data) => {
|
||||
// 成功后的逻辑
|
||||
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
// beforeAction: (formData) => {
|
||||
// // const newFormData = _.pick(formData, ['contactWechat', 'contactEmail',
|
||||
// // 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
// // ])
|
||||
// // vk.userCenter.updateUser({
|
||||
// // data: {...formData, ...{manager: this.manageList[0]}},
|
||||
// // success: (data) => {
|
||||
// // // 成功后的逻辑
|
||||
// //
|
||||
// // }
|
||||
// // });
|
||||
// // return false;
|
||||
//
|
||||
// },
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
@@ -417,7 +443,8 @@ export default {
|
||||
success: (data) => {
|
||||
this.form1.data = _.pick(data.userInfo, [
|
||||
'fadadaConfirm', 'person', 'company', 'manager', 'contactWechat',
|
||||
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress'
|
||||
'contactEmail', 'contactWechatImage', 'contactQq', 'mailAddress',
|
||||
'authStatus', 'authType', 'refuseReason'
|
||||
])
|
||||
// if (!this.form1.data.hasOwnProperty('fadadaConfirm') || !this.form1.data.fadadaConfirm) this.form1.data.authType = 1
|
||||
// this.form1.data.authType = 2
|
||||
@@ -434,7 +461,7 @@ export default {
|
||||
});
|
||||
},
|
||||
onFormSuccess1() {
|
||||
console.log(123);
|
||||
window.location.reload()
|
||||
},
|
||||
getCertUrl() {
|
||||
vk.callFunction({
|
||||
@@ -448,8 +475,21 @@ export default {
|
||||
this.manageList.push({})
|
||||
},
|
||||
allSubmit() {
|
||||
// this.form1.data.manager = this.manageList[0]
|
||||
this.form1.data.authStatus = 0
|
||||
this.form1.data.refuseReason = null
|
||||
this.form1.data.manager = this.manageList[0]
|
||||
this.$refs.form1.submitForm()
|
||||
},
|
||||
makeCard() {
|
||||
this.$emit('makeCard')
|
||||
},
|
||||
getCertRes() {
|
||||
vk.callFunction({
|
||||
url: 'client/user/kh/getFadadaRes',
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 flex justify-start items-start my-25 m-a">
|
||||
<view class="flex-col flex-col justify-center items-center bg-white text-40 left-wrap pointer">
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 0 ? 'active' : '' ]"
|
||||
@click="changeActive(0)">
|
||||
<i class="el-icon-upload2"/>
|
||||
<text class="ml-20">我的上传</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 1 ? 'active' : '' ]"
|
||||
@click="changeActive(1)">
|
||||
<i class="el-icon-download"/>
|
||||
<text class="ml-20">我的收藏</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 2 ? 'active' : '' ]"
|
||||
@click="changeActive(2)">
|
||||
<i class="el-icon-star-off"/>
|
||||
<text class="ml-20">我的下载</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ml-35 bg-white p-40 flex-1">
|
||||
<template v-if="mode === 'list'">
|
||||
<view v-if="activeIndex === 0" class="flex justify-start items-center text-50">
|
||||
<view class="flex justify-start items-center mr-35">
|
||||
<text>累计上传</text>
|
||||
<text class="text-main">{{ list.length }}</text>
|
||||
<text>篇</text>
|
||||
</view>
|
||||
<el-button type="primary" @click="showAction">我要上传</el-button>
|
||||
</view>
|
||||
<view v-if="activeIndex === 1" class="flex justify-start items-center text-50">
|
||||
<view class="flex justify-start items-center mr-35">
|
||||
<text>共计收藏</text>
|
||||
<text class="text-main">{{ list.length }}</text>
|
||||
<text>篇</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="activeIndex === 2" class="flex justify-start items-center text-50">
|
||||
<view class="flex justify-start items-center mr-35">
|
||||
<text>累计下载</text>
|
||||
<text class="text-main">{{ list.length }}</text>
|
||||
<text>篇</text>
|
||||
</view>
|
||||
<el-button type="primary" @click="showAction">我要上传</el-button>
|
||||
</view>
|
||||
<view class="flex flex-col justify-start items-start pointer w-100p">
|
||||
<view v-for="(item, index) in list" :key="index" class="content-item-wrap">
|
||||
<file-word theme="outline" size="80" fill="#4a90e2" strokeLinecap="square"/>
|
||||
<view class="content">
|
||||
<text class="title">{{ item.name }}</text>
|
||||
<view class="desc">
|
||||
<text class="item">{{ item._add_time_str }}</text>
|
||||
<text class="item">{{ item.viewNum }}人浏览</text>
|
||||
<text class="item">{{ item.downloadNum }}次下载</text>
|
||||
<text class="item">{{ item.amount === 0 ? '免费下载' : `${item.amount}元下载` }}</text>
|
||||
<!-- <text class="item">{{ item._add_time_str }}</text>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="text-50">上传文档</text>
|
||||
<vk-data-upload v-model="form1.data.file" accept="image/*,application/pdf"></vk-data-upload>
|
||||
</view>
|
||||
<vk-data-form v-model="form1.data" :rules="form1.props.rules" :action="form1.props.action"
|
||||
:form-type="form1.props.formType" :columns='form1.props.columns' label-width="120px"
|
||||
@success="addSuccess"></vk-data-form>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {FileWord} from "@icon-park/vue";
|
||||
|
||||
export default {
|
||||
name: "school",
|
||||
components: {FileWord},
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
mode: 'list',
|
||||
list: [],
|
||||
cateList: [],
|
||||
uploadFile: null,
|
||||
form1: {
|
||||
// 表单请求数据,此处可以设置默认值
|
||||
data: {
|
||||
amount: 0,
|
||||
},
|
||||
// 表单属性
|
||||
props: {
|
||||
// 表单请求地址
|
||||
action: "client/article/list/kh/add",
|
||||
// 表单字段显示规则
|
||||
columns: [
|
||||
{
|
||||
key: "name",
|
||||
title: "标题",
|
||||
type: "text",
|
||||
placeholder: "请输入标题"
|
||||
},
|
||||
{
|
||||
key: "parentId",
|
||||
title: "分类",
|
||||
type: "remote-select",
|
||||
placeholder: "请选择分类",
|
||||
showAll: true,
|
||||
action: "client/article/category/pub/getList",
|
||||
props: {
|
||||
list: "rows",
|
||||
value: "_id",
|
||||
label: "name",
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "content",
|
||||
title: "内容",
|
||||
type: "editor",
|
||||
placeholder: "请输入内容"
|
||||
},
|
||||
{
|
||||
key: "amount",
|
||||
title: "金额",
|
||||
type: "text",
|
||||
placeholder: "请输入内容",
|
||||
},
|
||||
],
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '名称不能为空', trigger: 'blur'},
|
||||
],
|
||||
},
|
||||
// add 代表添加 update 代表修改
|
||||
formType: "",
|
||||
// 是否显示表单的弹窗
|
||||
show: false
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/list/kh/getUserList'
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
async getCollectList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/article/collect/kh/getList'
|
||||
})
|
||||
this.list = rows
|
||||
},
|
||||
changeActive(index) {
|
||||
this.list = []
|
||||
this.mode = 'list'
|
||||
this.activeIndex = index
|
||||
if (index === 0) this.getList()
|
||||
else if (index === 1) this.getCollectList()
|
||||
},
|
||||
showAction() {
|
||||
this.mode = 'action'
|
||||
this.activeIndex = null
|
||||
},
|
||||
addSuccess() {
|
||||
this.mode = 'list'
|
||||
this.activeIndex = 0
|
||||
this.getList()
|
||||
}
|
||||
// beforeUpload(file) {
|
||||
// this.uploadFile = file
|
||||
// // return false
|
||||
// },
|
||||
// doUpload() {
|
||||
// vk.uploadFile({
|
||||
// title: '上传中',
|
||||
// filePath: this.uploadFile,
|
||||
// success(res) {
|
||||
// console.log(res)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.left-wrap {
|
||||
width: 240px;
|
||||
|
||||
view {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #a92924;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+1
-3
@@ -49,11 +49,9 @@
|
||||
data() {
|
||||
return {
|
||||
currMenu: 'fadada',
|
||||
// currMenu: 'fadada',
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
if(options && options.menu) {
|
||||
this.currMenu = options.menu
|
||||
}
|
||||
@@ -66,7 +64,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w-1200 {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
<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/yellowPage/list">金久信黄页</navigator>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-main">{{ info.company.companyName }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</view>
|
||||
<view class="mt-40 bg-white company">
|
||||
<view class="p-50 flex justify-between items-center pb-30 border-bottom">
|
||||
<view class="flex justify-start items-center">
|
||||
<image class="logo" :src="info.businessCard.logo"/>
|
||||
<view class="ml-35 flex flex-col justify-start items-start">
|
||||
<text class="text-40 font-bold">{{ info.company.companyName }}</text>
|
||||
<text class="text-gray text-28 mt-40">主营业务: {{ info.businessCard.mainBusiness }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end items-center">
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<view class="flex justify-center items-center">
|
||||
<protect theme="filled" size="24" fill="#d0021b" strokeLinecap="square"/>
|
||||
<view class="text-gray">平台累计交易</view>
|
||||
</view>
|
||||
<text class="text-main font-bold text-50">{{ info.transactionAmount }}</text>
|
||||
</view>
|
||||
<view class="flex flex-col justify-center items-center ml-35">
|
||||
<view class="flex justify-center items-center">
|
||||
<exchange-three theme="filled" size="24" fill="#d0021b" strokeLinecap="square"/>
|
||||
<view class="text-gray">已缴纳交易保证金</view>
|
||||
</view>
|
||||
<text class="text-main font-bold text-50">{{ info.paidEnsure }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-30 p-40">
|
||||
<view class="flex justify-between items-center mb-20">
|
||||
<view class="title">企业简介</view>
|
||||
<view class="mt-20" v-html="info.companyIntroduction"></view>
|
||||
</view>
|
||||
<view class="flex flex-col justify-start items-start mb-20">
|
||||
<view class="title">联系我们</view>
|
||||
<view class="mt-20 flex justify-start items-start flex-wrap w-100p text-30">
|
||||
<view class="flex justify-start items-center w-33p mb-20">
|
||||
<i class="el-icon-map-location mr-15"/>
|
||||
<text>地址:{{ info.manager.address }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-33p mb-20">
|
||||
<i class="el-icon-phone mr-15"/>
|
||||
<text>电话:{{ info.businessCard.phone }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-33p mb-20">
|
||||
<i class="el-icon-mobile mr-15"/>
|
||||
<text>手机:{{ info.businessCard.mobile }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-33p">
|
||||
<i class="el-icon-message mr-15"/>
|
||||
<text>邮箱:{{ info.businessCard.email }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center w-33p">
|
||||
<i class="el-icon-data-board mr-15"/>
|
||||
<text>网址:{{ info.businessCard.website }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col justify-start items-start mb-20">
|
||||
<view class="title">发布的现货</view>
|
||||
<view class="mt-20 bg-gray w-100p p-40" v-for="(item, index) in info.spotList" :key="index">
|
||||
<view class="w-100p flex justify-between items-center">
|
||||
<text class="font-bold text-40">{{ item.name }}</text>
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn"
|
||||
@click.native="vk.navigateTo('/pages/spot/goods/detail?id=' + item._id)">查看详情
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="w-60p flex justify-between items-center text-main my-20">
|
||||
<text>库存:{{ item.stock }}吨</text>
|
||||
<text>供货地:{{ item.address.province.name }}-{{
|
||||
item.address.city.name
|
||||
}}-{{ item.address.area.name }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="w-60p flex justify-between items-center text-gray">
|
||||
<view class="flex justify-start items-center">
|
||||
<i class="el-icon-user"/>
|
||||
<text>{{ info.company.companyName }}</text>
|
||||
</view>
|
||||
<text class="">{{ item._add_time_str }}发布</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-start mb-20">
|
||||
<view class="title">发布的询价单</view>
|
||||
<view class="text-main pointer" @click="vk.navigateTo('/pages/spot/goods/goods')">查看更多></view>
|
||||
</view>
|
||||
<view class="bg-gray-light flex justify-center items-center table-header p-20">
|
||||
<view class="text-gray flex-1">品名/材质</view>
|
||||
<view class="text-gray flex-1">采购量</view>
|
||||
<view class="text-gray flex-1">收购地</view>
|
||||
<view class="text-gray flex-1">采购企业</view>
|
||||
<view class="text-gray flex-1">报价情况</view>
|
||||
<view class="text-gray flex-1">发布时间</view>
|
||||
<view class="text-gray flex-1">操作</view>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-20 w-100p p-20"
|
||||
v-for="(item, index) in info.enquiryList" :key="index">
|
||||
<view class="text-main flex-1">{{ item.productList[0].goodsName }}</view>
|
||||
<view class="flex-1">{{ item.productList[0].procureNumber }}{{
|
||||
item.productList[0].procureUnit
|
||||
}}
|
||||
</view>
|
||||
<view class="flex-1">{{ item.address }}</view>
|
||||
<view class="flex-1">{{ info.company.companyName }}</view>
|
||||
<view class="flex-1">{{ item.answerNumber }}家已报价</view>
|
||||
<view class="flex-1">{{ item._add_time_str }}</view>
|
||||
<view class="flex-1">
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn"
|
||||
@click.native="vk.navigateTo('/pages/enquiry/detail?id=' + item._id);">查看
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-between items-start mb-20">
|
||||
<view class="title">发布的加工单</view>
|
||||
<view class="text-main" @click="vk.navigateTo('/pages/process/list')">查看更多></view>
|
||||
</view>
|
||||
<view class="bg-gray-light flex justify-center items-center table-header p-20">
|
||||
<view class="text-gray flex-1">品名/材质</view>
|
||||
<view class="text-gray flex-1">加工量</view>
|
||||
<!-- <view class="text-gray flex-1">收购地</view>-->
|
||||
<view class="text-gray flex-1">采购企业</view>
|
||||
<view class="text-gray flex-1">报价情况</view>
|
||||
<view class="text-gray flex-1">发布时间</view>
|
||||
<view class="text-gray flex-1">操作</view>
|
||||
</view>
|
||||
<view class="flex justify-center items-center mt-20 w-100p p-20"
|
||||
v-for="(item, index) in info.processList" :key="index">
|
||||
<view class="text-main flex-1">{{ item.title }}</view>
|
||||
<view class="flex-1">{{ item.productList[0].procureNumber }}{{
|
||||
item.productList[0].procureUnit
|
||||
}}
|
||||
</view>
|
||||
<!-- <view class="flex-1">{{ item.address }}</view>-->
|
||||
<view class="flex-1">{{ item.num }}</view>
|
||||
<view class="flex-1">{{ info.company.companyName }}</view>
|
||||
<view class="flex-1">{{ item.answerNumber }}家已报价</view>
|
||||
<view class="flex-1">{{ item._add_time_str }}</view>
|
||||
<view class="flex-1">
|
||||
<el-button type="primary" plain class="empty-bg-plain-btn"
|
||||
@click.native="toProcessDetail(row._id)">查看
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<gap/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Protect, ExchangeThree} from '@icon-park/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 Gap from "../../components/gap/gap.vue";
|
||||
|
||||
export default {
|
||||
name: "info",
|
||||
components: {Gap, Protect, ExchangeThree},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
info: {
|
||||
transactionAmount: 0,
|
||||
paidEnsure: 0,
|
||||
spotList: [],
|
||||
enquiryList: [],
|
||||
processList: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
vk.callFunction({
|
||||
url: "client/user/pub/getDetail",
|
||||
data: {
|
||||
_id: this.id
|
||||
},
|
||||
success: (res) => {
|
||||
this.info = res.data
|
||||
this.info.enquiryList.map(val => {
|
||||
let str = ''
|
||||
if (val.productList.length > 0 && val.productList[0].addressRegion.length > 0) {
|
||||
let provinceIndex = 0, cityIndex = 0, areaIndex = 0
|
||||
this.provinceData.forEach((item, index) => {
|
||||
if (parseInt(val.productList[0].addressRegion[0]) === parseInt(item.code)) {
|
||||
provinceIndex = index
|
||||
str = item.name
|
||||
}
|
||||
})
|
||||
this.cityData[provinceIndex].forEach((item, index) => {
|
||||
if (parseInt(val.productList[0].addressRegion[1]) === parseInt(item.code)) {
|
||||
cityIndex = index
|
||||
str += item.name
|
||||
}
|
||||
})
|
||||
this.areaData[provinceIndex][cityIndex].forEach((item, index) => {
|
||||
if (parseInt(val.productList[0].addressRegion[2]) === parseInt(item.code)) {
|
||||
areaIndex = index
|
||||
str += item.name
|
||||
}
|
||||
})
|
||||
str += val.productList[0].addressDetail
|
||||
}
|
||||
val.address = str
|
||||
return val
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
async toProcessDetail(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}`
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.id) {
|
||||
this.id = option.id
|
||||
this.getInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.company {
|
||||
|
||||
.logo {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
padding-left: 5px;
|
||||
border-left: 3px solid #d0021b;
|
||||
color: #d0021b;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
border-top: 8px solid #F4F4F4;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,307 @@
|
||||
<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">
|
||||
<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">
|
||||
|
||||
</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" v-if="clickedCateIndex !== null">
|
||||
<template v-if="clickedCateIndex === -1">
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in allChildCate" :key="index">{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="pointer mr-25" @click="selectCate(item._id)"
|
||||
:class="[checkCategoryList.includes(item._id) ? 'text-main' : '']"
|
||||
v-for="(item, index) in categoryTreeData[clickedCateIndex].children" :key="index">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</template>
|
||||
</view>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市" class="border-bottom pb-30">
|
||||
<view class="flex justify-start items-center flex-wrap">
|
||||
<text @click="selectProvince(-1)" class="pointer mr-25 flex-grow-0"
|
||||
:class="[checkProvinceList.length === 0 ? 'text-main selected-cate' : '']">全国
|
||||
</text>
|
||||
<view v-for="(item, index) in provinceData" :key="index" class="flex-grow-0 pointer mr-25">
|
||||
<text @click="selectProvince(item.code)"
|
||||
:class="[checkProvinceList.includes(item.code)? 'text-main selected-cate' : '']"
|
||||
v-if="index < 10 || showAllProvince">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text @click="showAllProvince = !showAllProvince" class="pointer mr-25">查看更多
|
||||
</text>
|
||||
</view>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="已选择">
|
||||
<view class="tags">
|
||||
<el-tag v-for="(item, index) in checkCategoryArr" :key="index">{{ item.name }}</el-tag>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</view>
|
||||
|
||||
<view class="w-1200 flex justify-start items-start flex-wrap m-a">
|
||||
<view v-for="(item, index) in companyList" :key="index" class="w-50p company-item">
|
||||
<view class="p-40">
|
||||
<view class="rounded shadow p-50 bg-white flex flex-col justify-start items-start">
|
||||
<view class="flex justify-end w-100p">
|
||||
<image class="authed" src="/static/images/authed.png" mode="aspectFit"
|
||||
v-if="item.authStatus === 1"/>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<image :src="item.businessCard.logo" class="logo"/>
|
||||
<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>
|
||||
</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>
|
||||
<view class="flex justify-start items-center mt-20">
|
||||
<i class="el-icon-phone mr-15"/>
|
||||
<text>电话:{{ item.businessCard.phone }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mt-20">
|
||||
<i class="el-icon-mobile mr-15"/>
|
||||
<text>手机:{{ item.businessCard.mobile }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mt-20">
|
||||
<i class="el-icon-message mr-15"/>
|
||||
<text>邮箱:{{ item.businessCard.email }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mt-20">
|
||||
<i class="el-icon-data-board mr-15"/>
|
||||
<text>网址:{{ item.businessCard.website }}</text>
|
||||
</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>
|
||||
</view>
|
||||
<el-button type="primary" @click="showInfo(item._id)">查看详情</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
data() {
|
||||
return {
|
||||
categoryTreeData: [],
|
||||
allChildCate: [],
|
||||
clickedCateIndex: null,
|
||||
checkCategoryList: [],
|
||||
keyword: '',
|
||||
provinceData: provinces,
|
||||
checkProvinceList: [],
|
||||
showAllProvince: false,
|
||||
companyList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCategoryTreeData() {
|
||||
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)
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
selectCate(id) {
|
||||
const index = this.checkCategoryList.indexOf(id)
|
||||
if (index === -1) this.checkCategoryList.push(id)
|
||||
else this.checkCategoryList.splice(index, 1)
|
||||
this.search(1)
|
||||
},
|
||||
selectProvince(code) {
|
||||
if (code === -1) this.checkProvinceList = []
|
||||
else {
|
||||
const index = this.checkProvinceList.indexOf(code)
|
||||
if (index === -1) this.checkProvinceList.push(code)
|
||||
else this.checkProvinceList.splice(index, 1)
|
||||
}
|
||||
this.search(1)
|
||||
},
|
||||
search() {
|
||||
|
||||
},
|
||||
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
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
showInfo(id){
|
||||
vk.navigateTo({
|
||||
url: `/pages/yellowPage/info?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getCategoryTreeData()
|
||||
this.getCompany()
|
||||
},
|
||||
computed: {
|
||||
checkCategoryArr() {
|
||||
const arr = []
|
||||
this.allChildCate.forEach(item => {
|
||||
if (this.checkCategoryList.includes(item._id)) arr.push(item)
|
||||
})
|
||||
this.provinceData.forEach(item => {
|
||||
if (this.checkProvinceList.includes(item.code)) {
|
||||
arr.push(item)
|
||||
}
|
||||
})
|
||||
return arr
|
||||
}
|
||||
}
|
||||
}
|
||||
</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;
|
||||
}
|
||||
}
|
||||
|
||||
.paginatio {
|
||||
float: none;
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.post-btn {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.post-btn:hover {
|
||||
background: #f6eae9;
|
||||
color: #A92924;
|
||||
}
|
||||
|
||||
.selected-cate {
|
||||
border-bottom: 2px solid #BD3124;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.child-cate {
|
||||
background-color: #DB8382;
|
||||
color: white;
|
||||
margin-top: 10rpx;
|
||||
border-radius: 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.company-item {
|
||||
font-size: 16px;
|
||||
|
||||
.authed {
|
||||
height: 40px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 166 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 131 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -12,7 +12,7 @@ module.exports = {
|
||||
let { uid } = data;
|
||||
let res = { code: 0, msg: "" };
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
const {id, authStatus} = data
|
||||
const {id, authStatus, refuseReason} = data
|
||||
const fadadaConfirm = authStatus === 1
|
||||
await vk.baseDao.updateById({
|
||||
dbName: 'uni-id-users',
|
||||
@@ -20,6 +20,7 @@ module.exports = {
|
||||
dataJson: {
|
||||
authStatus,
|
||||
fadadaConfirm,
|
||||
refuseReason,
|
||||
authTime: Date.now()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,34 +12,52 @@ module.exports = {
|
||||
let {uid} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
data.transactionId = vk.pubfn.createOrderNo("C", 20)
|
||||
const contractId = await vk.baseDao.add({
|
||||
dbName: 'jjx-contract',
|
||||
dataJson: {
|
||||
...data, ...{
|
||||
status: 0,
|
||||
userId: uid
|
||||
userId: uid,
|
||||
changeNum: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
await vk.daoCenter.userContractDao.adds([
|
||||
{
|
||||
transactionId: data.transactionId,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
userId: uid,
|
||||
role: 'buyer',
|
||||
sign: false,
|
||||
contractId
|
||||
contractId,
|
||||
},
|
||||
{
|
||||
transactionId: data.transactionId,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
userId: data.seller,
|
||||
role: 'seller',
|
||||
sign: false,
|
||||
contractId
|
||||
contractId,
|
||||
}
|
||||
])
|
||||
|
||||
if (data.type === 'process') {
|
||||
await vk.baseDao.updateById({
|
||||
dbName: 'jjx-process-sheet',
|
||||
id: data.sheetId,
|
||||
dataJson: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
await vk.baseDao.updateById({
|
||||
dbName: 'jjx-process-quote',
|
||||
id: data.quoteId,
|
||||
dataJson: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
|
||||
@@ -22,6 +22,13 @@ module.exports = {
|
||||
// msg: '请在个人中心上传印章'
|
||||
// }
|
||||
// }
|
||||
|
||||
const contract = await vk.baseDao.findByWhereJson({
|
||||
dbName: dbName.contract,
|
||||
whereJson: {
|
||||
_id: contractId,
|
||||
}
|
||||
})
|
||||
|
||||
// 获取合同信息
|
||||
const userContract = await vk.baseDao.selects({
|
||||
@@ -54,7 +61,7 @@ module.exports = {
|
||||
|
||||
const fadadaUrl = await pubFun.fadadaUrl('extsign.api', {
|
||||
transaction_id: userContract.transactionId,
|
||||
contract_id: userContract.contract.fadadaContractId,
|
||||
contract_id: contract.transactionId,
|
||||
customer_id: fadadaCustomerId,
|
||||
doc_title: userContract.contract.docTitle,
|
||||
sign_keyword: sign_keyword,
|
||||
|
||||
@@ -1,58 +1,59 @@
|
||||
'use strict';
|
||||
const dbName = require('../../../../dao/config.js')
|
||||
module.exports = {
|
||||
/**
|
||||
* 获取我的合同列表
|
||||
* @url client/enquiry/contract/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, pageIndex, pageSize, tradeMethod, status } = data;
|
||||
let res = { code: 0, msg: "" };
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
const lastWhereJson = {}
|
||||
const whereJson = {
|
||||
userId: uid
|
||||
}
|
||||
if(tradeMethod != null) {
|
||||
lastWhereJson['contract.tradeMethod'] = tradeMethod
|
||||
}
|
||||
|
||||
if(status != null) {
|
||||
lastWhereJson['contract.status'] = status
|
||||
}
|
||||
/**
|
||||
* 获取我的合同列表
|
||||
* @url client/enquiry/contract/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, pageIndex, pageSize, tradeMethod, status} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
res = await vk.daoCenter.userContractDao.selects({
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize
|
||||
},
|
||||
whereJson: whereJson,
|
||||
foreignDB:[
|
||||
{
|
||||
dbName: dbName.contract,
|
||||
localKey:"contractId", // 主表外键字段名
|
||||
foreignKey: "_id", // 副表外键字段名
|
||||
as: "contract",
|
||||
limit: 1, // 当limit = 1时,以对象形式返回,否则以数组形式返回
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: dbName.userContract,
|
||||
localKey:"_id", // 主表外键字段名
|
||||
foreignKey: "contractId", // 副表外键字段名
|
||||
as: "partyList",
|
||||
limit: 1000,
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
lastWhereJson: lastWhereJson
|
||||
})
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
const lastWhereJson = {}
|
||||
const whereJson = {
|
||||
userId: uid
|
||||
}
|
||||
if (tradeMethod != null) {
|
||||
lastWhereJson['contract.tradeMethod'] = tradeMethod
|
||||
}
|
||||
|
||||
if (status != null) {
|
||||
lastWhereJson['contract.status'] = status
|
||||
}
|
||||
|
||||
res = await vk.daoCenter.userContractDao.selects({
|
||||
data: {
|
||||
pageIndex,
|
||||
pageSize
|
||||
},
|
||||
whereJson: whereJson,
|
||||
sortArr: [{"name": "_id", "type": "desc"}],
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: dbName.contract,
|
||||
localKey: "contractId", // 主表外键字段名
|
||||
foreignKey: "_id", // 副表外键字段名
|
||||
as: "contract",
|
||||
limit: 1, // 当limit = 1时,以对象形式返回,否则以数组形式返回
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: dbName.userContract,
|
||||
localKey: "_id", // 主表外键字段名
|
||||
foreignKey: "contractId", // 副表外键字段名
|
||||
as: "partyList",
|
||||
limit: 1000,
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
lastWhereJson: lastWhereJson
|
||||
})
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,64 +1,73 @@
|
||||
'use strict';
|
||||
const dbName = require('../../../../dao/config.js')
|
||||
module.exports = {
|
||||
/**
|
||||
* 发起/创建合同
|
||||
* @url client/contract/kh/launch 前端调用的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, contractId,title,contractFile,otherFile,signEndDate,buyerSignKeyword, sellerSignKeyword } = data;
|
||||
let res = { code: 0, msg: "" };
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
const contract = await vk.baseDao.findByWhereJson({
|
||||
dbName: dbName.contract,
|
||||
whereJson: {
|
||||
_id: contractId,
|
||||
userId: uid
|
||||
}
|
||||
})
|
||||
console.log('contract: ',dbName.contract,uid);
|
||||
const uploaddocs = await pubFun.fadada('uploaddocs.api', {
|
||||
contract_id: contract.fadadaContractId,
|
||||
doc_title: title,
|
||||
doc_url: contractFile,
|
||||
// file: doc_url,
|
||||
doc_type: '.pdf'
|
||||
})
|
||||
|
||||
if(uploaddocs.code == 1000) {
|
||||
await vk.baseDao.update({
|
||||
dbName: dbName.contract,
|
||||
whereJson: {
|
||||
_id: contractId,
|
||||
userId: uid
|
||||
},
|
||||
dataJson: {
|
||||
status: 1,
|
||||
docTitle: title,
|
||||
signEndDate,
|
||||
otherFile,
|
||||
contractBase: contractFile,
|
||||
buyerSignKeyword,
|
||||
sellerSignKeyword
|
||||
}
|
||||
})
|
||||
|
||||
res.data = uploaddocs.result
|
||||
}else {
|
||||
return {
|
||||
code: -1,
|
||||
msg: uploaddocs.msg
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起/创建合同
|
||||
* @url client/contract/kh/launch 前端调用的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, contractId, title, contractFile, otherFile, signEndDate, buyerSignKeyword, sellerSignKeyword} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
const contract = await vk.baseDao.findByWhereJson({
|
||||
dbName: dbName.contract,
|
||||
whereJson: {
|
||||
_id: contractId,
|
||||
userId: uid
|
||||
}
|
||||
})
|
||||
console.log('contract: ', contract);
|
||||
const newTransactionId = vk.pubfn.createOrderNo("C", 20)
|
||||
|
||||
await vk.baseDao.update({
|
||||
dbName: dbName.contract,
|
||||
whereJson: {
|
||||
_id: contractId
|
||||
},
|
||||
dataJson: {
|
||||
transactionId: newTransactionId,
|
||||
}
|
||||
})
|
||||
const uploaddocs = await pubFun.fadada('uploaddocs.api', {
|
||||
contract_id: newTransactionId,
|
||||
doc_title: title,
|
||||
doc_url: contractFile,
|
||||
// file: doc_url,
|
||||
doc_type: '.pdf'
|
||||
})
|
||||
if (parseInt(uploaddocs.code) === 1000) {
|
||||
await vk.baseDao.update({
|
||||
dbName: dbName.contract,
|
||||
whereJson: {
|
||||
_id: contractId,
|
||||
userId: uid
|
||||
},
|
||||
dataJson: {
|
||||
status: 1,
|
||||
docTitle: title,
|
||||
signEndDate,
|
||||
otherFile,
|
||||
contractBase: contractFile,
|
||||
buyerSignKeyword,
|
||||
sellerSignKeyword
|
||||
}
|
||||
})
|
||||
|
||||
res.data = uploaddocs.result
|
||||
} else {
|
||||
return {
|
||||
code: -1,
|
||||
msg: uploaddocs.msg
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,13 +23,10 @@ module.exports = {
|
||||
})
|
||||
|
||||
const viewRes = pubFun.fadadaUrl('viewContract.api', {
|
||||
contract_id: contract.fadadaContractId
|
||||
contract_id: contract.transactionId
|
||||
})
|
||||
|
||||
res.data = viewRes
|
||||
|
||||
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
|
||||
@@ -19,13 +19,13 @@ module.exports = {
|
||||
let managerName = ''
|
||||
let managerMobile = ''
|
||||
|
||||
if (accountType == 1) {
|
||||
if (accountType === 1 && person.personName && person.mobile) {
|
||||
subjectName = person.personName
|
||||
subjectMobile = person.mobile
|
||||
} else {
|
||||
subjectName = company.companyName
|
||||
subjectMobile = company.legalMobile
|
||||
if (manager.mobile && manager.personName) {
|
||||
if (manager && manager.mobile && manager.personName) {
|
||||
managerName = manager.personName
|
||||
managerMobile = manager.mobile
|
||||
}
|
||||
|
||||
+148
-133
@@ -2,144 +2,159 @@
|
||||
|
||||
const dbName = require('../../../../../dao/config.js')
|
||||
module.exports = {
|
||||
/**
|
||||
* 同意合作
|
||||
* @url client/enquiry/quote/kh/confirmQuote 前端调用的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,
|
||||
quoteId
|
||||
} = data;
|
||||
let res = {
|
||||
code: 0,
|
||||
msg: ""
|
||||
};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
/**
|
||||
* 同意合作
|
||||
* @url client/enquiry/quote/kh/confirmQuote 前端调用的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,
|
||||
quoteId
|
||||
} = data;
|
||||
let res = {
|
||||
code: 0,
|
||||
msg: ""
|
||||
};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
// 修改报价单状态
|
||||
const quote = await vk.baseDao.updateAndReturn({
|
||||
dbName: 'jjx-enquiry-quote',
|
||||
whereJson: {
|
||||
_id: quoteId,
|
||||
status: 0
|
||||
},
|
||||
dataJson: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
|
||||
if (!quote) {
|
||||
return {
|
||||
code: -1,
|
||||
msg: '请刷新页面'
|
||||
}
|
||||
}
|
||||
// 获取乙方信息
|
||||
const quoteUser = await vk.baseDao.select({
|
||||
dbName: dbName.user,
|
||||
getMain: true,
|
||||
getOne: true,
|
||||
whereJson: {
|
||||
_id: quote.userId
|
||||
}
|
||||
})
|
||||
// 修改报价单状态
|
||||
const quote = await vk.baseDao.updateAndReturn({
|
||||
dbName: 'jjx-enquiry-quote',
|
||||
whereJson: {
|
||||
_id: quoteId,
|
||||
status: 0
|
||||
},
|
||||
dataJson: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
|
||||
// 获取商品信息
|
||||
const productTitle = quote.productList.map(item => {
|
||||
return item.name
|
||||
}).join("/")
|
||||
|
||||
|
||||
// 获取询价单信息
|
||||
const sheet = await vk.baseDao.selects({
|
||||
dbName: dbName.enquirySheet,
|
||||
whereJson: {_id: quote.sheetId},
|
||||
getMain: true,
|
||||
getOne: true
|
||||
})
|
||||
|
||||
const fadadaContractId = vk.pubfn.createOrderNo("E", 20)
|
||||
// 上传合同模板并填充
|
||||
// if(sheet.signMethod == 0 && sheet.contractType == 0) {
|
||||
// pubFun.fadada('generate_contract.api', {
|
||||
// template_id: '20231120',
|
||||
// contract_id: fadadaContractId,
|
||||
// parameter_map: JSON.stringify({
|
||||
// jiaName: userInfo.accountType == 1?userInfo.person.personName: userInfo.company.companyName,
|
||||
// jiaDate: '',
|
||||
// jiaPhone: '',
|
||||
// yiName: userInfo.accountType == 1?userInfo.person.personName: userInfo.company.companyName,
|
||||
// yiDate: '',
|
||||
// yiPhone: '',
|
||||
// sellerSupplement: '',
|
||||
// }),
|
||||
// })
|
||||
// }
|
||||
if (!quote) {
|
||||
return {
|
||||
code: -1,
|
||||
msg: '请刷新页面'
|
||||
}
|
||||
}
|
||||
// 获取乙方信息
|
||||
const quoteUser = await vk.baseDao.select({
|
||||
dbName: dbName.user,
|
||||
getMain: true,
|
||||
getOne: true,
|
||||
whereJson: {
|
||||
_id: quote.userId
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 新增合同记录
|
||||
const contractId = await vk.baseDao.add({
|
||||
dbName: 'jjx-contract',
|
||||
dataJson: {
|
||||
fadadaContractId: fadadaContractId,
|
||||
contractBase: '', // 原始合同
|
||||
contractHistory: [], // 历史合同
|
||||
contractFinal: '', // 归档合同
|
||||
status: 0,
|
||||
userId: uid,
|
||||
type: 'enquiry',
|
||||
quoteId: quoteId,
|
||||
sheetId: quote.sheetId,
|
||||
productList: quote.productList,
|
||||
productTitle,
|
||||
tradeMethod: quote.tradeMethod,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
contractType: sheet.contractType,
|
||||
signMethod: sheet.signMethod,
|
||||
sellerSupplement: sheet.sellerSupplement,
|
||||
}
|
||||
})
|
||||
|
||||
// 上传合同模板
|
||||
|
||||
//新增 用户与合同的关联记录
|
||||
await vk.daoCenter.userContractDao.adds([
|
||||
{
|
||||
transactionId: vk.pubfn.createOrderNo("S", 20),
|
||||
userId: uid,
|
||||
role: 'buyer',
|
||||
sign: false,
|
||||
contractId
|
||||
},
|
||||
{
|
||||
transactionId: vk.pubfn.createOrderNo("S", 20),
|
||||
userId: quote.userId,
|
||||
role: 'seller',
|
||||
sign: false,
|
||||
contractId
|
||||
}
|
||||
])
|
||||
// 获取询价单信息
|
||||
const sheet = await vk.baseDao.selects({
|
||||
dbName: dbName.enquirySheet,
|
||||
whereJson: {_id: quote.sheetId},
|
||||
getMain: true,
|
||||
getOne: true
|
||||
})
|
||||
|
||||
// 获取商品信息
|
||||
const productTitle = sheet.productList.map(item => {
|
||||
return item.goodsName
|
||||
}).join("/")
|
||||
|
||||
const fadadaContractId = vk.pubfn.createOrderNo("E", 20)
|
||||
// 上传合同模板并填充
|
||||
// if(sheet.signMethod == 0 && sheet.contractType == 0) {
|
||||
// pubFun.fadada('generate_contract.api', {
|
||||
// template_id: '20231120',
|
||||
// contract_id: fadadaContractId,
|
||||
// parameter_map: JSON.stringify({
|
||||
// jiaName: userInfo.accountType == 1?userInfo.person.personName: userInfo.company.companyName,
|
||||
// jiaDate: '',
|
||||
// jiaPhone: '',
|
||||
// yiName: userInfo.accountType == 1?userInfo.person.personName: userInfo.company.companyName,
|
||||
// yiDate: '',
|
||||
// yiPhone: '',
|
||||
// sellerSupplement: '',
|
||||
// }),
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
// 新增合同记录
|
||||
const contractId = await vk.baseDao.add({
|
||||
dbName: 'jjx-contract',
|
||||
dataJson: {
|
||||
fadadaContractId: fadadaContractId,
|
||||
contractBase: '', // 原始合同
|
||||
contractHistory: [], // 历史合同
|
||||
contractFinal: '', // 归档合同
|
||||
status: 0,
|
||||
userId: uid,
|
||||
type: 'enquiry',
|
||||
quoteId: quoteId,
|
||||
sheetId: quote.sheetId,
|
||||
productList: quote.productList,
|
||||
productTitle,
|
||||
tradeMethod: quote.tradeMethod,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
contractType: sheet.contractType,
|
||||
signMethod: sheet.signMethod,
|
||||
sellerSupplement: sheet.sellerSupplement,
|
||||
transactionId: vk.pubfn.createOrderNo("C", 20),
|
||||
amount: quote.totalPrice,
|
||||
}
|
||||
})
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
await vk.baseDao.updateById({
|
||||
dbName: 'jjx-enquiry-sheet',
|
||||
id: quote.sheetId,
|
||||
dataJson: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
await vk.baseDao.updateById({
|
||||
dbName: 'jjx-enquiry-quote',
|
||||
id: quoteId,
|
||||
dataJson: {
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
|
||||
// 上传合同模板
|
||||
|
||||
//新增 用户与合同的关联记录
|
||||
await vk.daoCenter.userContractDao.adds([
|
||||
{
|
||||
transactionId: vk.pubfn.createOrderNo("E", 20),
|
||||
userId: uid,
|
||||
role: 'buyer',
|
||||
sign: false,
|
||||
contractId
|
||||
},
|
||||
{
|
||||
transactionId: vk.pubfn.createOrderNo("E", 20),
|
||||
userId: quote.userId,
|
||||
role: 'seller',
|
||||
sign: false,
|
||||
contractId
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,8 @@ module.exports = {
|
||||
...data,
|
||||
...{
|
||||
answerNumber: 0,
|
||||
userId: uid
|
||||
userId: uid,
|
||||
status: 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,60 +1,78 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
/**
|
||||
* 获取用户发布的询价单
|
||||
* @url client/enquiry/sheet/pub/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, userId,pageIndex,pageSize,keyword,categoryIds,provinceCodes } = data;
|
||||
let res = { code: 0, msg: "" };
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
let dbName = "jjx-enquiry-sheet";
|
||||
|
||||
|
||||
let whereJson = {};
|
||||
|
||||
if(vk.pubfn.isNotNull(keyword)) {
|
||||
whereJson.name = new RegExp(keyword)
|
||||
}
|
||||
if(vk.pubfn.isNotNull(categoryIds)) {
|
||||
whereJson.categoryIds = _.in(categoryIds)
|
||||
}
|
||||
|
||||
if(vk.pubfn.isNotNull(provinceCodes)) {
|
||||
whereJson['address.province.code'] = _.in(provinceCodes)
|
||||
}
|
||||
|
||||
res = await vk.baseDao.selects({
|
||||
dbName,
|
||||
pageIndex,
|
||||
pageSize,
|
||||
whereJson,
|
||||
foreignDB: [
|
||||
{
|
||||
dbName:"uni-id-users",
|
||||
localKey:"userId",
|
||||
foreignKey:"_id",
|
||||
as:"user",
|
||||
limit:1, // limit=1则以对象形式返回
|
||||
fieldJson:{
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true
|
||||
},
|
||||
person: {
|
||||
personName: true
|
||||
},
|
||||
businessCard: true,
|
||||
accountType: true,
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 获取用户发布的询价单
|
||||
* @url client/enquiry/sheet/pub/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, pageIndex, pageSize, keyword, categoryIds, provinceCodes, formData} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
let dbName = "jjx-enquiry-sheet";
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
let whereJson = {};
|
||||
|
||||
if (vk.pubfn.isNotNull(keyword)) {
|
||||
whereJson.name = new RegExp(keyword)
|
||||
}
|
||||
|
||||
if (data.userId && vk.pubfn.isNotNull(data.userId)) {
|
||||
whereJson.userId = data.userId
|
||||
}else {
|
||||
whereJson.status = 0
|
||||
}
|
||||
|
||||
if (formData && formData.hasOwnProperty('userId') && vk.pubfn.isNotNull(formData.userId)) {
|
||||
whereJson.userId = formData.userId
|
||||
}else {
|
||||
whereJson.status = 0
|
||||
}
|
||||
|
||||
if (formData && formData.hasOwnProperty('companyList') && vk.pubfn.isNotNull(formData.companyList)) {
|
||||
whereJson.userId = _.in(formData.companyList)
|
||||
}
|
||||
|
||||
if (formData && formData.hasOwnProperty('categoryIds') && vk.pubfn.isNotNull(formData.categoryIds)) {
|
||||
whereJson.categoryIds = _.in(formData.categoryIds)
|
||||
}
|
||||
|
||||
if (vk.pubfn.isNotNull(provinceCodes)) {
|
||||
whereJson['address.province.code'] = _.in(provinceCodes)
|
||||
}
|
||||
|
||||
res = await vk.baseDao.selects({
|
||||
dbName,
|
||||
pageIndex,
|
||||
pageSize,
|
||||
whereJson,
|
||||
sortArr: [{name: "_add_time", type: "desc"}],
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: "uni-id-users",
|
||||
localKey: "userId",
|
||||
foreignKey: "_id",
|
||||
as: "user",
|
||||
limit: 1, // limit=1则以对象形式返回
|
||||
fieldJson: {
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true
|
||||
},
|
||||
person: {
|
||||
personName: true
|
||||
},
|
||||
businessCard: true,
|
||||
accountType: true,
|
||||
},
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
const rows = res.rows
|
||||
rows.forEach((row, rowIndex) => {
|
||||
@@ -71,13 +89,13 @@ module.exports = {
|
||||
const index = res.rows.indexOf(item);
|
||||
res.rows[index].quoteNum = await vk.baseDao.count({
|
||||
dbName: 'jjx-enquiry-quote',
|
||||
whereJson:{
|
||||
whereJson: {
|
||||
sheetId: item._id
|
||||
}
|
||||
})
|
||||
}
|
||||
res.rows = rows
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ var cloudObject = {
|
||||
config,
|
||||
pubFun
|
||||
} = this.getUtil(); // 获取工具包
|
||||
console.log('fadada res:', data)
|
||||
const {
|
||||
customerId
|
||||
} = data;
|
||||
@@ -90,7 +91,7 @@ var cloudObject = {
|
||||
res = await pubFun.fadada('find_personCertInfo.api', {
|
||||
verified_serialno: user.fadadaVerify.transactionNo
|
||||
})
|
||||
|
||||
console.log('fadada check res:', res)
|
||||
// 认证结果
|
||||
const {person} = res.data
|
||||
if(res.code !== 1 || person.status !== 2) {
|
||||
@@ -100,7 +101,7 @@ var cloudObject = {
|
||||
res = await pubFun.fadada('find_companyCertInfo.api', {
|
||||
verified_serialno: user.fadadaVerify.transactionNo
|
||||
})
|
||||
|
||||
console.log('fadada check res:', res)
|
||||
// 认证结果
|
||||
const {company, manager} = res.data
|
||||
if(res.code !== 1 || company.status !== 4 || manager.status !== 2) {
|
||||
@@ -179,7 +180,6 @@ var cloudObject = {
|
||||
whereJson: {
|
||||
_id: userContract.contractId,
|
||||
status: 1,
|
||||
|
||||
},
|
||||
dataJson: {
|
||||
signCount: _.inc(1),
|
||||
@@ -187,6 +187,17 @@ var cloudObject = {
|
||||
}
|
||||
})
|
||||
|
||||
// 用户交易额
|
||||
await vk.baseDao.update({
|
||||
dbName: "uni-id-users",
|
||||
whereJson: {
|
||||
_id: userContract.userId
|
||||
},
|
||||
dataJson: {
|
||||
transactionAmount: _.inc(contract.amount)
|
||||
}
|
||||
})
|
||||
|
||||
if (contract.signCount == contract.partyCount) {
|
||||
contract = await vk.daoCenter.contractDao.updateAndReturn({
|
||||
db: transaction,
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = {
|
||||
...data,
|
||||
...{
|
||||
userId: data.uid,
|
||||
answerNumber: 0
|
||||
answerNumber: 0,
|
||||
status: 0,
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -23,15 +23,17 @@ module.exports = {
|
||||
|
||||
res.quoteList = await vk.baseDao.selects({
|
||||
dbName: quoteDbName,
|
||||
sheetId: data.id,
|
||||
whereJson: {
|
||||
sheetId: data.id,
|
||||
},
|
||||
foreignDB: [
|
||||
{
|
||||
dbName:"uni-id-users",
|
||||
localKey:"userId",
|
||||
foreignKey:"_id",
|
||||
as:"user",
|
||||
limit:1, // limit=1则以对象形式返回
|
||||
fieldJson:{
|
||||
dbName: "uni-id-users",
|
||||
localKey: "userId",
|
||||
foreignKey: "_id",
|
||||
as: "user",
|
||||
limit: 1, // limit=1则以对象形式返回
|
||||
fieldJson: {
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true,
|
||||
|
||||
@@ -10,7 +10,7 @@ module.exports = {
|
||||
main: async (event) => {
|
||||
let {data = {}, userInfo, util, filterResponse, originalParam} = event;
|
||||
let {customUtil, uniID, config, pubFun, vk, db, _} = util;
|
||||
let {uid, userId, pageIndex, pageSize, keyword, categoryIds, provinceCodes} = data;
|
||||
let {uid, userId, pageIndex, pageSize, keyword, categoryIds, provinceCodes, formData} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
const dbName = "jjx-process-sheet";
|
||||
@@ -21,6 +21,16 @@ module.exports = {
|
||||
}
|
||||
if (vk.pubfn.isNotNull(userId)) {
|
||||
whereJson.userId = userId
|
||||
}else {
|
||||
whereJson.status = 0
|
||||
}
|
||||
|
||||
if (formData && formData.hasOwnProperty('companyList') && vk.pubfn.isNotNull(formData.companyList)) {
|
||||
whereJson.userId = _.in(formData.companyList)
|
||||
}
|
||||
|
||||
if (formData && formData.hasOwnProperty('categoryIds') && vk.pubfn.isNotNull(formData.categoryIds)) {
|
||||
whereJson.categoryIds = _.in(formData.categoryIds)
|
||||
}
|
||||
|
||||
if (vk.pubfn.isNotNull(categoryIds)) {
|
||||
|
||||
@@ -1,46 +1,57 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
/**
|
||||
* 新增或更新现货
|
||||
* @url client/product/goods/kh/addUpdate 前端调用的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 dbName = 'jjx-spot-goods'
|
||||
let {_id,name,categoryIds,address,stock,files} = data
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
let info = await vk.baseDao.findByWhereJson({
|
||||
dbName,
|
||||
whereJson:{
|
||||
userId: uid,
|
||||
}
|
||||
});
|
||||
|
||||
if(info == null) {
|
||||
await vk.baseDao.add({
|
||||
dbName,
|
||||
dataJson:{
|
||||
name,categoryIds,address,stock,files,userId: uid,sort: 0
|
||||
}
|
||||
});
|
||||
}else {
|
||||
await vk.baseDao.updateById({
|
||||
dbName,
|
||||
id: info._id,
|
||||
dataJson:{
|
||||
name,categoryIds,address,stock,files
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 新增或更新现货
|
||||
* @url client/product/goods/kh/addUpdate 前端调用的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 dbName = 'jjx-spot-goods'
|
||||
let {_id, name, categoryIds, address, stock, files} = data
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
let info = await vk.baseDao.findByWhereJson({
|
||||
dbName,
|
||||
whereJson: {
|
||||
userId: uid,
|
||||
}
|
||||
});
|
||||
|
||||
if (info == null) {
|
||||
await vk.baseDao.add({
|
||||
dbName,
|
||||
dataJson: {
|
||||
name,
|
||||
categoryIds,
|
||||
address,
|
||||
stock,
|
||||
files,
|
||||
userId: uid,
|
||||
sort: 0,
|
||||
status: 0
|
||||
}
|
||||
});
|
||||
} else {
|
||||
await vk.baseDao.updateById({
|
||||
dbName,
|
||||
id: info._id,
|
||||
dataJson: {
|
||||
name,
|
||||
categoryIds,
|
||||
address,
|
||||
stock,
|
||||
files,
|
||||
status: 0
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,75 +1,93 @@
|
||||
'use strict';
|
||||
const dbName = 'jjx-spot-goods'
|
||||
module.exports = {
|
||||
/**
|
||||
* XXXnameXXX
|
||||
* @url client/spot/goods/kh/getDetail 前端调用的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 {
|
||||
_id
|
||||
} = data
|
||||
res.data = await vk.baseDao.selects({
|
||||
dbName,
|
||||
getOne: true,
|
||||
getMain: true,
|
||||
// 主表where条件
|
||||
whereJson: {
|
||||
_id: _id
|
||||
},
|
||||
foreignDB: [{
|
||||
dbName: "uni-id-users",
|
||||
localKey: "userId",
|
||||
foreignKey: "_id",
|
||||
as: "user",
|
||||
limit: 1, // limit=1则以对象形式返回
|
||||
fieldJson: {
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true
|
||||
},
|
||||
person: {
|
||||
personName: true
|
||||
},
|
||||
businessCard: true,
|
||||
accountType: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
dbName: "jjx-goods-cooperate",
|
||||
localKey: "_id",
|
||||
foreignKey: "goodsId",
|
||||
as: "cooperateList",
|
||||
limit: 500, // limit=1则以对象形式返回
|
||||
}
|
||||
]
|
||||
});
|
||||
/**
|
||||
* XXXnameXXX
|
||||
* @url client/spot/goods/kh/getDetail 前端调用的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 {
|
||||
_id
|
||||
} = data
|
||||
res.data = await vk.baseDao.selects({
|
||||
dbName,
|
||||
getOne: true,
|
||||
getMain: true,
|
||||
// 主表where条件
|
||||
whereJson: {
|
||||
_id: _id
|
||||
},
|
||||
foreignDB: [{
|
||||
dbName: "uni-id-users",
|
||||
localKey: "userId",
|
||||
foreignKey: "_id",
|
||||
as: "user",
|
||||
limit: 1, // limit=1则以对象形式返回
|
||||
fieldJson: {
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true
|
||||
},
|
||||
person: {
|
||||
personName: true
|
||||
},
|
||||
businessCard: true,
|
||||
accountType: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
dbName: "jjx-goods-cooperate",
|
||||
localKey: "_id",
|
||||
foreignKey: "goodsId",
|
||||
as: "cooperateList",
|
||||
limit: 500, // limit=1则以对象形式返回
|
||||
foreignDB: [{
|
||||
dbName: "uni-id-users",
|
||||
localKey: "userId",
|
||||
foreignKey: "_id",
|
||||
as: "user",
|
||||
limit: 1, // limit=1则以对象形式返回
|
||||
fieldJson: {
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true
|
||||
},
|
||||
person: {
|
||||
personName: true
|
||||
},
|
||||
businessCard: true,
|
||||
accountType: true,
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,33 @@
|
||||
'use strict';
|
||||
const dbName = require("../../../../dao/config");
|
||||
module.exports = {
|
||||
/**
|
||||
* 企业用户列表
|
||||
* @url client/user/pub/getCompany 前端调用的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: "" };
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
/**
|
||||
* 企业用户列表
|
||||
* @url client/user/pub/getCompany 前端调用的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.getTableData({
|
||||
dbName: dbName.user,
|
||||
data,
|
||||
whereJson:{
|
||||
fadadaConfirm: true,
|
||||
accountType: 2
|
||||
whereJson: {
|
||||
// fadadaConfirm: true,
|
||||
...data,
|
||||
...{
|
||||
accountType: 2,
|
||||
businessCard: _.exists(true),
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +1,50 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
/**
|
||||
* 获取企业详情
|
||||
* @url client/user/pub/getDetail 前端调用的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, _id } = data;
|
||||
let res = { code: 0, msg: "" };
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
const dbName = "uni-id-users"
|
||||
res.data = await vk.baseDao.selects({
|
||||
dbName,
|
||||
getOne: true,
|
||||
getMain: true,
|
||||
whereJson: {
|
||||
_id
|
||||
},
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: 'jjx-spot-goods',
|
||||
localKey:"_id",
|
||||
foreignKey:"userId",
|
||||
as:"goodsList",
|
||||
},
|
||||
{
|
||||
dbName: 'jjx-enquiry-sheet',
|
||||
localKey:"_id",
|
||||
foreignKey:"userId",
|
||||
as:"goodsList",
|
||||
},
|
||||
// {
|
||||
// dbName: 'jjx-enquiry-sheet',
|
||||
// localKey:"_id",
|
||||
// foreignKey:"userId",
|
||||
// as:"goodsList",
|
||||
// }
|
||||
]
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取企业详情
|
||||
* @url client/user/pub/getDetail 前端调用的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, _id} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
|
||||
const dbName = "uni-id-users"
|
||||
res.data = await vk.baseDao.selects({
|
||||
dbName,
|
||||
getOne: true,
|
||||
getMain: true,
|
||||
whereJson: {
|
||||
_id
|
||||
},
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: 'jjx-spot-goods',
|
||||
localKey: "_id",
|
||||
foreignKey: "userId",
|
||||
as: "spotList",
|
||||
},
|
||||
{
|
||||
dbName: 'jjx-enquiry-sheet',
|
||||
localKey: "_id",
|
||||
foreignKey: "userId",
|
||||
as: "enquiryList",
|
||||
},
|
||||
{
|
||||
dbName: 'jjx-process-sheet',
|
||||
localKey: "_id",
|
||||
foreignKey: "userId",
|
||||
as: "processList",
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ module.exports = {
|
||||
company,
|
||||
accountType: accountType,
|
||||
nickname: accountType == 1?person.personName: company.companyName,
|
||||
authStatus: -1
|
||||
}
|
||||
});
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user