1、新增黄页

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