Commit 873c6c7f authored by 332784038@qq.com's avatar 332784038@qq.com

feature: 修改订单详情显示

parent 8f646dfc
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title">{{$t('入仓时间')}}</view> <view class="title">{{$t('入仓时间')}}</view>
<view class="content">{{ orderDetail.rucangTime | formatDate }}</view> <view class="content">{{ formatDate(orderDetail.rucangTime) }}</view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title">{{$t('路线')}}</view> <view class="title">{{$t('路线')}}</view>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</view> </view>
</view> </view>
<view> <view>
<!-- <view v-if="v.attrNameList">{{$t('特性')}}{{ v.attrNameList.join(',') }}</view> --> <view >{{$t('特性')}}{{ getProductNamesByIds(v.warehouseInInfoVO ? v.warehouseInProdAttrIds : v.prodAttrIds) }}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -72,6 +72,8 @@ ...@@ -72,6 +72,8 @@
</template> </template>
<script> <script>
import {getProductAttrList} from '@/api/system'
import util from "@/util/util.js";
export default { export default {
name: 'orderDetailModal', name: 'orderDetailModal',
...@@ -85,10 +87,37 @@ export default { ...@@ -85,10 +87,37 @@ export default {
default: true default: true
} }
}, },
computed: {
isChinese(){
return uni.getLocale() === 'zh-Hans'
}
},
data() {
return {
productAttrList: [],
}
},
created() {
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: { methods: {
formatDate: util.formatDate,
showOrderDetail(index) { showOrderDetail(index) {
this.$emit('close', false); this.$emit('close', false);
}, },
getProductNamesByIds(ids){
const result = []
ids?.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id) {
result.push(this.isChinese ? f.attrName : f.attrNameEn)
}
})
})
return result.join('')
},
} }
}; };
</script> </script>
......
...@@ -61,21 +61,21 @@ ...@@ -61,21 +61,21 @@
{{ index + 1 }} {{ index + 1 }}
</view> </view>
</view> </view>
<view> </view>
<view class="label">{{$t('订单号')}}: </view> <view>
<div class="content"> <view class="label">{{$t('订单号')}}: </view>
<text @tap="showOrderDetail(true, item.orderId)">{{item.orderNo}}</text> <view class="content">
<text>itemType</text> <text @tap="showOrderDetail(true, item.orderId)">{{item.orderNo}}</text>
<!-- 调仓 --> <!-- 调仓 -->
<!-- 报关方式 --> <text></text>
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" /> <!-- 报关方式 -->
<!-- 包装类型 --> <dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="item.unit"></dict-tag> <!-- 包装类型 -->
<!-- 混箱 --> <dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="item.unit"></dict-tag>
<!-- 有牌 --> <!-- 混箱 -->
<text v-if="item.orderItemDOS.some(ele => ele.checkBrandType && ele.checkBrandType !== 0)">有牌</text> <!-- 有牌 -->
<!-- 带电 --> <text v-if="item.orderItemDOS.some(ele => ele.checkBrandType && ele.checkBrandType !== 0)">有牌</text>
</div> <!-- 带电 -->
</view> </view>
</view> </view>
<view> <view>
...@@ -306,10 +306,10 @@ import {uniIcons} from '@dcloudio/uni-ui'; ...@@ -306,10 +306,10 @@ import {uniIcons} from '@dcloudio/uni-ui';
import { import {
createMergePkgOrder, createMergePkgOrderBatch, finishMergePkg, createMergePkgOrder, createMergePkgOrderBatch, finishMergePkg,
getPkgPageByPkgId, getUnPkgPage, removeMergePkg, removeMergePkgBatch, getPkgPageByPkgId, getUnPkgPage, removeMergePkg, removeMergePkgBatch,
scanOrderNoCreate scanOrderNoCreate, listByOrderId
} from "./api"; } from "./api";
import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../tallyAir/api"; import { batchCreateMore,batchDeleteMore,singleCreate,orderTagList } from "../tallyAir/api";
import { getOrderDetailByBoxNo } from "../loading/api"; import { getOrderDetail, getOrderDetailByBoxNo } from "../loading/api";
import EditMergePkgDialog from "@/pages/mergePkg/components/editMergePkgDialog.vue"; import EditMergePkgDialog from "@/pages/mergePkg/components/editMergePkgDialog.vue";
import OrderDetailModal from "@/components/order-detail-modal/index.vue" import OrderDetailModal from "@/components/order-detail-modal/index.vue"
import util from '@/util/util' import util from '@/util/util'
...@@ -452,7 +452,7 @@ export default { ...@@ -452,7 +452,7 @@ export default {
/* 读取订单详情 */ /* 读取订单详情 */
getOrderDetail(id) { getOrderDetail(id) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getOrderDetailAdmin(id).then((data) => { getOrderDetail(id).then((data) => {
//订单信息 //订单信息
this.orderDetail = data; this.orderDetail = data;
listByOrderId({ orderId: id }).then((data) => { listByOrderId({ orderId: id }).then((data) => {
......
...@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') { ...@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') {
/** /**
* 配置api基础路径 * 配置api基础路径
*/ */
//let apiBaseUrl = 'https://api2.groupage.cn/'
let apiBaseUrl = 'https://api2.groupage.cn/' let apiBaseUrl = 'https://api2.groupage.cn/'
// let apiBaseUrl = 'https://api.jd.qipx.top/'
//let apiBaseUrl = 'http://192.168.1.13:48080/' //let apiBaseUrl = 'http://192.168.1.13:48080/'
let localApiBaseUrl = uni.getStorageSync("localApiBaseUrl") let localApiBaseUrl = uni.getStorageSync("localApiBaseUrl")
if(localApiBaseUrl){ if(localApiBaseUrl){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment