Compare commits
2 Commits
e9e1b75a94
...
8f579226ba
Author | SHA1 | Date | |
---|---|---|---|
|
8f579226ba | ||
|
c2fc13483b |
@ -129,6 +129,14 @@
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/scanFeedback/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -135,30 +135,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="content5">
|
||||
<div class="wrap4" v-show="isExpand1" :style="{top:`-${152*3}rpx`}">
|
||||
<div class="item">
|
||||
<div class="item_1">1</div>
|
||||
<div class="item_2">FL0011</div>
|
||||
<div class="item_3">长江万里</div>
|
||||
<div class="item_4">¥ 160</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item_1">1</div>
|
||||
<div class="item_2">FL0011</div>
|
||||
<div class="item_3">长江万里</div>
|
||||
<div class="item_4">¥ 160</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item_1">1</div>
|
||||
<div class="item_2">FL0011</div>
|
||||
<div class="item_3">长江万里</div>
|
||||
<div class="item_4">¥ 160</div>
|
||||
<div class="wrap4" v-show="isExpand1" :style="{top:`-${152*listPaintings.length}rpx`}">
|
||||
<div class="item" v-for="(item,index) in listPaintings">
|
||||
<div class="item_1">{{index+1}}</div>
|
||||
<div class="item_2">{{item.artworkNum}}</div>
|
||||
<div class="item_3">{{item.artworkName}}</div>
|
||||
<div class="item_4">¥ {{item.expectedPayment}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap3" @click="expand1" :style="{transform:`${isExpand1?'':'rotate(180deg)'}`}"> <img src="https://cdns.fontree.cn/fonchain-main/prod/image/default/approval/13639162-2871-4187-abc5-71c2d9f01ac2.png" alt=""></div>
|
||||
<div class="wrap1">
|
||||
<div class="wrap1_1">*仅微信付款</div>
|
||||
<div class="wrap1_2">预计 ¥{{expectedPayment}}</div>
|
||||
<div class="wrap1_2">预计 ¥{{totalMoney||'0'}}</div>
|
||||
</div>
|
||||
<div class="wrap2" @click="signContract">确认金额并签署合同</div>
|
||||
</div>
|
||||
@ -194,7 +182,7 @@
|
||||
</div>
|
||||
</u-popup>
|
||||
|
||||
<u-popup :round="15" :show="show_1" mode="bottom" @open="()=>{show_1=true}">
|
||||
<!-- <u-popup :round="15" :show="show_1" mode="bottom" @open="()=>{show_1=true}">
|
||||
<div class="poup">
|
||||
<div class="content1" style="margin-top: 20rpx">
|
||||
<div class="wrap1">寄存时长</div>
|
||||
@ -213,23 +201,23 @@
|
||||
@cancel="show=false"
|
||||
:minDate="minDate"
|
||||
></u-datetime-picker>
|
||||
<u--input
|
||||
<u--input
|
||||
readonly
|
||||
placeholder="点击选择"
|
||||
border="surround"
|
||||
v-model="listPaintings[currentIndex].endAt"
|
||||
></u--input>
|
||||
></u--input>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="content2"></div>
|
||||
<!– <div class="content2"></div>
|
||||
<div class="content4">起始日期</div>
|
||||
<div class="content5">
|
||||
<div class="wrap1">年份</div>
|
||||
<div class="wrap2">月</div>
|
||||
<div class="wrap3">日</div>
|
||||
</div>-->
|
||||
<!-- <div style="margin-left: -30rpx;margin-right: -30rpx">
|
||||
</div>–>
|
||||
<!– <div style="margin-left: -30rpx;margin-right: -30rpx">
|
||||
<picker-view indicator-class="test" :value="value" @change="changeData" class="picker-view">
|
||||
<picker-view-column>
|
||||
<view style="display: flex;align-items: center;justify-content: center" class="item"
|
||||
@ -248,12 +236,13 @@
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</div>
|
||||
<div class="content2"></div>-->
|
||||
<div class="content2"></div>–>
|
||||
<div class="content6" @click="confirmCycle">
|
||||
<div class="wrap1">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</u-popup>-->
|
||||
<u-picker :show="show_1" ref="uPicker" :columns="columns" @confirm="confirmDate" @close="show_1=false" @change="changeHandler"></u-picker>
|
||||
<u-loading-page bgColor="rgba(0,0,0,0.5)" :loading="loading" loading-text="正在进入法大大签署..."></u-loading-page>
|
||||
</div>
|
||||
</template>
|
||||
@ -281,8 +270,16 @@ export default {
|
||||
days.push(i)
|
||||
}
|
||||
return {
|
||||
columns: [
|
||||
[180],
|
||||
['*'],
|
||||
[1,2,3,4,5],
|
||||
['='],
|
||||
[180]
|
||||
],
|
||||
currentIndex:0,
|
||||
listPaintings:[{
|
||||
expectedPayment:'',
|
||||
fileList1:[],
|
||||
artworkNum:'',
|
||||
artworkName:'',
|
||||
@ -319,35 +316,101 @@ export default {
|
||||
day,
|
||||
value: [9999, month - 1, day - 1],
|
||||
visible: true,
|
||||
url: ''//二维码扫码的结果用户发起请求的body体
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
totalMoney(){
|
||||
return this.listPaintings.reduce((total, item) => {
|
||||
return total + Number(item.expectedPayment);
|
||||
}, 0);
|
||||
},
|
||||
currentArtworkSquareSize() {
|
||||
if (
|
||||
this.currentIndex >= 0 &&
|
||||
this.currentIndex < this.listPaintings.length
|
||||
) {
|
||||
return this.listPaintings[this.currentIndex].artworkSquareSize;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
currentEndAt() {
|
||||
if (
|
||||
this.currentIndex >= 0 &&
|
||||
this.currentIndex < this.listPaintings.length
|
||||
) {
|
||||
return this.listPaintings[this.currentIndex].endAt;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
'info.artworkSquareSize':{
|
||||
handler(){
|
||||
currentArtworkSquareSize(newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
this.obtainAmount()
|
||||
}
|
||||
},
|
||||
value1(newValue){
|
||||
this.obtainAmount()
|
||||
|
||||
currentEndAt(newValue, oldValue) {
|
||||
console.log(newValue,oldValue)
|
||||
if (newValue !== oldValue) {
|
||||
this.obtainAmount()
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad(load){
|
||||
if (load.url){
|
||||
this.url=load.url
|
||||
this.getDetailUrl()
|
||||
}
|
||||
if (load.type==='detail'){
|
||||
this.getData()
|
||||
}
|
||||
if (load.type==='scan'){
|
||||
this.listPaintings=uni.getStorageSync('scanlist')?.map((x)=>{
|
||||
return {
|
||||
...x,
|
||||
expectedPayment:'',
|
||||
warehouseID:'',
|
||||
fileList1:[ { url:x.artworkImg }]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
const date = new Date();
|
||||
date.setHours(0, 0, 0, 0);
|
||||
this.minDate = date.getTime() + 120 * 24 * 60 * 60 * 1000;
|
||||
this.getCycle()
|
||||
if (this.$mp.query.url){
|
||||
this.url=this.$mp.query.url
|
||||
this.getDetailUrl()
|
||||
}
|
||||
this.getAddress()
|
||||
const today = new Date();
|
||||
this.value = [today.getFullYear() - 1990, today.getMonth(), today.getDate() - 1]
|
||||
this.data = [today.getFullYear(), today.getMonth() + 1, today.getDate()]
|
||||
this.$nextTick(()=>{
|
||||
this.getheight()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const data1 = {
|
||||
ID: Number(this.$mp.query.ID)
|
||||
}
|
||||
const res1 = await postDataByParams('/api/v2/warehouse/detail', data1)
|
||||
if (res1.code === 200) {
|
||||
this.info = res1.data
|
||||
}
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e
|
||||
if (columnIndex === 2) {
|
||||
picker.setColumnValues(this.columns.length-1, [this.columns[2][e.index]*this.columns[0][0]])
|
||||
}
|
||||
},
|
||||
itemDelete(){
|
||||
this.listPaintings.splice(this.currentIndex,1)
|
||||
this.currentIndex=0
|
||||
@ -365,6 +428,7 @@ export default {
|
||||
},
|
||||
addPainting(){
|
||||
this.listPaintings.push({
|
||||
expectedPayment:'',
|
||||
fileList1:[],
|
||||
artworkNum:'',
|
||||
artworkName:'',
|
||||
@ -410,8 +474,9 @@ export default {
|
||||
return year + "-" + month + "-" + day;
|
||||
},
|
||||
confirmDate(data){
|
||||
this.listPaintings[this.currentIndex].endAt=this.timestampToDateString(data.value)
|
||||
this.show=false
|
||||
this.listPaintings[this.currentIndex].endAt=data.value[data.value.length-1]
|
||||
this.obtainAmount()
|
||||
this.show_1=false
|
||||
},
|
||||
openShow1(){
|
||||
if (!this.listPaintings[this.currentIndex].artworkSquareSize){
|
||||
@ -431,7 +496,6 @@ export default {
|
||||
filePath: url,
|
||||
name: "file",
|
||||
success: (res) => {
|
||||
console.log(res,'res')
|
||||
const { path } = JSON.parse(res.data).data;
|
||||
resolve(path);
|
||||
|
||||
@ -468,80 +532,80 @@ export default {
|
||||
async signContract(){
|
||||
const checks = [
|
||||
{
|
||||
value: this.fileList1.length>0,
|
||||
message: '请上传画作图片'
|
||||
value: 'fileList1',
|
||||
message: '画作图片'
|
||||
},
|
||||
{
|
||||
value: this.info.artworkSquareSize,
|
||||
message: '请输入画作平尺数'
|
||||
value: 'artworkSquareSize',
|
||||
message: '画作平尺数'
|
||||
},
|
||||
{
|
||||
value: this.info.artistName,
|
||||
message: '请输入画家名称'
|
||||
value: 'artistName',
|
||||
message: '画家名称'
|
||||
},
|
||||
{
|
||||
value: this.info.artworkName,
|
||||
message: '请输入画作名称'
|
||||
value: 'artworkName',
|
||||
message: '画作名称'
|
||||
},
|
||||
{
|
||||
value: this.info.artworkNum,
|
||||
message: '请输入画作编号'
|
||||
value: 'artworkNum',
|
||||
message: '画作编号'
|
||||
},{
|
||||
value: this.warehouseID,
|
||||
message: '请选择寄存地址'
|
||||
value: 'warehouseID',
|
||||
message: '寄存地址'
|
||||
}, {
|
||||
value: this.value1,
|
||||
message: '请选择寄存时长'
|
||||
value: 'endAt',
|
||||
message: '择寄存时长'
|
||||
}]
|
||||
for (const check of checks) {
|
||||
if (!check.value) {
|
||||
uni.showToast({
|
||||
title: check.message,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
for (const [index,item] of this.listPaintings.entries()) {
|
||||
for (const check of checks) {
|
||||
if (!item[check.value]) {
|
||||
uni.showToast({
|
||||
title: `请完善第${index+1}条数据的${check.message}`,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
this.loading=true
|
||||
const data={
|
||||
endAt:this.value1,
|
||||
warehouseID:this.warehouseID,
|
||||
artworkSquareSize:Number(this.info.artworkSquareSize),
|
||||
artworkName: this.info.artworkName,
|
||||
artworkImage:this.fileList1?.[0]?.url,
|
||||
artworkNum:this.info.artworkNum,
|
||||
artistName: this.info.artistName
|
||||
orders:this.listPaintings.map((x)=>{
|
||||
return {
|
||||
endAt:new Date(Date.now() + x.endAt * 86400000)?.toISOString()?.slice(0, 10),
|
||||
warehouseID:x.warehouseID,
|
||||
artworkSquareSize:Number(x.artworkSquareSize),
|
||||
artworkName: x.artworkName,
|
||||
artworkImage:x.fileList1?.[0]?.url,
|
||||
artworkNum:x.artworkNum,
|
||||
artistName: x.artistName
|
||||
}
|
||||
})
|
||||
}
|
||||
const res = await postDataByParams('/api/warehouse/fdd/contract/h5',data)
|
||||
const res = await postDataByParams('/api/v2/warehouse/fdd/contract/h5',data)
|
||||
if (res.code===200){
|
||||
uni.setStorageSync("jumpUrl", res.data.jumpUrl)
|
||||
this.info.artworkImg=this.fileList1[0].url
|
||||
uni.setStorageSync("orderingInfo", {
|
||||
endAt:this.value1,
|
||||
warehouseID:this.warehouseID,
|
||||
listPaintings: this.listPaintings,
|
||||
transactionId:res.data.transactionId,
|
||||
dayMoney:this.dayMoney,
|
||||
info:this.info,
|
||||
expectedPayment:this.expectedPayment,
|
||||
addressName:this.addressList.find(x=>x.ID===this.warehouseID).address
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: `/pages/signwebview/index`,
|
||||
});
|
||||
this.loading=false
|
||||
}
|
||||
|
||||
},
|
||||
async obtainAmount(){
|
||||
uni.setStorageSync("endAt", this.value1);
|
||||
uni.setStorageSync("endAt",new Date(Date.now() + this.listPaintings[this.currentIndex].endAt * 86400000)?.toISOString()?.slice(0, 10))
|
||||
const data={
|
||||
artworkSquareSize:Number(this.info.artworkSquareSize),
|
||||
endAt:this.value1
|
||||
orders:[
|
||||
{ artworkSquareSize:Number(this.listPaintings[this.currentIndex].artworkSquareSize),
|
||||
endAt:new Date(Date.now() + this.listPaintings[this.currentIndex].endAt * 86400000)?.toISOString()?.slice(0, 10)}
|
||||
]
|
||||
}
|
||||
const res = await postDataByParams('/api/warehouse/calculate',data)
|
||||
const res = await postDataByParams('/api/v2/warehouse/calculate',data)
|
||||
if (res.code===200){
|
||||
this.expectedPayment=res.data.money
|
||||
this.dayMoney=res.data.dayMoney
|
||||
this.listPaintings[this.currentIndex].expectedPayment=res.data.orders?.[0]?.money
|
||||
}
|
||||
},
|
||||
confirmCycle() {
|
||||
|
@ -48,13 +48,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
scanOrder() {
|
||||
uni.removeStorageSync('scanlist')
|
||||
uni.scanCode({
|
||||
onlyFromCamera: false,
|
||||
success: res => {
|
||||
console.log("条码类型:" + res.scanType);
|
||||
console.log("条码内容:" + res.result);
|
||||
uni.navigateTo({
|
||||
url: "/pages/consignment-painting/index?url=" + res.result
|
||||
url: "/pages/scanFeedback/index?url=" + res.result
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -228,7 +228,7 @@ export default {
|
||||
},
|
||||
goRouter(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order-goods/order-details?ID=${item.ID}`
|
||||
url: `/pages/confirm-order/index?type=detail&ID=${item.ID}`
|
||||
})
|
||||
},
|
||||
search() {
|
||||
|
@ -5,46 +5,37 @@
|
||||
mode="scaleToFill"
|
||||
style="width:218rpx;height:54rpx;margin-top:150rpx"
|
||||
/>
|
||||
<view class="info">
|
||||
<view>
|
||||
<image :src="info.artworkImg" mode="scaleToFill" style="width:191rpx;height:146rpx"/>
|
||||
<view class="content">
|
||||
<view class="content1" v-for="(item,index) in info">
|
||||
<view class="wrap1">
|
||||
画作{{index+1}}:
|
||||
</view>
|
||||
<view class="info-right">
|
||||
<view class="info-right-item">
|
||||
<view class="title">画作编号</view>
|
||||
<view class="content">{{ info.artworkNum }}</view>
|
||||
<view class="wrap2">
|
||||
<view class="wrap2_1">
|
||||
<view class="wrap2_1_1"></view>
|
||||
<view class="wrap2_1_2">{{item.artworkNum}}</view>
|
||||
<view class="wrap2_1_3">{{item.artworkName}}</view>
|
||||
</view>
|
||||
<view class="info-right-item">
|
||||
<view class="title">画作名称</view>
|
||||
<view class="content">{{ info.artworkName }}</view>
|
||||
</view>
|
||||
<view class="info-right-item">
|
||||
<view class="title">画家名称</view>
|
||||
<view class="content">{{ info.artistName }}</view>
|
||||
</view>
|
||||
<view class="info-right-item">
|
||||
<view class="title">画作平尺数</view>
|
||||
<view class="content">{{ info.artworkSquareSize }}</view>
|
||||
<view class="wrap2_2">
|
||||
<view class="wrap2_2_1">
|
||||
<view class="wrap2_2_1_1">订单编号</view>
|
||||
<view class="wrap2_2_1_2">{{ item.num }}</view>
|
||||
</view>
|
||||
<view class="wrap2_2_1">
|
||||
<view class="wrap2_2_1_1">寄存地址</view>
|
||||
<view class="wrap2_2_1_2">{{item.warehouseName}}</view>
|
||||
</view>
|
||||
<view class="wrap2_2_1">
|
||||
<view class="wrap2_2_1_1">寄存期限</view>
|
||||
<view class="wrap2_2_1_2">{{item.endAt}}</view>
|
||||
</view>
|
||||
<view class="wrap2_2_1">
|
||||
<view class="wrap2_2_1_1">付款金额</view>
|
||||
<view class="wrap2_2_1_2">{{item.money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-info">
|
||||
<view class="info-right-item">
|
||||
<view class="title">订单编号</view>
|
||||
<view class="content">{{ info.artworkNum }}</view>
|
||||
</view>
|
||||
<view class="info-right-item">
|
||||
<view class="title">寄存地址</view>
|
||||
<view class="content">{{ info.warehouseName }}</view>
|
||||
</view>
|
||||
<view class="info-right-item">
|
||||
<view class="title">寄存时限</view>
|
||||
<view class="content">{{ info.cycleName }}</view>
|
||||
</view>
|
||||
<view class="info-right-item">
|
||||
<view class="title">付款金额</view>
|
||||
<view class="content">{{ info.money }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">*请携带您的画作在时限之前到达寄存地</view>
|
||||
<view class="btns">
|
||||
@ -65,17 +56,19 @@ export default {
|
||||
name: 'paySuccess',
|
||||
data() {
|
||||
return {
|
||||
info: {}
|
||||
listPaintings:[],
|
||||
info: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
goDetails(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/order-goods/order-details?ID=${this.$mp.query.ID}`,
|
||||
});
|
||||
url:`/pages/confirm-order/index?type=detail&ID=${this.$mp.query.ID}`
|
||||
})
|
||||
},
|
||||
goHome(){
|
||||
uni.switchTab({
|
||||
@ -86,7 +79,7 @@ export default {
|
||||
const data1 = {
|
||||
ID: Number(this.$mp.query.ID)
|
||||
}
|
||||
const res1 = await postDataByParams('/api/warehouse/detail', data1)
|
||||
const res1 = await postDataByParams('/api/v2/warehouse/detail', data1)
|
||||
if (res1.code === 200) {
|
||||
this.info = res1.data
|
||||
}
|
||||
@ -105,6 +98,75 @@ export default {
|
||||
align-items: center;
|
||||
padding: 32rpx;
|
||||
flex-direction: column;
|
||||
.content{
|
||||
margin-top: 110rpx;
|
||||
max-height: 768rpx;
|
||||
overflow-y: scroll;
|
||||
.content1{
|
||||
box-sizing: border-box;
|
||||
width: 686rpx;
|
||||
height: 374rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding-left: 18rpx;
|
||||
padding-right: 24rpx;
|
||||
&:not(:first-child){
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.wrap2{
|
||||
display: flex;
|
||||
padding-top: 18rpx;
|
||||
padding-bottom: 10rpx;
|
||||
.wrap2_2{
|
||||
margin-left: 34rpx;
|
||||
.wrap2_2_1{
|
||||
margin-top: 42rpx;
|
||||
&:first-child{
|
||||
margin-top: 0;
|
||||
}
|
||||
display: flex;
|
||||
.wrap2_2_1_1{
|
||||
margin-right: 60rpx;
|
||||
color: rgba(98, 98, 98, 1);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.wrap2_2_1_2{
|
||||
color: rgba(147, 147, 147, 1);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wrap2_1{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.wrap2_1_3{
|
||||
color: rgba(147, 147, 147, 1);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.wrap2_1_2{
|
||||
margin-top: 10rpx;
|
||||
color: rgba(147, 147, 147, 1);
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
.wrap2_1_1{
|
||||
border-radius: 20rpx;
|
||||
width: 190rpx;
|
||||
height: 190rpx;
|
||||
background-color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wrap1{
|
||||
font-weight: bold;
|
||||
height: 76rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-right-item {
|
||||
color: #626262;
|
||||
|
132
pages/scanFeedback/index.vue
Normal file
132
pages/scanFeedback/index.vue
Normal file
@ -0,0 +1,132 @@
|
||||
<script>
|
||||
import {postDataByParams} from "../../http/service";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
data(){
|
||||
return {
|
||||
url:'',
|
||||
list:[]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
scanOrder() {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: false,
|
||||
success: res => {
|
||||
this.url=res.result
|
||||
this.getDetailUrl()
|
||||
}
|
||||
})
|
||||
},
|
||||
completeScan(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/consignment-painting/index?type=scan'
|
||||
})
|
||||
},
|
||||
async getDetailUrl() {
|
||||
const data = {
|
||||
url: this.url
|
||||
}
|
||||
const res = await postDataByParams('/api/warehouse/ocr', data)
|
||||
if (res.code === 200) {
|
||||
if (uni.getStorageSync('scanlist')){
|
||||
uni.setStorageSync('scanlist', [...uni.getStorageSync('scanlist'),res.data])
|
||||
}else {
|
||||
uni.setStorageSync('scanlist', [res.data])
|
||||
}
|
||||
this.list=uni.getStorageSync('scanlist')
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted(){
|
||||
if (this.$mp.query.url){
|
||||
this.url=this.$mp.query.url
|
||||
this.getDetailUrl()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="content1">
|
||||
<div class="wrap1">
|
||||
<img src="https://cdns.fontree.cn/fonchain-main/prod/image/default/approval/500b8411-c3ab-485a-af51-28d877c7524d.png" alt="">
|
||||
</div>
|
||||
<div class="wrap2">扫描成功-{{list.length}}</div>
|
||||
<div class="wrap3">
|
||||
<div class="wrap3_1" @click="scanOrder">继续扫描</div>
|
||||
<div class="wrap3_2" @click="completeScan">完成扫描</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container{
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
background-color: grey;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.content1{
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-left: 42rpx;
|
||||
padding-right: 42rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #fff;
|
||||
width: 640rpx;
|
||||
height: 438rpx;
|
||||
.wrap3{
|
||||
margin-top: 96rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.wrap3_2{
|
||||
margin-left: 18rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color:#fff ;
|
||||
width: 270rpx;
|
||||
height: 64rpx;
|
||||
background-color: rgba(118, 196, 88, 1);
|
||||
}
|
||||
.wrap3_1{
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color:rgba(118, 196, 88, 1) ;
|
||||
width: 270rpx;
|
||||
height: 64rpx;
|
||||
border: 1rpx solid rgba(118, 196, 88, 1);
|
||||
}
|
||||
}
|
||||
.wrap2{
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
margin-top: 56rpx;
|
||||
|
||||
}
|
||||
.wrap1{
|
||||
margin-top: 38rpx;
|
||||
img{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user