Browse Source

询价bug

devlop
邓雄飞 4 years ago
parent
commit
a2d9b7de06
12 changed files with 1896 additions and 1857 deletions
  1. 42
      pages.json
  2. 626
      pages/enquiry-list/index.vue
  3. 1170
      pages/for-comparison/index.vue
  4. 7
      pages/order-detail/index.vue
  5. 1242
      pages/paper-details/index.vue
  6. 666
      pages/store/index.vue
  7. BIN
      static/imgs/tabbar/cart-blue.png
  8. BIN
      static/imgs/tabbar/cart-gray.png
  9. BIN
      static/imgs/tabbar/mine-blue.png
  10. BIN
      static/imgs/tabbar/mine-gray.png
  11. BIN
      static/imgs/tabbar/store-blue.png
  12. BIN
      static/imgs/tabbar/store-gray.png

42
pages.json

@ -137,23 +137,23 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/account-management/index",
"style": {
"navigationBarTitleText": "账号管理",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/add-account/index",
"style": {
"navigationBarTitleText": "新增企业账号",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
},
{
"path": "pages/account-management/index",
"style": {
"navigationBarTitleText": "账号管理",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/add-account/index",
"style": {
"navigationBarTitleText": "新增企业账号",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
@ -175,14 +175,14 @@
}, },
{ {
"pagePath": "pages/cart/index", "pagePath": "pages/cart/index",
"iconPath": "static/imgs/tabbar/store-gray.png",
"selectedIconPath": "static/imgs/tabbar/store-blue.png",
"iconPath": "static/imgs/tabbar/cart-gray.png",
"selectedIconPath": "static/imgs/tabbar/cart-blue.png",
"text": "购物车" "text": "购物车"
}, },
{ {
"pagePath": "pages/mine/index", "pagePath": "pages/mine/index",
"iconPath": "static/imgs/tabbar/store-gray.png",
"selectedIconPath": "static/imgs/tabbar/store-blue.png",
"iconPath": "static/imgs/tabbar/mine-gray.png",
"selectedIconPath": "static/imgs/tabbar/mine-blue.png",
"text": "个人中心" "text": "个人中心"
} }
] ]

626
pages/enquiry-list/index.vue

