提交 b7d366a8 authored 作者: 刘旭's avatar 刘旭

修改搜索提示

上级 7a7d9f2e
...@@ -117,10 +117,10 @@ let initMSJFList = async () => { ...@@ -117,10 +117,10 @@ let initMSJFList = async () => {
if (res.data.data.total > 10) moreStates.value = 'more'; if (res.data.data.total > 10) moreStates.value = 'more';
else moreStates.value = 'no-more'; else moreStates.value = 'no-more';
// 区分是否全路径 // 区分是否全路径
for(let s in res.data.data.list) { for (let s in res.data.data.list) {
for(let g in res.data.data.list[s].goodsList) { for (let g in res.data.data.list[s].goodsList) {
let picUrl = res.data.data.list[s].goodsList[g].picUrl let picUrl = res.data.data.list[s].goodsList[g].picUrl
if(picUrl.split('.').length != 5) if (picUrl.split('.').length != 5)
res.data.data.list[s].goodsList[g].picUrl = baseURL + picUrl res.data.data.list[s].goodsList[g].picUrl = baseURL + picUrl
} }
} }
...@@ -134,7 +134,7 @@ initMSJFList(); ...@@ -134,7 +134,7 @@ initMSJFList();
// 单个商品详情 // 单个商品详情
let initMSJFDetail = async (id: any) => { let initMSJFDetail = async (id: any) => {
let res: any = await getMSJFDetail({ orderGoodsId: id }) let res: any = await getMSJFDetail({ orderGoodsId: id })
if(res.data.errno === 0 ) if (res.data.errno === 0)
detailData.value = res.data.data.list detailData.value = res.data.data.list
} }
</script> </script>
...@@ -167,6 +167,7 @@ page { ...@@ -167,6 +167,7 @@ page {
height: var(--status-bar-height); height: var(--status-bar-height);
width: 100%; width: 100%;
} }
.order-container { .order-container {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
...@@ -175,6 +176,7 @@ page { ...@@ -175,6 +176,7 @@ page {
margin-top: 30rpx; margin-top: 30rpx;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
.or-top { .or-top {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -185,29 +187,36 @@ page { ...@@ -185,29 +187,36 @@ page {
line-height: 60rpx; line-height: 60rpx;
font-size: 14px; font-size: 14px;
} }
.or-bottom { .or-bottom {
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
height: 190rpx; height: 190rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #f2f2f2; border-top: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
.or-left { .or-left {
float: left; float: left;
margin-right: 14%; margin-right: 14%;
.or-left-image { .or-left-image {
height: 160rpx; height: 160rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
} }
.order-right { .order-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.details-top { .details-top {
margin-bottom: 4%; margin-bottom: 4%;
} }
.details-center { .details-center {
margin-bottom: 3%; margin-bottom: 3%;
} }
.details-bottom { .details-bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -219,11 +228,13 @@ page { ...@@ -219,11 +228,13 @@ page {
.content { .content {
padding: 30rpx; padding: 30rpx;
.order-image { .order-image {
width: 100%; width: 100%;
height: 60rpx; height: 60rpx;
margin-bottom: 6rpx; margin-bottom: 6rpx;
} }
.order-content { .order-content {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -237,12 +248,14 @@ page { ...@@ -237,12 +248,14 @@ page {
border-radius: 10rpx; border-radius: 10rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
background: #fff !important; background: #fff !important;
.order-left { .order-left {
width: 260rpx; width: 260rpx;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 20rpx; margin-right: 20rpx;
.order-left-image { .order-left-image {
// width: 120rpx; // width: 120rpx;
height: 78px; height: 78px;
...@@ -250,6 +263,7 @@ page { ...@@ -250,6 +263,7 @@ page {
margin-right: 30rpx; margin-right: 30rpx;
} }
} }
.order-right { .order-right {
.details-top { .details-top {
display: block; display: block;
...@@ -257,33 +271,16 @@ page { ...@@ -257,33 +271,16 @@ page {
font-weight: 600; font-weight: 600;
margin-bottom: 6rpx; margin-bottom: 6rpx;
} }
.details-center { .details-center {
display: block; display: block;
font-size: 24rpx; font-size: 24rpx;
} }
.details-bottom { .details-bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 20rpx; margin-top: 20rpx;
// .details-sum {
// margin-left: 10rpx;
// display: inline-block;
// border: 1px solid #d0d0d0;
// text {
// width: 40rpx;
// line-height: 50rpx;
// text-align: center;
// display: inline-block;
// background-color: #fff;
// }
// .add {
// color: #fa4305;
// border-left: 1px solid #d0d0d0;
// }
// .subtract {
// border-right: 1px solid #d0d0d0;
// }
// }
} }
} }
} }
...@@ -307,6 +304,7 @@ page { ...@@ -307,6 +304,7 @@ page {
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
} }
.btn-image { .btn-image {
position: fixed; position: fixed;
bottom: 2%; bottom: 2%;
...@@ -320,11 +318,13 @@ page { ...@@ -320,11 +318,13 @@ page {
// padding: 20rpx; // padding: 20rpx;
background-color: #fff; background-color: #fff;
margin-bottom: 40rpx; margin-bottom: 40rpx;
.detail-list { .detail-list {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
.label { .label {
width: 168rpx; width: 168rpx;
height: 40rpx; height: 40rpx;
...@@ -332,6 +332,7 @@ page { ...@@ -332,6 +332,7 @@ page {
text-align: right; text-align: right;
margin-right: 10rpx; margin-right: 10rpx;
} }
.text { .text {
padding-left: 20rpx; padding-left: 20rpx;
width: 280rpx; width: 280rpx;
...@@ -342,6 +343,7 @@ page { ...@@ -342,6 +343,7 @@ page {
overflow: hidden; overflow: hidden;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
} }
.phone-list { .phone-list {
.text { .text {
width: 230rpx; width: 230rpx;
......
...@@ -4,7 +4,14 @@ ...@@ -4,7 +4,14 @@
<headerVue :color1="color"></headerVue> <headerVue :color1="color"></headerVue>
<view class="query-content"> <view class="query-content">
<view class="query-record"> <view class="query-record">
<view class="content"><uni-search-bar cancelButton="always" v-model="searchValue" placeholder="SN" @confirm="confirm" /></view> <view class="content">
<uni-search-bar
cancelButton="always"
v-model="searchValue"
placeholder="序列号、手机号"
@confirm="confirm"
/>
</view>
</view> </view>
<view v-if="JSON.stringify(queryRecord) != '[]'"> <view v-if="JSON.stringify(queryRecord) != '[]'">
<view v-for="(item, i) in queryRecord" :key="i"> <view v-for="(item, i) in queryRecord" :key="i">
...@@ -13,18 +20,26 @@ ...@@ -13,18 +20,26 @@
<view class="record"> <view class="record">
<text class="record-text">{{ item.goodsName }}</text> <text class="record-text">{{ item.goodsName }}</text>
<view class="record-center"> <view class="record-center">
<text v-if="item.used" style="margin-bottom: 8rpx;">扫码手机:{{ item.used ? item.phoneAndTime[0].phone : '' }}</text> <text v-if="item.used" style="margin-bottom: 8rpx;">
扫码手机:{{ item.used ? item.phoneAndTime[0].phone : '' }}
</text>
<text>序 列 号 :{{ item.sn }}</text> <text>序 列 号 :{{ item.sn }}</text>
</view> </view>
<view class="record-footer"> <view class="record-footer">
<text class="price">{{ item.goodsPrice }}</text> <text class="price">{{ item.goodsPrice }}</text>
<text style="color: #ccc; margin-top: 3%;">{{ item.sameDay }}</text> <text style="color: #ccc; margin-top: 3%;">{{ item.sameDay }}</text>
<text v-if="item.used" style="color: #ccc; margin-top: 3%;">{{ item.strength }}</text> <text v-if="item.used" style="color: #ccc; margin-top: 3%;">
{{ item.strength }}
</text>
</view> </view>
</view> </view>
<view :class="item.used ? 'tag' : 'info-tag'">{{ item.used ? '已开瓶' : '未开瓶' }}</view> <view :class="item.used ? 'tag' : 'info-tag'">
{{ item.used ? '已开瓶' : '未开瓶' }}
</view>
</view> </view>
<text style="font-size: 26rpx; color: #313131; margin: 20rpx 60rpx">订单编号:{{ item.orderSn }}</text> <text style="font-size: 26rpx; color: #313131; margin: 20rpx 60rpx">
订单编号:{{ item.orderSn }}
</text>
</view> </view>
</view> </view>
<uni-load-more v-else status="no-more"></uni-load-more> <uni-load-more v-else status="no-more"></uni-load-more>
...@@ -52,7 +67,7 @@ let color = ref('#a27443'); ...@@ -52,7 +67,7 @@ let color = ref('#a27443');
let downUrl = '/wx/storage/fetch/'; let downUrl = '/wx/storage/fetch/';
// let used = ref(false); // let used = ref(false);
let queryRecord = ref(); let queryRecord = ref();
...@@ -71,11 +86,12 @@ let queryRecord = ref(); ...@@ -71,11 +86,12 @@ let queryRecord = ref();
let confirm = async (data: any) => { let confirm = async (data: any) => {
if (data.value) { if (data.value) {
let res: any = await searchSnInfo({ code: data.value }); let res: any = await searchSnInfo({ code: data.value });
if(JSON.stringify(res.data.data) == '[]') return queryRecord.value = [] if (JSON.stringify(res.data.data) == '[]') return (queryRecord.value = []);
if (res.data.errno == 0) { if (res.data.errno == 0) {
for (let s in res.data.data) { for (let s in res.data.data) {
let picUrl = res.data.data[s].goodsPicUrl; let picUrl = res.data.data[s].goodsPicUrl;
if (picUrl.split('.').length != 5) res.data.data[s].goodsPicUrl = baseURL + downUrl + picUrl; if (picUrl.split('.').length != 5)
res.data.data[s].goodsPicUrl = baseURL + downUrl + picUrl;
} }
queryRecord.value = res.data.data; queryRecord.value = res.data.data;
console.log(queryRecord.value, '查询记录'); console.log(queryRecord.value, '查询记录');
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论