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> <template>
<tpx-page>
<tpx-layout> <tpx-layout>
<template v-slot:header></template> <template v-slot:header></template>
<template v-slot:body> <template v-slot:body>
@ -22,6 +23,8 @@
</view> --> </view> -->
</template> </template>
</tpx-layout> </tpx-layout>
</tpx-page>
</template> </template>
<script> <script>

View File

@ -1,53 +1,20 @@
<template> <template>
<tpx-page>
<tpx-layout> <tpx-layout>
<template v-slot:header> <template v-slot:header>
<view class="pgb-header"> <view class="pgb-header">
<view class="com-jianju"> <view class="com-jianju">
<tpx-scan-input v-model:value="searchParam.yundanhao" placeholder="请输入单号或扫码" <tpx-scan-input v-model:value="searchParam.billCode" placeholder="请输入单号或扫码"
iconPos="right"></tpx-scan-input> @change="handleScanValChange" iconPos="right"></tpx-scan-input>
</view> </view>
</view> </view>
</template> </template>
<template v-slot:body> <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 style="position: relative;">
<view class="mp-aside"> <view class="mp-aside">
<u-row justify="between"> <bpd-send-reciever-tmp :value="modelInfo"></bpd-send-reciever-tmp>
<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>
</view> </view>
<view class="mp-aside"> <view class="mp-aside">
@ -90,11 +57,15 @@
</view> </view>
<view class="dt-block"> <view class="dt-block">
<view class="dt-item"> <view class="mb-20">
<buns-locus-pos :list="[{},{},{},{},{}]"></buns-locus-pos> <buns-locus-pos :billCode="searchParam.billCode"></buns-locus-pos>
</view> </view>
</view> </view>
</div> </div>
<view v-if="!modelInfo.billCode">
<tpx-empty></tpx-empty>
</view>
</template> </template>
</tpx-layout> </tpx-layout>
@ -126,20 +97,14 @@
</view> </view>
</tpx-dialog> </tpx-dialog>
</tpx-page>
</template> </template>
<script> <script>
import getCdnUrl from "@/common/getCdnUrl" import { debounce } from "@/common/util"
import * as apiService from "@/common/api"
import { import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
goto,
goBack,
scanCode,
setClipboardData,
confirmModal,
makePhoneCall,
showLoading
} from "@/common/untool"
export default { export default {
props: { props: {
@ -147,35 +112,41 @@
// type: Boolean // type: Boolean
// } // }
}, },
computed: {}, computed: {
dicData() {
return this.$store.getters.dicData
},
},
components: { BpdSendRecieverTmp },
data() { data() {
return { return {
queryOption: {
billCode: '', // 运单id
},
modelInfo: {},
danCheckModal: { danCheckModal: {
show: false show: false
}, },
searchParam: { searchParam: {
keyword: '' billCode: ''
} }
} }
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
// title: '',
// path: 'TODO'
} }
}, },
onLoad(queryOption) { onLoad(option) {
this.queryOption = queryOption this.queryOption = option
this.searchParam.billCode = option.billCode
this.initData(); this.initData();
}, },
onUnload() {}, onUnload() {},
methods: { methods: {
setClipboardData,
goBack,
goto,
getCdnUrl,
initData() { initData() {
// showLoading()
}, },
handleCheckDanJu() { handleCheckDanJu() {
this.danCheckModal.show = true this.danCheckModal.show = true
@ -187,11 +158,13 @@
] ]
}) })
}, },
handleSearchParamChange() { handleScanValChange: debounce(function(val){
val && (this.handleSearch(val))
}, }),
async handleScan () { async handleSearch(val) {
const res = await scanCode() let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
// 通过对象合并才能修改父级 数据
Object.assign(this.modelInfo, res.data || {})
}, },
handleSubmitDanCheck() { handleSubmitDanCheck() {
this.danCheckModal.show = false this.danCheckModal.show = false
@ -244,11 +217,4 @@
font-size: 30rpx; font-size: 30rpx;
} }
} }
.dt-item {
display: flex;
flex-direction: row;
margin-bottom: 20rpx;
justify-content: space-between;
}
</style> </style>