杨阁辉 4 years ago
parent
commit
c827881975
8 changed files with 54 additions and 26 deletions
  1. 4
      components/not-logged/not-logged.vue
  2. 3
      pages.json
  3. 9
      pages/add-record/index.vue
  4. 12
      pages/follow-up-records/index.vue
  5. 16
      pages/mall/index.vue
  6. 17
      pages/mine/index.vue
  7. 18
      pages/trade/index.vue
  8. 1
      pages/trade/quotationList.vue

4
components/not-logged/not-logged.vue

@ -42,8 +42,8 @@
margin-top: 40%; margin-top: 40%;
} }
.view-image{ .view-image{
width: 100rpx;
height: 100rpx;
width: 750rpx;
height: 456rpx;
} }
.login-btn{ .login-btn{
width: 90%; width: 90%;

3
pages.json

@ -330,8 +330,7 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
],
],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",

9
pages/add-record/index.vue

@ -78,14 +78,17 @@ export default {
form: { form: {
address: '', address: '',
content: '', content: '',
customerEnterpriseId: this.$store.state.supplierInfo.id || null,
mallSupplierId: this.$store.state.supplierInfo.supplierId || null,
customerEnterpriseId: null,
mallSupplierId: this.$store.state.supplierInfo.supplierId || null,
remark: '', remark: '',
respondent: '' respondent: ''
} }
} }
}, },
onLoad() {
onLoad(option) {
if (option.customerEnterpriseId) {
this.form.customerEnterpriseId = option.customerEnterpriseId
}
this.locatePosition() this.locatePosition()
}, },
methods: { methods: {

12
pages/follow-up-records/index.vue

@ -78,10 +78,8 @@ export default {
params: { params: {
asc: '', asc: '',
desc: '', desc: '',
customerEnterpriseId: this.$store.state.supplierInfo.id || null,
customerEnterpriseId: null,
mallSupplierId: this.$store.state.supplierInfo.supplierId || null mallSupplierId: this.$store.state.supplierInfo.supplierId || null
// enterpriseIds : ['651107734133018624'],
// mallSupplierId : '670334117090562048',
}, },
pagination: { pagination: {
pageNum: 0, // pageNum: 0, //
@ -103,9 +101,9 @@ export default {
this.downCallback() this.downCallback()
}, },
onLoad(option) { onLoad(option) {
// if (option.customerEnterpriseId) {
// this.params.customerEnterpriseId = option.customerEnterpriseId
// }
if (option.customerEnterpriseId) {
this.params.customerEnterpriseId = option.customerEnterpriseId
}
}, },
methods: { methods: {
back, back,
@ -133,7 +131,7 @@ export default {
}) })
}, },
addTap() { addTap() {
go2('add-record')
go2('add-record', { customerEnterpriseId: this.params.customerEnterpriseId })
}, },
downCallback() { downCallback() {
this.pagination.pageNum = 1 this.pagination.pageNum = 1

16
pages/mall/index.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<view v-if="hasCompany" class="wrapper">
<view v-if="hasCompany && hasLogin" class="wrapper">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true"> <uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view slot="left" class="left-title">纸商城</view> <view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title" @tap="shareTap">分享</view> <view slot="right" class="right-title" @tap="shareTap">分享</view>
@ -68,9 +68,10 @@
<uni-nav-bar :fixed="true" :status-bar="true"> <uni-nav-bar :fixed="true" :status-bar="true">
<view slot="left" style="font-size: 40rpx; color: #000000">纸商城</view> <view slot="left" style="font-size: 40rpx; color: #000000">纸商城</view>
</uni-nav-bar> </uni-nav-bar>
<view class="flex-col-center-center" style="margin-top: 100rpx">
<view v-if="!hasCompany" class="flex-col-center-center" style="margin-top: 100rpx">
<text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text> <text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text>
</view> </view>
<view class="" v-if="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view>
</view> </view>
<view class="share-area" v-if="visible" @click="closeShare"> <view class="share-area" v-if="visible" @click="closeShare">
<view class="share-content"> <view class="share-content">
@ -91,13 +92,14 @@
</template> </template>
<script> <script>
import notLogged from '@/components/not-logged/not-logged.vue'
import uGap from '@/components/u-gap/u-gap.vue' import uGap from '@/components/u-gap/u-gap.vue'
import { back, go2, loginGo2, screenShot } from '@/utils/hook.js' import { back, go2, loginGo2, screenShot } from '@/utils/hook.js'
import { SupplierList, productStatus, storeDetail, getSupplierQrCode } from '@/apis/add-paper.js' import { SupplierList, productStatus, storeDetail, getSupplierQrCode } from '@/apis/add-paper.js'
import { getTimer } from '@/utils/index.js' import { getTimer } from '@/utils/index.js'
import noData from './no-data.vue' import noData from './no-data.vue'
export default { export default {
components: { uGap, noData },
components: { uGap, noData, notLogged },
filters: { filters: {
timeFilter(value) { timeFilter(value) {
var abs = '' var abs = ''
@ -150,7 +152,10 @@ export default {
computed: { computed: {
hasCompany() { hasCompany() {
return this.$store.state.supplierInfo.id != null return this.$store.state.supplierInfo.id != null
}
},
hasLogin() {
return this.$store.state.qnToken != ''
}
}, },
onShow() { onShow() {
if (this.hasCompany) { if (this.hasCompany) {
@ -163,6 +168,9 @@ export default {
}, },
methods: { methods: {
back, back,
loginChange() {
go2('login')
},
// //
makeScreenShot() { makeScreenShot() {
screenShot() screenShot()

17
pages/mine/index.vue

@ -21,7 +21,12 @@
<image v-else class="image" @click="certifyCompany()" src="/static/imgs/mine/non-certified-icon.png"></image> <image v-else class="image" @click="certifyCompany()" src="/static/imgs/mine/non-certified-icon.png"></image>
</view> </view>
<view style="margin-top: 10rpx"> <view style="margin-top: 10rpx">
<text style="font-size: 26rpx; color: #fff; font-weight: 400; word-break: break-all">{{ userInfo.supplierName }}</text>
<text
style="font-size: 26rpx; color: #fff; font-weight: 400; word-break: break-all"
@click="loginGo2('enterprise-info', { operation: 'edit' })"
>
{{ hasCompany ? userInfo.supplierName : '点击完善企业信息' }}
</text>
</view> </view>
</view> </view>
</view> </view>
@ -292,6 +297,16 @@ export default {
}, },
tradeDate() { tradeDate() {
this.getStatistics() this.getStatistics()
},
hasLogin(val) {
if (!val) {
//
this.tradeData = {
tradingVolume: 0,
volumeOfBusiness: 0,
orderQuantity: 0
}
}
} }
}, },
computed: { computed: {

18
pages/trade/index.vue

@ -2,8 +2,8 @@
<view class="trade-index"> <view class="trade-index">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true"> <uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view class="left-title"> <view class="left-title">
<view v-if="mainKey === '0'" class="text-view"><text class="title">交易大厅</text></view>
<view v-if="mainKey === '1'">
<view v-if="!hasLogin" class="text-view"><text class="title">交易大厅</text></view>
<view v-if="hasLogin">
<view class="bar-contant"> <view class="bar-contant">
<view class="check-control title-left36" :class="current === '0' ? 'check-title' : 'oncheck-title'" @click="controlChange('0')"> <view class="check-control title-left36" :class="current === '0' ? 'check-title' : 'oncheck-title'" @click="controlChange('0')">
<text>报价</text> <text>报价</text>
@ -24,8 +24,8 @@
</view> </view>
</view> </view>
</view> --> </view> -->
<view class="" v-if="mainKey === '0'"><not-logged @loginChange="loginChange()"></not-logged></view>
<view class="" v-if="mainKey === '1'">
<view class="" v-if="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view>
<view class="" v-if="hasLogin">
<view class="content"> <view class="content">
<view v-if="current === '0'"> <view v-if="current === '0'">
<quotationList :refresh="refresh"></quotationList> <quotationList :refresh="refresh"></quotationList>
@ -43,12 +43,13 @@ import notLogged from '@/components/not-logged/not-logged.vue'
import scrollList from '@/components/scroll-list/scroll-list.vue' import scrollList from '@/components/scroll-list/scroll-list.vue'
import quotationList from './quotationList.vue' import quotationList from './quotationList.vue'
import orderList from './orderList.vue' import orderList from './orderList.vue'
import { back, go2, uploadFile } from '@/utils/hook.js'
export default { export default {
components: { notLogged, scrollList, quotationList, orderList }, components: { notLogged, scrollList, quotationList, orderList },
data() { data() {
return { return {
key: '', key: '',
mainKey: '1',
mainKey: '0',
current: '0', current: '0',
items: ['报价', '订单'], items: ['报价', '订单'],
refresh: false refresh: false
@ -57,9 +58,14 @@ export default {
onShow() { onShow() {
this.refresh = !this.refresh this.refresh = !this.refresh
}, },
computed: {
hasLogin() {
return this.$store.state.qnToken != ''
}
},
methods: { methods: {
loginChange() { loginChange() {
this.mainKey === '0' ? '1' : '0'
go2('login')
}, },
// //
controlChange(value) { controlChange(value) {

1
pages/trade/quotationList.vue

@ -105,7 +105,6 @@ export default {
this.quotationDown() this.quotationDown()
} }
}, },
onLoad(option) {},
filters: { filters: {
replyStatusName(status) { replyStatusName(status) {
let name = '' let name = ''

Loading…
Cancel
Save