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

feature: 修改订单详情显示

parent 8f646dfc
......@@ -27,7 +27,7 @@
</view>
<view class="cu-form-group">
<view class="title">{{$t('入仓时间')}}</view>
<view class="content">{{ orderDetail.rucangTime | formatDate }}</view>
<view class="content">{{ formatDate(orderDetail.rucangTime) }}</view>
</view>
<view class="cu-form-group">
<view class="title">{{$t('路线')}}</view>
......@@ -58,7 +58,7 @@
</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>
......@@ -72,6 +72,8 @@
</template>
<script>
import {getProductAttrList} from '@/api/system'
import util from "@/util/util.js";
export default {
name: 'orderDetailModal',
......@@ -85,10 +87,37 @@ export default {
default: true
}
},
computed: {
isChinese(){
return uni.getLocale() === 'zh-Hans'
}
},
data() {
return {
productAttrList: [],
}
},
created() {
getProductAttrList().then(data => {
this.productAttrList = data
})
},
methods: {
formatDate: util.formatDate,
showOrderDetail(index) {
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>
......
......@@ -61,21 +61,21 @@
{{ index + 1 }}
</view>
</view>
<view>
<view class="label">{{$t('订单号')}}: </view>
<div class="content">
<text @tap="showOrderDetail(true, item.orderId)">{{item.orderNo}}</text>
<text>itemType</text>
<!-- 调仓 -->
<!-- 报关方式 -->
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
<!-- 包装类型 -->
<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>
<!-- 带电 -->
</div>
</view>
<view>
<view class="label">{{$t('订单号')}}: </view>
<view class="content">
<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.WAREHOUSING_SPECIFICATION_TYPE" :value="item.unit"></dict-tag>
<!-- 混箱 -->
<!-- 有牌 -->
<text v-if="item.orderItemDOS.some(ele => ele.checkBrandType && ele.checkBrandType !== 0)">有牌</text>
<!-- 带电 -->
</view>
</view>
<view>
......@@ -306,10 +306,10 @@ import {uniIcons} from '@dcloudio/uni-ui';
import {
createMergePkgOrder, createMergePkgOrderBatch, finishMergePkg,
getPkgPageByPkgId, getUnPkgPage, removeMergePkg, removeMergePkgBatch,
scanOrderNoCreate
scanOrderNoCreate, listByOrderId
} from "./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 OrderDetailModal from "@/components/order-detail-modal/index.vue"
import util from '@/util/util'
......@@ -452,7 +452,7 @@ export default {
/* 读取订单详情 */
getOrderDetail(id) {
return new Promise((resolve, reject) => {
getOrderDetailAdmin(id).then((data) => {
getOrderDetail(id).then((data) => {
//订单信息
this.orderDetail = data;
listByOrderId({ orderId: id }).then((data) => {
......
......@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') {
/**
* 配置api基础路径
*/
//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 localApiBaseUrl = uni.getStorageSync("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