杨阁辉 4 years ago
parent
commit
c58d5992b8
9 changed files with 1174 additions and 1132 deletions
  1. 443
      components/bussiness-components/packingStationItem.vue
  2. 83
      components/qn-map/qn-map.nvue
  3. 482
      pages/client-detail/base-paper-deals.vue
  4. 2
      pages/client-detail/basic-information.vue
  5. 432
      pages/client-detail/index.vue
  6. 4
      pages/client/index.nvue
  7. 858
      pages/mall/index.vue
  8. 2
      pages/search/index.vue
  9. BIN
      static/imgs/client/client-default.png

443
components/bussiness-components/packingStationItem.vue

@ -1,229 +1,240 @@
<template> <template>
<view class="packing-area">
<view class="info" @tap="goDetail">
<image class="image" :src="info.enterpriseLogo || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'"></image>
<view class="content">
<view class="title">
<text class="text">{{ info.enterpriseName }}</text>
<image class="icon" :src="info.whetherCooperation ? '/static/imgs/general/cooperation-icon.png' : '/static/imgs/general/no-cooperation-icon.png'"></image>
</view>
<view class="desc">
<text>{{ transformBusiness(info.business) }}</text>
</view>
<view v-if="info.whetherCooperation === 1" class="box-area">
<view class="box">
<view><text class="title">月采购量</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.monthlyPurchaseQuantity ? `${info.monthlyPurchaseQuantity}` : '0' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">月采购额</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.monthlyTradingQuota ? `${info.monthlyTradingQuota}` : '0' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">最近购买</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ transformDate(info.lastTradingDate) || '-' }}</text>
</view>
</view>
</view>
<view v-if="info.whetherCooperation === 0" class="box-area">
<view class="box">
<view><text class="title">法定代表人</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.legalPerson ? `${info.legalPerson}` : '' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">注册资本</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.registeredCapital ? `${info.registeredCapital}` : '0' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">成立时间</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ transformDate(info.openingDate) || '-' }}</text>
</view>
</view>
</view>
</view>
</view>
<view class="other">
<view class="box">
<image class="icon" src="/static/imgs/client-list/navigation-icon.png"></image>
<text class="text">{{ info.detailedAddress || '未知' }}</text>
</view>
<view class="divide"></view>
<view class="box">
<image class="icon" src="/static/imgs/client-list/phone-icon.png"></image>
<text class="text">{{ info.legalPerson + ' ' + transformPhoneNum(info.contactNumber) }}</text>
</view>
</view>
</view>
<view class="packing-area">
<view class="info" @tap="goDetail">
<image class="image" :src="info.enterpriseLogo || '/static/imgs/client-default.png'"></image>
<view class="content">
<view class="title">
<text class="text" style="width: 410rpx">{{ info.enterpriseName }}123123123</text>
<image
class="icon"
:src="info.whetherCooperation ? '/static/imgs/general/cooperation-icon.png' : '/static/imgs/general/no-cooperation-icon.png'"
></image>
</view>
<view class="desc">
<text class="text" style="width: 520rpx">{{ transformBusiness(info.business) }}</text>
</view>
<view v-if="info.whetherCooperation === 1" class="box-area">
<view class="box">
<view><text class="title">月采购量</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.monthlyPurchaseQuantity ? `${info.monthlyPurchaseQuantity}` : '0' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">月采购额</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.monthlyTradingQuota ? `${info.monthlyTradingQuota}` : '0' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">最近购买</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ transformDate(info.lastTradingDate) || '-' }}</text>
</view>
</view>
</view>
<view v-if="info.whetherCooperation === 0" class="box-area">
<view class="box">
<view><text class="title">法定代表人</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.legalPerson ? `${info.legalPerson}` : '' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">注册资本</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ info.registeredCapital ? `${info.registeredCapital}` : '0' }}</text>
</view>
</view>
<view class="box">
<view><text class="title">成立时间</text></view>
<view style="margin-top: 16rpx">
<text class="value">{{ transformDate(info.openingDate) || '-' }}</text>
</view>
</view>
</view>
</view>
</view>
<view class="other">
<view class="box">
<image class="icon" src="/static/imgs/client-list/navigation-icon.png"></image>
<text class="text" style="width: 248rpx">{{ info.detailedAddress || '未知' }}</text>
</view>
<view class="divide"></view>
<view class="box">
<image class="icon" src="/static/imgs/client-list/phone-icon.png"></image>
<text class="text" style="width: 248rpx">{{ info.legalPerson + ' ' + transformPhoneNum(info.contactNumber) }}</text>
</view>
</view>
</view>
</template> </template>
<script> <script>
import { go2 } from '@/utils/hook.js' import { go2 } from '@/utils/hook.js'
export default { export default {
props: {
info: {
type: Object,
default: () => ({
enterpriseName: '广州市金骏彩色印务有限公司',
enterpriseLogo: '',
business: '生产画册、书刊、包装盒、手提袋子、快递箱',
whetherCooperation: 1,
monthlyPurchaseQuantity: 100,
monthlyTradingQuota: 200,
lastTradingDate: '2020-12-12',
openingDate: '2020-12-12',
legalPerson: '张三',
registeredCapital: 1000,
contactNumber: '13888888888',
detailedAddress: '广州市天河区天河路'
})
}
},
methods: {
goDetail() {
go2('client-detail', { id: this.info.enterpriseId })
},
transformBusiness(business) {
let text = business?.trim() || '未知'
if (text.length > 17) {
text = text.substr(0, 17) + '...'
}
return '主营:' + text
},
transformDate(date) {
if (date) {
return date.split('-').join('/')
}
return ''
},
transformPhoneNum(phoneNum) {
if (phoneNum) {
if (this.hasLogin) {
return phoneNum
} else {
return phoneNum.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
}
}
return '--'
}
},
computed: {
hasLogin() {
return this.$store.state.qnToken != ''
}
}
props: {
info: {
type: Object,
default: () => ({
enterpriseName: '广州市金骏彩色印务有限公司',
enterpriseLogo: '',
business: '生产画册、书刊、包装盒、手提袋子、快递箱',
whetherCooperation: 1,
monthlyPurchaseQuantity: 100,
monthlyTradingQuota: 200,
lastTradingDate: '2020-12-12',
openingDate: '2020-12-12',
legalPerson: '张三',
registeredCapital: 1000,
contactNumber: '13888888888',
detailedAddress: '广州市天河区天河路'
})
}
},
methods: {
goDetail() {
go2('client-detail', { id: this.info.enterpriseId })
},
transformBusiness(business) {
let text = business?.trim() || '未知'
if (text.length > 17) {
text = text.substr(0, 17) + '...'
}
return '主营:' + text
},
transformDate(date) {
if (date) {
return date.split('-').join('/')
}
return ''
},
transformPhoneNum(phoneNum) {
if (phoneNum) {
if (this.hasLogin) {
return phoneNum
} else {
return phoneNum.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
}
}
return '--'
}
},
computed: {
hasLogin() {
return this.$store.state.qnToken != ''
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.packing-area { .packing-area {
width: 750rpx;
background-color: #fff;
.info {
width: 750rpx;
padding: 30rpx 32rpx 48rpx;
border-bottom: 2rpx solid #dddddd;
display: flex;
flex-direction: row;
align-items: flex-start;
.image {
width: 140rpx;
height: 140rpx;
flex-grow: 0;
flex-shrink: 0;
margin-right: 20rpx;
}
.content {
flex-grow: 1;
.title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.text {
font-size: 32rpx;
color: #000000;
font-weight: 600;
}
.icon {
width: 100rpx;
height: 32rpx;
flex-grow: 0;
flex-shrink: 0;
margin-left: 8rpx;
}
}
.desc {
margin-top: 14rpx;
font-size: 26rpx;
color: #333333;
}
.box-area {
margin-top: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
.box {
width: 170rpx;
.title {
display: flex;
flex-direction: row;
justify-content: center;
font-size: 24rpx;
color: #888888;
}
.value {
display: flex;
flex-direction: row;
justify-content: center;
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
}
}
}
}
.other {
width: 750rpx;
padding: 24rpx 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.divide {
width: 2rpx;
height: 32rpx;
background: #d8d8d8;
}
.box {
width: 340rpx;
margin: 0 32rpx;
display: flex;
flex-direction: row;
align-items: center;
.icon {
width: 52rpx;
height: 52rpx;
flex-grow: 0;
flex-shrink: 0;
margin-right: 10rpx;
}
.text {
font-size: 24rpx;
color: #555555;
}
}
}
width: 750rpx;
background-color: #fff;
.info {
width: 750rpx;
padding: 30rpx 32rpx 48rpx;
border-bottom: 2rpx solid #dddddd;
display: flex;
flex-direction: row;
align-items: flex-start;
.image {
width: 140rpx;
height: 140rpx;
flex-grow: 0;
flex-shrink: 0;
margin-right: 20rpx;
}
.content {
flex-grow: 1;
.title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: nowrap;
.text {
lines: 1;
text-overflow: ellipsis;
font-size: 32rpx;
color: #000000;
font-weight: 600;
}
.icon {
width: 100rpx;
height: 32rpx;
flex-grow: 0;
flex-shrink: 0;
margin-left: 8rpx;
}
}
.desc {
margin-top: 14rpx;
.text {
font-size: 26rpx;
color: #333333;
}
}
.box-area {
margin-top: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
.box {
width: 170rpx;
.title {
display: flex;
flex-direction: row;
justify-content: center;
font-size: 24rpx;
color: #888888;
}
.value {
display: flex;
flex-direction: row;
justify-content: center;
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
}
}
}
}
.other {
width: 750rpx;
padding: 24rpx 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.divide {
width: 2rpx;
height: 32rpx;
background: #d8d8d8;
}
.box {
width: 340rpx;
margin: 0 32rpx;
display: flex;
flex-direction: row;
align-items: center;
.icon {
width: 52rpx;
height: 52rpx;
flex-grow: 0;
flex-shrink: 0;
margin-right: 10rpx;
}
.text {
font-size: 24rpx;
color: #555555;
lines: 1;
text-overflow: ellipsis;
}
}
}
} }
</style> </style>

83
components/qn-map/qn-map.nvue

@ -7,7 +7,7 @@
:longitude="centerPoint.longitude" :longitude="centerPoint.longitude"
:latitude="centerPoint.latitude" :latitude="centerPoint.latitude"
:markers="markers" :markers="markers"
:show-location="true"
:show-location="true"
:scale="scale" :scale="scale"
@labeltap="labeltap" @labeltap="labeltap"
@regionchange="regionchange" @regionchange="regionchange"
@ -45,26 +45,30 @@ export default {
}, },
mounted() { mounted() {
this.mapContext = uni.createMapContext('qnMap', this) this.mapContext = uni.createMapContext('qnMap', this)
this.mapContext.onstatuschanged = function (e) {
console('change:', e)
}
console.log('mapContetxt:', this.mapContext.onstatuschanged)
}, },
watch: { watch: {
// 只监听items一层变化 // 只监听items一层变化
items(val) { items(val) {
console.log('val:',val)
console.log('val:', val)
this.markers = val.map((item) => { this.markers = val.map((item) => {
return this.causeMarker(item) return this.causeMarker(item)
}) })
console.log('res:',this.markers)
console.log('res:', this.markers)
this.mapContext.addMarkers({ this.mapContext.addMarkers({
markers: this.markers, markers: this.markers,
clear: true, clear: true,
success: (res) => { success: (res) => {
console.log('success', res)
},
console.log('success', res)
},
fail: (err) => { fail: (err) => {
console.log('fail', err) console.log('fail', err)
} }
}) })
},
}
}, },
methods: { methods: {
// 生成markers // 生成markers
@ -124,8 +128,10 @@ export default {
this.selectedId = e.detail.markerId this.selectedId = e.detail.markerId
}, },
dragMap() { dragMap() {
console.log('drag begin')
this.mapContext.getCenterLocation({ this.mapContext.getCenterLocation({
success: (res) => { success: (res) => {
console.log('dragMap success:', res)
// 抛出移动事件 // 抛出移动事件
this.$emit('dragMap', { this.$emit('dragMap', {
longitude: res.longitude, longitude: res.longitude,
@ -134,6 +140,9 @@ export default {
}) })
this.centerPoint.longitude = res.longitude this.centerPoint.longitude = res.longitude
this.centerPoint.latitude = res.latitude this.centerPoint.latitude = res.latitude
},
fail: (err) => {
console.log('dragMap err:', err)
} }
}) })
}, },
@ -156,8 +165,10 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
this.timer = null this.timer = null
} }
console.log('e timer after:', e)
let eventName = e.causedBy || e.detail.causedBy
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
switch (e.causedBy) {
switch (eventName) {
case 'drag': case 'drag':
this.dragMap() this.dragMap()
break break
@ -169,35 +180,35 @@ export default {
} }
}, 500) }, 500)
}, },
// 移动到当前坐标
moveTo({longitude,latitude,scale}) {
scale = Math.ceil(scale)
if(!isNaN(scale)) {
this.scale = scale
}else {
scale = null
}
let data = {
longitude: longitude,
latitude: latitude,
scale: scale || this.scale
}
if (this.mapContext) {
this.mapContext.moveToLocation({
longitude: longitude,
latitude: latitude,
success:res => {
console.log('移动success',res)
},
fail:err => {
console.log('移动fail',err)
}
})
}
setTimeout(() => {
this.$emit('reset', data)
},100)
}
// 移动到当前坐标
moveTo({ longitude, latitude, scale }) {
scale = Math.ceil(scale)
if (!isNaN(scale)) {
this.scale = scale
} else {
scale = null
}
let data = {
longitude: longitude,
latitude: latitude,
scale: scale || this.scale
}
if (this.mapContext) {
this.mapContext.moveToLocation({
longitude: longitude,
latitude: latitude,
success: (res) => {
console.log('移动success', res)
},
fail: (err) => {
console.log('移动fail', err)
}
})
}
setTimeout(() => {
this.$emit('reset', data)
}, 100)
}
} }
} }
</script> </script>

