|
|
|
@ -5,168 +5,156 @@ |
|
|
|
<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></view> |
|
|
|
<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">东莞市隆兴纸业有限公司</view> |
|
|
|
<view class="desc">全部商品 39 | 上新 9</view> |
|
|
|
<view class="title">{{ customerInfo.name }}</view> |
|
|
|
<view class="desc">全部商品 {{ customerInfo.productNumber }} | 上新 {{ 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" |
|
|
|
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" |
|
|
|
@input="search" |
|
|
|
@confirm="addHistory" |
|
|
|
@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 7" :key="index"> |
|
|
|
<view class="content"> |
|
|
|
<view class="box" v-for="(item, index) in list" :key="index"> |
|
|
|
<view class="image-box"> |
|
|
|
<view class=""> |
|
|
|
<image class="special-img" src="/static/imgs/store/special-offe.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="title"> |
|
|
|
博汇朱雀白卡 |
|
|
|
<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;">广州市</text> |
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
库存:9600张 |
|
|
|
<text style="padding-left: 6rpx;">{{ customerInfo.area }}</text> |
|
|
|
</view> |
|
|
|
<view class="">库存:{{ item.stock || XX }} {{ item.stockUnit == 1 ? '张' : '吨' }}</view> |
|
|
|
</view> |
|
|
|
<view class="footer"> |
|
|
|
<view class=""> |
|
|
|
<text class="price">¥2300</text> |
|
|
|
<text class="unit">/吨</text> |
|
|
|
</view> |
|
|
|
<view class="btn" @tap="seeDetailsTap(item)"> |
|
|
|
马上抢 |
|
|
|
<view class="left"> |
|
|
|
<text class="price">{{ item.priceRange }}</text> |
|
|
|
<!-- <text class="unit">/吨</text> --> |
|
|
|
</view> |
|
|
|
<view class="btn" @tap="seeDetailsTap(item)">马上抢</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="box"> |
|
|
|
<view class="image-box"> |
|
|
|
<view class=""> |
|
|
|
<image class="special-img" src="/static/imgs/store/special-offe.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="title"> |
|
|
|
博汇朱雀白卡 |
|
|
|
</view> |
|
|
|
<view class="desc"> |
|
|
|
<view class=""> |
|
|
|
<image class="icon" src="/static/imgs/store/address-icon.png"></image> |
|
|
|
<text style="padding-left: 6rpx;">广州市</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
库存:9600张 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="footer"> |
|
|
|
<view class=""> |
|
|
|
<text class="price">¥2300</text> |
|
|
|
<text class="unit">/吨</text> |
|
|
|
</view> |
|
|
|
<view class="btn"> |
|
|
|
马上抢 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</scroll-list> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import qnHeader from '@/components/qn-header/qn-header.vue' |
|
|
|
import { go2 } from '@/utils/hook.js' |
|
|
|
export default { |
|
|
|
components: {qnHeader}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
option: { |
|
|
|
size: 10, |
|
|
|
auto: true, |
|
|
|
emptyText: '暂无数据~', |
|
|
|
background: '#F7F8FA', |
|
|
|
disabled: false |
|
|
|
}, |
|
|
|
params: {}, |
|
|
|
pagination: { |
|
|
|
pageNum: 0, // 初始会执行一次下拉加载 |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
enterpriseName: '', |
|
|
|
list: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
seeDetailsTap(item) { |
|
|
|
go2('paper-details', {id: null}) |
|
|
|
import qnHeader from '@/components/qn-header/qn-header.vue' |
|
|
|
import { go2 } from '@/utils/hook.js' |
|
|
|
import { getCustomer, getPaperList } from '@/apis/storeApi.js' |
|
|
|
export default { |
|
|
|
components: { qnHeader }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
option: { |
|
|
|
size: 10, |
|
|
|
auto: true, |
|
|
|
emptyText: '暂无数据~', |
|
|
|
background: '#F7F8FA', |
|
|
|
disabled: false |
|
|
|
}, |
|
|
|
getList() { |
|
|
|
// return new Promise((resolve, reject) => { |
|
|
|
// getDeviceInfo({ ...this.params, ...this.pagination }) |
|
|
|
// .then(res => { |
|
|
|
// res.records.forEach(el => { |
|
|
|
// el.collapse = false |
|
|
|
// el.isShowSelect = false |
|
|
|
// }) |
|
|
|
// 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) |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
params: { |
|
|
|
asc: '', |
|
|
|
desc: '', |
|
|
|
name: '', |
|
|
|
name: '', |
|
|
|
supplierId: this.$store.state.supplierId || null |
|
|
|
}, |
|
|
|
downCallback() { |
|
|
|
// this.pagination.pageNum = 1 |
|
|
|
// this.getList() |
|
|
|
// .then(({ list, total }) => { |
|
|
|
// this.$refs.list.refreshSuccess({ list, total }) |
|
|
|
// }) |
|
|
|
// .catch(() => { |
|
|
|
// this.$refs.list.refreshFail() |
|
|
|
// }) |
|
|
|
pagination: { |
|
|
|
pageNum: 0, // 初始会执行一次下拉加载 |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
upCallback() { |
|
|
|
// this.pagination.pageNum++ |
|
|
|
// this.getList() |
|
|
|
// .then(({ list, total }) => { |
|
|
|
// this.$refs.list.loadSuccess({ list, total }) |
|
|
|
// }) |
|
|
|
// .catch(() => { |
|
|
|
// this.$refs.list.loadFail() |
|
|
|
// }) |
|
|
|
enterpriseName: '', |
|
|
|
list: [], |
|
|
|
customerParams: { |
|
|
|
supplierId: this.$store.state.supplierId || null |
|
|
|
// supplierId: '677166944742412288' |
|
|
|
}, |
|
|
|
search() {}, |
|
|
|
addHistory(value) {} |
|
|
|
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() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
@ -180,7 +168,7 @@ |
|
|
|
text-align: center; |
|
|
|
font-weight: 500; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.right-title { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #007aff; |
|
|
|
@ -205,7 +193,6 @@ |
|
|
|
} |
|
|
|
.right { |
|
|
|
width: 140rpx; |
|
|
|
|
|
|
|
} |
|
|
|
.center { |
|
|
|
padding-left: 20rpx; |
|
|
|
@ -225,7 +212,6 @@ |
|
|
|
font-weight: 500; |
|
|
|
padding-right: 32rpx; |
|
|
|
padding-top: 12rpx; |
|
|
|
|
|
|
|
} |
|
|
|
.cut { |
|
|
|
display: flex; |
|
|
|
@ -258,10 +244,10 @@ |
|
|
|
justify-content: center; |
|
|
|
padding: 0rpx 32rpx; |
|
|
|
height: 104rpx; |
|
|
|
background: #FFFFFF; |
|
|
|
background: #ffffff; |
|
|
|
.easyinput { |
|
|
|
height: 72rpx; |
|
|
|
background: #F5F6F7; |
|
|
|
background: #f5f6f7; |
|
|
|
border-radius: 16rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -273,15 +259,15 @@ |
|
|
|
padding: 0rpx 32rpx 20rpx 32rpx; |
|
|
|
.box { |
|
|
|
// height: 514rpx; |
|
|
|
background: #FFFFFF; |
|
|
|
box-shadow: 0rpx 8rpx 28rpx 0rpx rgba(112,112,112,0.1); |
|
|
|
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; |
|
|
|
@ -296,7 +282,6 @@ |
|
|
|
letter-spacing: 0; |
|
|
|
font-weight: 500; |
|
|
|
padding-top: 10rpx; |
|
|
|
|
|
|
|
} |
|
|
|
.desc { |
|
|
|
display: flex; |
|
|
|
@ -319,30 +304,36 @@ |
|
|
|
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; |
|
|
|
color: #f5222d; |
|
|
|
letter-spacing: 0; |
|
|
|
font-weight: 600; |
|
|
|
} |
|
|
|
.unit { |
|
|
|
font-size: 24rpx; |
|
|
|
color: #F5222D; |
|
|
|
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; |
|
|
|
background: #ff4849; |
|
|
|
border-radius: 27rpx; |
|
|
|
ont-size: 26rpx; |
|
|
|
color: #FFFFFF; |
|
|
|
color: #ffffff; |
|
|
|
letter-spacing: 0; |
|
|
|
font-weight: 400; |
|
|
|
} |
|
|
|
|