Commit 67ed1d4a authored by 我在何方's avatar 我在何方

订单详情打包记录完善

parent be916223
...@@ -833,3 +833,11 @@ export function batchException(data){ ...@@ -833,3 +833,11 @@ export function batchException(data){
data data
}) })
} }
// 打包记录列表
export function orderItemPackLogPage(params){
return request({
url: '/order/item-pack-log/page',
method: 'get',
params
})
}
\ No newline at end of file
<template>
<!-- 订单获取入仓记录 -->
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" width="800px">
<el-table v-if="packData" :data="packData">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('打包人')" prop="name">
<template slot-scope="{row}">
{{row.creatorName}}
</template>
</el-table-column>isNoNeedToPack
<el-table-column :label="$t('打包时间')" prop="time" >
<template slot-scope="{row}">{{row.createTime|parseTime}}</template>
</el-table-column>
<el-table-column :label="$t('备注')" prop="time" >
<template slot-scope="{row}">{{row.isNoNeedToPack?this.$t('无需打包'):''}}</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template slot-scope="{row}">
<el-button type="primary" @click="showPackDetail(row)">{{$t('详情')}}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
</el-dialog>
</template>
<script>
import { orderItemPackLogPage } from '@/api/ecw/order'
import { parseTime } from '@/utils/ruoyi'
export default {
filters: {parseTime},
props:{
order: Object,
orderItemId: Number,
},
data(){
return {
total:0,
queryParams:{
page:1,
rows:10
},
packData:[]
}
},
computed:{
title(){
if(!this.order||!this.orderItemId) return this.$t('打包历史')
var orderItem = this.order.orderItemVOList.find(item => item.orderItemId == this.orderItemId)
if(!orderItem) return this.$t('打包历史')
return orderItem.prodTitleZh+'('+ orderItem.prodTitleEn+')' + this.$t('打包历史')
}
},
created(){
this.show = true
if(this.order && this.orderItemId){
this.queryParams.orderId = this.order.orderId;
this.queryParams.orderItemId = this.orderItemId;
orderItemPackLogPage(this.queryParams).then(res => {
this.packData = []
this.$nextTick(() => {
this.packData = res.data.list
})
this.total = res.data.total;
})
}
},
methods:{
getList(){
},
closeDialog(){
this.show = false
this.$emit('close');
},
showPackDetail(orderWarehouseInContent){
this.$emit('showPackDetail',orderWarehouseInContent);
}
}
}
</script>
<template>
<!-- 订单获取入仓记录 -->
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" width="1200px">
<el-card style="margin-bottom:10px">
<el-descriptions :title="$t('入仓数据')" :column="3" :labelStyle="{width:'66px'}">
<el-descriptions-item :label="$t('品名')">{{orderItem.prodTitleZh}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文品名')">{{orderItem.prodTitleEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')" >
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="orderItem.brandType" />
</el-descriptions-item>
<el-descriptions-item :label="$t('箱数')">{{orderItem.num+$t('')}}</el-descriptions-item>
<el-descriptions-item :label="$t('体积')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.volume : orderItem.volume}}</el-descriptions-item>
<el-descriptions-item :label="$t('重量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.weight : orderItem.weight}}kg</el-descriptions-item>
<el-descriptions-item :label="$t('重量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.quantityAll : orderItem.quantity}}</el-descriptions-item>
<el-descriptions-item :label="$t('备货状态')">{{airShipmentData[info.airShipment]}}</el-descriptions-item>
<el-descriptions-item :label="$t('商品特性')">{{productAttr}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card style="margin-bottom:10px">
<div slot="header" class="card-title">
{{$t('打包前')}}
</div>
<el-table v-if="orderWarehouseInContent" :data="orderWarehouseInContent">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" />
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[0]}}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[1]}}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[2]}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<el-table-column :label="$t('入仓快递单号')" prop="expressNo" />
<el-table-column :label="$t('入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
{{getLocationName(row.orderLocationBackVOList)}}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="margin-bottom:10px">
<div slot="header" class="card-title">
{{$t('打包后')}}
</div>
<el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" />
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[0]}}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[1]}}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[2]}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<el-table-column :label="$t('入仓快递单号')" prop="expressNo" />
<el-table-column :label="$t('入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
{{getLocationName(row.orderLocationBackVOList)}}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="margin-bottom:10px">
<el-descriptions :title="$t('打包数据')" :column="2" :labelStyle="{width:'120px'}">
<el-descriptions-item :label="$t('打包后箱数')">{{packData.cartonsNum+$t('箱')}}</el-descriptions-item>
<el-descriptions-item :label="$t('打包后体积')">{{packData.volume}}m³</el-descriptions-item>
<el-descriptions-item :label="$t('打包后重量')">{{packData.weight}}kg</el-descriptions-item>
<el-descriptions-item :label="$t('打包后数量(个)')" >{{packData.quantityAll}}</el-descriptions-item>
<el-descriptions-item :label="$t('打包人')">{{packAfterData.creatorName}}</el-descriptions-item>
<el-descriptions-item :label="$t('打包时间')">{{packAfterData.createTime|parseTime}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-button type="primary" @click="closeDialog">{{$t('关闭窗口')}}</el-button>
</el-dialog>
</template>
<script>
import { getOrder, getOrderWarehouseIn } from '@/api/ecw/order'
import { DICT_TYPE } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getProductAttrList} from '@/api/ecw/productAttr'
export default {
components: {
WarehouseAreaSelect
},
filters: {parseTime},
props:{
order: Object, // order 和 orderId 二选一
packAfterData: Object,
orderItemId: Number,
},
data(){
return {
orderDetail: null,
warehouseList: null,
productAttrList:[], // 商品属性
airShipmentData:['默认值','待出','可出','备货中','已备货'],
packData:{
cartonsNum:0,
volume:0,
weight:0,
quantityAll:0
}
}
},
computed:{
info(){
return this.orderDetail || this.order
},
orderItem(){
if(!this.info) return null
return this.info.orderItemVOList.find(item => item.orderItemId == this.orderItemId)
},
warehouseItem(){
if(!this.warehouseList) return []
return this.warehouseList.find(item => item.orderItemId == this.orderItemId) || []
},
title(){
if(!this.orderItem) return '-'
return this.$l(this.orderItem, 'prodTitle') + ' - ' + this.$t('入仓记录')
},
orderWarehouseInContent(){
if(!this.packAfterData) return []
return JSON.parse(this.packAfterData.orderWarehouseInContent)
},
productAttr(){
if(this.productAttrList.length==0||!this.orderItem.prodAttrIds) return ''
var data = []
this.productAttrList.forEach(item=>{
if(this.orderItem.prodAttrIds.indexOf(item.id)>-1){
data.push(this.$l(item, 'attrName'))
}
})
return data.join(',')
},
},
async created(){
this.show = true
if(!this.order && this.orderId){
getOrder(this.orderId).then(res => {
this.orderDetail = res.data
})
}
this.getOrderWarehouseIn()
this.productAttrList = (await getProductAttrList()).data
},
methods:{
// 获取储位名称
getLocationName(locationArr){
if(!locationArr || !locationArr.length) return ''
let arr = []
locationArr.forEach(item => {
arr.push(`${item.areaName}${item.locationName || ''}`)
})
return Array.from(new Set(arr)).join(",")
},
closeDialog(){
this.show = false
this.$emit('close');
},
getOrderWarehouseIn(){
getOrderWarehouseIn(this.info.orderId).then(res => {
this.warehouseList = res.data
var warehouseItem = this.warehouseList.find(item => item.orderItemId == this.orderItemId)
if(warehouseItem&&warehouseItem.orderWarehouseInBackItemDoList!=null){
warehouseItem.orderWarehouseInBackItemDoList.forEach(item=>{
if(item.volume) this.packData.volume += parseFloat(item.volume)
if(item.weight) this.packData.weight += parseFloat(item.weight)
if(item.cartonsNum) this.packData.cartonsNum += parseInt(item.cartonsNum)
if(item.quantityAll) this.packData.quantityAll += parseInt(item.quantityAll)
})
}
})
},
}
}
</script>
<template> <template>
<!-- 订单获取入仓记录 --> <!-- 订单获取入仓记录 -->
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" width="1000px"> <el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" width="1000px">
<el-button v-if="[3,4].indexOf(+info.transportId) > -1" style="position:absolute;top:15px;left:340px" type="primary" @click="seePackLog">{{$t('查看打包历史')}}</el-button>
<el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList"> <el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" /> <el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" /> <el-table-column :label="$t('箱数')" prop="cartonsNum" />
...@@ -110,6 +111,9 @@ export default { ...@@ -110,6 +111,9 @@ export default {
getOrderWarehouseIn(this.info.orderId).then(res => { getOrderWarehouseIn(this.info.orderId).then(res => {
this.warehouseList = res.data this.warehouseList = res.data
}) })
},
seePackLog(){
this.$emit('openPackHistory',2)
} }
} }
} }
......
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
<print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" /> <print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" />
<print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" /> <print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" />
<warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" /> <warehouse-detail :order="order" @openPackHistory="openPackHistory" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
<el-dialog :title="$t('付款人')" :visible.sync="showDarweeDialog" v-if="order && order.customDraweeVOList"> <el-dialog :title="$t('付款人')" :visible.sync="showDarweeDialog" v-if="order && order.customDraweeVOList">
<el-table :data="order.customDraweeVOList" v-if="order.drawee==3" > <el-table :data="order.customDraweeVOList" v-if="order.drawee==3" >
<el-table-column :label="$t('费用类型')" prop="label" width="200px"> <el-table-column :label="$t('费用类型')" prop="label" width="200px">
...@@ -444,6 +444,10 @@ ...@@ -444,6 +444,10 @@
<!--日志详情--> <!--日志详情-->
<operate-log-detail v-if="showLogDetailId" :log-id="showLogDetailId" @close="showLogDetailId=null"></operate-log-detail> <operate-log-detail v-if="showLogDetailId" :log-id="showLogDetailId" @close="showLogDetailId=null"></operate-log-detail>
<!--打包历史-->
<pack-history v-if="shopPackId" :order ="order" :orderItemId="shopPackId" @showPackDetail="showPackDetail" @close="shopPackId=null"></pack-history>
<!--打包历史详情-->
<pack-history-detail v-if="packAfterData" :order="order" :packAfterData="packAfterData" :orderItemId="showWarehouseInItemId" @close="packAfterData=null"></pack-history-detail>
</div> </div>
</template> </template>
...@@ -464,11 +468,13 @@ import { parseTime } from '@/utils/ruoyi'; ...@@ -464,11 +468,13 @@ import { parseTime } from '@/utils/ruoyi';
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect" import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {checkPermi} from '@/utils/permission' import {checkPermi} from '@/utils/permission'
import OperateLogDetail from "@/views/ecw/order/components/OprateLogDetail"; import OperateLogDetail from "@/views/ecw/order/components/OprateLogDetail";
import PackHistory from './components/PackHistory';
import PackHistoryDetail from './components/PackHistoryDetail';
export default { export default {
name: "detail", name: "detail",
components: { components: {
OperateLogDetail, OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,PackHistory,PackHistoryDetail
}, },
filters: { filters: {
customsTypeFilter(e, customsTypeList) { customsTypeFilter(e, customsTypeList) {
...@@ -513,6 +519,8 @@ export default { ...@@ -513,6 +519,8 @@ export default {
showMore:false, showMore:false,
consigneeText:this.$t('更多'), consigneeText:this.$t('更多'),
showLogDetailId: null, // 显示日志详情的ID showLogDetailId: null, // 显示日志详情的ID
shopPackId:null,//显示打包历史的ID
packAfterData:null,//显示打包历史详情
} }
}, },
computed:{ computed:{
...@@ -745,6 +753,15 @@ export default { ...@@ -745,6 +753,15 @@ export default {
parseLogNote(note){ parseLogNote(note){
if(!note) return [] if(!note) return []
return JSON.parse(note) return JSON.parse(note)
},
//查看打包历史
openPackHistory(){
this.shopPackId = this.showWarehouseInItemId
},
//查看打包历史详情
showPackDetail(packAfterData){
this.packAfterData = packAfterData
} }
} }
}; };
......
...@@ -478,6 +478,7 @@ ...@@ -478,6 +478,7 @@
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 不可出渠道异常 -->
<div v-if="orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&handlerParams.orderExceptionHandlerResult=='change_channel'"> <div v-if="orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&handlerParams.orderExceptionHandlerResult=='change_channel'">
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'"> <el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
<!--嵌套一个form来脱离disabled控制--> <!--嵌套一个form来脱离disabled控制-->
...@@ -501,6 +502,30 @@ ...@@ -501,6 +502,30 @@
</option> </option>
</select> </select>
</div> </div>
<div v-if="orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&(handlerParams.orderExceptionHandlerResult=='change_channel'||handlerParams.orderExceptionHandlerResult=='hand_confirm')">
<div>
<el-form-item :label="$t('运费成交单价')+':'" size="medium">
<el-select v-model="handlerParams.currency" style="width: 120px !important;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<span style="margin:0 20px;font-size:16px">/</span>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
</div>
<div>
<el-form-item :label="$t('清关费成交单价')+':'" size="medium">
<el-select v-model="handlerParams.currency" style="width: 12 0px !important;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<span style="margin:0 20px;font-size:16px">/</span>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
</div>
</div>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
...@@ -732,7 +757,7 @@ ...@@ -732,7 +757,7 @@
// that.orderExceptionData.orderExceptionType = 'order_other_exception' // that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_miss_exception' // that.orderExceptionData.orderExceptionType = 'order_miss_exception'
// that.orderExceptionData.orderExceptionType = 'not_customer_service_exception' // that.orderExceptionData.orderExceptionType = 'not_customer_service_exception'
// that.orderExceptionData.orderExceptionType = 'not_shipping_channel_exception' that.orderExceptionData.orderExceptionType = 'not_shipping_channel_exception'
that.loading = false; that.loading = false;
that.orderId = response.data.orderId that.orderId = response.data.orderId
that.getOrderData() that.getOrderData()
......
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