You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
352 lines
7.8 KiB
352 lines
7.8 KiB
<template>
|
|
<view class="page1">
|
|
<view class="top" ref="top">
|
|
<view @tap="backPage" style="width: 80rpx;height: 80rpx;margin: 98rpx 0 0 30rpx;">
|
|
<uni-icons type="left" color="#fff" size="27"></uni-icons>
|
|
</view>
|
|
<view class="top1">
|
|
<view class="hello-box">
|
|
<view class="hello-left">
|
|
<text
|
|
style="font-size: 40rpx;font-weight: 800;line-height: 56rpx;color: rgba(86, 132, 255, 1);">Hi</text>
|
|
</view>
|
|
<view class="hello-name">
|
|
你好,{{shopName}}
|
|
</view>
|
|
<view class="hello-right"></view>
|
|
|
|
</view>
|
|
<view class="hello-text">
|
|
欢迎使用快衣店AI助手~
|
|
</view>
|
|
<view class="ai-bot"></view>
|
|
</view>
|
|
</view>
|
|
<view class="content">
|
|
<view style="height: 80rpx;line-height: 80rpx;font-size: 32rpx;font-weight: bold;padding-left: 30rpx;position: relative;">
|
|
入库列表
|
|
<view @tap="goAiPicture" style="position: absolute;top: 0;right: 20rpx;">
|
|
<uni-icons type="plusempty" size="26"></uni-icons>
|
|
</view>
|
|
</view>
|
|
<view class="content-list" v-for="(item,index) in aiList" :key="index">
|
|
<view class="image-box">
|
|
<view class="image">AI</view>
|
|
</view>
|
|
<view class="content-text">
|
|
<view class="text" style="font-weight: bold;font-size: 32rpx;color: #000;margin-top:36rpx;">
|
|
{{item.createTime}}
|
|
</view>
|
|
<view class="text">总数:{{item.count}} (成功:{{item.ocrCount}})</view>
|
|
</view>
|
|
<view class="content-btn">
|
|
<text class="blink" v-if="item.inStorageStatus==2">识别中...</text>
|
|
<text style="position: absolute;top: 40rpx;right: 20rpx;" v-else>识别完成</text>
|
|
<view class="btn" @tap="montageData(item.id)" v-if="item.inStorageStatus==3">去入库</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
components: {},
|
|
data() {
|
|
return {
|
|
aiList:[],
|
|
carList1:[],
|
|
purchaseDetails:[],
|
|
shopName:''
|
|
}
|
|
},
|
|
onPullDownRefresh(){
|
|
this.getList()
|
|
},
|
|
onShow() {
|
|
this.carList1 = []
|
|
this.getList()
|
|
},
|
|
onLoad() {
|
|
this.shopName = uni.getStorageSync('shopName')
|
|
},
|
|
methods: {
|
|
getList(){
|
|
this.tui.request("/app/purchase/getPurchaseList", "POST", {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
isAiList: 1
|
|
}, false, false).then((res) => {
|
|
this.aiList = res.result.records
|
|
setTimeout(function () {
|
|
uni.stopPullDownRefresh();
|
|
}, 500);
|
|
}).catch((res) => {})
|
|
uni.stopPullDownRefresh()
|
|
},
|
|
backPage(){
|
|
uni.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
sliceMsg(val) {
|
|
var name = ''
|
|
if (typeof(val) == 'string') {
|
|
let newObj = JSON.parse(val)
|
|
for (let as in newObj) {
|
|
name += newObj[as] + '/'
|
|
}
|
|
}
|
|
return name;
|
|
},
|
|
async montageData(id){
|
|
this.tui.request("/app/purchase/getPurchaseAllDataOfAi?id=" + id, "POST", {}, false, false)
|
|
.then((res) => {
|
|
this.purchaseDetails = res.result.purchaseDetails
|
|
uni.setStorageSync('AiInventoryId', res.result.purchase.id)
|
|
for(let i=0;i<this.purchaseDetails.length;i++){
|
|
let data = {
|
|
id: this.purchaseDetails[i].id,
|
|
price: this.purchaseDetails[i].price,
|
|
productCount: 0,
|
|
categoryId:this.purchaseDetails[i].categoryId,
|
|
wholesalePrice: this.purchaseDetails[i].wholesalePrice,
|
|
purchasePrice:this.purchaseDetails[i].purchasePrice,
|
|
isNew: this.purchaseDetails[i].productId==null?true:false,
|
|
productId:this.purchaseDetails[i].productId,
|
|
productName: this.purchaseDetails[i].productName,
|
|
productSn: this.purchaseDetails[i].productSn,
|
|
productPicture: this.purchaseDetails[i].productPicture,
|
|
supplierName: this.purchaseDetails[i].supplierName,
|
|
saleDetailQueryDTO: []
|
|
}
|
|
for(let m=0;m<this.purchaseDetails[i].stockLogList1.length;m++){
|
|
let list = {
|
|
attributeList: this.purchaseDetails[i].stockLogList1[m].attributeList,
|
|
productCount:this.purchaseDetails[i].stockLogList1[m].productCount,
|
|
productNum:'',
|
|
name: this.sliceMsg(this.purchaseDetails[i].stockLogList1[m].attributeList),
|
|
price: this.purchaseDetails[i].stockLogList1[m].purchasePrice
|
|
}
|
|
data.productCount += this.purchaseDetails[i].stockLogList1[m].productCount
|
|
data.saleDetailQueryDTO.push(list)
|
|
}
|
|
this.carList1.push(data)
|
|
|
|
}
|
|
}).catch((res) => {})
|
|
|
|
setTimeout(res => {
|
|
this.goInventory()
|
|
}, 300)
|
|
|
|
},
|
|
goInventory(){
|
|
console.log('来来',this.carList1)
|
|
uni.setStorageSync('carList1', this.carList1)
|
|
uni.navigateTo({
|
|
url: '/pages/inventory/AIInventory'
|
|
})
|
|
},
|
|
goAiPicture(){
|
|
uni.navigateTo({
|
|
url: '/package1/AI/AIPicture'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page,
|
|
.page1 {
|
|
background: #FAF7F7;
|
|
}
|
|
|
|
.top {
|
|
width: 780rpx;
|
|
height: 390rpx;
|
|
opacity: 1;
|
|
background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.top1 {
|
|
width: 780rpx;
|
|
height: 390rpx;
|
|
opacity: 1;
|
|
background: linear-gradient(360deg, #FAF7F7 0%, rgba(255, 255, 255, 0) 100%);
|
|
}
|
|
|
|
.ai-bot {
|
|
position: absolute;
|
|
top: 200rpx;
|
|
right: 40rpx;
|
|
width: 90rpx;
|
|
height: 110rpx;
|
|
background-size: 100% !important;
|
|
background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/66dc640d9e8f4749a234d9ef2af1b257.png) no-repeat;
|
|
}
|
|
|
|
.hello-box {
|
|
position: absolute;
|
|
left: 42rpx;
|
|
top: 205rpx;
|
|
width: 220rpx;
|
|
height: 56rpx;
|
|
|
|
.hello-left {
|
|
width: 102rpx;
|
|
height: 56rpx;
|
|
opacity: 1;
|
|
background: #fff;
|
|
border-radius: 3px;
|
|
text-align: center;
|
|
transform: skewX(8deg);
|
|
}
|
|
|
|
.hello-right {
|
|
position: absolute;
|
|
left: 5px;
|
|
bottom: 0rpx;
|
|
width: 220rpx;
|
|
height: 2px;
|
|
opacity: 1;
|
|
background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
|
|
}
|
|
|
|
.hello-name {
|
|
position: absolute;
|
|
left: 118rpx;
|
|
top: 0;
|
|
width: 400rpx;
|
|
height: 55rpx;
|
|
font-size: 32rpx;
|
|
line-height: 55rpx;
|
|
color: white;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
.hello-text {
|
|
position: absolute;
|
|
top: 275rpx;
|
|
left: 50rpx;
|
|
color: #fff;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.content-list {
|
|
width: 95%;
|
|
height: 170rpx;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
margin: 0 auto 20rpx;
|
|
overflow: hidden;
|
|
display: block;
|
|
}
|
|
|
|
.image-box {
|
|
width: 120rpx;
|
|
height: 170rpx;
|
|
display: block;
|
|
overflow: hidden;
|
|
float: left;
|
|
}
|
|
|
|
.image {
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
margin: 35rpx 0 0 20rpx;
|
|
font-size: 36rpx;
|
|
background: #8470FF;
|
|
border-radius: 50%;
|
|
text-align: center;
|
|
line-height: 100rpx;
|
|
color: #fff;
|
|
}
|
|
|
|
.content-text {
|
|
width: 400rpx;
|
|
height: 200rpx;
|
|
float: left;
|
|
line-height: 50rpx;
|
|
padding-left: 30rpx;
|
|
}
|
|
|
|
.text {
|
|
color: #747474;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.content-btn {
|
|
position: relative;
|
|
width: 190rpx;
|
|
height: 170rpx;
|
|
float: left;
|
|
}
|
|
|
|
.btn {
|
|
position: absolute;
|
|
width: 120rpx;
|
|
height: 60rpx;
|
|
background: linear-gradient(90deg, #6691fb 0%, #6ad3fe 100%);
|
|
color: #fff;
|
|
border-radius: 6px;
|
|
text-align: center;
|
|
line-height: 60rpx;
|
|
bottom: 20rpx;
|
|
right: 20rpx;
|
|
}
|
|
|
|
@keyframes blinking {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
|
|
50% {
|
|
opacity: 0;
|
|
}
|
|
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.blink {
|
|
position: absolute;
|
|
top: 40rpx;
|
|
right: 20rpx;
|
|
animation: blinking 1s infinite;
|
|
}
|
|
|
|
.bottom {
|
|
position: fixed;
|
|
bottom: 100rpx;
|
|
right: 50rpx;
|
|
background: linear-gradient(90deg, #6691fb 0%, #6ad3fe 100%);
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.btn-x {
|
|
width: 2px;
|
|
height: 40rpx;
|
|
background: #fff;
|
|
border-radius: 2rpx;
|
|
position: absolute;
|
|
top: 40rpx;
|
|
left: 59rpx;
|
|
}
|
|
|
|
.btn-y {
|
|
width: 40rpx;
|
|
height: 2px;
|
|
background: #fff;
|
|
border-radius: 2rpx;
|
|
position: absolute;
|
|
top: 59rpx;
|
|
left: 40rpx;
|
|
}
|
|
</style>
|