|
@@ -42,14 +42,14 @@
|
|
<view class="history">
|
|
<view class="history">
|
|
<view class="item" v-for="(item, i) in waybillNoHistory.slice(0, 5)" :key="i">
|
|
<view class="item" v-for="(item, i) in waybillNoHistory.slice(0, 5)" :key="i">
|
|
<view>
|
|
<view>
|
|
- <view>
|
|
|
|
- <text class="type">库位</text>
|
|
|
|
|
|
+ <view class="mb-10">
|
|
|
|
+ <text>库位: </text>
|
|
<text class="code" :style="{ color: item.status ? 'green' : '#666' }">{{
|
|
<text class="code" :style="{ color: item.status ? 'green' : '#666' }">{{
|
|
item.space
|
|
item.space
|
|
}}</text>
|
|
}}</text>
|
|
</view>
|
|
</view>
|
|
- <view>
|
|
|
|
- <text class="type">单号</text>
|
|
|
|
|
|
+ <view class="mb-10">
|
|
|
|
+ <text class="type">单号: </text>
|
|
<text class="code" :style="{ color: item.status ? 'green' : '#666' }">{{
|
|
<text class="code" :style="{ color: item.status ? 'green' : '#666' }">{{
|
|
item.code
|
|
item.code
|
|
}}</text>
|
|
}}</text>
|
|
@@ -73,16 +73,6 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <!-- <uni-popup ref="historypopup" type="bottom">
|
|
|
|
- <view class="history">
|
|
|
|
- <view class="title">历史</view>
|
|
|
|
- <view class="item" v-for="(item, i) in waybillNoHistory" :key="i">
|
|
|
|
- <view class="type">库位</view>
|
|
|
|
- <view class="code">{{ item.space }}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </uni-popup> -->
|
|
|
|
-
|
|
|
|
<uni-popup ref="messageRef" type="message">
|
|
<uni-popup ref="messageRef" type="message">
|
|
<uni-popup-message
|
|
<uni-popup-message
|
|
:type="messageType"
|
|
:type="messageType"
|
|
@@ -222,16 +212,16 @@ const onsubmit = async () => {
|
|
messageText.value = res.msg
|
|
messageText.value = res.msg
|
|
messageRef.value.open()
|
|
messageRef.value.open()
|
|
|
|
|
|
- // const historyItem = {
|
|
|
|
- // code: valiFormData.value.code,
|
|
|
|
- // createTime: new Date(),
|
|
|
|
- // type: '运单号',
|
|
|
|
- // space: space.text,
|
|
|
|
- // status: false,
|
|
|
|
- // }
|
|
|
|
- // waybillNoHistory.value.unshift(historyItem)
|
|
|
|
- // uni.setStorageSync('waybillNoHistory', waybillNoHistory.value)
|
|
|
|
- // getHistory()
|
|
|
|
|
|
+ const historyItem = {
|
|
|
|
+ code: valiFormData.value.code,
|
|
|
|
+ createTime: new Date(),
|
|
|
|
+ type: '运单号',
|
|
|
|
+ space: space.text,
|
|
|
|
+ status: false,
|
|
|
|
+ }
|
|
|
|
+ waybillNoHistory.value.unshift(historyItem)
|
|
|
|
+ uni.setStorageSync('waybillNoHistory', waybillNoHistory.value)
|
|
|
|
+ getHistory()
|
|
}
|
|
}
|
|
st = setTimeout(() => {
|
|
st = setTimeout(() => {
|
|
reset()
|
|
reset()
|
|
@@ -307,17 +297,12 @@ onBackPress(() => {
|
|
})
|
|
})
|
|
onShow(() => {
|
|
onShow(() => {
|
|
hidePage.value = false
|
|
hidePage.value = false
|
|
- // token.value = uni.getStorageSync('token')
|
|
|
|
getOptions()
|
|
getOptions()
|
|
getHistory()
|
|
getHistory()
|
|
})
|
|
})
|
|
|
|
|
|
// 获取选项
|
|
// 获取选项
|
|
const getOptions = async () => {
|
|
const getOptions = async () => {
|
|
- // 1 调用services定义的方法 获取选项数据
|
|
|
|
- // 2 判断获取的数据是否成功,code === 1
|
|
|
|
- // 3 如果成功,将数据赋值给options.space数组中
|
|
|
|
-
|
|
|
|
const res = await waybillNoOptions()
|
|
const res = await waybillNoOptions()
|
|
if (res.code === 1) {
|
|
if (res.code === 1) {
|
|
for (let key in res.data.space_id) {
|
|
for (let key in res.data.space_id) {
|
|
@@ -327,29 +312,6 @@ const getOptions = async () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- /**
|
|
|
|
- uni.request({
|
|
|
|
- url: 'url',
|
|
|
|
- method: 'GET',
|
|
|
|
- header: {
|
|
|
|
- // batoken: token.value,
|
|
|
|
- },
|
|
|
|
- success: (res: any) => {
|
|
|
|
- console.log(res)
|
|
|
|
- if (res.code === 1) {
|
|
|
|
- for (let key in res.data.space_id) {
|
|
|
|
- // eslint-disable-next-line no-prototype-builtins
|
|
|
|
- if (res.data.space_id.hasOwnProperty(key)) {
|
|
|
|
- options.space.push({ text: res.data.space_id[key], value: key })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- fail(e) {
|
|
|
|
- console.log('fail--', e)
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
- */
|
|
|
|
}
|
|
}
|
|
|
|
|
|
const setFocus = () => {
|
|
const setFocus = () => {
|
|
@@ -430,21 +392,20 @@ button {
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
|
|
- // .type {
|
|
|
|
- // padding-right: 20rpx;
|
|
|
|
- // font-size: 24rpx;
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
.code {
|
|
.code {
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .mb-10 {
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
+ }
|
|
.item {
|
|
.item {
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
font-size: 20rpx;
|
|
font-size: 20rpx;
|
|
color: #666;
|
|
color: #666;
|
|
- // display: flex;
|
|
|
|
- // flex-direction: row;
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ align-items: center;
|
|
|
|
|
|
.status {
|
|
.status {
|
|
padding-left: 20rpx;
|
|
padding-left: 20rpx;
|