@ -1,56 +1,64 @@
<template> <template>
<view class="warpper">
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="询价列表"></uni-nav-bar>
<view class="">
<view class="status-bar">
<view v-for="(item, index) in statusBarArray" :key="index" :class="{ box: true, 'box--selected': current == index }" @click="selectStatus(item, index)">
{{ item }}
</view>
</view>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff">
<view class="content" v-for="(item, index) in list" :key="index">
<uGap v-if="index > 0"></uGap>
<view class="header">
<view class="header-title">{{ item.belongEnterpriseName }}</view>
<view class="header-value">
<text :class="item.status == 30131 || item.status == 30138 ? 'failure' : ''">{{ item.status | statusName }}</text>
</view>
</view>
<view class="box" v-if="item.status != 30116 && item.status != 30131">
<view class="list-box" v-for="(sitem, sindex) in item.itemList" :key="sindex">
<image class="image" :src="sitem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image>
<view class="info-box">
<view class="name">{{ sitem.brandName }}</view>
<view class="value">
{{ sitem.categoryName }}/{{ sitem.paperName }}/{{ sitem.gramWeight }}g/{{ sitem.width }}*{{ sitem.length }}/{{ sitem.quantity }}
</view>
</view>
</view>
</view>
<view class="box" v-else>
<view class="list-box" v-for="(sitem, sindex) in item.reply.replyItemList" :key="sindex">
<image class="image" :src="sitem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image>
<view class="info-box">
<view class="name">{{ sitem.brandName }}</view>
<view class="value">
{{ sitem.categoryName }}/{{ sitem.paperName }}/{{ sitem.gramWeight }}g/{{ sitem.width }}*{{ sitem.length }}/{{ sitem.quantity }}
</view>
</view>
</view>
</view>
<view class="other" v-if="item.status == 30116 || item.status == 30131">
<view class="left">{{ item.createTime }}</view>
<view class="right">
<view class="">
<text class="price" v-if="item.reply">¥ {{ item.reply.totalPrice }}</text>
</view>
<view class="btn" @tap="placeOrderTap(item,item.reply.replyItemList)" v-if="item.status == 30116">去下单</view>
</view>
</view>
</view>
</scroll-list>
</view>
</view>
<view class="wrapper">
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="询价列表"></uni-nav-bar>
<view class="">
<view class="status-bar">
<view v-for="(item, index) in statusBarArray" :key="index" :class="{ box: true, 'box--selected': current == index }" @click="selectStatus(item, index)">
{{ item }}
</view>
</view>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback">
<view class="content" v-for="(item, index) in list" :key="index">
<uGap v-if="index > 0"></uGap>
<view class="header">
<view class="header-title">{{ item.belongEnterpriseName }}</view>
<view class="header-value">
<text :class="item.status == 30131 || item.status == 30138 ? 'failure' : ''">{{ item.status | statusName }}</text>
</view>
</view>
<view class="box" v-if="item.status != 30116 && item.status != 30131">
<view class="list-box" v-for="(subItem, subIndex) in item.itemList" :key="subIndex">
<image
class="image"
:src="subItem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode=""
></image>
<view class="info-box">
<view class="name">{{ subItem.brandName }}</view>
<view class="value">
{{ subItem.categoryName }}/{{ subItem.paperName }}/{{ subItem.gramWeight }}g/{{ subItem.width }}*{{ subItem.length }}/{{ subItem.quantity }}
</view>
</view>
</view>
</view>
<view class="box" v-else>
<view class="list-box" v-for="(subItem, subIndex) in item.reply.replyItemList" :key="subIndex">
<image
class="image"
:src="subItem.productImg || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode=""
></image>
<view class="info-box">
<view class="name">{{ subItem.brandName }}</view>
<view class="value">
{{ subItem.categoryName }}/{{ subItem.paperName }}/{{ subItem.gramWeight }}g/{{ subItem.width }}*{{ subItem.length }}/{{ subItem.quantity }}
</view>
</view>
</view>
</view>
<view class="other" v-if="item.status == 30116 || item.status == 30131">
<view class="left">{{ item.createTime }}</view>
<view class="right">
<view class="">
<text class="price" v-if="item.reply">¥ {{ item.reply.totalPrice }}</text>
</view>
<view class="btn" @tap="placeOrderTap(item, item.reply.replyItemList)" v-if="item.status == 30116">去下单</view>
</view>
</view>
</view>
</scroll-list>
</view>
</view>
</template> </template>
<script> <script>
@ -58,268 +66,266 @@ import { go2, back } from '@/utils/hook.js'
import uGap from '@/components/u-gap/u-gap.vue' import uGap from '@/components/u-gap/u-gap.vue'
import { getEnquiryOrder, createByEnquiry } from '@/apis/enquiryListApi.js' import { getEnquiryOrder, createByEnquiry } from '@/apis/enquiryListApi.js'
export default { export default {
components: { uGap },
data() {
return {
current: 0,
statusBarArray: ['全部', '待报价', '已报价', '已成交'],
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false,
emptyImage: '/static/imgs/order/order-empty.png'
},
components: { uGap },
data() {
return {
current: 0,
statusBarArray: ['全部', '待报价', '已报价', '已成交'],
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false,
emptyImage: '/static/imgs/order/order-empty.png'
},
pagination: {
status: 0,
pageNum: 0, //
pageSize: 10
},
list: []
}
},
filters: {
statusName(e) {
let name = ''
switch (e) {
case 30114:
name = '待报价'
break
case 30116:
name = '已报价'
break
case 30131:
name = '已成交'
break
case 30138:
name = '已失效'
break
default:
break
}
return name
}
},
onShow() {
// this.getList()
},
methods: {
go2,
back,
selectStatus(item, index) {
this.current = index
this.pagination.status = index
this.downCallback()
},
getList() {
return new Promise((resolve, reject) => {
getEnquiryOrder({ ...this.pagination })
.then(res => {
// console.log('', res.records)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
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()
})
},
//
placeOrderTap(item, replyItemList) {
console.log('replyItemList', replyItemList)
const params = {
enquiryId: item.id,
orderGoodsList: replyItemList,
purchaserEnterpriseId: this.$store.state.companyInfo.id,
userId: this.$store.state.userInfo.userId,
// purchaserEnterpriseId: '677166943471538176',
// userId: '573244119569272832',
}
createByEnquiry(params).then(res => {
if (res) {
uni.showToast({
title: '下单成功',
icon: 'success'
})
setTimeout(() => {
go2('order-make', { orderId: item.orderId })
}, 500)
}
})
}
}
pagination: {
status: 0,
pageNum: 0, //
pageSize: 10
},
list: []
}
},
filters: {
statusName(e) {
let name = ''
switch (e) {
case 30114:
name = '待报价'
break
case 30116:
name = '已报价'
break
case 30131:
name = '已成交'
break
case 30138:
name = '已失效'
break
default:
break
}
return name
}
},
onShow() {
this.downCallback()
},
methods: {
go2,
back,
selectStatus(item, index) {
this.current = index
this.pagination.status = index
this.downCallback()
},
getList() {
return new Promise((resolve, reject) => {
getEnquiryOrder({ ...this.pagination })
.then((res) => {
// console.log('', res.records)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
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()
})
},
//
placeOrderTap(item, replyItemList) {
const params = {
enquiryId: item.id,
orderGoodsList: replyItemList,
purchaserEnterpriseId: this.$store.state.companyInfo.id,
userId: this.$store.state.userInfo.userId
}
createByEnquiry(params).then((res) => {
if (res) {
uni.showToast({
title: '下单成功',
icon: 'success'
})
setTimeout(() => {
go2('order-make', { orderId: res.orderId })
}, 500)
}
})
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.warpper {
display: flex;
flex-direction: column;
flex: 1;
height: 100vh;
.status-bar {
flex-grow: 0;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
// border-bottom: 2rpx solid #DDDDDD;
background-color: #fff;
border-bottom: 2rpx solid rgba($color: #dddddd, $alpha: 0.8);
height: 90rpx;
.box {
height: 86rpx;
flex-grow: 0;
flex-shrink: 0;
color: #000000;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
// border-bottom: 4rpx solid #f8f8f8;
}
.box--selected {
border-bottom: 4rpx solid #007aff;
color: #007aff;
}
}
.content {
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 88rpx;
background: #ffffff;
padding: 0rpx 32rpx;
border-bottom: 2rpx solid #dddddd;
.header-title {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
}
.header-value {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
.failure {
color: #888888;
}
}
}
.box {
padding: 24rpx 32rpx;
.list-box:nth-last-child(even) {
border-bottom: 2rpx solid #dddddd;
}
.list-box {
display: flex;
flex-direction: row;
height: 148rpx;
background: #ffffff;
.wrapper {
display: flex;
flex-direction: column;
flex: 1;
height: 100vh;
.status-bar {
flex-grow: 0;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
// border-bottom: 2rpx solid #DDDDDD;
background-color: #fff;
border-bottom: 2rpx solid rgba($color: #dddddd, $alpha: 0.8);
height: 90rpx;
.box {
height: 86rpx;
flex-grow: 0;
flex-shrink: 0;
color: #000000;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
// border-bottom: 4rpx solid #f8f8f8;
}
.box--selected {
border-bottom: 4rpx solid #007aff;
color: #007aff;
}
}
.content {
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 88rpx;
background: #ffffff;
padding: 0rpx 32rpx;
border-bottom: 2rpx solid #dddddd;
.header-title {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
font-weight: 500;
}
.header-value {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
.failure {
color: #888888;
}
}
}
.box {
background-color: #fff;
padding: 24rpx 32rpx;
.list-box:nth-last-child(even) {
border-bottom: 2rpx solid #dddddd;
}
.list-box {
display: flex;
flex-direction: row;
height: 148rpx;
background: #ffffff;
padding: 24rpx 0rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 20rpx;
}
.info-box {
.name {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 400;
padding-top: 4rpx;
}
.value {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
padding-top: 26rpx;
}
}
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0rpx 32rpx;
height: 80rpx;
background: #ffffff;
border-top: 2rpx solid #dddddd;
.left {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.right {
display: flex;
align-items: center;
.price {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
}
.btn {
margin-left: 24rpx;
width: 132rpx;
height: 54rpx;
line-height: 54rpx;
background: #007aff;
border-radius: 27rpx;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
}
}
}
padding: 24rpx 0rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 20rpx;
}
.info-box {
.name {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 400;
padding-top: 4rpx;
}
.value {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
padding-top: 26rpx;
}
}
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0rpx 32rpx;
height: 80rpx;
background: #ffffff;
border-top: 2rpx solid #dddddd;
.left {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.right {
display: flex;
align-items: center;
.price {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
}
.btn {
margin-left: 24rpx;
width: 132rpx;
height: 54rpx;
line-height: 54rpx;
background: #007aff;
border-radius: 27rpx;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
text-align: center;
font-weight: 500;
}
}
}
}
} }
</style>
</style>

1170
pages/for-comparison/index.vue
File diff suppressed because it is too large
View File

7
pages/order-detail/index.vue

@ -223,6 +223,9 @@ export default {
let outboundQuantity = 0 let outboundQuantity = 0
if (list && list.length > 0) { if (list && list.length > 0) {
list.forEach((item) => { list.forEach((item) => {
if (item.userName && item.userName.length > 3) {
item.userName = item.userName.substr(0, 2) + '...'
}
if (item.status == '30301') { if (item.status == '30301') {
step1.push({ step1.push({
title: '分切', title: '分切',
@ -231,13 +234,13 @@ export default {
} else if (item.status == '30302') { } else if (item.status == '30302') {
step2.push({ step2.push({
title: '出库', title: '出库',
desc: item.userName + item.quantity + '\n\r' + item.createTime
desc: item.userName + ' ' + item.quantity + '\n\r' + item.createTime
}) })
outboundQuantity += item.quantity outboundQuantity += item.quantity
} else if (item.status == '30303') { } else if (item.status == '30303') {
step3.push({ step3.push({
title: '完成', title: '完成',
desc: '已收货'
desc: '已完成'
}) })
} }
}) })

1242
pages/paper-details/index.vue
File diff suppressed because it is too large
View File

666
pages/store/index.vue

@ -1,344 +1,352 @@
<template> <template>
<view class="warpper">
<qnHeader class="header">
<view class="header-title">店铺首页</view>
<view class=""></view>
</qnHeader>
<view class="top-box">
<view class="">
<!-- <image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image> -->
<image class="image" :src="customerInfo.logo || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image>
</view>
<view class="center">
<view class="title">{{ customerInfo.name }}</view>
<view class="desc">全部商品 {{ customerInfo.productNumber }} &nbsp; | &nbsp;上新 {{ customerInfo.currentProductNumber }}</view>
</view>
</view>
<view class="search-box">
<uni-easyinput
v-model="enterpriseName"
:inputBorder="false"
:clearSize="18"
:placeholderStyle="'font-size:25rpx;text-align: center;font-weight: 400;color: rgba(34,34,34,0.75);'"
placeholder="搜索"
confirmType="search"
type="text"
class="easyinput"
prefixIcon="search"
@confirm="searchConfirm"
/>
</view>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #FFFFFF;">
<view class="content">
<view class="box" v-for="(item, index) in list" :key="index" @tap="seeDetailsTap(item)">
<view class="image-box">
<view class=""><image class="special-img" :src="item.isPromoting ? '/static/imgs/store/special-offe.png' : ''" mode=""></image></view>
<image class="image" :src="item.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif'" mode=""></image>
</view>
<view class="title">{{ item.name }}</view>
<view class="desc">
<view class="">
<image class="icon" src="/static/imgs/store/address-icon.png"></image>
<text style="padding-left: 6rpx;">{{ customerInfo.area }}</text>
</view>
<view class="">库存:{{ item.stock || XX }} {{ item.stockUnit == 1 ? '张' : '吨' }}</view>
</view>
<view class="footer">
<view class="left">
<text class="price">{{ item.priceRange }}</text>
<!-- <text class="unit">/</text> -->
</view>
<view class="btn">马上抢</view>
</view>
</view>
</view>
</scroll-list>
</view>
<view class="warpper">
<qnHeader class="header">
<view class="header-title">店铺首页</view>
<view class=""></view>
</qnHeader>
<view class="top-box">
<view class="">
<!-- <image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png" mode=""></image> -->
<image
class="image"
:src="customerInfo.logo || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode=""
></image>
</view>
<view class="center">
<view class="title">{{ customerInfo.name }}</view>
<view class="desc">全部商品 {{ customerInfo.productNumber }} &nbsp; | &nbsp;上新 {{ customerInfo.currentProductNumber }}</view>
</view>
</view>
<view class="search-box">
<uni-easyinput
v-model="enterpriseName"
:inputBorder="false"
:clearSize="18"
:placeholderStyle="'font-size:25rpx;text-align: center;font-weight: 400;color: rgba(34,34,34,0.75);'"
placeholder="搜索"
confirmType="search"
type="text"
class="easyinput"
prefixIcon="search"
@confirm="searchConfirm"
/>
</view>
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #ffffff">
<view class="content">
<view class="box" v-for="(item, index) in list" :key="index" @tap="seeDetailsTap(item)">
<view class="image-box">
<view class=""><image class="special-img" :src="item.isPromoting ? '/static/imgs/store/special-offe.png' : ''" mode=""></image></view>
<image
class="image"
:src="item.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'"
mode=""
></image>
</view>
<view class="title">{{ item.name }}</view>
<view class="desc">
<view class="">
<image class="icon" src="/static/imgs/store/address-icon.png"></image>
<text style="padding-left: 6rpx">{{ customerInfo.area }}</text>
</view>
<view class="">库存:{{ item.stock || 'XX' }} {{ item.stockUnit == 1 ? '张' : '吨' }}</view>
</view>
<view class="footer">
<view class="left">
<text class="price">{{ item.priceRange }}</text>
<!-- <text class="unit">/</text> -->
</view>
<view class="btn">马上抢</view>
</view>
</view>
</view>
</scroll-list>
</view>
</template> </template>
<script> <script>
import qnHeader from '@/components/qn-header/qn-header.vue' import qnHeader from '@/components/qn-header/qn-header.vue'
import { go2 } from '@/utils/hook.js'
import { go2, loginGo2 } from '@/utils/hook.js'
import { getCustomer, getPaperList } from '@/apis/storeApi.js' import { getCustomer, getPaperList } from '@/apis/storeApi.js'
export default { export default {
components: { qnHeader },
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
params: {
asc: '',
desc: '',
name: '',
name: '',
supplierId: this.$store.state.supplierId || null
},
pagination: {
pageNum: 0, //
pageSize: 10
},
enterpriseName: '',
list: [],
customerParams: {
supplierId: this.$store.state.supplierId || null
// supplierId: '677166944742412288'
},
customerInfo: {}
}
},
onLoad() {
this.getCustomer()
},
methods: {
seeDetailsTap(item) {
go2('paper-details', { id: item.id })
},
//
getCustomer() {
getCustomer(this.customerParams).then(res => {
// console.log('', res)
if (res) {
this.customerInfo = res
}
})
},
getList() {
return new Promise((resolve, reject) => {
getPaperList({ ...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 })
}
})
.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()
})
},
searchConfirm(value) {
this.params.name = value
this.pagination.pageNum = 1
this.getList()
}
}
components: { qnHeader },
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
params: {
asc: '',
desc: '',
name: '',
name: '',
supplierId: this.$store.state.supplierId || null
},
pagination: {
pageNum: 0, //
pageSize: 10
},
enterpriseName: '',
list: [],
customerParams: {
supplierId: this.$store.state.supplierId || null
// supplierId: '677166944742412288'
},
customerInfo: {}
}
},
onLoad() {
this.getCustomer()
},
methods: {
seeDetailsTap(item) {
loginGo2('paper-details', { id: item.id })
},
//
getCustomer() {
getCustomer(this.customerParams).then((res) => {
// console.log('', res)
if (res) {
this.customerInfo = res
}
})
},
getList() {
return new Promise((resolve, reject) => {
getPaperList({ ...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 })
}
})
.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()
})
},
searchConfirm(value) {
this.params.name = value
this.pagination.pageNum = 1
this.getList()
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.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;
}
}
.top-box {
display: flex;
flex-direction: row;
align-items: center;
// justify-content: space-around;
height: 180rpx;
background: url('/static/imgs/store/store-icon.png') no-repeat;
background-size: 100%;
.image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-left: 32rpx;
}
.right {
width: 140rpx;
}
.center {
padding-left: 20rpx;
}
.title {
font-size: 34rpx;
color: #ffffff;
letter-spacing: 2rpx;
font-weight: 600;
padding-bottom: 12rpx;
}
.desc {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
padding-right: 32rpx;
padding-top: 12rpx;
}
.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;
}
}
.search-box {
display: flex;
align-items: center;
justify-content: center;
padding: 0rpx 32rpx;
height: 104rpx;
background: #ffffff;
.easyinput {
height: 72rpx;
background: #f5f6f7;
border-radius: 16rpx;
}
}
.content {
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
padding: 0rpx 32rpx 20rpx 32rpx;
.box {
// height: 514rpx;
width: 330rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 28rpx 0rpx rgba(112, 112, 112, 0.1);
border-radius: 10rpx;
.special-img {
width: 110rpx;
height: 110rpx;
position: absolute;
z-index: 10;
}
.image {
width: 330rpx;
height: 330rpx;
z-index: 9;
border-top-left-radius: 10rpx;
}
.title {
padding: 0rpx 16rpx;
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
padding-top: 10rpx;
}
.desc {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 20rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
padding: 16rpx 16rpx 10rpx 16rpx;
.icon {
width: 16rpx;
height: 16rpx;
}
}
.footer {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 10rpx 16rpx 37rpx 16rpx;
.left {
flex-grow: 1;
flex-shrink: 1;
}
.price {
font-size: 34rpx;
color: #f5222d;
letter-spacing: 0;
font-weight: 600;
}
.unit {
font-size: 24rpx;
color: #f5222d;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.btn {
flex-grow: 0;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
// text-align: center;
width: 108rpx;
height: 48rpx;
background: #ff4849;
border-radius: 27rpx;
ont-size: 26rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 400;
}
}
}
}
.right-title {
font-size: 28rpx;
color: #007aff;
text-align: center;
line-height: 40rpx;
font-weight: 500;
}
}
.top-box {
display: flex;
flex-direction: row;
align-items: center;
// justify-content: space-around;
height: 180rpx;
background: url('/static/imgs/store/store-icon.png') no-repeat;
background-size: 100%;
.image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-left: 32rpx;
}
.right {
width: 140rpx;
}
.center {
padding-left: 20rpx;
}
.title {
font-size: 34rpx;
color: #ffffff;
letter-spacing: 2rpx;
font-weight: 600;
padding-bottom: 12rpx;
}
.desc {
opacity: 0.75;
font-size: 28rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
padding-right: 32rpx;
padding-top: 12rpx;
}
.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;
}
}
.search-box {
display: flex;
align-items: center;
justify-content: center;
padding: 0rpx 32rpx;
height: 104rpx;
background: #ffffff;
.easyinput {
height: 72rpx;
background: #f5f6f7;
border-radius: 16rpx;
}
}
.content {
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: wrap;
padding: 0rpx 32rpx 20rpx 32rpx;
.box {
// height: 514rpx;
width: 330rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 28rpx 0rpx rgba(112, 112, 112, 0.1);
border-radius: 10rpx;
.special-img {
width: 110rpx;
height: 110rpx;
position: absolute;
z-index: 10;
}
.image {
width: 330rpx;
height: 330rpx;
z-index: 9;
border-top-left-radius: 10rpx;
}
.title {
padding: 0rpx 16rpx;
font-size: 28rpx;
color: #000000;
letter-spacing: 0;
font-weight: 500;
padding-top: 10rpx;
}
.desc {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 20rpx;
color: #333333;
letter-spacing: 0;
font-weight: 400;
padding: 16rpx 16rpx 10rpx 16rpx;
.icon {
width: 16rpx;
height: 16rpx;
}
}
.footer {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 10rpx 16rpx 37rpx 16rpx;
.left {
flex-grow: 1;
flex-shrink: 1;
}
.price {
font-size: 34rpx;
color: #f5222d;
letter-spacing: 0;
font-weight: 600;
}
.unit {
font-size: 24rpx;
color: #f5222d;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.btn {
flex-grow: 0;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
// text-align: center;
width: 108rpx;
height: 48rpx;
background: #ff4849;
border-radius: 27rpx;
ont-size: 26rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 400;
}
}
}
}
} }
</style> </style>

BIN
static/imgs/tabbar/cart-blue.png

Before After
Width: 44  |  Height: 44  |  Size: 1.0 KiB

BIN
static/imgs/tabbar/cart-gray.png

Before After
Width: 44  |  Height: 44  |  Size: 1.9 KiB

BIN
static/imgs/tabbar/mine-blue.png

Before After
Width: 45  |  Height: 45  |  Size: 957 B

BIN
static/imgs/tabbar/mine-gray.png

Before After
Width: 44  |  Height: 44  |  Size: 1.5 KiB

BIN
static/imgs/tabbar/store-blue.png

Before After
Width: 45  |  Height: 45  |  Size: 959 B Width: 45  |  Height: 45  |  Size: 1.1 KiB

BIN
static/imgs/tabbar/store-gray.png

Before After
Width: 45  |  Height: 45  |  Size: 1.1 KiB Width: 45  |  Height: 45  |  Size: 1.7 KiB
Loading…
Cancel
Save