Merge branch 'master' of http://git.xdadan.com/tanex/emis-sapp
This commit is contained in:
commit
3d16777dc1
@ -14,7 +14,8 @@ const coreRequestBase = (url, reqParams, options = {}, methodType = "POST", core
|
||||
url,
|
||||
data: reqParams,
|
||||
header: options,
|
||||
method: methodType,
|
||||
method: methodType,
|
||||
timeout: 10*60*1000, // 请求超时
|
||||
...coreParams,
|
||||
success: (res) => {
|
||||
resolve(res)
|
||||
@ -80,28 +81,28 @@ let coreRequest = function(url, params = {}, options = {}, methodType, coreParam
|
||||
// emoUnicode(res, 2)
|
||||
return res
|
||||
})
|
||||
}
|
||||
|
||||
const coreDownloadRequest = (url, params = {}, options = {}, methodType = 'GET', coreParams = {})=> {
|
||||
let comReqData = getCommonReqData()
|
||||
// 统一把emo转unicode
|
||||
// emoUnicode(params)
|
||||
const reqParams = {
|
||||
...baseParam,
|
||||
...params,
|
||||
}
|
||||
url = `${host}${url}`
|
||||
options = {
|
||||
...comReqData.header,
|
||||
...options,
|
||||
}
|
||||
|
||||
// get请求 需要转成query参
|
||||
url = url + (url.indexOf('?') == -1 ? '?': '') + tansGetParamsToQuery(reqParams)
|
||||
return { url, header: options }
|
||||
}
|
||||
|
||||
const coreDownloadRequest = (url, params = {}, options = {}, methodType = 'GET', coreParams = {})=> {
|
||||
let comReqData = getCommonReqData()
|
||||
// 统一把emo转unicode
|
||||
// emoUnicode(params)
|
||||
const reqParams = {
|
||||
...baseParam,
|
||||
...params,
|
||||
}
|
||||
url = `${host}${url}`
|
||||
options = {
|
||||
...comReqData.header,
|
||||
...options,
|
||||
}
|
||||
|
||||
// get请求 需要转成query参
|
||||
url = url + (url.indexOf('?') == -1 ? '?': '') + tansGetParamsToQuery(reqParams)
|
||||
return { url, header: options }
|
||||
}
|
||||
|
||||
export {
|
||||
export {
|
||||
coreDownloadRequest,
|
||||
coreRequest
|
||||
}
|
||||
@ -52,7 +52,7 @@
|
||||
filDataList: this.list
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
onHide() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<tpx-page>
|
||||
<tpx-page v-if="!pageLoading">
|
||||
<view class="dt-block" style="margin-top: 0;">
|
||||
|
||||
<!-- <tpx-text-dic :value="modelInfo.waybillStatus" :list="dicData.emis_waybill_status" ></tpx-text-dic> -->
|
||||
@ -212,43 +212,43 @@
|
||||
<view v-if="modelInfo.pickupMethod == 2" class="dt-item">
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">预约上门</text>
|
||||
<view>
|
||||
<text class=""> {{modelInfo.pickStartDate || '-'}}</text>
|
||||
<view>
|
||||
<text class=""> {{modelInfo.pickStartDate || '-'}}</text>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
<view v-if="modelInfo.pickupMethod == 1">
|
||||
<view class="dt-item">
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">预计入仓时间</text>
|
||||
<text class=""> {{modelInfo.pickStartDate || '-'}}</text>
|
||||
</u-row>
|
||||
</view>
|
||||
<view class="dt-item">
|
||||
<view>
|
||||
<text class="clr-sub pr-10">仓库名称</text>
|
||||
<text class=""> {{modelInfo.intoWarehouseName || '-'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dt-item">
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">仓库联系人</text>
|
||||
<view class="">
|
||||
<tpx-text-dic :value="modelInfo.intoWarehouseContact"></tpx-text-dic>
|
||||
</view>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">仓库电话</text>
|
||||
<text>{{modelInfo.intoWarehousePhone || '-'}}</text>
|
||||
</u-row>
|
||||
</view>
|
||||
<view class="dt-item">
|
||||
<view>
|
||||
<text class="clr-sub pr-10">仓库地址</text>
|
||||
<text class=""> {{modelInfo.intoWarehouseAddress || '-'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="modelInfo.pickupMethod == 1">
|
||||
<view class="dt-item">
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">预计入仓时间</text>
|
||||
<text class=""> {{modelInfo.pickStartDate || '-'}}</text>
|
||||
</u-row>
|
||||
</view>
|
||||
<view class="dt-item">
|
||||
<view>
|
||||
<text class="clr-sub pr-10">仓库名称</text>
|
||||
<text class=""> {{modelInfo.intoWarehouseName || '-'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dt-item">
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">仓库联系人</text>
|
||||
<view class="">
|
||||
<tpx-text-dic :value="modelInfo.intoWarehouseContact"></tpx-text-dic>
|
||||
</view>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">仓库电话</text>
|
||||
<text>{{modelInfo.intoWarehousePhone || '-'}}</text>
|
||||
</u-row>
|
||||
</view>
|
||||
<view class="dt-item">
|
||||
<view>
|
||||
<text class="clr-sub pr-10">仓库地址</text>
|
||||
<text class=""> {{modelInfo.intoWarehouseAddress || '-'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="dt-item">
|
||||
<view>
|
||||
@ -376,7 +376,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import dayjs from "dayjs"
|
||||
import BpeAddressjiamiTmp from "@/components/buns-post-edit-templates/bpe-addressjiami-tmp"
|
||||
import BpdPicPreviewTmp from "@/components/buns-post-detail-templates/bpd-pic-preview-tmp"
|
||||
import BpeGoodstaticTmp from "@/components/buns-post-edit-templates/bpe-goodstatic-tmp"
|
||||
@ -413,7 +413,8 @@
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
pageLoading: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -431,10 +432,15 @@
|
||||
methods: {
|
||||
async initData(){
|
||||
if(this.billCode) {
|
||||
let res = await apiService.getOrderDetail({billCode: this.billCode, _loading: true})
|
||||
let res = await apiService.getOrderDetail({billCode: this.billCode, _loading: true})
|
||||
let resData = res.data
|
||||
if(resData.estimateDate){
|
||||
resData.estimateDate = dayjs(resData.estimateDate).format('YYYY-MM-DD')
|
||||
}
|
||||
// 通过对象合并才能修改父级 数据
|
||||
Object.assign(this.modelInfo, res.data || {})
|
||||
}
|
||||
Object.assign(this.modelInfo, resData || {})
|
||||
}
|
||||
this.pageLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<view v-if="showInfoBtn" @click="goto(`post/detail?billCode=${modelInfo.billCode}`)" class="com-tag-grey">
|
||||
运单信息
|
||||
</view>
|
||||
<tpx-text-dic v-if="!showInfoBtn" :value="modelInfo.orderStatus" :list="dicData.emis_order_status" ></tpx-text-dic>
|
||||
<tpx-text-dic v-if="false" :value="modelInfo.orderStatus" :list="dicData.emis_order_status" ></tpx-text-dic>
|
||||
</view>
|
||||
</u-row>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
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('post/toline.png')">
|
||||
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('search/toline.png')">
|
||||
</image>
|
||||
<!-- getCdnUrl('post/toline-grey.png') -->
|
||||
<view class="mt-10">
|
||||
|
||||
105
components/buns-post-detail-templates/bpd-send-site-tmp.vue
Normal file
105
components/buns-post-detail-templates/bpd-send-site-tmp.vue
Normal file
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<u-row justify="between">
|
||||
<u-row @click="setClipboardData(modelInfo.billCode)">
|
||||
<view>
|
||||
<u-text v-if="modelInfo.billCode" :text="`运单号:${modelInfo.billCode}` " size="26"></u-text>
|
||||
<u-text v-else :text="`订单号:${modelInfo.orderSn}` " size="26"></u-text>
|
||||
</view>
|
||||
<view class="pl-10">
|
||||
<u-icon name="file-text" size="32" custom-style=""></u-icon>
|
||||
</view>
|
||||
</u-row>
|
||||
<view>
|
||||
<view v-if="showInfoBtn" @click="goto(`post/detail?billCode=${modelInfo.billCode}`)" class="com-tag-grey">
|
||||
运单信息
|
||||
</view>
|
||||
<tpx-text-dic v-if="false" :value="modelInfo.orderStatus" :list="dicData.emis_order_status" ></tpx-text-dic>
|
||||
</view>
|
||||
</u-row>
|
||||
|
||||
<view >
|
||||
<u-row custom-style="margin-top: 30rpx;" justify="center">
|
||||
<u-col span="4">
|
||||
<u-text :text="(modelInfo.sendSiteName)||'-'" size="30" :bold="true" align="center"></u-text>
|
||||
</u-col>
|
||||
<u-col span="4" justify="center" align="center" custom-style="text-align: center;">
|
||||
<view>
|
||||
<tpx-text-dic :value="modelInfo.waybillStatus" :list="dicData.emis_waybill_status" ></tpx-text-dic>
|
||||
</view>
|
||||
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('search/toline.png')">
|
||||
</image>
|
||||
<!-- getCdnUrl('post/toline-grey.png') -->
|
||||
<view class="mt-10">
|
||||
<text>{{modelInfo.productTypeName}}</text>
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="4">
|
||||
<u-text :text="(modelInfo.dispatchUnderlingSiteName)||'-'" size="30" :bold="true" align="center"></u-text>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<u-text :text="`预计送达时间:${modelInfo.estimateDate || '-'}`" color="#B12D29" size="26" bold
|
||||
margin="30rpx 0 0 0"></u-text>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
modelInfo: {
|
||||
get() {
|
||||
return this.value
|
||||
}
|
||||
},
|
||||
sender() {
|
||||
let obj = JSON.parse(JSON.stringify(this.value?.sender || this.value || {}))
|
||||
obj.countryName = obj.sendCountryName || obj.countryName
|
||||
obj.provinceName = obj.sendProvinceName || obj.provinceName
|
||||
obj.name = obj.sendName || obj.name
|
||||
return obj
|
||||
},
|
||||
reciever() {
|
||||
let obj = JSON.parse(JSON.stringify(this.value?.reciever || this.value || {}))
|
||||
obj.countryName = obj.receiveCountryName || obj.countryName
|
||||
obj.provinceName = obj.receiveProvinceName || obj.provinceName
|
||||
obj.name = obj.receiveName || obj.name
|
||||
return obj
|
||||
},
|
||||
dicData() {
|
||||
return this.$store.getters.dicData
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
showInfoBtn: {
|
||||
default () {
|
||||
return true
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
|
||||
},
|
||||
unmounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -35,11 +35,11 @@
|
||||
<!-- <u-row justify="between">
|
||||
<view>
|
||||
<text class="clr-sub pr-10">特殊报价</text>
|
||||
<text>{{modelInfo.blSpecialQuote ? '是' : '否'}}</text>
|
||||
<text>{{modelInfo.blSpecialQuote==1 ? '是' : '否'}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="clr-sub pr-10">敏感物</text>
|
||||
<text>{{modelInfo.blSpecialGoods ? '是' : '否'}}</text>
|
||||
<text>{{modelInfo.blSpecialGoods==1 ? '是' : '否'}}</text>
|
||||
</view>
|
||||
<u-row>
|
||||
<text class="clr-sub pr-10">计费方式</text>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<template v-slot:footer>
|
||||
<view class="blcok-white-noradius">
|
||||
<u-row justify="space-around">
|
||||
<u-button @click="goto(`post/post?type=edit&billCode=${queryOption.billCode}&orderSn=${queryOption.orderSn}`)" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
<u-button v-if="submitParam.waybillStatus == 0" @click="goto(`post/post?type=edit&billCode=${queryOption.billCode}&orderSn=${queryOption.orderSn}`)" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
>修改
|
||||
</u-button>
|
||||
<u-button v-if="submitParam.orderStatus == 0" @click="handleCancel" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
|
||||
@ -7,14 +7,21 @@
|
||||
<tpx-scan-input v-model:value="searchParam.billCode" placeholder="请输入单号或扫码"
|
||||
@change="handleScanValChange" iconPos="right"></tpx-scan-input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<template v-slot:body>
|
||||
<view v-if="historyList && historyList.length > 0" class="pgb-header mt-20" style="padding-bottom: 10rpx;">
|
||||
<view class="com-jianju">
|
||||
<tpx-tags :list="historyList" @onItemClick="handleHisItem"></tpx-tags>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div v-if="modelInfo.billCode" style="min-height: 100%;display: flex;flex-direction: column;">
|
||||
<view style="position: relative;">
|
||||
|
||||
<view class="mp-aside">
|
||||
<bpd-send-reciever-tmp :value="modelInfo" :showInfoBtn="false" :hideDetail="true"></bpd-send-reciever-tmp>
|
||||
<bpd-send-site-tmp :value="modelInfo" :showInfoBtn="canViewImg" ></bpd-send-site-tmp>
|
||||
</view>
|
||||
|
||||
<view class="mp-aside">
|
||||
@ -77,10 +84,12 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import dayjs from "dayjs"
|
||||
import { debounce } from "@/common/util"
|
||||
import * as apiService from "@/common/api"
|
||||
import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
|
||||
import * as apiService from "@/common/api"
|
||||
import { setSessionSystemInfo, getSessionSystemInfo } from "@/session"
|
||||
import BpdSendSiteTmp from "@/components/buns-post-detail-templates/bpd-send-site-tmp"
|
||||
import BpdPicPreviewTmp from "@/components/buns-post-detail-templates/bpd-pic-preview-tmp"
|
||||
|
||||
export default {
|
||||
@ -94,7 +103,7 @@
|
||||
return this.$store.getters.dicData
|
||||
},
|
||||
},
|
||||
components: { BpdSendRecieverTmp, BpdPicPreviewTmp },
|
||||
components: { BpdSendSiteTmp, BpdPicPreviewTmp, },
|
||||
data() {
|
||||
return {
|
||||
canViewImg: false,
|
||||
@ -106,7 +115,8 @@
|
||||
},
|
||||
danCheckModal: {
|
||||
show: false
|
||||
},
|
||||
},
|
||||
historyList: getSessionSystemInfo()?.postQueryHistory || [],
|
||||
searchParam: {
|
||||
billCode: ''
|
||||
}
|
||||
@ -130,11 +140,27 @@
|
||||
},
|
||||
handleScanValChange: debounce(function(val){
|
||||
val && (this.handleSearch(val))
|
||||
}),
|
||||
async handleSearch(val) {
|
||||
let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
|
||||
}),
|
||||
handleHisItem(item){
|
||||
this.searchParam.billCode = item.val
|
||||
this.handleSearch()
|
||||
},
|
||||
async handleSearch() {
|
||||
let res = await apiService.getOrderDetail({...this.searchParam, _loading: true})
|
||||
let resData = res.data
|
||||
let maxHisLen = 5 // 最多记录个数
|
||||
if(resData.billCode && this.historyList?.filter?.(t=> t.val == resData.billCode)?.length == 0) {
|
||||
this.historyList.unshift({ title: resData.billCode, val: resData.billCode })
|
||||
this.historyList.length > maxHisLen && (this.historyList.length = maxHisLen);
|
||||
}
|
||||
// 更新缓存
|
||||
setSessionSystemInfo({ postQueryHistory: this.historyList })
|
||||
|
||||
if(resData.estimateDate){
|
||||
resData.estimateDate = dayjs(resData.estimateDate).format('YYYY-MM-DD')
|
||||
}
|
||||
// 通过对象合并才能修改父级 数据
|
||||
Object.assign(this.modelInfo, res.data || {})
|
||||
Object.assign(this.modelInfo, resData || {})
|
||||
// 判断是否有权限查看图片
|
||||
this.canViewImg = this.modelInfo.customerCode == this.$store.getters.userInfo.customerCode
|
||||
setTimeout(()=> {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_KEY } from "./key"
|
||||
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_KEY, SYSTEM_INFO_KEY } from "./key"
|
||||
|
||||
export const setSessionXToken = (val = '')=> {
|
||||
uni.setStorageSync(XTOKEN_KEY, val)
|
||||
@ -33,4 +33,18 @@ export const getSessionLoginInfo = ()=> {
|
||||
return uni.getStorageSync(LOGININFO_KEY) || {
|
||||
remberPassport: []
|
||||
}
|
||||
}
|
||||
|
||||
export const setSessionSystemInfo = (val = {})=> {
|
||||
let oldVal = getSessionSystemInfo()
|
||||
// {
|
||||
// postQueryHistory: [], // 快递查询历史
|
||||
// }
|
||||
uni.setStorageSync(SYSTEM_INFO_KEY, { ...oldVal, ...val})
|
||||
}
|
||||
|
||||
export const getSessionSystemInfo = ()=> {
|
||||
return uni.getStorageSync(SYSTEM_INFO_KEY) || {
|
||||
postQueryHistory: []
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
export const XTOKEN_KEY = 'XTOKEN_KEY'
|
||||
export const USERINFO_KEY = 'USERINFO_KEY'
|
||||
export const BLUETOOTH_KEY = 'BLUETOOTH_KEY'
|
||||
export const LOGININFO_KEY = 'LOGININFO_KEY'
|
||||
export const LOGININFO_KEY = 'LOGININFO_KEY'
|
||||
export const SYSTEM_INFO_KEY = 'SYSTEM_INFO_KEY'
|
||||
Loading…
Reference in New Issue
Block a user