|
|
|
@ -19,48 +19,51 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #FFFFFF;"> |
|
|
|
<view v-for="(item, index) in listData" :key="index" @click="detailInfo(item)"> |
|
|
|
<view class="content"> |
|
|
|
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image> |
|
|
|
<view class=""> |
|
|
|
<view class="title"> |
|
|
|
<view class="">{{item.brandName}}</view> |
|
|
|
<view class=""> |
|
|
|
<image class="icon" :src="item.status === 1 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" mode=""></image> |
|
|
|
<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" @click="detailInfo(item)"> |
|
|
|
<view class="content"> |
|
|
|
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image> |
|
|
|
<view class=""> |
|
|
|
<view class="title"> |
|
|
|
<view class="">{{ item.brandName }}</view> |
|
|
|
<view class=""> |
|
|
|
<image class="icon" :src="item.status === 1 ? '/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">克重(价格):200(3900) 235(3900) 255(390 0)255(390</view> |
|
|
|
</view> |
|
|
|
<view class="sub-title">{{item.categoryName}}/{{item.name}}/{{item.manufacturerName}}</view> |
|
|
|
<view class="desc">克重(价格):200(3900) 235(3900) 255(390 0)255(390</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="other"> |
|
|
|
<view class="time">{{item.updateTime}}</view> |
|
|
|
<view class="btn"> |
|
|
|
<view class="" @click="editPaper()">编辑</view> |
|
|
|
<view class="divide"></view> |
|
|
|
<view class="" @click="productStatusChange(item)">{{item.status=== '30111'?'下架':'上架'}}</view> |
|
|
|
<view class="other"> |
|
|
|
<view class="time">{{ item.updateTime }}</view> |
|
|
|
<view class="btn"> |
|
|
|
<view class="" @click="editPaper()">编辑</view> |
|
|
|
<view class="divide"></view> |
|
|
|
<view class="" @click="productStatusChange(item)">{{ item.status === '30111' ? '下架' : '上架' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
</view> |
|
|
|
</scroll-list> |
|
|
|
</scroll-list> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view class="offer-prices" @click="nativeTo()"> |
|
|
|
<image class="my-image" src="../../static/imgs/trade/camera.png" mode=""></image> |
|
|
|
</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> |
|
|
|
|
|
|
|
<script> |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import { back, go2, loginG2 } from '@/utils/hook.js' |
|
|
|
import { SupplierList,productStatus } from '@/apis/add-paper.js' |
|
|
|
import { SupplierList, productStatus } from '@/apis/add-paper.js' |
|
|
|
import noData from './no-data.vue' |
|
|
|
export default { |
|
|
|
components: { uGap }, |
|
|
|
components: { uGap, noData }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
pageShow: true, |
|
|
|
option: { |
|
|
|
size: 10, |
|
|
|
auto: true, |
|
|
|
@ -79,11 +82,11 @@ export default { |
|
|
|
orderPagination: { |
|
|
|
pageNum: 0, // 初始会执行一次下拉加载 |
|
|
|
pageSize: 10, |
|
|
|
storeId:null, |
|
|
|
name:null, |
|
|
|
supplierId:this.$store.state.supplierInfo.id |
|
|
|
storeId: null, |
|
|
|
name: null, |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
}, |
|
|
|
listData:[] |
|
|
|
listData: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
@ -91,13 +94,17 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
back, |
|
|
|
// 获取纸品列表 |
|
|
|
// 获取纸品列表 pageShow |
|
|
|
quertData() { |
|
|
|
console.log('this.$store.state',this.$store.state) |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
SupplierList({ ...this.orderPagination }) |
|
|
|
SupplierList({ ...this.orderPagination }) |
|
|
|
.then(res => { |
|
|
|
console.log('纸品列表', res) |
|
|
|
if (res) { |
|
|
|
if (res.records.length === 0) { |
|
|
|
this.pageShow = false |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.orderPagination.pageNum == 1) { |
|
|
|
this.listData = res.records |
|
|
|
} else { |
|
|
|
@ -140,28 +147,28 @@ export default { |
|
|
|
var params = { |
|
|
|
title: '添加纸品' |
|
|
|
} |
|
|
|
go2('add-paper',params) |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
// 编辑事件 |
|
|
|
editPaper(){ |
|
|
|
editPaper() { |
|
|
|
var params = { |
|
|
|
title: '编辑纸品' |
|
|
|
} |
|
|
|
go2('add-paper',params) |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
// 店铺设置按钮 |
|
|
|
setting(){ |
|
|
|
setting() { |
|
|
|
go2('store-settings') |
|
|
|
}, |
|
|
|
// 详情点击事件 |
|
|
|
detailInfo(){ |
|
|
|
detailInfo() { |
|
|
|
loginGo2('paper-detail') |
|
|
|
}, |
|
|
|
// 上下架事件 |
|
|
|
productStatusChange(item){ |
|
|
|
productStatusChange(item) { |
|
|
|
var params = { |
|
|
|
id:item.id, |
|
|
|
status:item.status === '30111'?'30112':'30111' |
|
|
|
id: item.id, |
|
|
|
status: item.status === '30111' ? '30112' : '30111' |
|
|
|
} |
|
|
|
productStatus(params).then(res => { |
|
|
|
if (res) { |
|
|
|
@ -174,7 +181,7 @@ export default { |
|
|
|
}, 1000) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -340,7 +347,7 @@ export default { |
|
|
|
z-index: 9999; |
|
|
|
right: 32rpx; |
|
|
|
bottom: 122rpx; |
|
|
|
background-color: #007AFF; |
|
|
|
background-color: #007aff; |
|
|
|
border-radius: 50%; |
|
|
|
padding: 10rpx; |
|
|
|
text-align: center; |
|
|
|
|