482
pages/client-detail/base-paper-deals.vue

@ -1,50 +1,52 @@
<template> <template>
<view class="warpper">
<view class="sum-box">
<view class="">
<view class="title">交易金额</view>
<view class="value">{{ topInfo.tradingVolume }}</view>
</view>
<view class="">
<view class="title">总交易量()</view>
<view class="value">{{ topInfo.volumeOfBusiness }}</view>
</view>
</view>
<uGap></uGap>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff">
<view class="card-box" v-for="(item, index) in list" :key="index">
<view class="header">
<view class="left-title">{{ item.customerEnterpriseName }}</view>
<view class="right-title">¥ {{ item.totalOfferPrice }}</view>
</view>
<view class="content" v-for="(subItem, subIndex) in item.supplierOrderList[0].orderItems" :key="subIndex">
<!-- <image class="image" :src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image> -->
<image class="image" :src="subItem.productImg" mode=""></image>
<view class="">
<view class="title">{{ subItem.productName }}</view>
<view class="desc">
{{ subItem.brandName }}/{{ subItem.categoryName }}/{{ subItem.gramWeight }}g/{{ subItem.length }}*{{ subItem.width }}/{{ subItem.pieceQuantity }}
</view>
</view>
</view>
<!-- <view class="content">
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image>
<view class="warpper">
<view class="sum-box">
<view class="">
<view class="title">交易金额</view>
<view class="value">{{ topInfo.tradingVolume }}</view>
</view>
<view class="">
<view class="title">总交易量()</view>
<view class="value">{{ topInfo.volumeOfBusiness }}</view>
</view>
</view>
<uGap></uGap>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff">
<view class="card-box" v-for="(item, index) in list" :key="index">
<view class="header">
<view class="left-title">{{ item.customerEnterpriseName }}</view>
<view class="right-title">¥ {{ item.totalOfferPrice }}</view>
</view>
<view class="content" v-for="(subItem, subIndex) in item.supplierOrderList[0].orderItems" :key="subIndex">
<!-- <image class="image" :src="/static/imgs/client-default.png" mode=""></image> -->
<image class="image" :src="subItem.productImg" mode=""></image>
<view class="">
<view class="title">{{ subItem.productName }}</view>
<view class="desc">
{{ subItem.brandName }}/{{ subItem.categoryName }}/{{ subItem.gramWeight }}g/{{ subItem.length }}*{{ subItem.width }}/{{
subItem.pieceQuantity
}}
</view>
</view>
</view>
<!-- <view class="content">
<image class="image" src="/static/imgs/client-default.png" mode=""></image>
<view class=""> <view class="">
<view class="title">丽盈白卡</view> <view class="title">丽盈白卡</view>
<view class="desc">白卡纸/丽盈/350g/787*1092/2200</view> <view class="desc">白卡纸/丽盈/350g/787*1092/2200</view>
</view> </view>
</view> --> </view> -->
<view class="other">
<view class="time">{{ item.createTime }}</view>
<view class="btn">
更多详情
<image class="icon" src="/static/imgs/client-detail/arrow-right-icon.png"></image>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
<view class="other">
<view class="time">{{ item.createTime }}</view>
<view class="btn">
更多详情
<image class="icon" src="/static/imgs/client-detail/arrow-right-icon.png"></image>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
</template> </template>
<script> <script>
@ -52,209 +54,209 @@ import uGap from '@/components/u-gap/u-gap.vue'
import { getBasePaperDeals, getOrderVolumeStatistics } from '@/apis/clientDetailApi.js' import { getBasePaperDeals, getOrderVolumeStatistics } from '@/apis/clientDetailApi.js'
export default { export default {
components: { uGap },
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无原纸交易~',
background: '#F7F8FA',
disabled: false,
emptyImage: '/static/imgs/order/order-empty.png'
},
params: {
asc: '',
desc: '',
customerEnterpriseId: this.$store.state.supplierInfo.id || null, // IDid
mallSupplierId: this.$store.state.supplierInfo.supplierId || null, // id
// customerEnterpriseId: '651107734133018624', // ID
// mallSupplierId: '670334117090562048', // id
status: '0', // 0 /30106,/30107,/30207,/30104
},
pagination: {
pageNum: 0, //
pageSize: 10
},
orderParams: {
beginDate: '',
// currentSupplier: '670334117090562048',
currentSupplier: this.$store.state.supplierInfo.supplierId || null,
endDate: ''
},
list: [],
topInfo: {}
}
},
created() {
this.getOrderVolumeStatistics()
},
methods: {
//
getOrderVolumeStatistics() {
getOrderVolumeStatistics(this.orderParams).then(res => {
// console.log('', res)
this.topInfo = res
})
},
getList() {
return new Promise((resolve, reject) => {
getBasePaperDeals({ ...this.params, ...this.pagination })
.then(res => {
// console.log('', res)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
// this.list = []
// this.list = [...this.list, ...[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch(err => {
reject(err)
})
})
},
downCallback() {
this.pagination.pageNum = 1
this.getList()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.pagination.pageNum++
this.getList()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
}
}
components: { uGap },
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无原纸交易~',
background: '#F7F8FA',
disabled: false,
emptyImage: '/static/imgs/order/order-empty.png'
},
params: {
asc: '',
desc: '',
customerEnterpriseId: this.$store.state.supplierInfo.id || null, // IDid
mallSupplierId: this.$store.state.supplierInfo.supplierId || null, // id
// customerEnterpriseId: '651107734133018624', // ID
// mallSupplierId: '670334117090562048', // id
status: '0' // 0 /30106,/30107,/30207,/30104
},
pagination: {
pageNum: 0, //
pageSize: 10
},
orderParams: {
beginDate: '',
// currentSupplier: '670334117090562048',
currentSupplier: this.$store.state.supplierInfo.supplierId || null,
endDate: ''
},
list: [],
topInfo: {}
}
},
created() {
this.getOrderVolumeStatistics()
},
methods: {
//
getOrderVolumeStatistics() {
getOrderVolumeStatistics(this.orderParams).then((res) => {
// console.log('', res)
this.topInfo = res
})
},
getList() {
return new Promise((resolve, reject) => {
getBasePaperDeals({ ...this.params, ...this.pagination })
.then((res) => {
// console.log('', res)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
// this.list = []
// this.list = [...this.list, ...[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]
resolve({ list: this.list, total: res.total })
} else {
reject()
}
})
.catch((err) => {
reject(err)
})
})
},
downCallback() {
this.pagination.pageNum = 1
this.getList()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.pagination.pageNum++
this.getList()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.warpper { .warpper {
width: 750rpx;
.sum-box {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
// text-align: center;
height: 184rpx;
background: url('/static/imgs/client-detail/yzjy-icon.png') no-repeat;
background-size: 100%;
.title {
font-size: 26rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
}
.value {
font-size: 56rpx;
color: #ffffff;
letter-spacing: 0;
text-align: left;
font-weight: 500;
margin-top: 16rpx;
}
}
.card-box {
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 88rpx;
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;
.left-title {
font-size: 30rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
}
.right-title {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
}
}
.content {
display: flex;
flex-direction: row;
align-items: center;
height: 148rpx;
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 20rpx;
}
.title {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.desc {
padding-top: 26rpx;
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.btn {
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: center;
font-weight: 500;
display: flex;
align-items: center;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
}
width: 750rpx;
.sum-box {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
// text-align: center;
height: 184rpx;
background: url('/static/imgs/client-detail/yzjy-icon.png') no-repeat;
background-size: 100%;
.title {
font-size: 26rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
}
.value {
font-size: 56rpx;
color: #ffffff;
letter-spacing: 0;
text-align: left;
font-weight: 500;
margin-top: 16rpx;
}
}
.card-box {
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 88rpx;
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;
.left-title {
font-size: 30rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
}
.right-title {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
}
}
.content {
display: flex;
flex-direction: row;
align-items: center;
height: 148rpx;
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 20rpx;
}
.title {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.desc {
padding-top: 26rpx;
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.btn {
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: center;
font-weight: 500;
display: flex;
align-items: center;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
}
} }
</style> </style>

2
pages/client-detail/basic-information.vue

@ -8,7 +8,7 @@
</view> </view>
<view class="card-content"> <view class="card-content">
<view class="info"> <view class="info">
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image>
<image class="image" src="/static/imgs/client-default.png" mode=""></image>
<view class="content"> <view class="content">
<view class="title"> <view class="title">
<text class="text">{{ info.name }}</text> <text class="text">{{ info.name }}</text>

432
pages/client-detail/index.vue

@ -1,33 +1,40 @@
<template> <template>
<view class="warpper">
<qnHeader class="header">
<!-- <view class="header"> -->
<view class="header-title">客户详情</view>
<view class="right-title" @click="onCustomerCredit">客户授信</view>
<!-- </view> -->
</qnHeader>
<view>
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#007AFF" class="segmented"></uni-segmented-control>
<view class="warpper">
<qnHeader class="header">
<!-- <view class="header"> -->
<view class="header-title">客户详情</view>
<view class="right-title" @click="onCustomerCredit">客户授信</view>
<!-- </view> -->
</qnHeader>
<view>
<uni-segmented-control
:current="current"
:values="items"
@clickItem="onClickItem"
styleType="text"
activeColor="#007AFF"
class="segmented"
></uni-segmented-control>
<view class="content">
<view v-show="current === 0"><basicInformation ref="basicInformationRef" :customerId="customerId"></basicInformation></view>
<view v-show="current === 1"><equipmentInformation></equipmentInformation></view>
<view v-show="current === 2"><basePaperDeals></basePaperDeals></view>
<view v-show="current === 3"><wastePaperTrading></wastePaperTrading></view>
</view>
</view>
<uni-popup ref="popup" type="center" :mask-click="false">
<view class="popup-box">
<view class="header-title">{{ dialogTitle }}</view>
<view class="tip-title">{{ dialogContent }}</view>
<view class="operation-row">
<view class="cancel-text" @tap="cancelTap">取消</view>
<view class="line"></view>
<view class="confirm-text" @tap="confirmTap">{{ confirmText }}</view>
</view>
</view>
</uni-popup>
</view>
<view class="content">
<view v-show="current === 0"><basicInformation ref="basicInformationRef" :customerId="customerId"></basicInformation></view>
<view v-show="current === 1"><equipmentInformation></equipmentInformation></view>
<view v-show="current === 2"><basePaperDeals></basePaperDeals></view>
<view v-show="current === 3"><wastePaperTrading></wastePaperTrading></view>
</view>
</view>
<uni-popup ref="popup" type="center" :mask-click="false">
<view class="popup-box">
<view class="header-title">{{ dialogTitle }}</view>
<view class="tip-title">{{ dialogContent }}</view>
<view class="operation-row">
<view class="cancel-text" @tap="cancelTap">取消</view>
<view class="line"></view>
<view class="confirm-text" @tap="confirmTap">{{ confirmText }}</view>
</view>
</view>
</uni-popup>
</view>
</template> </template>
<script> <script>
@ -39,191 +46,202 @@ import wastePaperTrading from './waste-paper-trading.vue'
import { go2 } from '@/utils/hook.js' import { go2 } from '@/utils/hook.js'
import { getBaseInfo, getVerifyUrl } from '@/apis/commonApi.js' import { getBaseInfo, getVerifyUrl } from '@/apis/commonApi.js'
export default { export default {
components: {
qnHeader,
basicInformation,
equipmentInformation,
basePaperDeals,
wastePaperTrading
},
data() {
return {
current: 0,
items: ['基础信息', '设备信息', '原纸交易', '废纸交易'],
customerId: null,
dialogTitle: null,
dialogContent: null,
confirmText: null,
dialogType: 1 // 1: 2 3VIP
}
},
onLoad(option) {
this.customerId = option.id || '800890'
this.$nextTick(() => {
this.$refs.basicInformationRef.getBaseInfo()
})
},
onShow() {
this.$refs.popup.close()
},
methods: {
go2,
onClickItem(e) {
console.log('e', e)
this.current = e.currentIndex
},
//
onCustomerCredit() {
if (this.$store.state.supplierInfo == null) {
// store supplierInfo == null
this.dialogTitle = '您还未完善企业信息'
this.dialogContent = '请先完善企业基本信息才能对客户进行'
this.confirmText = '去完善'
this.dialogType = 1
this.$refs.popup.open()
} else if (this.$store.state.supplierInfo.fddEnterpriseStatus == 1) {
// supplierInfo.fddEnterpriseStatus == 1
this.dialogTitle = '未认证电子签约'
this.dialogContent = '客户授信过程需要进行电子合同签订,请先进行认证'
this.confirmText = '去认证'
this.dialogType = 2
this.$refs.popup.open()
} else if (!this.$store.state.supplierInfo.isVip) {
// vip supplierInfo isVip
this.dialogTitle = '未开通VIP'
this.dialogContent = '客户授信需要VIP权限,是否立即开通?'
this.confirmText = '去开通'
this.dialogType = 3
this.$refs.popup.open()
} else {
go2('client-credit')
}
},
cancelTap() {
this.$refs.popup.close()
},
confirmTap() {
switch (this.dialogType) {
case 1:
go2('enterprise-info')
break
case 2:
getVerifyUrl({ enterpriseId: this.$store.state.supplierInfo.id }).then(res => {
if (res) {
// #ifdef APP-PLUS
go2('page-view', { title: '实名认证', url: encodeURIComponent(res) })
// #endif
// #ifdef H5
window ? (window.location.href = res) : ''
// #endif
}
})
break
case 3:
break
default:
break
}
}
}
components: {
qnHeader,
basicInformation,
equipmentInformation,
basePaperDeals,
wastePaperTrading
},
data() {
return {
current: 0,
items: ['基础信息', '设备信息', '原纸交易', '废纸交易'],
customerId: null,
dialogTitle: null,
dialogContent: null,
confirmText: null,
dialogType: 1 // 1: 2 3VIP
}
},
onLoad(option) {
this.customerId = option.id || '800890'
this.$nextTick(() => {
this.$refs.basicInformationRef.getBaseInfo()
})
},
onShow() {
this.$refs.popup.close()
},
methods: {
go2,
onClickItem(e) {
console.log('e', e)
this.current = e.currentIndex
},
//
onCustomerCredit() {
if (this.$store.state.supplierInfo == null) {
// store supplierInfo == null
this.dialogTitle = '您还未完善企业信息'
this.dialogContent = '请先完善企业基本信息才能对客户进行'
this.confirmText = '去完善'
this.dialogType = 1
this.$refs.popup.open()
} else if (this.$store.state.supplierInfo.fddEnterpriseStatus == 1) {
// supplierInfo.fddEnterpriseStatus == 1
this.dialogTitle = '未认证电子签约'
this.dialogContent = '客户授信过程需要进行电子合同签订,请先进行认证'
this.confirmText = '去认证'
this.dialogType = 2
this.$refs.popup.open()
} else if (!this.$store.state.supplierInfo.isVip) {
// vip supplierInfo isVip
this.dialogTitle = '未开通VIP'
this.dialogContent = '客户授信需要VIP权限,是否立即开通?'
this.confirmText = '去开通'
this.dialogType = 3
this.$refs.popup.open()
} else {
go2('client-credit')
}
},
cancelTap() {
this.$refs.popup.close()
},
confirmTap() {
switch (this.dialogType) {
case 1:
go2('enterprise-info')
break
case 2:
getVerifyUrl({ enterpriseId: this.$store.state.supplierInfo.id }).then((res) => {
if (res) {
// #ifdef APP-PLUS
go2('page-view', { title: '实名认证', url: encodeURIComponent(res) })
// #endif
// #ifdef H5
window ? (window.location.href = res) : ''
// #endif
}
})
break
case 3:
break
default:
break
}
},
makeCredit() {
let info = this.$refs.basicInformationRef.getCompanyInfo()
if (info.id) {
go2('client-credit', { enterpriseId: info.id, name: info.name })
} else {
uni.showToast({
title: '该企业基础信息不完善',
icon: 'error'
})
}
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.warpper { .warpper {
.header {
justify-content: space-between;
}
.header-title {
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.header {
justify-content: space-between;
}
.header-title {
font-size: 36rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: center;
line-height: 40rpx;
font-weight: 500;
}
.segmented {
height: 88rpx;
border-bottom: 2rpx solid #ececec;
font-size: 28rpx;
color: #333333;
text-align: center;
font-weight: 400;
}
.account-dialog-text {
font-size: 28rpx;
color: #969799;
text-align: center;
line-height: 40rpx;
font-weight: 400;
}
.popup-box {
width: 540rpx;
height: 226rpx;
background: #ffffff;
border-radius: 14rpx;
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: center;
line-height: 40rpx;
font-weight: 500;
}
.segmented {
height: 88rpx;
border-bottom: 2rpx solid #ececec;
font-size: 28rpx;
color: #333333;
text-align: center;
font-weight: 400;
}
.account-dialog-text {
font-size: 28rpx;
color: #969799;
text-align: center;
line-height: 40rpx;
font-weight: 400;
}
.popup-box {
width: 540rpx;
height: 226rpx;
background: #ffffff;
border-radius: 14rpx;
.header-title {
font-size: 32rpx;
color: #323233;
text-align: center;
font-weight: 500;
padding-top: 48rpx;
}
.tip-title {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
// height: 126rpx;
padding: 16rpx 48rpx 48rpx 48rpx;
font-size: 28rpx;
color: #969799;
letter-spacing: 0;
text-align: center;
font-weight: 400;
}
.operation-row {
border-radius: 14rpx;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 96rpx;
background: #ffffff;
border-top: 2rpx solid #dddddd;
.cancel-text {
flex-grow: 1;
flex-shrink: 1;
font-size: 32rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 400;
}
.line {
flex-grow: 0;
flex-shrink: 0;
width: 2rpx;
height: 96rpx;
border-left: 2rpx solid #dcdee3;
}
.confirm-text {
flex-grow: 1;
flex-shrink: 1;
font-size: 32rpx;
color: #007aff;
text-align: center;
font-weight: 400;
}
}
}
.header-title {
font-size: 32rpx;
color: #323233;
text-align: center;
font-weight: 500;
padding-top: 48rpx;
}
.tip-title {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
// height: 126rpx;
padding: 16rpx 48rpx 48rpx 48rpx;
font-size: 28rpx;
color: #969799;
letter-spacing: 0;
text-align: center;
font-weight: 400;
}
.operation-row {
border-radius: 14rpx;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 96rpx;
background: #ffffff;
border-top: 2rpx solid #dddddd;
.cancel-text {
flex-grow: 1;
flex-shrink: 1;
font-size: 32rpx;
color: #000000;
letter-spacing: 0;
text-align: center;
font-weight: 400;
}
.line {
flex-grow: 0;
flex-shrink: 0;
width: 2rpx;
height: 96rpx;
border-left: 2rpx solid #dcdee3;
}
.confirm-text {
flex-grow: 1;
flex-shrink: 1;
font-size: 32rpx;
color: #007aff;
text-align: center;
font-weight: 400;
}
}
}
} }
</style> </style>

4
pages/client/index.nvue

@ -133,7 +133,9 @@ export default {
type: 'wgs84', type: 'wgs84',
success: (res) => { success: (res) => {
console.log('location success', res) console.log('location success', res)
const { lat, lon } = wgs84togcj02(res.latitude, res.longitude)
let result = wgs84togcj02(res.latitude, res.longitude)
console.log('result:',result)
const { lat, lon } = result
this.$refs.qnMap.moveTo({ latitude: lat, longitude: lon }) this.$refs.qnMap.moveTo({ latitude: lat, longitude: lon })
}, },
fail: (err) => { fail: (err) => {

858
pages/mall/index.vue

@ -1,64 +1,64 @@
<template> <template>
<view class="wrapper">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
<view class="top-box" :style="backgroundStyle">
<view class=""><image class="image" :src="logo" mode=""></image></view>
<view class="center">
<view class="title">{{ storeInformation.name }}</view>
<view class="desc">全部商品 {{ storeInformation.productNumber }} &nbsp; | &nbsp;上新 {{ storeInformation.currentProductNumber }}</view>
</view>
<view class="right">
<view class="cut" @click="checkMall()">
切换商城
<image class="cut-icon" src="/static/imgs/mall/cut-icon.png" mode=""></image>
</view>
<view class="set" @click="setting">设置</view>
</view>
</view>
<uGap></uGap>
<view class="" v-if="pageShow">
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff">
<view v-for="(item, index) in listData" :key="index">
<view class="content" @click="detailInfo(item)">
<image class="image" :src="item.litPicUrl" mode=""></image>
<view class="" style="width: 100%">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image
class="icon"
:src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'"
mode=""
></image>
</view>
</view>
<view class="sub-title">{{ item.categoryName }}/{{ item.name }}/{{ item.manufacturerName }}</view>
<view class="desc">
克重(价格)
<text v-for="(sku, index) in item.skuList" :key="index">{{ sku.weight }}({{ sku.listPrice }})</text>
</view>
</view>
</view>
<view class="other">
<view class="time">{{ item.updateTime | timeFilter }}</view>
<view class="btn">
<view class="" @click="editPaper(item)" v-if="item.status === 30112">编辑</view>
<view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
<view>
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png" mode=""></image></view>
</view>
<no-data v-if="!pageShow"></no-data>
</view>
<view class="wrapper">
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true">
<view slot="left" class="left-title">纸商城</view>
<view slot="right" class="right-title" @tap="shareTap">分享</view>
</uni-nav-bar>
<view class="top-box" :style="backgroundStyle">
<view class=""><image class="image" :src="logo" mode=""></image></view>
<view class="center">
<view class="title">{{ storeInformation.name }}</view>
<view class="desc">全部商品 {{ storeInformation.productNumber }} &nbsp; | &nbsp;上新 {{ storeInformation.currentProductNumber }}</view>
</view>
<view class="right">
<view class="cut" @click="checkMall()">
切换商城
<image class="cut-icon" src="/static/imgs/mall/cut-icon.png" mode=""></image>
</view>
<view class="set" @click="setting">设置</view>
</view>
</view>
<uGap></uGap>
<view class="" v-if="pageShow">
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff">
<view v-for="(item, index) in listData" :key="index">
<view class="content" @click="detailInfo(item)">
<image class="image" :src="item.litPicUrl" mode=""></image>
<view class="" style="width: 100%">
<view class="title">
<view class="">{{ item.brandName }}</view>
<view class="">
<image
class="icon"
:src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'"
mode=""
></image>
</view>
</view>
<view class="sub-title">{{ item.categoryName }}/{{ item.name }}/{{ item.manufacturerName }}</view>
<view class="desc">
克重(价格)
<text v-for="(sku, index) in item.skuList" :key="index">{{ sku.weight }}({{ sku.listPrice }})</text>
</view>
</view>
</view>
<view class="other">
<view class="time">{{ item.updateTime | timeFilter }}</view>
<view class="btn">
<view class="" @click="editPaper(item)" v-if="item.status === 30112">编辑</view>
<view class="divide"></view>
<view class="" @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
<view>
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png" mode=""></image></view>
</view>
<no-data v-if="!pageShow"></no-data>
</view>
</template> </template>
<script> <script>
@ -68,379 +68,377 @@ import { SupplierList, productStatus, storeDetail } 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 },
filters: {
timeFilter(value) {
var abs = ''
if (value) {
abs = getTimer(value)
}
return abs
}
},
data() {
return {
pageShow: true,
storeInformation: {
supplierId: null,
name: null,
productNumber: 0,
currentProductNumber: 0
},
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
pattern: {
backgroundColor: '#007AFF',
buttonColor: '#007AFF'
},
content: [],
horizontal: 'right',
vertical: 'bottom',
direction: 'vertical',
orderPagination: {
pageNum: 0, //
pageSize: 10,
storeId: null,
name: null,
supplierId: this.$store.state.supplierInfo.supplierId
},
listData: [],
logo:'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif',
backgroundStyle:'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
}
},
onShow() {
this.storeInformation = {
supplierId: this.$store.state.supplierInfo.supplierId,
name: this.$store.state.supplierInfo.name
}
this.quertData()
this.getSuliper(this.$store.state.supplierInfo.supplierId)
},
onLoad() {
this.quertData()
},
methods: {
back,
//
getSuliper(id) {
storeDetail(id)
.then(res => {
if (res) {
this.$set(this.storeInformation, 'productNumber', res.productNumber)
this.$set(this.storeInformation, 'currentProductNumber', res.currentProductNumber)
if(res.logo === ""){
this.logo = 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'
}else{
this.logo = res.logo
}
if(res.backgroundImg === ""){
this.backgroundStyle = 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
}else{
this.backgroundStyle = 'background: url('+res.backgroundImg+') no-repeat;'
}
}
})
.catch(err => {
reject(err)
})
},
// pageShow
quertData() {
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
.then(res => {
if (res) {
if (res.records.length === 0) {
this.pageShow = false
return
}
if (this.orderPagination.pageNum == 1) {
this.listData = res.records
} else {
this.listData = this.listData.concat(res.records)
}
resolve({ list: this.listData, total: res.total })
}
})
.catch(err => {
reject(err)
})
})
},
downCallback() {
this.orderPagination.pageNum = 1
this.quertData()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.orderPagination.pageNum++
this.quertData()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
},
//
checkMall() {
go2('switching-mall', { supplierId: this.storeInformation.supplierId })
},
//
nativeTo() {
var params = {
title: '添加纸品'
}
go2('add-paper', params)
},
//
editPaper(item) {
var params = {
...item,
title: '编辑纸品'
}
go2('add-paper', params)
},
//
setting(item) {
go2('store-settings')
},
//
detailInfo(item) {
loginGo2('paper-detail', item)
},
//
productStatusChange(item) {
var params = {
id: item.id,
status: item.status === 30111 ? 30112 : 30111
}
productStatus(params).then(res => {
if (res) {
uni.showToast({
title: '状态修改成功',
icon: 'success'
})
setTimeout(() => {
this.orderPagination.pageNum = 1
this.quertData()
}, 500)
}
})
},
//
shareTap() {
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: 'http://uniapp.dcloud.io/',
title: 'uni-app分享',
summary: '我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png',
success: function(res) {
console.log('success:' + JSON.stringify(res))
},
fail: function(err) {
console.log('fail:' + JSON.stringify(err))
}
})
}
}
components: { uGap, noData },
filters: {
timeFilter(value) {
var abs = ''
if (value) {
abs = getTimer(value)
}
return abs
}
},
data() {
return {
pageShow: true,
storeInformation: {
supplierId: null,
name: null,
productNumber: 0,
currentProductNumber: 0
},
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
pattern: {
backgroundColor: '#007AFF',
buttonColor: '#007AFF'
},
content: [],
horizontal: 'right',
vertical: 'bottom',
direction: 'vertical',
orderPagination: {
pageNum: 0, //
pageSize: 10,
storeId: null,
name: null,
supplierId: this.$store.state.supplierInfo.supplierId
},
listData: [],
logo: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif',
backgroundStyle: 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
}
},
onShow() {
this.storeInformation = {
supplierId: this.$store.state.supplierInfo.supplierId,
name: this.$store.state.supplierInfo.name
}
this.quertData()
this.getSuliper(this.$store.state.supplierInfo.supplierId)
},
onLoad() {
this.quertData()
},
methods: {
back,
//
getSuliper(id) {
storeDetail(id)
.then((res) => {
if (res) {
this.$set(this.storeInformation, 'productNumber', res.productNumber)
this.$set(this.storeInformation, 'currentProductNumber', res.currentProductNumber)
if (res.logo === '') {
this.logo = 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'
} else {
this.logo = res.logo
}
if (res.backgroundImg === '') {
this.backgroundStyle = 'background: url("/static/imgs/mall/zsc-bg-icon.png") no-repeat;'
} else {
this.backgroundStyle = 'background: url(' + res.backgroundImg + ') no-repeat;'
}
}
})
.catch((err) => {
reject(err)
})
},
// pageShow
quertData() {
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
.then((res) => {
if (res) {
if (res.records.length === 0) {
this.pageShow = false
return
}
if (this.orderPagination.pageNum == 1) {
this.listData = res.records
} else {
this.listData = this.listData.concat(res.records)
}
resolve({ list: this.listData, total: res.total })
}
})
.catch((err) => {
reject(err)
})
})
},
downCallback() {
this.orderPagination.pageNum = 1
this.quertData()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.orderPagination.pageNum++
this.quertData()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
},
//
checkMall() {
go2('switching-mall', { supplierId: this.storeInformation.supplierId })
},
//
nativeTo() {
var params = {
title: '添加纸品'
}
go2('add-paper', params)
},
//
editPaper(item) {
var params = {
...item,
title: '编辑纸品'
}
go2('add-paper', params)
},
//
setting(item) {
go2('store-settings')
},
//
detailInfo(item) {
loginGo2('paper-detail', item)
},
//
productStatusChange(item) {
var params = {
id: item.id,
status: item.status === 30111 ? 30112 : 30111
}
productStatus(params).then((res) => {
if (res) {
uni.showToast({
title: '状态修改成功',
icon: 'success'
})
setTimeout(() => {
this.orderPagination.pageNum = 1
this.quertData()
}, 500)
}
})
},
//
shareTap() {
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: 'http://uniapp.dcloud.io/',
title: 'uni-app分享',
summary: '我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/d8590190-4f28-11eb-b680-7980c8a877b8.png',
success: function (res) {
console.log('success:' + JSON.stringify(res))
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err))
}
})
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.wrapper { .wrapper {
width: 750rpx;
overflow: hidden;
.left-title {
font-size: 40rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: right;
font-weight: 500;
}
.top-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
height: 180rpx;
background-size: 100%;
.image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.right {
width: 140rpx;
}
.center {
position: relative;
left: -20rpx;
}
.title {
font-size: 34rpx;
color: #ffffff;
letter-spacing: 2rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.desc {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
padding-right: 32rpx;
}
.cut {
display: flex;
align-items: center;
font-size: 24rpx;
color: #ffffff;
letter-spacing: 0;
text-align: center;
font-weight: 400;
.cut-icon {
width: 29.42rpx;
height: 26.67rpx;
margin-left: 10rpx;
}
}
.set {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
position: relative;
top: 39rpx;
left: 60rpx;
}
}
.content {
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
display: flex;
flex-direction: row;
padding: 24rpx 0rpx 24rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 18rpx;
}
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
.icon {
position: relative;
top: -22rpx;
width: 150rpx;
height: 50rpx;
}
}
.sub-title {
position: relative;
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
top: -4rpx;
}
.desc {
font-size: 28rpx;
color: #555555;
letter-spacing: 0;
font-weight: 400;
padding-top: 10rpx;
line-height: 1.4;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
}
.btn {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: right;
font-weight: 400;
}
.divide {
width: 2rpx;
height: 32rpx;
background: #d8d8d8;
margin: 0 32rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
.offer-prices {
position: absolute;
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #007aff;
border-radius: 50%;
padding: 10rpx;
text-align: center;
width: 110rpx;
height: 110rpx;
border: 2rpx solid #f9f9f9;
box-shadow: 0rpx 4rpx 34rpx 0rpx rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.my-image {
width: 100rpx;
height: 100rpx;
}
width: 750rpx;
overflow: hidden;
.left-title {
font-size: 40rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: right;
font-weight: 500;
}
.top-box {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
height: 180rpx;
background-size: 100%;
.image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.right {
width: 140rpx;
}
.center {
position: relative;
left: -20rpx;
}
.title {
font-size: 34rpx;
color: #ffffff;
letter-spacing: 2rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.desc {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
padding-right: 32rpx;
}
.cut {
display: flex;
align-items: center;
font-size: 24rpx;
color: #ffffff;
letter-spacing: 0;
text-align: center;
font-weight: 400;
.cut-icon {
width: 29.42rpx;
height: 26.67rpx;
margin-left: 10rpx;
}
}
.set {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
position: relative;
top: 39rpx;
left: 60rpx;
}
}
.content {
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
display: flex;
flex-direction: row;
padding: 24rpx 0rpx 24rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 18rpx;
}
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
.icon {
position: relative;
top: -22rpx;
width: 150rpx;
height: 50rpx;
}
}
.sub-title {
position: relative;
font-size: 28rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
top: -4rpx;
}
.desc {
font-size: 28rpx;
color: #555555;
letter-spacing: 0;
font-weight: 400;
padding-top: 10rpx;
line-height: 1.4;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 28rpx;
color: #888888;
letter-spacing: 0;
font-weight: 400;
}
.btn {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: right;
font-weight: 400;
}
.divide {
width: 2rpx;
height: 32rpx;
background: #d8d8d8;
margin: 0 32rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
.offer-prices {
position: absolute;
z-index: 9999;
right: 32rpx;
bottom: 122rpx;
background-color: #007aff;
border-radius: 50%;
padding: 10rpx;
text-align: center;
width: 110rpx;
height: 110rpx;
border: 2rpx solid #f9f9f9;
box-shadow: 0rpx 4rpx 34rpx 0rpx rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.my-image {
width: 100rpx;
height: 100rpx;
}
} }
</style>
</style>

2
pages/search/index.vue

@ -37,7 +37,7 @@
<view class="packing-area" v-show="packingList.length > 0"> <view class="packing-area" v-show="packingList.length > 0">
<scroll-view scroll-y="true" class="scroll-area"> <scroll-view scroll-y="true" class="scroll-area">
<view class="search-item" v-for="item in packingList" :key="item.enterpriseId"> <view class="search-item" v-for="item in packingList" :key="item.enterpriseId">
<image class="item_image" :src="item.enterpriseLogo || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'"></image>
<image class="item_image" :src="item.enterpriseLogo || '/static/imgs/client-default.png'"></image>
<view class="item"> <view class="item">
<view class="name" v-html="transformTitle(item.enterpriseName)"></view> <view class="name" v-html="transformTitle(item.enterpriseName)"></view>
<text class="business">{{ transformBusiness(item.business) }}</text> <text class="business">{{ transformBusiness(item.business) }}</text>

BIN
static/imgs/client/client-default.png

Before After
Width: 140  |  Height: 140  |  Size: 13 KiB
Loading…
Cancel
Save