This commit is contained in:
aihe 2024-05-23 16:58:00 +08:00
parent 3f0340dfb0
commit 3b6fc3bcac
2 changed files with 144 additions and 175 deletions

View File

@ -1,4 +1,5 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:header></template>
<template v-slot:body>
@ -22,6 +23,8 @@
</view> -->
</template>
</tpx-layout>
</tpx-page>
</template>
<script>

View File

@ -1,53 +1,20 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="pgb-header">
<view class="com-jianju">
<tpx-scan-input v-model:value="searchParam.yundanhao" placeholder="请输入单号或扫码"
iconPos="right"></tpx-scan-input>
<tpx-scan-input v-model:value="searchParam.billCode" placeholder="请输入单号或扫码"
@change="handleScanValChange" iconPos="right"></tpx-scan-input>
</view>
</view>
</template>
<template v-slot:body>
<div style="min-height: 100%;display: flex;flex-direction: column;">
<div v-if="modelInfo.billCode" style="min-height: 100%;display: flex;flex-direction: column;">
<view style="position: relative;">
<view class="mp-aside">
<u-row justify="between">
<u-row @click="setClipboardData(`T7080304038`)">
<view>
<u-text :text="'运单号:'+ 'T7080304038'" size="26"></u-text>
</view>
<view class="pl-10">
<u-icon name="file-text" size="32" custom-style=""></u-icon>
</view>
</u-row>
<view @click="goto(`post/detail?id={${22}}`)" class="com-tag-grey">
运单信息
</view>
</u-row>
<u-row @click="handleDealItem(orItem, { type: 1 })" custom-style="margin-top: 30rpx;" justify="center">
<u-col span="4">
<u-text :text="'中国上海'" size="30" :bold="true" align="center"></u-text>
<u-text :text="'张三'" size="26" color="#999" margin="20rpx 0 0 0"
align="center"></u-text>
</u-col>
<u-col span="4" justify="center" align="center" custom-style="text-align: center;">
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('search/toline.png')">
</image>
<!-- getCdnUrl('search/toline-grey.png') -->
<u-text :text="'待付款'" align="center" size="22" margin="10rpx 0 0 0"></u-text>
</u-col>
<u-col span="4">
<u-text :text="'越南'" size="30" :bold="true" align="center"></u-text>
<u-text :text="'李四'" size="26" color="#999" margin="20rpx 0 0 0"
align="center"></u-text>
</u-col>
</u-row>
<u-text :text="'下单时间:' + '2022-04-30 15:25'" color="#999" size="24"
margin="30rpx 0 0 0"></u-text>
<bpd-send-reciever-tmp :value="modelInfo"></bpd-send-reciever-tmp>
</view>
<view class="mp-aside">
@ -90,11 +57,15 @@
</view>
<view class="dt-block">
<view class="dt-item">
<buns-locus-pos :list="[{},{},{},{},{}]"></buns-locus-pos>
<view class="mb-20">
<buns-locus-pos :billCode="searchParam.billCode"></buns-locus-pos>
</view>
</view>
</div>
<view v-if="!modelInfo.billCode">
<tpx-empty></tpx-empty>
</view>
</template>
</tpx-layout>
@ -126,20 +97,14 @@
</view>
</tpx-dialog>
</tpx-page>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import {
goto,
goBack,
scanCode,
setClipboardData,
confirmModal,
makePhoneCall,
showLoading
} from "@/common/untool"
import { debounce } from "@/common/util"
import * as apiService from "@/common/api"
import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
export default {
props: {
@ -147,35 +112,41 @@
// type: Boolean
// }
},
computed: {},
computed: {
dicData() {
return this.$store.getters.dicData
},
},
components: { BpdSendRecieverTmp },
data() {
return {
queryOption: {
billCode: '', // 运单id
},
modelInfo: {},
danCheckModal: {
show: false
},
searchParam: {
keyword: ''
billCode: ''
}
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad(queryOption) {
this.queryOption = queryOption
onLoad(option) {
this.queryOption = option
this.searchParam.billCode = option.billCode
this.initData();
},
onUnload() {},
methods: {
setClipboardData,
goBack,
goto,
getCdnUrl,
initData() {
// showLoading()
},
handleCheckDanJu() {
this.danCheckModal.show = true
@ -187,11 +158,13 @@
]
})
},
handleSearchParamChange() {
},
async handleScan () {
const res = await scanCode()
handleScanValChange: debounce(function(val){
val && (this.handleSearch(val))
}),
async handleSearch(val) {
let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
// 通过对象合并才能修改父级 数据
Object.assign(this.modelInfo, res.data || {})
},
handleSubmitDanCheck() {
this.danCheckModal.show = false
@ -244,11 +217,4 @@
font-size: 30rpx;
}
}
.dt-item {
display: flex;
flex-direction: row;
margin-bottom: 20rpx;
justify-content: space-between;
}
</style>