xingyy
xingyy 1 year ago
parent cbfdf4bc0d
commit 2d0e817c1f

@ -3,7 +3,7 @@ import tabBar from "./util/tabbar";
export default { export default {
onLaunch: function() { onLaunch: function() {
uni.setStorageSync("token",'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MCwiT3BlbklkIjoib01qYXY2eFFjQUttUW1ZUTFXV20zOXlCQUZ4byIsIk5pY2tOYW1lIjoiIiwiVGVsTnVtIjoiMTgyMDUwNTI2MjciLCJBdmF0YXIiOiIiLCJJRE51bSI6IiIsImV4cCI6MTY5NTQzNjEwMSwiaXNzIjoibWFsbCJ9.qYzFMtoOOBuawYDTl7iuwlTTz7Fakhr8657PjxWhQ8I') uni.setStorageSync("token",'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MCwiT3BlbklkIjoib01qYXY2eFFjQUttUW1ZUTFXV20zOXlCQUZ4byIsIk5pY2tOYW1lIjoi6K645pe76L22IiwiVGVsTnVtIjoiMTgyMDUwNTI2MjciLCJBdmF0YXIiOiIiLCJJRE51bSI6IjMyMDUwNDE5OTgwOTE2NDAzMyIsImV4cCI6MTY5NjA0MTE4MCwiaXNzIjoibWFsbCJ9.bNsyjyMDacBrBlmP556rznofYq11M9AkoDpeixolE4o')
uni.hideTabBar(); uni.hideTabBar();
uni.setStorageSync("tabBar", tabBar); uni.setStorageSync("tabBar", tabBar);
}, },

@ -20,7 +20,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content1{ .content1{
height: 52rpx; height: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;

@ -71,6 +71,7 @@
{ {
"path": "pages/order-goods/order-details", "path": "pages/order-goods/order-details",
"style": { "style": {
"navigationStyle": "custom",
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -126,19 +127,22 @@
}, },
"uniIdRouter": {}, "uniIdRouter": {},
"tabBar": { "tabBar": {
"list": [
// list {
"list": [{ "pagePath": "pages/home/index",
"pagePath": "pages/home/index" "text": "首页"
}, },
{ {
"pagePath": "pages/mine/index" "pagePath": "pages/mine/index",
"text": "首页"
}, },
{ {
"pagePath": "pages/contract/index" "pagePath": "pages/contract/index",
"text": "首页"
}, },
{ {
"pagePath": "pages/order-goods/index" "pagePath": "pages/order-goods/index",
"text": "首页"
} }
] ]
} }

@ -45,15 +45,15 @@
<image :src="item.artworkImg?item.artworkImg:'../../static/jx632@3x.png'"></image> <image :src="item.artworkImg?item.artworkImg:'../../static/jx632@3x.png'"></image>
</div> </div>
<div class="wrap1_2"> <div class="wrap1_2">
<div class="wrap1_2_1">{{item.artworkName}}</div> <div class="wrap1_2_1">{{ item.artworkName }}</div>
<div class="wrap1_2_2">订单号:{{item.artworkName}}</div> <div class="wrap1_2_2">订单号:{{ item.artworkName }}</div>
<div class="wrap1_2_3">{{item.artworkSquareSize}}平尺</div> <div class="wrap1_2_3">{{ item.artworkSquareSize }}平尺</div>
<div class="wrap1_2_4">{{item.startAt}}-{{item.endAt}}</div> <div class="wrap1_2_4">{{ item.startAt }}-{{ item.endAt }}</div>
</div> </div>
<div class="wrap1_3" :class="[`status${item.artworkStatus}`]"> <div class="wrap1_3" :class="[`status${item.artworkStatus}`]">
<div class="wrap1_3_1" v-if="item.artworkStatus===4"> <div class="wrap1_3_1" v-if="item.artworkStatus===4">
<div class="wrap1_3_1_1">2023.09.28</div> <div class="wrap1_3_1_1">2023.09.28</div>
<div class="wrap1_3_1_2">超时</div> <div class="wrap1_3_1_2">延期</div>
<div class="wrap1_3_1_3">点击补款</div> <div class="wrap1_3_1_3">点击补款</div>
</div> </div>
<div class="wrap1_3_3" v-if="item.artworkStatus!==4"> <div class="wrap1_3_3" v-if="item.artworkStatus!==4">
@ -61,17 +61,18 @@
</div> </div>
<div class="wrap1_3_2"> <div class="wrap1_3_2">
<div class="wrap1_3_2_1">货架号:</div> <div class="wrap1_3_2_1">货架号:</div>
<div class="wrap1_3_2_2">{{item.shelvesNum}}</div> <div class="wrap1_3_2_2">{{ item.shelvesNum }}</div>
</div> </div>
</div> </div>
<div class="wrap1_4" v-if="item.isRight&&item.artworkStatus===5"> <div class="wrap1_4" v-if="item.isRight&&item.artworkStatus===5" @click.stop="openDelete(item)">
<image style="width: 80rpx;height: 80rpx" src="../../static/zu154@3x.png"></image> <image style="width: 80rpx;height: 80rpx" src="../../static/zu154@3x.png"></image>
</div> </div>
</div> </div>
</div> </div>
</scroll-view> </scroll-view>
<u-modal :show="show_1" title="确认删除吗" @cancel="show_1=false" @confirm="deleteClick" confirmText="确认"
cancelText="取消" showCancelButton></u-modal>
<tabbar :current="1"></tabbar> <tabbar :current="1"></tabbar>
</div> </div>
</template> </template>
@ -84,18 +85,20 @@ export default {
name: "index", name: "index",
data() { data() {
return { return {
show_1: false,
show: false, show: false,
mobileKey: '', mobileKey: '',
startX: 0, startX: 0,
windowWidth: 0, windowWidth: 0,
page: 1, page: 1,
item: null,
artworkStatus: 0, artworkStatus: 0,
pageSize: 999, pageSize: 999,
mainList: [], mainList: [],
statusValue: [{label: '全部状态', value: 0}, {label: '入库', value: 1}, { statusValue: [{label: '全部状态', value: 0}, {label: '入库', value: 1}, {
label: '已入库', label: '已入库',
value: 2 value: 2
}, {label: '即将到期', value: 3}, {label: '超时', value: 4}, {label: '已取', value: 5}] }, {label: '即将到期', value: 3}, {label: '已延期', value: 4}, {label: '已取', value: 5}]
} }
}, },
components: {UImage, tabbar}, components: {UImage, tabbar},
@ -108,10 +111,35 @@ export default {
}) })
}, },
methods: { methods: {
goRouter(){ openDelete(item) {
uni.navigateTo({ this.show_1 = true
url:'/pages/order-goods/order-details' this.item = item
}) },
async deleteClick() {
this.show_1 = false
const data = {
ID: this.item.ID
}
const res = await postDataByParams('/api/warehouse/remove', data)
if (res.code === 200) {
this.getData()
uni.showToast({
title: '删除成功',
icon: 'none'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
},
goRouter(item) {
uni.navigateTo({
url: `/pages/order-goods/order-details?ID=${item.ID}`
})
}, },
search() { search() {
this.getData() this.getData()
@ -130,7 +158,7 @@ export default {
const data = { const data = {
page: this.page, // page: this.page, //
pageSize: this.pageSize, // pageSize: this.pageSize, //
status: this.artworkStatus, //(1- 2- 3- 4- 5-) status: this.artworkStatus, //(1- 2- 3- 4- 5-)
mobileKey: this.mobileKey mobileKey: this.mobileKey
} }
const res = await postDataByParams('/api/warehouse/list', data) const res = await postDataByParams('/api/warehouse/list', data)
@ -140,10 +168,10 @@ export default {
this.$set(x, 'distanceX', 0) this.$set(x, 'distanceX', 0)
this.$set(x, 'isRight', false) this.$set(x, 'isRight', false)
}) })
}else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon:'none' icon: 'none'
}) })
} }
}, },
@ -214,12 +242,15 @@ export default {
position: relative; position: relative;
width: 144rpx; width: 144rpx;
height: 228rpx; height: 228rpx;
&.status5{
&.status5 {
background: #939393; background: #939393;
.wrap1_3_3_1 { .wrap1_3_3_1 {
color: #939393; color: #939393;
} }
} }
&.status1 { &.status1 {
background: #FFBA00; background: #FFBA00;
@ -243,6 +274,7 @@ export default {
color: #FF4848; color: #FF4848;
} }
} }
&.status4 { &.status4 {
background: #FF4848; background: #FF4848;

@ -1,56 +1,135 @@
<template> <template>
<div class="order-details" :style="{background:'url('+'../../static/bbj1@3x.png'+')'}"> <div class="order-details" >
<div class="content1"> <title-block class="title-block" title="订单库">
<div class="wrap1"> <template #left>
<image src="../../static/zu506@3x.png"></image> <div> <image style="width: 112rpx;height: 52rpx" src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png" @click="back"></image></div>
</template>
</title-block>
<div :style="{height:`${distance}px`}" style="overflow-y: auto">
<div style="padding-bottom: 128rpx">
<div class="content2">
<image src="../../static/zu709@3x.png"></image>
</div>
<div class="content3">
<div class="wrap1">
<div class="wrap1_1">
<div class="wrap1_1_1">画作编号</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkNum"/>
</div>
<div class="wrap1_1_4"></div>
</div> </div>
<div class="wrap2"> <div class="wrap1_1">
订单号的详情 <div class="wrap1_1_1">画作名称</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkName"/>
</div>
<div class="wrap1_1_4"></div>
</div> </div>
<div class="wrap3"> <div class="wrap1_1">
<image src="../../static/zu594@3x.png"></image> <div class="wrap1_1_1">画家名称</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artistName"/>
</div>
<div class="wrap1_1_4">
</div>
</div>
<div class="wrap1_1">
<div class="wrap1_1_1">画作平尺数</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkSquareSize"/>
</div>
</div> </div>
</div> </div>
<div class="content2"> <div class="wrap2"></div>
<image src="../../static/zu709@3x.png"></image> </div>
</div> <div class="content3" >
<div class="content3"> <div class="wrap1">
<div class="wrap1"> <div class="wrap1_1">
<div class="wrap1_1"> <div class="wrap1_1_1">订单编号</div>
<div class="wrap1_1_1">画作编号</div> <div class="wrap1_1_2"></div>
<div class="wrap1_1_2"></div> <div class="wrap1_1_3">
<div class="wrap1_1_3"> <input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkNum"/>
<input placeholder-style="color: #939393;font-size: 24rpx;" placeholder="画作编号"/>
</div>
<div class="wrap1_1_4"></div>
</div> </div>
<div class="wrap1_1"> <div class="wrap1_1_4"></div>
<div class="wrap1_1_1">画作名称</div> </div>
<div class="wrap1_1_2"></div> <div class="wrap1_1">
<div class="wrap1_1_3"> <div class="wrap1_1_1">订单状态</div>
<input placeholder-style="color: #939393;font-size: 24rpx;" placeholder="画作名称"/> <div class="wrap1_1_2"></div>
</div> <div class="wrap1_1_3">
<div class="wrap1_1_4"></div> <input disabled :placeholder-style="statusValue.find(x=>x.value===info.artworkStatus).style" :placeholder="statusValue.find(x=>x.value===info.artworkStatus).label"/>
</div> </div>
<div class="wrap1_1"> <div class="wrap1_1_4"></div>
<div class="wrap1_1_1">画家名称</div> </div>
<div class="wrap1_1_2"></div> <div class="wrap1_1">
<div class="wrap1_1_3"> <div class="wrap1_1_1">寄存地址</div>
<input placeholder-style="color: #939393;font-size: 24rpx;" placeholder="画家名称"/> <div class="wrap1_1_2"></div>
</div> <div class="wrap1_1_3">
<div class="wrap1_1_4"> <input disabled placeholder-style="color: #76C458;font-size: 24rpx;" :placeholder="info.warehouseName"/>
</div> </div>
<div class="wrap1_1_4">
</div> </div>
<div class="wrap1_1"> </div>
<div class="wrap1_1_1">画作平尺数</div> <div class="wrap1_1" style="position: relative;">
<div class="wrap1_1_2"></div> <div class="wrap1_1_1" >寄存时限</div>
<div class="wrap1_1_3"> <div class="wrap1_1_2"></div>
<input placeholder-style="color: #939393;font-size: 24rpx;" placeholder="画作平尺数"/> <div class="wrap1_1_3" >
<div class="wrap1_1_3_1" style="position: absolute;display: flex;top: 50%;transform: translateY(-50%);">
<div class="wrap1_1_3_1_1" style="width: 70rpx;color:#fff;height: 30rpx;background: #76C458;font-size: 16rpx;display: flex;justify-content: center;align-items: center;margin-right: 2rpx">{{info.cycleName}}</div>
<div class="wrap1_1_3_1_2" style="color: #939393;font-size: 24rpx">{{`${info.startAt}-${info.endAt}`}}</div>
</div> </div>
</div> </div>
<div class="wrap1_1_4">
</div>
</div>
<div class="wrap1_1">
<div class="wrap1_1_1">剩余天数</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled :placeholder-style="daysRemainingStyle" :placeholder="info.levelDays"/>
</div>
<div class="wrap1_1_4">
</div>
</div>
<div class="wrap1_1">
<div class="wrap1_1_1">订单金额</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="`${info.money}元`"/>
</div>
<div class="wrap1_1_4">
</div>
</div>
<div class="wrap1_1">
<div class="wrap1_1_1">每日集保金额</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="`${info.dayMoney}元`"/>
</div>
<div class="wrap1_1_4">
</div>
</div>
<div class="wrap1_1">
<div class="wrap1_1_1">待补款金额</div>
<div class="wrap1_1_2"></div>
<div class="wrap1_1_3">
<input disabled placeholder-style="color: #FF4848;font-size: 24rpx;" :placeholder="`${info.supplementMoney}元`"/>
</div>
<div class="wrap1_1_4">
</div>
</div> </div>
<div class="wrap2"></div>
</div> </div>
<div class="wrap2"></div>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -58,12 +137,63 @@ import {postDataByParams} from "../../http/service";
export default { export default {
name: "order-details", name: "order-details",
data(){
return{
distance:'',
ID:'',
info: {},
statusValue: [{label: '全部状态', value: 0}, {label: '待入库', value: 1,style:'color: #FFBA00;font-size: 24rpx'}, {
label: '已入库',
value: 2,
style:'color: #76C458;font-size: 24rpx'
}, {label: '即将到期', value: 3,style:'color: #FF4848;font-size: 24rpx'}, {label: '延期待补款', value: 4,style:'color: #FF4848;font-size: 24rpx'}, {label: '已取出', value: 5}]
}
},
computed:{
daysRemainingStyle(){
switch (this.info.artworkStatus){
case 1:
case 2:
case 3:
case 5:
return 'color: #939393;font-size: 24rpx;'
case 4:{
return 'color: #FF4848;font-size: 24rpx;'
}
}
}
},
mounted() { mounted() {
if (this.$mp.query.ID) {
this.ID=this.$mp.query.ID
}
this.getData() this.getData()
uni.createSelectorQuery().select('.title-block').boundingClientRect(data => {
let res = uni.getSystemInfoSync();
const distance = res.windowHeight - data.bottom;
this.distance = distance
}).exec()
}, },
methods: { methods: {
back(){
uni.navigateBack()
},
async getData() { async getData() {
const res = await postDataByParams('/api/warehouse/detail') const res = await postDataByParams('/api/warehouse/detail',{ID:Number(this.ID)})
if (res.code===200){
this.info=res.data
}else {
uni.showToast({
title: res.msg,
icon:'none'
})
}
console.log(res, 'res') console.log(res, 'res')
} }
} }
@ -71,14 +201,14 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.order-details { .order-details {
background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/4fdc9a0f-d72a-46b6-a04d-ed56d5465213.png");
box-sizing: border-box; box-sizing: border-box;
padding-top: 46rpx; overflow: hidden;
padding-left: 30rpx; padding-left: 30rpx;
padding-right: 30rpx; padding-right: 30rpx;
background-size: cover; background-size: cover;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
.content3 { .content3 {
margin-top: 60rpx; margin-top: 60rpx;

Loading…
Cancel
Save