Commit 76798144 authored by 1483922988@qq.com's avatar 1483922988@qq.com

6

parent a5b25c53
import request from "@/utils/request";
import request from "@/utils/request"
// 创建出货
export function createbox(data) {
return request({
url: "/shipment/box/createAir",
method: "post",
data: data,
});
data: data
})
}
// 更新出货
......@@ -14,8 +14,8 @@ export function updatebox(data) {
return request({
url: "/shipment/box/update",
method: "put",
data: data,
});
data: data
})
}
/**
......@@ -30,15 +30,15 @@ export function booking(data) {
return request({
url: "/shipment/box-book-air/update",
method: "put",
data,
});
data
})
}
return request({
url: "/shipment/box-book-air/create",
method: "post",
data,
});
data
})
}
/**
......@@ -52,8 +52,8 @@ export function preloadPage(data) {
return request({
url: "/ecw/box-preload-goods/preloadPageAir",
method: "post",
data,
});
data
})
}
/**
......@@ -67,8 +67,8 @@ export function createGoods(data) {
return request({
url: "/ecw/box-preload-goods/createAir",
method: "post",
data,
});
data
})
}
/***************************** 合包 start **********************************/
......@@ -84,8 +84,8 @@ export function getMergePkgList(params) {
return request({
url: "/ecw/box-merge-pkg/page",
method: "get",
params,
});
params
})
}
/**
......@@ -99,8 +99,8 @@ export function createMergePkg(data) {
return request({
url: "/ecw/box-merge-pkg/create",
method: "post",
data,
});
data
})
}
/**
......@@ -114,8 +114,8 @@ export function updateMergePkg(data) {
return request({
url: "/ecw/box-merge-pkg/update",
method: "put",
data,
});
data
})
}
/**
......@@ -127,9 +127,9 @@ export function updateMergePkg(data) {
*/
export function deleteMergePkg(id) {
return request({
url: `/ecw/box-merge-pkg/delete?id=`+id,
method: "delete",
});
url: `/ecw/box-merge-pkg/delete?id=` + id,
method: "delete"
})
}
/**
......@@ -143,8 +143,8 @@ export function getUnPkgPage(params) {
return request({
url: "/ecw/box-merge-pkg/getUnPkgPage",
method: "get",
params,
});
params
})
}
/**
......@@ -158,8 +158,8 @@ export function getPkgPageByPkgId(params) {
return request({
url: "/ecw/box-merge-pkg/getPkgPageByPkgId",
method: "get",
params,
});
params
})
}
/**
......@@ -173,8 +173,8 @@ export function createPkgOrder(data) {
return request({
url: "/ecw/box-pkg-order/create",
method: "post",
data,
});
data
})
}
/**
......@@ -188,8 +188,8 @@ export function createBatchPkgOrder(data) {
return request({
url: "/ecw/box-pkg-order/createBatch",
method: "post",
data,
});
data
})
}
/**
......@@ -203,11 +203,11 @@ export function deleteRelate(pkgId, orderId) {
return request({
url: `/ecw/box-pkg-order/deleteRelate`,
method: "delete",
headers:{
'Content-type': 'application/x-www-form-urlencoded'
headers: {
"Content-type": "application/x-www-form-urlencoded"
},
data: 'pkgId='+pkgId+'&orderId='+orderId
});
data: "pkgId=" + pkgId + "&orderId=" + orderId
})
}
/**
......@@ -222,7 +222,7 @@ export function deleteBatchRelate(data) {
url: `/ecw/box-pkg-order/deleteBatchRelate`,
method: "post",
data: data
});
})
}
/**
......@@ -234,9 +234,9 @@ export function deleteBatchRelate(data) {
*/
export function getMergePkgInfoById(id) {
return request({
url: "/ecw/box-merge-pkg/getMergePkgInfoById?id="+id,
url: "/ecw/box-merge-pkg/getMergePkgInfoById?id=" + id,
method: "get"
});
})
}
/**
......@@ -248,9 +248,9 @@ export function getMergePkgInfoById(id) {
*/
export function getMergeTagById(id) {
return request({
url: "/ecw/box-merge-pkg/getMergeTagById?id="+id,
url: "/ecw/box-merge-pkg/getMergeTagById?id=" + id,
method: "get"
});
})
}
/**
......@@ -262,29 +262,27 @@ export function getMergeTagById(id) {
*/
export function finishMergePkg(shipmentId) {
return request({
url: "/ecw/box-merge-pkg/finishMergePkg?shipmentId="+shipmentId,
url: "/ecw/box-merge-pkg/finishMergePkg?shipmentId=" + shipmentId,
method: "get"
});
})
}
/***************************** 合包 end **********************************/
/***************************** 起运 start *******************************/
export function takeoffCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-air-fly/update",
method: "put",
data,
});
data
})
}
return request({
url: "/ecw/box-air-fly/create",
method: "post",
data,
});
data
})
}
/***************************** 起运 end *******************************/
......@@ -297,9 +295,9 @@ export function takeoffCreate(data) {
*/
export function shipmentOrderList(shipmentId) {
return request({
url: "/shipment/box/shipmentOrderList?shipmentId="+shipmentId,
url: "/shipment/box/shipmentOrderList?shipmentId=" + shipmentId,
method: "get"
});
})
}
/**
......@@ -314,7 +312,7 @@ export function updateOrderArrival(data) {
url: `/ecw/box-arrival-air/updateOrderArrival`,
method: "post",
data: data
});
})
}
/**
......@@ -329,7 +327,7 @@ export function createOrderArrival(data) {
url: `/ecw/box-arrival-air/create`,
method: "post",
data: data
});
})
}
/**
......@@ -344,7 +342,7 @@ export function updateAllOrderArrival(data) {
url: `/ecw/box-arrival-air/updateAllOrderArrival`,
method: "post",
data: data
});
})
}
/**
......@@ -359,7 +357,7 @@ export function updateOrderClearance(data) {
url: `/ecw/box-clearance/updateOrderClearance`,
method: "post",
data: data
});
})
}
/**
......@@ -374,7 +372,7 @@ export function updateAllOrderClearance(data) {
url: `/ecw/box-clearance/updateAllOrderClearance`,
method: "post",
data: data
});
})
}
/**
......@@ -389,7 +387,7 @@ export function getLineInfo(params) {
url: `/ecw/warehouse/getLineInfo`,
method: "get",
params
});
})
}
/**
......@@ -400,7 +398,7 @@ export function downloadLoadGoods(params) {
url: "/ecw/box-preload-goods/downloadAirLoadGoodsList",
method: "get",
timeout: 120000,
params,
params
})
}
......@@ -416,7 +414,7 @@ export function checkInfoSingleCreate(data) {
url: `/ecw/box-order-check-info/singleCreate`,
method: "post",
data: data
});
})
}
/**
......@@ -431,7 +429,7 @@ export function checkInfoBatchCreate(data) {
url: `/ecw/box-order-check-info/batchCreate`,
method: "post",
data: data
});
})
}
/**
......@@ -446,7 +444,7 @@ export function checkInfoSingleDelete(data) {
url: `/ecw/box-order-check-info/singleDelete`,
method: "post",
data: data
});
})
}
/**
......@@ -461,7 +459,7 @@ export function checkInfoBatchDelete(data) {
url: `/ecw/box-order-check-info/batchDelete`,
method: "post",
data: data
});
})
}
/**
......@@ -476,7 +474,7 @@ export function getOrderTagList(params) {
url: `/ecw/box-order-check-info/orderTagList`,
method: "get",
params
});
})
}
/**
......@@ -491,7 +489,7 @@ export function searchLoadOrderByBoxNo(data) {
url: `/ecw/box-order-check-info/searchLoadOrderByBoxNo`,
method: "post",
data: data
});
})
}
/**
......@@ -506,7 +504,7 @@ export function confirmAirCheckout(params) {
url: `/ecw/box-air-checkout/confirmAirCheckout`,
method: "get",
params
});
})
}
/**
......@@ -520,8 +518,8 @@ export function singleAirCreate(data) {
return request({
url: "/ecw/box-load-info/singleAirCreate",
method: "post",
data,
});
data
})
}
/**
* 批量装柜
......@@ -534,6 +532,6 @@ export function batchAirCreate(data) {
return request({
url: "/ecw/box-load-info/batchAirCreate",
method: "post",
data,
});
data
})
}
import request from '@/utils/request'
import request from "@/utils/request"
// 创建订单
export function createOrder(data) {
return request({
url: '/ecw/order/create',
method: 'post',
url: "/ecw/order/create",
method: "post",
data: data,
timeout: 5 * 60000
})
......@@ -13,8 +13,8 @@ export function createOrder(data) {
// 更新订单
export function updateOrder(data) {
return request({
url: '/ecw/order/update',
method: 'put',
url: "/ecw/order/update",
method: "put",
data: data,
timeout: 5 * 60000
})
......@@ -23,33 +23,33 @@ export function updateOrder(data) {
// 删除订单
export function deleteOrder(id) {
return request({
url: '/ecw/order/delete?orderId=' + id,
method: 'delete'
url: "/ecw/order/delete?orderId=" + id,
method: "delete"
})
}
// 获得订单
export function getOrder(orderId) {
return request({
url: '/ecw/order/info/' + orderId,
method: 'get'
url: "/ecw/order/info/" + orderId,
method: "get"
})
}
// 获得订单编辑详情
export function getOrderDetail(orderId) {
return request({
url: '/ecw/order/get',
method: 'get',
params: {orderId}
url: "/ecw/order/get",
method: "get",
params: { orderId }
})
}
// 获得订单分页
export function getOrderPage(query) {
return request({
url: '/ecw/order/page',
method: 'get',
url: "/ecw/order/page",
method: "get",
params: query
})
}
......@@ -57,8 +57,8 @@ export function getOrderPage(query) {
// 获得订单列表
export function getOrderList(query) {
return request({
url: '/ecw/order/list',
method: 'get',
url: "/ecw/order/list",
method: "get",
params: query
})
}
......@@ -66,175 +66,173 @@ export function getOrderList(query) {
// 导出订单 Excel
export function exportOrderExcel(query) {
return request({
url: '/ecw/order/export-excel',
method: 'get',
url: "/ecw/order/export-excel",
method: "get",
params: query,
responseType: 'blob'
responseType: "blob"
})
}
// 打印标签
export function printTag(id) {
return request({
url: '/order/print/orderTagPrint?orderId=' + id,
method: 'get',
url: "/order/print/orderTagPrint?orderId=" + id,
method: "get",
timeout: 3 * 60000
})
}
//根据订单号获得订单费用申请列表
export function feeApplicationListByOrderId(query){
export function feeApplicationListByOrderId(query) {
return request({
url:'/order/fee-application/listByOrderId',
method: 'get',
params: query,
url: "/order/fee-application/listByOrderId",
method: "get",
params: query
})
}
//费用申请提交
export function feeApplicationCreate(data){
export function feeApplicationCreate(data) {
return request({
url:'order/fee-application/create',
method:'post',
data:data,
url: "order/fee-application/create",
method: "post",
data: data
})
}
}
// 批量申请费用
export function feeApplicationCreateBatch(data){
// 批量申请费用
export function feeApplicationCreateBatch(data) {
return request({
url:'order/fee-application/create/batch',
method:'post',
data:data,
url: "order/fee-application/create/batch",
method: "post",
data: data
})
}
// 根据订单ID获取是否有正在申请的费用申请
export function getFeeApplicationApproveByOrderId(orderId){
export function getFeeApplicationApproveByOrderId(orderId) {
return request({
url:'/order/fee-application/get/isApprove',
method:'get',
params: {id: orderId}
url: "/order/fee-application/get/isApprove",
method: "get",
params: { id: orderId }
})
}
// 根据流程主键ID得到批量申请费用
export function getBatchFeeByBusinessId(businessId){
export function getBatchFeeByBusinessId(businessId) {
return request({
url:'/order/fee-application/getBatchFeeByBusinessId',
method:'get',
params: {businessId}
url: "/order/fee-application/getBatchFeeByBusinessId",
method: "get",
params: { businessId }
})
}
// 查询批量申请费用
export function feeApplicationGetBatch(params){
export function feeApplicationGetBatch(params) {
return request({
url:'/order/fee-application/get/batch',
method:'get',
url: "/order/fee-application/get/batch",
method: "get",
params
})
}
//费用申请修改
export function applicationUpdate(data){
//费用申请修改
export function applicationUpdate(data) {
return request({
url:'/order/fee-application/update',
method:'put',
data:data,
url: "/order/fee-application/update",
method: "put",
data: data
})
}
export function ApplicationListByOrderId(params){
return request({
url:'order/fee-application/listByOrderId',
method:'get',
params:params
})
}
}
export function ApplicationListByOrderId(params) {
return request({
url: "order/fee-application/listByOrderId",
method: "get",
params: params
})
}
// 批量更新特需
export function specialNeedCreate(data){
export function specialNeedCreate(data) {
return request({
url:'ecw/order-special-need/updateBatch',
method:'put',
data,
url: "ecw/order-special-need/updateBatch",
method: "put",
data
})
}
// 创建特殊
export function getSpecialListByOrderId(orderId){
export function getSpecialListByOrderId(orderId) {
return request({
url: 'ecw/order-special-need/getListByOrderId',
method: 'get',
params: {orderId},
url: "ecw/order-special-need/getListByOrderId",
method: "get",
params: { orderId }
})
}
// 删除特需
export function orderSpecialNeed(params){
export function orderSpecialNeed(params) {
return request({
url:'/ecw/order-special-need/deleteByOrderId',
method: 'delete',
data:params
url: "/ecw/order-special-need/deleteByOrderId",
method: "delete",
data: params
})
}
}
// 获得提单pdf
export function getLadingBill(query){
export function getLadingBill(query) {
return request({
url:'ecw/order/billLading/template',
method: 'get',
responseType: 'arraybuffer',
params: query,
url: "ecw/order/billLading/template",
method: "get",
responseType: "arraybuffer",
params: query
})
}
//调仓申请
export function orderWarehouseInAdjustApply(data){
export function orderWarehouseInAdjustApply(data) {
return request({
url:'/order/order-warehouse-in/adjust-apply',
method:'put',
data:data,
url: "/order/order-warehouse-in/adjust-apply",
method: "put",
data: data
})
}
// 获得入仓货物详情
export function getOrderWarehouseIn(id) {
return request({
url: '/order/order-warehouse-in/get-order-warehouse-in?orderId=' + id,
method: 'get'
url: "/order/order-warehouse-in/get-order-warehouse-in?orderId=" + id,
method: "get"
})
}
// 入仓
export function orderWarehouseIn(data){
export function orderWarehouseIn(data) {
return request({
url: '/order/order-warehouse-in/create',
method: 'post',
url: "/order/order-warehouse-in/create",
method: "post",
data
})
}
// 入仓修改
export function orderWarehouseInUpdateApply(data){
export function orderWarehouseInUpdateApply(data) {
return request({
url: '/order/order-warehouse-in/update-or-updateApply',
method: 'put',
url: "/order/order-warehouse-in/update-or-updateApply",
method: "put",
data
})
}
// 入仓修改箱号
export function orderWarehouseInUpdateLabel(data){
export function orderWarehouseInUpdateLabel(data) {
return request({
url: '/order/order-warehouse-in/update-label',
method: 'post',
url: "/order/order-warehouse-in/update-label",
method: "post",
data
})
}
// 根据订单id获取标签箱号列表
export function getLabelByOrder(orderId){
export function getLabelByOrder(orderId) {
return request({
url: '/order/order-warehouse-in/get-label-by-order',
method: 'get',
url: "/order/order-warehouse-in/get-label-by-order",
method: "get",
params: {
orderId
}
......@@ -242,10 +240,10 @@ export function getLabelByOrder(orderId){
}
// 根据订单id获取待入仓标签箱号
export function getLabelWaitInByOrder(orderId){
export function getLabelWaitInByOrder(orderId) {
return request({
url: '/order/order-warehouse-in/get-label-wait-in-by-order',
method: 'get',
url: "/order/order-warehouse-in/get-label-wait-in-by-order",
method: "get",
params: {
orderId
}
......@@ -253,19 +251,19 @@ export function getLabelWaitInByOrder(orderId){
}
// 入仓修改储位
export function saveOrUpdateOrderLocation(data){
export function saveOrUpdateOrderLocation(data) {
return request({
url: '/order/order-warehouse-in/save-or-update-order-location',
method: 'post',
url: "/order/order-warehouse-in/save-or-update-order-location",
method: "post",
data
})
}
// 入仓修改储位
export function updateWarehouseInLocation(data){
export function updateWarehouseInLocation(data) {
return request({
url: '/order/location/update-warehouse-in-location',
method: 'put',
url: "/order/location/update-warehouse-in-location",
method: "put",
data
})
}
......@@ -273,174 +271,173 @@ export function updateWarehouseInLocation(data){
// 获取入仓修改审批单详情-审批使用
export function getWarehouseUpdateApprovalInfo(id) {
return request({
url: '/order/order-warehouse-in/get-update-approval-info?formId=' + id,
method: 'get'
url: "/order/order-warehouse-in/get-update-approval-info?formId=" + id,
method: "get"
})
}
// 获取最近的入仓修改审批单详情-修改页面使用
export function getWarehouseLastUpdateApprovalInfo(params) {
return request({
url: '/order/order-warehouse-in/get-last-update-approval-info',
method: 'get',
url: "/order/order-warehouse-in/get-last-update-approval-info",
method: "get",
params
})
}
// 入仓完成
export function orderWarehouseInFinish(data){
export function orderWarehouseInFinish(data) {
return request({
url: '/order/order-warehouse-in/finish',
method: 'post',
url: "/order/order-warehouse-in/finish",
method: "post",
data
})
}
// 退仓
export function rollbackApply(data){
export function rollbackApply(data) {
return request({
url: '/order/order-warehouse-in/rollback-apply',
method: 'put',
url: "/order/order-warehouse-in/rollback-apply",
method: "put",
data
})
}
// 退仓-订单项退仓(不审批)
export function rollbackDelete(data){
export function rollbackDelete(data) {
return request({
url: '/order/order-warehouse-in/rollback-order-item',
method: 'put',
url: "/order/order-warehouse-in/rollback-order-item",
method: "put",
data
})
}
//取消订单
export function cancelOrder(orderId){
export function cancelOrder(orderId) {
return request({
url: `/ecw/order/cancel/${orderId}`,
method: 'put',
method: "put"
})
}
// 恢复订单
export function recoveryOrder(orderId){
export function recoveryOrder(orderId) {
return request({
url: `/ecw/order/recovery/${orderId}`,
method: 'put',
method: "put"
})
}
// 获得我的订单分页
export function getMyOrderPage(query) {
return request({
url: '/ecw/order/my/page',
method: 'get',
url: "/ecw/order/my/page",
method: "get",
params: query
})
}
//根据流程ID获得订单信息
export function applicationGetOrderByProcessId(params){
export function applicationGetOrderByProcessId(params) {
return request({
url:'/order/fee-application/getOrderByProcessId',
method:'get',
url: "/order/fee-application/getOrderByProcessId",
method: "get",
params
})
}
export function feeApplicationGet(params){
}
export function feeApplicationGet(params) {
return request({
url:'/order/fee-application/get',
method:'get',
url: "/order/fee-application/get",
method: "get",
params
})
}
//获得调仓明细
export function orderWarehouseInGetAdjustInfo(params){
export function orderWarehouseInGetAdjustInfo(params) {
return request({
url:'order/order-warehouse-in/get-adjust-info',
method:'get',
url: "order/order-warehouse-in/get-adjust-info",
method: "get",
params
})
}
export function warehouseAdjustSendOut(data){
}
export function warehouseAdjustSendOut(data) {
return request({
url:'/order/order-warehouse-in/warehouse-adjust-send-out',
method:'put',
url: "/order/order-warehouse-in/warehouse-adjust-send-out",
method: "put",
data
})
}
//获得订单仓库图片分页
export function orderWarehousePicturePage(params){
}
//获得订单仓库图片分页
export function orderWarehousePicturePage(params) {
return request({
url:'/order/warehouse-picture/page',
method:'get',
url: "/order/warehouse-picture/page",
method: "get",
params
})
}
export function warehouseAdjustPage(params){
}
export function warehouseAdjustPage(params) {
return request({
url:'/order/warehouse-adjust/page',
method:'get',
url: "/order/warehouse-adjust/page",
method: "get",
params
})
}
}
// 调仓-明细-后台使用
export function getAdjustInfo(params){
export function getAdjustInfo(params) {
return request({
url:'/order/order-warehouse-in/get-adjust-info',
method:'get',
params,
url: "/order/order-warehouse-in/get-adjust-info",
method: "get",
params
})
}
export function warehouseAdjustArrived(data){
return request({
url:'/order/order-warehouse-in/warehouse-adjust-arrived',
method:'put',
data
})
export function warehouseAdjustArrived(data) {
return request({
url: "/order/order-warehouse-in/warehouse-adjust-arrived",
method: "put",
data
})
}
export function listByOrderId(params){
export function listByOrderId(params) {
return request({
url:'/order/location/list-by-order-id',
method:'get',
params,
url: "/order/location/list-by-order-id",
method: "get",
params
})
}
// 获取快递单号
export function getOrderCourierNumber(params){
export function getOrderCourierNumber(params) {
return request({
url:'/ecw/order/courier/number',
method:'get',
params,
url: "/ecw/order/courier/number",
method: "get",
params
})
}
// 获取审核
export function getApproval(id){
export function getApproval(id) {
return request({
url:'/order/approval/get?id=' + id,
method:'get'
url: "/order/approval/get?id=" + id,
method: "get"
})
}
// 特价申请
export function createOrderSpecial(data) {
return request({
url: '/ecw/order/special/apply',
method: 'put',
url: "/ecw/order/special/apply",
method: "put",
data: data
})
}
// 特价申请
export function cancelOrderSpecial(orderApprovalId,data) {
export function cancelOrderSpecial(orderApprovalId, data) {
return request({
url: '/ecw/order/cancel/approval/'+orderApprovalId,
method: 'get',
params:data
url: "/ecw/order/cancel/approval/" + orderApprovalId,
method: "get",
params: data
})
}
......@@ -448,8 +445,8 @@ export function cancelOrderSpecial(orderApprovalId,data) {
export function getOrderSpecial(orderId, type, params) {
console.log(orderId, type, params)
return request({
url: '/ecw/order/special/info/' + orderId + '/' + type,
method: 'get',
url: "/ecw/order/special/info/" + orderId + "/" + type,
method: "get",
params
})
}
......@@ -457,17 +454,16 @@ export function getOrderSpecial(orderId, type, params) {
// 根据订单项商品ID与审批类型获得订单商品的特价申请详情
export function getOrderSpecialByApproveId(approveId) {
return request({
url: '/ecw/order/special/info?approveId=' + approveId,
method: 'get'
url: "/ecw/order/special/info?approveId=" + approveId,
method: "get"
})
}
// 特价申请-批量
export function createOrderSpecialBatch(data) {
return request({
url: '/ecw/order/special/apply/batch',
method: 'put',
url: "/ecw/order/special/apply/batch",
method: "put",
data: data
})
}
......@@ -476,24 +472,24 @@ export function createOrderSpecialBatch(data) {
export function getOrderSpecialBatch(orderId, type) {
console.log(orderId, type)
return request({
url: '/ecw/order/special/info/batch/' + orderId + '/' + type,
method: 'get'
url: "/ecw/order/special/info/batch/" + orderId + "/" + type,
method: "get"
})
}
// 根据订单项商品ID与审批类型获得订单商品的特价申请详情-批量
export function getOrderSpecialByApproveIdBatch(approveId) {
return request({
url: '/ecw/order/special/batch/info?approveId=' + approveId,
method: 'get'
url: "/ecw/order/special/batch/info?approveId=" + approveId,
method: "get"
})
}
// 订单号检索功能
export function getOrderNoSearch(params) {
return request({
url: '/ecw/order/orderNoSearch',
method: 'get',
url: "/ecw/order/orderNoSearch",
method: "get",
params
})
}
......@@ -501,17 +497,17 @@ export function getOrderNoSearch(params) {
// 提单号检索功能
export function getBillNoSearch(params) {
return request({
url: '/ecw/order/billNoSearch',
method: 'get',
url: "/ecw/order/billNoSearch",
method: "get",
params
})
}
// 根据合并订单编号获得已合单的订单动态
export function getMergeLogByMergedOrderNo(params){
export function getMergeLogByMergedOrderNo(params) {
return request({
url: '/order/merge/getMergeLogByMergedOrderNo',
method: 'get',
url: "/order/merge/getMergeLogByMergedOrderNo",
method: "get",
params
})
}
......@@ -519,566 +515,591 @@ export function getMergeLogByMergedOrderNo(params){
// 导入装箱单
export function orderImport(data) {
return request({
url: '/ecw/order/import',
method: 'post',
url: "/ecw/order/import",
method: "post",
data
})
}
// 下载装箱单模板
export function exportPackingList(){
export function exportPackingList() {
return request({
url: '/ecw/order/export-packing-list',
method: 'get',
responseType: 'blob'
url: "/ecw/order/export-packing-list",
method: "get",
responseType: "blob"
})
}
//获得特需
export function orderSpecialNeedGet(params){
export function orderSpecialNeedGet(params) {
return request({
url:'/ecw/order-special-need/get',
method:'get',
url: "/ecw/order-special-need/get",
method: "get",
params
})
}
//取消调仓
export function cancelAdjust(data){
export function cancelAdjust(data) {
return request({
url:'/order/order-warehouse-in/cancel-adjust',
method:'post',
url: "/order/order-warehouse-in/cancel-adjust",
method: "post",
data
})
}
}
//取消订单费用申请
export function feeApplicationCancel(data){
return request({
url:'/order/fee-application/cancel',
method:'delete',
data
})
}
export function feeApplicationCancel(data) {
return request({
url: "/order/fee-application/cancel",
method: "delete",
data
})
}
// 获得订单修改申请详情
export function getUpdateInfo(id){
// 获得订单修改申请详情
export function getUpdateInfo(id) {
return request({
url:'/ecw/order/update/info/' + id,
method:'get'
url: "/ecw/order/update/info/" + id,
method: "get"
})
}
// 根据审批ID获得订单修改申请详情
export function getUpdateInfoByApproveId(approveId){
// 根据审批ID获得订单修改申请详情
export function getUpdateInfoByApproveId(approveId) {
return request({
url:'/ecw/order/update/info',
method:'get',
params: {approveId}
url: "/ecw/order/update/info",
method: "get",
params: { approveId }
})
}
// (新修改订单)订单修改审批申请
export function updateApply(data){
export function updateApply(data) {
return request({
url:'/ecw/order/update/apply',
method:'put',
url: "/ecw/order/update/apply",
method: "put",
data
})
}
// 出货阶段的订单编辑
export function updateShipmentApply(data){
export function updateShipmentApply(data) {
return request({
url:'/ecw/order/shipment/update/apply',
method:'put',
url: "/ecw/order/shipment/update/apply",
method: "put",
data
})
}
export function warehousePictureList(data){
export function warehousePictureList(data) {
return request({
url:'/order/warehouse-picture/list',
method:'post',
url: "/order/warehouse-picture/list",
method: "post",
data
})
}
// 获得部门订单分页
export function deptOrderPage(params){
export function deptOrderPage(params) {
return request({
url: '/ecw/order/dept-order-page',
method: 'GET',
url: "/ecw/order/dept-order-page",
method: "GET",
params
})
}
// 获得订单统计
export function orderStatistics(params){
export function orderStatistics(params) {
return request({
url: '/ecw/order/statistics',
method: 'GET',
url: "/ecw/order/statistics",
method: "GET",
params
})
}
// 获得我的订单统计
export function orderMyStatistics(params){
export function orderMyStatistics(params) {
return request({
url: '/ecw/order/my/statistics',
method: 'GET',
url: "/ecw/order/my/statistics",
method: "GET",
params
})
}
// 获得部门订单统计
export function orderDeptStatistics(params){
export function orderDeptStatistics(params) {
return request({
url: '/ecw/order/dept/statistics',
method: 'GET',
url: "/ecw/order/dept/statistics",
method: "GET",
params
})
}
// 参数搜索导出订单管理 Excel
export function orderExportSearch(params){
export function orderExportSearch(params) {
return request({
url: '/ecw/order/export/search',
method: 'GET',
url: "/ecw/order/export/search",
method: "GET",
timeout: 5 * 60000,
params
})
}
// 参数搜索导出我的订单管理 Excel
export function orderExportMySearch(params){
export function orderExportMySearch(params) {
return request({
url: '/ecw/order/export/my/search',
method: 'GET',
url: "/ecw/order/export/my/search",
method: "GET",
timeout: 5 * 60000,
params
})
}
// 参数搜索导出部门订单管理 Excel
export function orderExportDeptSearch(params){
export function orderExportDeptSearch(params) {
return request({
url: '/ecw/order/export/dept/search',
method: 'GET',
url: "/ecw/order/export/dept/search",
method: "GET",
timeout: 5 * 60000,
params
})
}
// 参数搜索导出异常订单统计 Excel
export function exportAbnormal(params){
export function exportAbnormal(params) {
return request({
url: '/ecw/order/export/export-exception',
method: 'get',
url: "/ecw/order/export/export-exception",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出重货单统计 Excel
export function exportHeavyOrder(params){
export function exportHeavyOrder(params) {
return request({
url: '/ecw/order/export/export-heavyOrder',
method: 'get',
url: "/ecw/order/export/export-heavyOrder",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出退仓单统计统计 Excel
export function exportReturnOrder(params){
export function exportReturnOrder(params) {
return request({
url: '/ecw/order/export/export-returnOrder',
method: 'get',
url: "/ecw/order/export/export-returnOrder",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出售后赔偿金额统计 Excel
export function exportSaleRepay(params){
export function exportSaleRepay(params) {
return request({
url: '/ecw/order/export/export-saleRepay',
method: 'get',
url: "/ecw/order/export/export-saleRepay",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出报关数统计 Excel
export function exportCustomsDatas(params){
export function exportCustomsDatas(params) {
return request({
url: '/ecw/order/export/export-customDatas',
method: 'get',
url: "/ecw/order/export/export-customDatas",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出客户出货量统计 Excel
export function exportShippingDatas(params){
export function exportShippingDatas(params) {
return request({
url: '/ecw/order/export/export-shipDatas',
method: 'get',
url: "/ecw/order/export/export-shipDatas",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出预付运费统计 Excel
export function exportShipFee(params){
export function exportShipFee(params) {
return request({
url: '/ecw/order/export/export-shipFee',
method: 'get',
url: "/ecw/order/export/export-shipFee",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 参数搜索导出卸货费统计 Excel
export function exportUnload(params){
export function exportUnload(params) {
return request({
url: '/ecw/order/export/export-excel',
method: 'get',
url: "/ecw/order/export/export-excel",
method: "get",
params: params,
timeout: 5 * 60000,
timeout: 5 * 60000
})
}
// 操作日志分页
export function operateLogPage(params){
export function operateLogPage(params) {
return request({
url: '/ecw/order-operate-log/page',
method: 'get',
url: "/ecw/order-operate-log/page",
method: "get",
params: params,
timeout: 5 * 60000
})
}
// 获取操作日志详情
export function getOperateLogDetail(id){
export function getOperateLogDetail(id) {
return request({
url: '/ecw/order-operate-log/get',
params: {id},
method: 'get',
url: "/ecw/order-operate-log/get",
params: { id },
method: "get"
})
}
// 取消拆单申请
export function splitCancelApply(data){
export function splitCancelApply(data) {
return request({
url: '/order/split/cancel-apply',
method: 'put',
url: "/order/split/cancel-apply",
method: "put",
data
})
}
// 撤销拆单
export function orderSplitRevoke(data){
export function orderSplitRevoke(data) {
return request({
url: '/order/split/revoke',
method: 'put',
url: "/order/split/revoke",
method: "put",
data
})
}
/*根据订单ID获取撤销拆单详情*/
export function splitRevoke(orderId){
export function splitRevoke(orderId) {
return request({
url: '/order/split/revoke/' + orderId,
method: 'get'
url: "/order/split/revoke/" + orderId,
method: "get"
})
}
/*根据审批ID获取撤销拆单详情*/
export function splitRevokeApply(approvalId){
export function splitRevokeApply(approvalId) {
return request({
url: '/order/split/revoke/apply/' + approvalId,
method: 'get'
url: "/order/split/revoke/apply/" + approvalId,
method: "get"
})
}
/*取消撤销拆单*/
export function cancelSplitRevoke(data){
export function cancelSplitRevoke(data) {
return request({
url: '/order/split/cancel/revoke',
method: 'put',
url: "/order/split/cancel/revoke",
method: "put",
data
})
}
/*修改拆单项*/
export function splitItemUpdate(data){
export function splitItemUpdate(data) {
return request({
url: '/order/split-item/update',
method: 'post',
url: "/order/split-item/update",
method: "post",
data
})
}
// 待备货(可出)订单列表
export function canShipmentPage(params){
export function canShipmentPage(params) {
return request({
url: '/air/order/data/scope/can/shipment/page',
method: 'get',
url: "/air/order/data/scope/can/shipment/page",
method: "get",
params
})
}
// 待出订单列表
export function waitingShipmentPage(params){
export function waitingShipmentPage(params) {
return request({
url: '/air/order/data/scope/waiting/shipment/page',
method: 'get',
url: "/air/order/data/scope/waiting/shipment/page",
method: "get",
params
})
}
// 备货订单列表
export function canReadyStockShipmentPage(params){
export function canReadyStockShipmentPage(params) {
return request({
url: '/air/order/can-ready-stock/shipment/page',
method: 'get',
url: "/air/order/can-ready-stock/shipment/page",
method: "get",
params
})
}
// 确认订单可出
export function setCanShipment(orderId){
export function setCanShipment(orderId) {
return request({
url: '/air/order/can/shipment/' + orderId,
method: 'put',
url: "/air/order/can/shipment/" + orderId,
method: "put"
})
}
// 批量可出
export function batchCanShipment(orderIdList){
export function batchCanShipment(orderIdList) {
return request({
url: '/air/order/can/shipment/',
method: 'put',
data: {orderIdList}
url: "/air/order/can/shipment/",
method: "put",
data: { orderIdList }
})
}
// 导出备货订单
export function exportReadyStock(params){
export function exportReadyStock(params) {
return request({
url: '/ecw/order/export/ready-stock/search',
method: 'get',
url: "/ecw/order/export/ready-stock/search",
method: "get",
params,
responseType: 'blob'
responseType: "blob"
})
}
// 导出可出订单
export function exportCanShipment(params){
export function exportCanShipment(params) {
return request({
url: '/ecw/order/export/can-shipment/search',
method: 'get',
url: "/ecw/order/export/can-shipment/search",
method: "get",
params,
responseType: 'blob'
responseType: "blob"
})
}
// 导出待出订单
export function exportWaitingShipment(params){
return request({
url: '/ecw/order/export/waiting-shipment/search',
method: 'get',
params,
responseType: 'blob'
})
export function exportWaitingShipment(params) {
return request({
url: "/ecw/order/export/waiting-shipment/search",
method: "get",
params,
responseType: "blob"
})
}
// 无需打包
export function noNeedPack(orderItemId){
export function noNeedPack(orderItemId) {
return request({
url: '/order/order-warehouse-in/no-need-to-pack',
method: 'get',
params: {orderItemId}
url: "/order/order-warehouse-in/no-need-to-pack",
method: "get",
params: { orderItemId }
})
}
// 完成打包
export function finishPacked(data){
export function finishPacked(data) {
return request({
url: '/order/order-warehouse-in/finish-packed',
method: 'post',
url: "/order/order-warehouse-in/finish-packed",
method: "post",
data
})
}
// 完成备货
export function finishStock(data){
export function finishStock(data) {
return request({
url: '/order/order-warehouse-in/finish-stocked',
method: 'put',
url: "/order/order-warehouse-in/finish-stocked",
method: "put",
data
})
}
// 批量转异
export function batchException(data){
export function batchException(data) {
return request({
url: '/air/order/manual-exception/batch',
method: 'put',
url: "/air/order/manual-exception/batch",
method: "put",
data
})
}
// 打包记录列表
export function orderItemPackLogPage(params){
export function orderItemPackLogPage(params) {
return request({
url: '/order/item-pack-log/page',
method: 'get',
url: "/order/item-pack-log/page",
method: "get",
params
})
}
// 上传报关资料
export function warehousePictureCreate(data) {
return request({
url: '/order/warehouse-picture/create',
method: 'post',
url: "/order/warehouse-picture/create",
method: "post",
data
})
}
// 删除报关资料
export function warehousePictureDelete(id) {
return request({
url: '/order/warehouse-picture/delete?id=' + id,
method: 'delete'
url: "/order/warehouse-picture/delete?id=" + id,
method: "delete"
})
}
//上传
export function uploadFile(data) {
return request({
url: '/infra/file/up',
method: 'post',
url: "/infra/file/up",
method: "post",
data: data
})
}
//上传
export function uploadOrgname(data) {
return request({
url: '/infra/file/org-name/up',
method: 'post',
url: "/infra/file/org-name/up",
method: "post",
data: data
})
}
/*根据订单ID查询目的国*/
export function getDestCountryByOrderId(params){
export function getDestCountryByOrderId(params) {
return request({
url: '/ecw/order/getDestCountryByOrderId',
method: 'get',
params:params
url: "/ecw/order/getDestCountryByOrderId",
method: "get",
params: params
})
}
// 订单费用汇总
export function orderSummary(orderId){
export function orderSummary(orderId) {
return request({
url: '/ecw/orderCount/orderSummary/' + orderId,
method: 'get'
url: "/ecw/orderCount/orderSummary/" + orderId,
method: "get"
})
}
// 订单明细汇总
export function orderDetailSummary(orderId){
export function orderDetailSummary(orderId) {
return request({
url: '/ecw/orderCount/orderDetailSummary/' + orderId,
method: 'get'
url: "/ecw/orderCount/orderDetailSummary/" + orderId,
method: "get"
})
}
// 自编号的订单费用汇总
export function orderSummaryByContainerNumber(params){
export function orderSummaryByContainerNumber(params) {
return request({
url: '/ecw/orderCount/containerNumber/orderSummary',
method: 'get',
url: "/ecw/orderCount/containerNumber/orderSummary",
method: "get",
params
})
}
// 导出自编号订单汇总列表
export function exportOrderSummaryByContainerNumber(params){
export function exportOrderSummaryByContainerNumber(params) {
return request({
url: '/ecw/order/export/export-order-summary',
method: 'get',
url: "/ecw/order/export/export-order-summary",
method: "get",
params,
timeout: 5 * 60000,
responseType: 'blob'
responseType: "blob"
})
}
// 查询权限范围内待出订单数量
export function getWaitingShipmentCount(){
export function getWaitingShipmentCount() {
return request({
url: '/air/order/data/scope/waiting/shipment/count',
method: 'get'
url: "/air/order/data/scope/waiting/shipment/count",
method: "get"
})
}
// 空运订单不可出
export function setCanNotShipment(orderId){
export function setCanNotShipment(orderId) {
return request({
url: '/air/order/not/can/shipment/' + orderId,
method: 'put',
url: "/air/order/not/can/shipment/" + orderId,
method: "put"
})
}
// 查看母订单
export function getParentOrder(orderId){
export function getParentOrder(orderId) {
return request({
url: '/ecw/order/getParentOrder?orderId=' + orderId,
method: 'get'
url: "/ecw/order/getParentOrder?orderId=" + orderId,
method: "get"
})
}
// 获取订单入仓商品明细通用属性集合,用于备货选择订单商品到明细
export function getOrderItemCommonAttr(orderId, excludeOrderWarehouseInId){
export function getOrderItemCommonAttr(orderId, excludeOrderWarehouseInId) {
return request({
url: '/order/order-warehouse-in/get-order-warehouse-in-common-attr-list',
method: 'get',
params: {orderId, excludeOrderWarehouseInId}
url: "/order/order-warehouse-in/get-order-warehouse-in-common-attr-list",
method: "get",
params: { orderId, excludeOrderWarehouseInId }
})
}
//退仓品名列表
export function getOrderItemDeleted(orderId){
export function getOrderItemDeleted(orderId) {
return request({
url: '/ecw/order/order-item-info-when-warehouse-in-deleted/' + orderId,
method: 'get',
url: "/ecw/order/order-item-info-when-warehouse-in-deleted/" + orderId,
method: "get"
})
}
// 打包页面订单数据统计
export function getPackStatistics(orderId){
export function getPackStatistics(orderId) {
return request({
url: '/ecw/order/order-packed-page-statistics/' + orderId,
method: 'get'
url: "/ecw/order/order-packed-page-statistics/" + orderId,
method: "get"
})
}
//获得订单品名对应的退仓入仓货物详情
export function getOrderWarehouseDeleted(orderId,orderItem){
export function getOrderWarehouseDeleted(orderId, orderItem) {
return request({
url: '/order/order-warehouse-in/get-order-warehouse-in-deleted?orderId=' + orderId+'&orderItemId='+orderItem,
url: "/order/order-warehouse-in/get-order-warehouse-in-deleted?orderId=" + orderId + "&orderItemId=" + orderItem
})
}
export function getRegionList(type, regionId) {
return request({
url: "/ecw/warehouse/getRegionList?type=" + type + "&regionId=" + regionId,
method: "get"
})
}
export function getRegionList(type,regionId){
// 复制订单
export function copyOrder(orderId) {
return request({
url:'/ecw/warehouse/getRegionList?type='+type+'&regionId='+regionId,
method: 'get',
url: "/ecw/order/copy/" + orderId,
method: "post"
})
}
// 强制到仓
export function order_warehouse_check_force(data) {
return request({
url: "/order/order-warehouse-check/force",
method: "post",
data
})
}
// 复制订单
export function copyOrder(orderId){
// 到仓查询
export function order_warehouse_check_query(id) {
return request({
url: "/order/order-warehouse-check/query?orderItemId=" + id,
method: "get"
})
}
// 撤销到仓
export function order_warehouse_check_revoke(data) {
return request({
url: '/ecw/order/copy/' + orderId,
method: 'post'
url: "/order/order-warehouse-check/revoke",
method: "post",
data
})
}
// 到仓修改
export function order_warehouse_check_update(data) {
return request({
url: "/order-warehouse-check/update",
method: "post",
data
})
}
<template>
<div class="app-startUnloading">
<!-- 自编号 -->
<el-row>
<p style="color:#D9001B;" v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2&&pageData.boxCustomsBackVO.weightMisreport==1">
{{$t('过机重量异常')}}:{{$t('机场误差3%以内')}}
</p>
<p style="color:#D9001B;" v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2&&pageData.boxCustomsBackVO.weightMisreport==2">
{{$t('过机重量异常')}}:{{$t('我司误差超10kg')}}
</p>
<p style="color:#D9001B;" v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2&&pageData.boxCustomsBackVO.overWeight>0">
{{$t('过机重量异常')}}:{{$t('超过机场重量')}}{{pageData.boxCustomsBackVO.overWeight}}kg
</p>
<p style="color:#D9001B;" v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2&&pageData.boxCustomsBackVO.weightMisreport==3">
{{$t('过机重量异常')}}: {{$t('过机放行-未找到重货订单')}}
</p>
<p style="color:#D9001B;" v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2&&pageData.boxCustomsBackVO.weightMisreport==4">
{{$t('过机重量异常')}}: {{$t('过机放行-已找到重货订单')}}:<span v-for="order in strToArray(pageData.boxCustomsBackVO.overOrders)" :key="order">{{ getOrders(order) }}</span>
<p style="color: #d9001b" v-if="pageData.boxCustomsBackVO && pageData.boxCustomsBackVO.overMachineStatus == 2 && pageData.boxCustomsBackVO.overMachineAbnormalStatus == 2 && pageData.boxCustomsBackVO.weightMisreport == 1">{{ $t("过机重量异常") }}:{{ $t("机场误差3%以内") }}</p>
<p style="color: #d9001b" v-if="pageData.boxCustomsBackVO && pageData.boxCustomsBackVO.overMachineStatus == 2 && pageData.boxCustomsBackVO.overMachineAbnormalStatus == 2 && pageData.boxCustomsBackVO.weightMisreport == 2">{{ $t("过机重量异常") }}:{{ $t("我司误差超10kg") }}</p>
<p style="color: #d9001b" v-if="pageData.boxCustomsBackVO && pageData.boxCustomsBackVO.overMachineStatus == 2 && pageData.boxCustomsBackVO.overMachineAbnormalStatus == 2 && pageData.boxCustomsBackVO.overWeight > 0">{{ $t("过机重量异常") }}:{{ $t("超过机场重量") }}{{ pageData.boxCustomsBackVO.overWeight }}kg</p>
<p style="color: #d9001b" v-if="pageData.boxCustomsBackVO && pageData.boxCustomsBackVO.overMachineStatus == 2 && pageData.boxCustomsBackVO.overMachineAbnormalStatus == 2 && pageData.boxCustomsBackVO.weightMisreport == 3">{{ $t("过机重量异常") }}: {{ $t("过机放行-未找到重货订单") }}</p>
<p style="color: #d9001b" v-if="pageData.boxCustomsBackVO && pageData.boxCustomsBackVO.overMachineStatus == 2 && pageData.boxCustomsBackVO.overMachineAbnormalStatus == 2 && pageData.boxCustomsBackVO.weightMisreport == 4">
{{ $t("过机重量异常") }}: {{ $t("过机放行-已找到重货订单") }}:<span v-for="order in strToArray(pageData.boxCustomsBackVO.overOrders)" :key="order">{{ getOrders(order) }}</span>
</p>
</el-row>
<el-row class="number-area">
<p class="label-font"><span style="color:red">*</span>{{$t('到仓时间')}}</p>
<p class="label-font"><span style="color: red">*</span>{{ $t("到仓时间") }}</p>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="ulWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-row>
<el-row class="number-area">
<p class="label-font">{{$t('自编号')}}</p>
<p class="label-font">{{selfNo}}</p>
<p class="label-font">{{ $t("自编号") }}</p>
<p class="label-font">{{ selfNo }}</p>
<el-input v-model="labelNo" :placeholder="$t('请输入')"></el-input>
<div>
<!-- <el-button type="primary" @click="modifyUnload">{{$t('提交')}}</el-button> -->
<el-button type="primary" @click="modifyBatchUnload">{{$t('批量输入')}}</el-button>
<el-button type="primary" @click="modifyAllUnload">{{$t('全部到仓')}}</el-button>
<el-button type="primary" @click="modifyBatchUnload">{{ $t("批量输入") }}</el-button>
<el-button type="primary" @click="modifyAllUnload">{{ $t("全部到仓") }}</el-button>
</div>
</el-row>
<!-- 当前部分 -->
<el-row class="number-area">
<p class="label-font">{{$t('当前部分')}}</p>
<p class="label-font">{{ $t("当前部分") }}</p>
<el-select :placeholder="$t('请选择')" v-model="sectionId" @change="sectionChange">
<el-option key="0" :label="$t('全部')" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
</el-select>
<p>
{{getSectionInfo}}
{{ getSectionInfo }}
</p>
</el-row>
......@@ -65,7 +56,7 @@
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status" :filter="statusDictFilter" clearable />
</el-form-item>
<el-form-item>
<el-button @click="batchUnLoad" :disabled="!multipleSelection.length">{{$t('选中订单一键卸柜')}}</el-button>
<el-button @click="batchUnLoad" :disabled="!multipleSelection.length">{{ $t("选中订单一键卸柜") }}</el-button>
</el-form-item>
</el-form>
</el-row>
......@@ -77,21 +68,22 @@
<el-table-column :label="$t('序号')" align="center" width="50" prop="tidanNum" />
<el-table-column :label="$t('订单号')" align="center" prop="orderNo">
<template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{scope.row.orderNo}}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderNo }}</a>
</div>
<div style="color: blue; fontweight: bold">
{{ scope.row.isExternalWarehouse === 1 ? "(" + $t("外部仓") + ")" : "" }}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px">
<template slot-scope="scope">
<section class="table-goodList">
<div v-for="(item, index) in scope.row.goodsList" :key="index" class="goodList-div">
<p>{{$t('品名')}}{{$l(item, 'prodTitle')}}</p>
<p>{{$t('品牌')}}:【<template v-if="item.brandName">{{item.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="item.feeType" />{{ $t('】') }}</p>
<p>{{ $t("品名") }}{{ $l(item, "prodTitle") }}</p>
<p>
{{ $t("品牌") }}:【<template v-if="item.brandName">{{ item.brandName }}</template> <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="item.feeType" />{{ $t("】") }}
</p>
</div>
</section>
</template>
......@@ -105,26 +97,26 @@
</el-table-column>
<el-table-column :label="$t('实装箱数')" align="center" prop="installNum">
<template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{scope.row.installNum}}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.installNum }}</a>
</div>
<div style="color: blue; fontweight: bold">
{{ scope.row.isExternalWarehouse === 1 ? "(" + $t("外部仓") + ")" : "" }}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('到仓箱数')" align="center" prop="unloadNum">
<template slot-scope="scope">
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{scope.row.unloadNum}}</a>
</div>
<div style="color:blue;fontWeight:bold;">
{{ scope.row.isExternalWarehouse === 1 ? '(' + $t('外部仓') + ')' : ''}}
</div>
</template>
<div>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.unloadNum }}</a>
</div>
<div style="color: blue; fontweight: bold">
{{ scope.row.isExternalWarehouse === 1 ? "(" + $t("外部仓") + ")" : "" }}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('清关状态')" align="center" prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template>
<template slot-scope="scope">{{ clearStatus(scope.row) }}</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName" />
<el-table-column :label="$t('目的仓')" align="center" prop="destWarehouseName" />
......@@ -132,24 +124,27 @@
<el-table-column :label="$t('重量')" align="center" prop="weight" />
<el-table-column :label="$t('订单状态')" align="center" prop="">
<template slot-scope="scope">
{{scope.row.statusMsg}}
{{ scope.row.statusMsg }}
</template>
</el-table-column>
<el-table-column :label="$t('异常状态')" align="center" prop="">
<template slot-scope="scope">
<el-button v-if="scope.row.exceptionList" type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{getOrderError(scope.row, 'errorStatus')}}</el-button>
<el-button v-if="scope.row.exceptionList" type="text" size="small" @click="handleError(scope.row)" icon="el-icon-edit">{{ getOrderError(scope.row, "errorStatus") }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('异常类型')" align="center" prop="">
<template slot-scope="scope">
{{getUnloadError(scope.row.exceptionList)}}
{{ getUnloadError(scope.row.exceptionList) }}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="170" class-name="small-padding fixed-width">
<template slot-scope="scope" >
<div class="number-area">
<el-button type="danger" size="small" @click="openError(scope.row)">{{$t('异常')}}</el-button>
<el-button v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2" plain type="primary" size="small" @click="$router.push('/order/warehousing-update?id='+scope.row.orderId)">{{$t('入仓修改 ')}}</el-button>
<template slot-scope="scope">
<div class="btns">
<el-button type="danger" size="small" @click="openError(scope.row)">{{ $t("异常") }}</el-button>
<el-button v-if="pageData.boxCustomsBackVO && pageData.boxCustomsBackVO.overMachineStatus == 2 && pageData.boxCustomsBackVO.overMachineAbnormalStatus == 2" plain type="primary" size="small" @click="$router.push('/order/warehousing-update?id=' + scope.row.orderId)">{{ $t("入仓修改 ") }}</el-button>
<el-button plain type="primary" size="small" @click="order_warehouse_check_revoke(scope.row.orderId)" v-if="scope.row.inWarehouseState == 218">{{ $t("撤销到仓") }}</el-button>
<el-button plain type="primary" size="small" @click="order_warehouse_check_force(scope.row.orderId)" v-if="scope.row.installNum > scope.row.unloadNum">{{ $t("强制到仓") }}</el-button>
<el-button plain type="primary" size="small" @click="$router.push('/order/warehousingTo-update?id=' + scope.row.orderId)" v-if="scope.row.inWarehouseState == 218">{{ $t("到仓修改") }}</el-button>
</div>
</template>
</el-table-column>
......@@ -160,14 +155,14 @@
<el-row>
<div class="label-font">
<p>
<span>{{$t('总计')}}:</span>
<span>{{getTotlContent(pageData.totalStatistics)}}</span>
<span>{{ $t("总计") }}:</span>
<span>{{ getTotlContent(pageData.totalStatistics) }}</span>
</p>
</div>
<div class="label-font">
<p>
<span>{{$t('到仓')}}:</span>
<span>{{getUnLoadNumCount}}</span>
<span>{{ $t("到仓") }}:</span>
<span>{{ getUnLoadNumCount }}</span>
</p>
</div>
</el-row>
......@@ -175,23 +170,23 @@
<!-- 审核流程 -->
<el-row class="process-area">
<div class="process">
<div>{{$t('审批流程')}}</div>
<div>{{ $t("审批流程") }}</div>
<work-flow xmlkey="unload_container" v-model="selectedUsers"></work-flow>
</div>
<!-- 操作 -->
<div v-if="!isUnderReview">
<el-button type="success" @click="onSubmit">{{$t('提交完成到仓审核')}}</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">{{$t('返回')}}</el-button>
<el-button type="success" @click="onSubmit">{{ $t("提交完成到仓审核") }}</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">{{ $t("返回") }}</el-button>
</div>
<div v-if="isUnderReview">
<el-button type="primary" @click="jumpReviewDetail">{{$t('到仓审核中')}}</el-button>
<el-button plain type="primary" @click="canclAudit">{{$t('取消审核')}}</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">{{$t('返回')}}</el-button>
<el-button type="primary" @click="jumpReviewDetail">{{ $t("到仓审核中") }}</el-button>
<el-button plain type="primary" @click="canclAudit">{{ $t("取消审核") }}</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">{{ $t("返回") }}</el-button>
</div>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body="false" append-to-body>
<!-- 已装未装订单 -->
<template v-if="dialogConfig.type === 'orderTable'">
<el-table :data="orderList" height="500px" border>
......@@ -201,35 +196,26 @@
</template>
</el-dialog>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body=false append-to-body>
<el-dialog custom-class="shipping-dialog" :title="$t('异常')" :visible.sync="dialogVisible" width="600px" :modal-append-to-body="false" append-to-body>
<unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" />
</el-dialog>
<el-dialog :title="$t('批量到仓选中订单')" :visible="batchUnloading" :before-close="handleCloseBatchUnloading" append-to-body>
<template v-for="item in batchLogs">
<div>{{item}}</div>
<div>{{ item }}</div>
</template>
</el-dialog>
</div>
</template>
<script>
import unloadingError from "./unloadingError.vue";
import {
loadGoodsList,
airBatchUnload,
airAllUnload,
orderTagList,
approvalCreate,
approvalCancel,
getSectionList,
airSingleUnload,
boxGoodsDetail
} from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow";
import Decimal from "decimal.js";
import { getWarehouseList } from '@/api/ecw/warehouse'
import Template from '@/views/cms/template/index.vue'
import unloadingError from "./unloadingError.vue"
import { loadGoodsList, airBatchUnload, airAllUnload, orderTagList, approvalCreate, approvalCancel, getSectionList, airSingleUnload, boxGoodsDetail } from "@/api/ecw/boxSea"
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils"
import WorkFlow from "@/components/WorkFlow"
import Decimal from "decimal.js"
import { getWarehouseList } from "@/api/ecw/warehouse"
import { order_warehouse_check_revoke, order_warehouse_check_force } from "@/api/ecw/order"
import Template from "@/views/cms/template/index.vue"
/**
* 开始卸柜
......@@ -254,7 +240,7 @@ export default {
dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
fullscreen: false
},
dialogVisible: false,
// 已装/未装
......@@ -271,17 +257,17 @@ export default {
sectionObj: {
secStatistics: {},
sectionOrderList: [],
totalStatistics: {},
totalStatistics: {}
},
selectedUsers: [],
sectionOrderList: [],
ulWarehouseTime: null,
warehouseList:[],
warehouseList: [],
// 筛选参数
queryParams:{
orderNo: '',
startWarehouseIds:[],
destWarehouseIds:[],
queryParams: {
orderNo: "",
startWarehouseIds: [],
destWarehouseIds: [],
status: null
},
// 表格选中的
......@@ -289,21 +275,21 @@ export default {
// 是否正在批量卸柜
batchUnloading: false,
// 批量操作的日志
batchLogs:[]
};
batchLogs: []
}
},
created() {
getWarehouseList().then(res => this.warehouseList = res.data)
this.getLoadGoodsList();
getWarehouseList().then((res) => (this.warehouseList = res.data))
this.getLoadGoodsList()
// 部分
getSectionList({ shipmentId: this.$attrs.shipmentObj.id }).then((res) => {
this.sectionList = res.data.map((item, index) => {
return {
...item,
title: this.$t("第{index}部分", { index: index + 1 }),
};
});
});
title: this.$t("第{index}部分", { index: index + 1 })
}
})
})
boxGoodsDetail({
shipmentId: this.$attrs.shipmentObj.id,
secId: 0
......@@ -312,94 +298,104 @@ export default {
})
},
methods: {
order_warehouse_check_revoke(orderId) {
this.$confirm(this.$t("确定要撤销到仓么?")).then(async () => {
let r = await order_warehouse_check_revoke({ orderId })
})
},
order_warehouse_check_force(orderId) {
this.$confirm(this.$t("确定要强制到仓么?")).then(async () => {
let r = await order_warehouse_check_force({ orderId })
})
},
getTotlContent,
getOrders(id) {
let order = this.sectionOrderList.find((item) => item.orderId == id)
if (order) {
return order.orderNo
}
return ''
return ""
},
strToArray(str) {
if (!str) return []
let array = str?.split(',') ?? []
let array = str?.split(",") ?? []
return array.map((item) => {
return Number(item)
})
},
/* 获取卸柜数据 */
getLoadGoodsList() {
this.loading = true;
this.loading = true
let params = {
secId: this.sectionId,
shipmentId: this.$attrs.shipmentObj.id,
};
shipmentId: this.$attrs.shipmentObj.id
}
loadGoodsList(params).then((res) => {
const { data } = res;
this.pageData = data;
this.loading = false;
});
const { data } = res
this.pageData = data
this.loading = false
})
},
/** 表格订单号点击 */
orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => {
const { data = {} } = res;
this.orderList = [];
const { data = {} } = res
this.orderList = []
// 取最长的list
let dataLength = data.loadList.length;
let dataLength = data.loadList.length
if (data.unLoadList.length > dataLength) {
dataLength = data.unLoadList.length;
dataLength = data.unLoadList.length
}
// 组装数据,用一个table组件渲染
for (let index = 0; index < dataLength; index++) {
this.orderList.push({
loadTag: data.loadList[index],
unloadTag: data.unloadCabinetList[index],
});
unloadTag: data.unloadCabinetList[index]
})
}
});
})
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
});
title: row.selfNo
})
},
/** 弹窗事件 */
shwoDialog(config) {
this.$set(this.dialogConfig, "title", config.title);
this.$set(this.dialogConfig, "type", config.type);
this.$set(this.dialogConfig, "title", config.title)
this.$set(this.dialogConfig, "type", config.type)
switch (config.type) {
case "orderTable":
this.$set(this.dialogConfig, "fullscreen", false);
break;
this.$set(this.dialogConfig, "fullscreen", false)
break
}
this.$set(this.dialogConfig, "dialogVisible", true);
this.$set(this.dialogConfig, "dialogVisible", true)
},
/* 单个卸柜 */
modifyUnload() {
if (!this.labelNo) {
this.$message.error(this.$t("请输入箱号标签"));
return;
this.$message.error(this.$t("请输入箱号标签"))
return
}
airSingleUnload({
orderNumCode: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id,
shipmentId: this.$attrs.shipmentObj.id
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.labelNo = "";
this.getLoadGoodsList();
});
});
this.labelNo = ""
this.getLoadGoodsList()
})
})
},
/* 批量输入 */
modifyBatchUnload() {
if (!this.labelNo) {
this.$message.error(this.$t("请输入订单号"));
return;
this.$message.error(this.$t("请输入订单号"))
return
}
if (!this.ulWarehouseTime) {
this.$message.error(this.$t("请选择到仓时间"));
return;
this.$message.error(this.$t("请选择到仓时间"))
return
}
airBatchUnload({
orderNo: this.labelNo,
......@@ -407,195 +403,194 @@ export default {
unloadTime: this.ulWarehouseTime
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.labelNo = "";
this.getLoadGoodsList();
});
});
this.labelNo = ""
this.getLoadGoodsList()
})
})
},
/* 一键卸柜 */
modifyAllUnload() {
if (!this.ulWarehouseTime) {
this.$message.error(this.$t("请选择到仓时间"));
return;
this.$message.error(this.$t("请选择到仓时间"))
return
}
this.$confirm(this.$t("确认到仓?"), this.$t("提示"), {
type: "warning",
type: "warning"
})
.then((_) => {
airAllUnload({ shipmentId: this.$attrs.shipmentObj.id, unloadTime: this.ulWarehouseTime }).then((res) => {
serviceMsg(res, this).then((res) => {
this.getLoadGoodsList();
});
});
this.getLoadGoodsList()
})
})
})
.catch((_) => {});
.catch((_) => {})
},
/** 提交 */
onSubmit() {
// let flag = false
// this.pageData.sectionOrderList.forEach(item=>{
// if(![118428,15].includes(item.status)){
// flag = true
// }
// })
// if(flag){
// this.$message.error(this.$t("存在未到港或未清关的订单"));
// return
// }
if(this.getUnLoadNumCount>0){
// let flag = false
// this.pageData.sectionOrderList.forEach(item=>{
// if(![118428,15].includes(item.status)){
// flag = true
// }
// })
// if(flag){
// this.$message.error(this.$t("存在未到港或未清关的订单"));
// return
// }
if (this.getUnLoadNumCount > 0) {
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 15, // 卸柜
copyUserId: this.selectedUsers,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}else{
this.$message.error(this.$t("货物到仓数小于实装数,请确认"));
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 15, // 卸柜
copyUserId: this.selectedUsers
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit")
})
})
} else {
this.$message.error(this.$t("货物到仓数小于实装数,请确认"))
}
},
/** 取消 */
cancel(type) {
this.$emit('closeDialog', type)
this.$emit("closeDialog", type)
},
/* 关闭弹窗 */
closeDialog(type) {
this.dialogVisible = false;
if (type === "query") this.getLoadGoodsList();
this.dialogVisible = false
if (type === "query") this.getLoadGoodsList()
},
/* 打开异常 */
openError(row) {
this.currRow = row;
this.dialogVisible = true;
this.currRow = row
this.dialogVisible = true
},
/* 清关状态 */
clearStatus(row) {
const { installNum, unloadNum } = row;
const { installNum, unloadNum } = row
if (installNum === unloadNum) {
return this.$t("全部清关");
return this.$t("全部清关")
}
if (installNum >= unloadNum) {
return this.$t("部分清关");
return this.$t("部分清关")
}
if (unloadNum === 0) {
return this.$t("未清关");
return this.$t("未清关")
}
},
// 部分切换
sectionChange() {
this.getLoadGoodsList();
this.getLoadGoodsList()
},
/* 取消审核 */
canclAudit() {
const { shipmentObj } = this.$attrs;
const { shipmentObj } = this.$attrs
approvalCancel({
applyReason: this.$t("取消审核"),
id: shipmentObj["cabinetUnloadApprovalInfo"].id,
shipmentId: shipmentObj.id,
shipmentId: shipmentObj.id
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
this.cancel("submit")
})
})
},
// 获取异常类型
getUnloadError(exceptionList) {
if (!exceptionList) return exceptionList;
const codes = this.getDictDatas(this.DICT_TYPE.ORDER_ERROR_TYPE);
let errorLabels = [];
if (!exceptionList) return exceptionList
const codes = this.getDictDatas(this.DICT_TYPE.ORDER_ERROR_TYPE)
let errorLabels = []
exceptionList.forEach((item) => {
const errObj = codes.find(
(cItem) => cItem.value === item.orderExceptionType
);
if (errObj) errorLabels.push(errObj.label);
});
return errorLabels.join(",");
const errObj = codes.find((cItem) => cItem.value === item.orderExceptionType)
if (errObj) errorLabels.push(errObj.label)
})
return errorLabels.join(",")
},
// 订单异常
getOrderError(row, type) {
if (row.exceptionList && row.exceptionList.length) {
return type === "orderStatus" ? this.$t("卸柜异常") : this.$t("待处理");
return type === "orderStatus" ? this.$t("卸柜异常") : this.$t("待处理")
}
return type === "orderStatus" ? this.$t("已到港") : "";
return type === "orderStatus" ? this.$t("已到港") : ""
},
// 处理异常
handleError(row) {
this.$emit("closeStart", "close");
this.$emit("closeStart", "close")
this.$router.push({
path: `/order/pending?id=${row.orderId}`,
});
path: `/order/pending?id=${row.orderId}`
})
},
jumpReviewDetail() {
const { cabinetUnloadApprovalInfo } = this.$attrs.shipmentObj;
toReviewDetail.apply(this, [cabinetUnloadApprovalInfo.bpmProcessId]);
this.$emit("closeStart", "close");
const { cabinetUnloadApprovalInfo } = this.$attrs.shipmentObj
toReviewDetail.apply(this, [cabinetUnloadApprovalInfo.bpmProcessId])
this.$emit("closeStart", "close")
},
// 表格多选
handleSelectionChange(selection) {
console.log({selection})
console.log({ selection })
this.multipleSelection = selection
},
async batchUnLoad(){
if(!this.multipleSelection?.length){
return this.$message(this.$t('请先选择订单'))
async batchUnLoad() {
if (!this.multipleSelection?.length) {
return this.$message(this.$t("请先选择订单"))
}
if(!this.ulWarehouseTime){
return this.$message(this.$t('请选择卸柜时间'))
if (!this.ulWarehouseTime) {
return this.$message(this.$t("请选择卸柜时间"))
}
console.log('批量卸柜')
console.log("批量卸柜")
this.batchUnloading = true
this.batchLogs = []
for(const item of this.multipleSelection){
if(!this.batchUnloading)break;
for (const item of this.multipleSelection) {
if (!this.batchUnloading) break
const time = new Date()
const timeStr = [time.getHours(), time.getMinutes(), time.getSeconds()].map(item => item.toString().padStart(2, '0')).join(':')
const timeStr = [time.getHours(), time.getMinutes(), time.getSeconds()].map((item) => item.toString().padStart(2, "0")).join(":")
await airBatchUnload({
orderNo: item.orderNo,
shipmentId: this.$attrs.shipmentObj.id,
unloadTime: this.ulWarehouseTime
}).then((res) => {
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜成功`)
}).catch((err) => {
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜失败` + JSON.stringify(err))
});
})
.then((res) => {
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜成功`)
})
.catch((err) => {
this.batchLogs.push(`${timeStr} 订单号:${item.orderNo}卸柜失败` + JSON.stringify(err))
})
}
this.batchLogs.push("批量卸柜完成")
this.getLoadGoodsList();
this.getLoadGoodsList()
},
handleCloseBatchUnloading(){
handleCloseBatchUnloading() {
this.batchUnloading = false
},
// 过滤订单状态筛选字典内容
statusDictFilter(item){
if(item.cssClass && item.cssClass != 'air'){
statusDictFilter(item) {
if (item.cssClass && item.cssClass != "air") {
return false
}
return true
},
}
},
computed: {
exportWarehouseList(){
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
importWarehouseList() {
return this.warehouseList.filter((item) => item.tradeType == 1 || item.tradeType == 3)
},
filteredOrderList(){
if(!this.pageData?.sectionOrderList?.length) return []
filteredOrderList() {
if (!this.pageData?.sectionOrderList?.length) return []
return this.pageData.sectionOrderList.filter((item) => {
if(this.queryParams.orderNo && item.orderNo.indexOf(this.queryParams.orderNo) == -1)return false
if(this.queryParams.startWarehouseIds?.length && this.queryParams.startWarehouseIds.indexOf(item.startWarehouseName) === -1){
if (this.queryParams.orderNo && item.orderNo.indexOf(this.queryParams.orderNo) == -1) return false
if (this.queryParams.startWarehouseIds?.length && this.queryParams.startWarehouseIds.indexOf(item.startWarehouseName) === -1) {
return false
}
if(this.queryParams.destWarehouseIds?.length && this.queryParams.destWarehouseIds.indexOf(item.destWarehouseName) === -1){
if (this.queryParams.destWarehouseIds?.length && this.queryParams.destWarehouseIds.indexOf(item.destWarehouseName) === -1) {
return false
}
if(this.queryParams.status && this.queryParams.status != item.status){
if (this.queryParams.status && this.queryParams.status != item.status) {
return false
}
return true
......@@ -603,33 +598,42 @@ export default {
},
/* 是否审核中 */
isUnderReview() {
const { currNode, shipmentObj } = this.$attrs;
return shipmentObj[currNode.keyName] === 183 ? true : false;
const { currNode, shipmentObj } = this.$attrs
return shipmentObj[currNode.keyName] === 183 ? true : false
},
// 部分信息
getSectionInfo() {
const { totalStatistics, secStatistics } = this.pageData;
const { totalStatistics, secStatistics } = this.pageData
if (!this.sectionId) {
return getTotlContent(totalStatistics);
return getTotlContent(totalStatistics)
} else {
return getTotlContent(secStatistics);
return getTotlContent(secStatistics)
}
},
/* 已卸总数 */
getUnLoadNumCount() {
let count = 0;
let count = 0
if (this.pageData.sectionOrderList) {
this.pageData.sectionOrderList.forEach((item) => {
count = Decimal.add(count, item.unloadNum).toNumber();
});
count = Decimal.add(count, item.unloadNum).toNumber()
})
}
return count;
},
},
};
return count
}
}
}
</script>
<style lang="scss" scoped>
.btns {
& > * {
&:nth-child(n + 1) {
margin: 0 auto;
margin-top: 6px;
display: block;
}
}
}
.app-startUnloading {
p {
margin: 0;
......
<template>
<div style="display: inline-block; margin-right: 10px">
<el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button>
<el-dialog :title="title + ' - ' + warehousing.orderNo" :visible.sync="visible" width="100%">
<el-tabs v-model="activeName" type="card">
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first">
<el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t("中文品名") }}</template>
<span style="min-width: 200px; margin-right: 15px; display: inline-block">
<product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" v-model="form.prodId" @change="onProductChange" determined protect-once />
<span v-else>{{ warehousing.prodTitleZh }}</span>
</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t("英文品名") }}</template>
<product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" lang="En" v-model="form.prodId" @change="onProductChange" determined protect-once />
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t("品牌") }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select v-model="form.brand" :placeholder="$t('可修改')" filterable remote @change="handleBrandChange" :remote-method="getProductBrandPage" clearable>
<el-option v-for="item in brandList" :key="item.id" :label="item.titleZh" :value="item.id"> </el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t("是否备案") }}</template>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t("收费模式") }}</template>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item :label="$t('入库参数')">
{{ $t("箱数") }}:{{ warehousing.warehouseCheckInfoVO.cartonsNum }}<br />
{{ $t("体积") }}:{{ warehousing.warehouseCheckInfoVO.volume }}m³<br />
{{ $t("重量") }}:{{ warehousing.warehouseCheckInfoVO.weight }}Kg
</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.checkMaterial" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('到仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form.warehouseCheckProdAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, "label") }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t("到仓记录") }}</span>
</div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table :data="form.table" style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header> <span style="color: red">*</span>{{ $t("箱数") }}</template>
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.cartonsNum">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form.table[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header> <span style="color: red">*</span>{{ $t("包装类型") }}</template>
<template v-slot="{ r, c, $index }">
<el-form-item>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t("") }}</span
>(cm)
</template>
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.boxGauge1">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t("") }}</span
>(cm)
</template>
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.boxGauge2">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t("") }}</span
>(cm)
</template>
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.boxGauge3">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t("体积") }}</span
>(m³)
</template>
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.volume">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t("重量") }}</span
>(Kg)
</template>
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.weight">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="140px">
<template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.quantityAll">
<el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="" type="number">
<template slot="append">{{ $t("") }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{ r, c, $index }">
<el-form-item>
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select v-if="visible" v-model="form.table[$index].orderLocationBackVOList" :order-id="orderId" :order-item-id="warehousing.orderItemId" :warehouse-in-id="form.table[$index].id" :warehouse-id="warehouseId" :is-editing="false"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template v-slot="{ r, c, $index }">
<el-form-item>
<el-input v-model="form.table[$index].remark" type="textarea" show-word-limit maxlength="100" placeholder="" :disabled="$index < protectRowCount"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index }">
<WarehouseRecordDetail v-model="form.table[$index].orderWarehouseInDetailsVOList" :readonly="true" />
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<el-card style="margin-top: 15px">
<div slot="header" class="clearfix">
<span style="font-size: 18px"><span style="color: red">*</span>{{ $t("到仓影像") }}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.pictureUrls" :id="orderItemId" :type="5" @delete="handleImageDelete"></image-and-video-upload>
</div>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit && order.status !== 3">
<h2>{{ $t("审批流程") }}</h2>
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div>
<span slot="footer">
<template v-if="!isEditing">
<el-button @click="handleClose">{{ $t("关 闭") }}</el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit()">{{ edit ? $t("确认修改") : $t("提 交") }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t("审核中") }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t("取消审核") }}</el-button>
<el-button @click="handleClose">{{ $t("返回") }}</el-button>
</template>
<template v-else> </template>
</span>
</el-dialog>
</div>
</template>
<script>
import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import { getFeeTypeByOrderProduct, getProductBrankPage } from "@/api/ecw/productBrank"
import { cancelProcessInstance } from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import { DICT_TYPE, getDictDataLabel, getDictDatas } from "@/utils/dict"
import { orderWarehouseIn, orderWarehouseInUpdateApply, warehousePictureDelete, warehousePictureList } from "@/api/ecw/order"
import { getProductAttrList } from "@/api/ecw/productAttr"
import { getProductTypeList } from "@/api/ecw/productType"
import { addProduct } from "@/api/ecw/product"
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue"
import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue"
export default {
name: "Warehouse",
components: {
WarehouseRecordDetail,
ImageAndVideoUpload,
ProductSelector,
WarehouseAreaSelect,
WorkFlow
},
props: {
title: {
type: String,
default: undefined
},
order: {
type: Object,
default: undefined
},
isJiyun: {
type: Boolean,
default: false
},
// 入仓修改
edit: {
type: Boolean,
default: false
},
orderItemA: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
},
orderItemB: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
}
},
mounted() {
this.getAttrList()
this.getTypeList()
},
computed: {
isAdd() {
return this.$route.path === "/order/warehousing-add"
},
warehousing() {
return { ...this.orderItemA, ...this.orderItemB }
},
orderId() {
return this.order.orderId
},
orderItemId() {
return this.warehousing.orderItemId
},
brandObject() {
return this.brandList.find((e) => e.id === this.form.brand) || ""
},
brandObject1() {
return this.brandList.find((e) => e.id === this.form1.brand) || ""
},
isBeian() {
if (this.form.recordMode !== undefined) {
return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.form.recordMode]
}
if (this.brandObject.filing) {
return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.brandObject.filing]
} else {
return ""
}
},
isBeian1() {
if (this.form1.recordMode !== undefined) {
return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.form1.recordMode]
}
if (this.brandObject1.filing) {
return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.brandObject1.filing]
} else {
return ""
}
},
/**
* 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType() {
const feeType = this.form.feeType
if (feeType >= 0 && feeType < 3) {
return [this.$t("无牌价"), this.$t("有牌价"), this.$t("中性品牌价")][feeType]
}
return ""
},
feeType1() {
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return [this.$t("无牌价"), this.$t("有牌价"), this.$t("中性品牌价")][feeType]
}
return ""
},
warehouseId() {
return this.order.adjustToDestWarehouseId || this.order?.logisticsInfoDto?.startWarehouseId
}
},
watch: {
visible(val) {
if (val) {
this.init()
this.getProductBrandPage(this.warehousing.brandName)
this.getProductBrandPage1()
this.handleBrandChange(parseInt(this.form.brand))
} else {
this.$emit("close")
}
}
},
data() {
return {
DICT_TYPE,
getDictDataLabel,
getDictDatas,
activeName: "first",
visible: false,
submitting: false,
form: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
warehouseCheckProdAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: undefined,
feeType: undefined,
recordMode: undefined,
pictureUrls: [],
usageIds: []
},
form1: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
warehouseCheckProdAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: 1,
feeType: undefined,
recordMode: undefined,
pictureUrls: [],
usageIds: []
},
brandList: [],
brandList1: [],
formRules: {
prodId: [{ required: true, message: this.$t("请选择品名"), trigger: "change" }],
brand: [{ required: true, message: this.$t("请选择品牌"), trigger: "change" }]
},
tableFormRules: {
// cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
// boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}],
// boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}],
// boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}],
// volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}],
// weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}],
// // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
},
selectedUsers: undefined,
// 入仓修改正在审核中
isEditing: false,
// 审批业务id
formId: "",
// 追加时被保护的行数
protectRowCount: -1,
productForm: {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
},
productRules: {
typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }]
},
//类型列表
typeList: [],
// 特性列表
attrList: []
}
},
methods: {
init() {
this.form.brandType = this.warehousing.brandType
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderNo
this.form.orderNo = this.warehousing.orderNo
this.form.brand = this.warehousing.brand
this.form.brandType = this.warehousing.brandType
this.form.inTime = this.warehousing.inTime
this.form.material = this.warehousing.material
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo
if ((this.edit || this.isAdd) && this.warehousing.warehouseCheckProdAttrIds !== null) {
this.form.warehouseCheckProdAttrIds = this.warehousing.warehouseCheckProdAttrIds?.split(",").map((e) => +e) || []
} else {
this.form.warehouseCheckProdAttrIds = this.warehousing.warehouseCheckProdAttrIds?.split(",").map((e) => +e) || this.warehousing.prodAttrIds?.split(",").map((e) => +e) || []
}
this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh
this.form.prodType = this.warehousing.prodType
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls
this.form.usageIds = this.warehousing.usageIds ? this.warehousing.usageIds.split(",") : []
if (this.form.usageIds.length > 0 && this.form.usageIds[0] === "") {
this.usageIds.splice(0, 1)
}
this.warehousing.orderWarehouseInBackItemDoList.forEach((e) => {
let bg = {}
if (e.boxGauge) {
const boxGauge = e.boxGauge.split("*")
// e.boxGauge1 = boxGauge[0]
// e.boxGauge2 = boxGauge[1]
// e.boxGauge3 = boxGauge[2]
bg = {
boxGauge1: boxGauge[0],
boxGauge2: boxGauge[1],
boxGauge3: boxGauge[2]
}
}
this.form.table.push({ ...e, ...bg })
})
if (!this.edit) {
let protectRowCount = 0
this.protectRowCount = this.form.table.map((e) => {
if (e.id) {
protectRowCount++
}
})
this.protectRowCount = protectRowCount
this.handleAdd()
this.handleAdd(1)
}
},
handleImageDelete(url) {
warehousePictureList({
bizId: this.orderId,
type: 1
}).then((r) => {
console.log(r, url)
if (r.data?.length > 0) {
const id = r.data.find((e) => e?.url === url)?.id
if (id) {
warehousePictureDelete(id).then((r) => {
console.log(r)
})
}
}
})
},
handleClose() {
this.visible = false
},
handleVolume(index, val) {
setTimeout(() => {
const { boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum } = (val === 1 ? this.form1.table : this.form.table)[index]
let result = ""
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === "1" ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3)) / 1000000 + 0.000001)?.toFixed(2) || ""
} else {
result = ""
}
if (result === "0.00") result = "0.01"
;(val === 1 ? this.form1.table : this.form.table)[index].volume = result
}, 0)
},
handleSubmit() {
if (this.activeName !== "first") {
// 添加非填单货物
if (this.form1.warehouseCheckProdAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t("提示"),
message: this.$t("订单包含不接受货物,请检查"),
type: "warning"
})
}
this.$refs["form1"].validate((valid) => {
this.$refs["tableForm1"].validate((valid1) => {
if (!valid || !valid1) {
return
}
this.submitting = true
return orderWarehouseIn({
...this.form1,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
warehouseCheckProdAttrIds: this.form1.warehouseCheckProdAttrIds.join(","),
usageIds: this.form1.usageIds.join(","),
orderWarehouseInItemDoList: this.form1.table.map((e) => {
return {
...e,
boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
})
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success("新增入仓成功")
this.handleClose()
} else {
this.$message.success("新增入仓失败")
}
})
.catch(() => {
this.submitting = false
})
})
})
} else {
if (this.form.warehouseCheckProdAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t("提示"),
message: this.$t("订单包含不接受货物,请检查"),
type: "warning"
})
}
this.$refs["form"].validate((valid) => {
this.$refs["tableForm"].validate((valid1) => {
if (!valid || !valid1) {
return
}
if (this.edit) {
// 入仓修改
this.submitting = true
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || "",
weight: (+this.warehousing.weight)?.toFixed(2) || "",
prodId: this.form.prodId,
warehouseCheckProdAttrIds: this.form.warehouseCheckProdAttrIds.join(","),
usageIds: this.form.usageIds.join(","),
orderWarehouseInUpdateItemDoList: this.form.table.map((e) => {
return {
...e,
boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
copyUserId: this.selectedUsers
})
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success(r.msg || "入仓修改发起成功")
this.handleClose()
} else {
this.$message.success(r.msg || "入仓修改发起失败")
}
})
.catch(() => {
this.submitting = false
})
} else {
// 首次入仓、入仓补充
this.submitting = true
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
warehouseCheckProdAttrIds: this.form.warehouseCheckProdAttrIds.join(","),
usageIds: this.form.usageIds.join(","),
orderWarehouseInItemDoList: this.form.table.map((e) => {
return {
...e,
boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
})
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success("入仓成功")
this.handleClose()
} else {
this.$message.success("入仓失败")
}
})
.catch(() => {
this.submitting = false
})
}
})
})
}
},
handleCancelProcessInstance() {
this.$prompt("请输入取消原因?", this.$t("取消流程"), {
type: "warning",
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空")
}).then(({ value }) => {
cancelProcessInstance(this.formId, value).then(() => {
this.opened = false
this.$modal.msgSuccess("取消成功")
})
})
},
onProductChange(product) {
if (!product) {
return
}
this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand))
this.form.warehouseCheckProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : []
},
onProductChange1(product) {
if (!product) {
return
}
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand))
this.form1.warehouseCheckProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : []
},
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({ pageSize: 20, titleZh }).then((r) => {
this.brandList = r.data.list
})
},
getProductBrandPage1(titleZh = undefined) {
getProductBrankPage({ pageSize: 20, titleZh }).then((r) => {
this.brandList1 = r.data.list
})
},
handleBrandChange(v) {
getFeeTypeByOrderProduct({
brandId: parseInt(v),
productId: this.warehousing.prodId,
orderId: this.orderId
}).then((r) => {
if (r.code === 0) {
;(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType)
;(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
}
})
},
handleDelete(val) {
if (val === 1) {
this.form1.table.pop()
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ""
if (val !== 1) {
// 货物入仓
let hasCartonsNum = 0
this.form.table.forEach((e) => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
}
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/
form.table.push({
boxGauge1: this.isJiyun ? 0 : "",
boxGauge2: this.isJiyun ? 0 : "",
boxGauge3: this.isJiyun ? 0 : "",
cartonsNum: cartonsNum > 0 ? cartonsNum : "",
expressNo: "",
quantityAll: undefined,
unit: "1",
volume: "",
weight: "",
specificationType: "1",
table: [],
orderLocationBackVOList
})
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then((response) => {
this.attrList = response.data
})
},
/** 获取产品类型列表 */
getTypeList() {
getProductTypeList().then((response) => {
this.typeList = response.data
})
}
}
}
</script>
<style scoped></style>
<template>
<div style="display: inline-block">
<template v-if="text">
<el-button size="mini" type="text" style="margin-right: 10px" @click="handleOpen">{{ num }}{{$t('混箱')}}})</el-button>
</template>
<template v-else>
<el-button size="mini" type="primary" style="margin-right: 10px" @click="handleOpen">{{ title }}</el-button>
</template>
<el-dialog
append-to-body
:title="title"
:visible.sync="dialogVisible"
width="1024px"
:before-close="handleClose">
<template v-slot:title>
<div class="flex flex-items-center">
<div class="title flex-1 flex flex-items-center">{{title}}</div>
<el-button v-if="showChooseOrderItem" type="primary" size="mini" @click="handleShowChooseDialog">{{$t('选择订单商品')}}</el-button>
<div style="width: 100px"><!--占位,防止被关闭按钮挡住--></div>
</div>
</template>
<el-form v-if="dialogVisible">
<WarehouseRecordDetailItem
v-for="(item, index) in dataList"
:key="index" v-model="dataList[index]"
:index="index" :attr-list="attrList"
@handle-delete="handleDelete(index)"
:readonly="readonly"
/>
</el-form>
<el-button v-show="!readonly" type="primary" size="mini" @click="handleAddItem">{{$t('添加一条明细')}}</el-button>
<span v-show="!readonly" slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="handleSave">{{$t('确定')}}</el-button>
</span>
</el-dialog>
<choose-order-products
v-if="showChooseDialog"
:order-id="orderId"
:warehouse-in-id="warehouseInId"
@close="showChooseDialog=false"
@success="handleChooseOrderProducts"></choose-order-products>
</div>
</template>
<script>
import ProductSelector from "@/components/ProductSelector/index.vue";
import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue";
import {getProductAttrList} from "@/api/ecw/productAttr";
import {getOrderItemCommonAttr} from "@/api/ecw/order";
import ChooseOrderProducts from "@/views/ecw/order/stocking/components/ChooseOrderProducts.vue";
/**
* 入仓明细弹窗
*/
export default {
name: 'WarehouseRecordDetail',
components: {ChooseOrderProducts, WarehouseRecordDetailItem, ProductSelector},
props: {
value: {
type: Array,
default: () => []
},
readonly: {
type: Boolean,
default: false
},
text: {
type: Boolean,
default: false
},
num:{
type:Number,
default:0
},
// 是否显示添加订单商品按钮
showChooseOrderItem:Boolean,
orderId: Number,
warehouseInId: Number
},
data() {
return {
dialogVisible: false,
dataList: [],
// 特性列表
attrList: [],
showChooseDialog: false
};
},
watch:{
dialogVisible(v){
if(!v){
this.$emit("close")
}
}
},
mounted() {
this.getAttrList()
},
methods: {
init() {
if (!this.value || this.value.length === 0) {
this.dataList = [{
"boxGauge": "",
"brand": undefined,
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": '',
"prodId": undefined,
"quantityAll": undefined,
"specificationType": undefined,
"unit": "",
"usageIds": "",
"volume": undefined,
"weight": undefined,
"material": undefined
}]
} else {
this.dataList = JSON.parse(JSON.stringify(this.value))
}
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
handleAddItem() {
this.dataList.push({
"boxGauge": "",
"brand": undefined,
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": '',
"prodId": undefined,
"quantityAll": undefined,
"specificationType": undefined,
"unit": "",
"usageIds": "",
"volume": undefined,
"weight": undefined,
"material": undefined
})
},
handleDelete(index) {
this.dataList.splice(index, 1)
},
handleOpen() {
this.init()
this.dialogVisible = true
},
handleClose(done) {
if (this.readonly) {
return done()
}
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
handleSave() {
for (let i = 0; i < this.dataList.length; i++) {
if (!this.dataList[i].prodId) {
return this.$notify({
title: this.$t("填写第{n}条明细的品名", {n: i=1}),
type: "warning"
})
}
if (!this.dataList[i].brand) {
return this.$notify({
title: this.$t("填写第{n}条明细的品牌", {n: i=1}),
type: "warning"
})
}
if(!this.dataList[i].quantityAll){
return this.$notify({
title: this.$t("填写第{n}条明细的数量", {n: i=1}),
type: "warning"
})
}
}
this.$emit('input', this.dataList)
this.dialogVisible = false
},
handleShowChooseDialog(){
this.showChooseDialog = true
},
handleChooseOrderProducts(data){
this.showChooseDialog = false
if(!data?.length) return
// 如果最后一条是空的,则删除先
if(this.dataList?.length){
const index = this.dataList.length - 1
let lastItem = this.dataList[index]
if(!lastItem.prodId && !lastItem.brand && !lastItem.prodAttrIds && !lastItem.material && !lastItem.quantityAll){
this.dataList.splice(index, 1)
}
}
data.forEach(item => {
this.dataList.push({
"boxGauge": "",
"brand": item.brand,
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": item.prodAttrIds,
"prodId": item.prodId,
"quantityAll": item.quantityAll,
"specificationType": undefined,
"unit": "",
"usageIds": item.usageIds || "",
"volume": undefined,
"weight": undefined,
"material": item.material
})
})
}
},
computed: {
title() {
if (this.readonly) {
return this.$t('查看箱明细')
}
return !this.value || this.value.length === 0 ? this.$t('添加箱明细') : this.$t('编辑箱明细')
}
}
}
</script>
<style scoped lang="scss">
.title{
font-size: 16px;
}
</style>
<template>
<el-card style="margin-bottom: 10px">
<div slot="header">
<span>序号{{ index + 1 }}</span>
<el-link v-show="!readonly" type="danger" @click="handleDelete" style="float: right">删除</el-link>
</div>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item :label="$t('中文品名')" required>
<product-selector v-model="value.prodId" @change="onProductChange" determined :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('品牌')" required>
<el-select
v-model="value.brand"
:placeholder="$t('可修改')"
filterable
remote
:remote-method="getProductBrandPage"
:disabled="readonly"
clearable>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('材质')">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="material" clearable :disabled="readonly"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('商品特性')">
<el-checkbox-group v-model="prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id" :disabled="readonly">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<!--<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('长')">
<el-input v-model="boxGauge1" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('宽')">
<el-input v-model="boxGauge2" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('高')">
<el-input v-model="boxGauge3" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('重量')">
<el-input v-model="value.weight" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('体积')">
<el-input v-model="value.volume" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>-->
<el-row :gutter="10">
<!--<el-col :span="4">
<el-form-item :label="$t('快递单号')">
<el-input v-model="value.expressNo" :disabled="readonly" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('包装类型')">
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit" :disabled="readonly"></dict-selector>
</el-form-item>
</el-col>-->
<el-col :span="4">
<el-form-item :label="$t('数量')" required>
<el-input v-model="value.quantityAll" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>
</el-card>
</template>
<script>
import ProductSelector from "@/components/ProductSelector/index.vue"
import { getProductBrank, getProductBrankPage } from '@/api/ecw/productBrank'
import {getProductAttrList} from "@/api/ecw/productAttr"
import {DICT_TYPE, getDictDatas} from '@/utils/dict'
export default {
name: "WarehouseRecordDetailItem",
computed: {
DICT_TYPE() {
return DICT_TYPE
}
},
components: {ProductSelector},
props: {
value: {
type: Object,
default: () => {}
},
index: {
type: Number,
default: 0
},
readonly: {
type: Boolean,
default: false
},
// 特性列表
attrList: {
type: Array,
default: () => []
}
},
data() {
return {
brandList: [],
prodAttrIds: [],
usageIds: [],
material: '',
boxGauge1: '',
boxGauge2: '',
boxGauge3: '',
}
},
async mounted() {
// 品牌回显
if (this.value.brand) {
await getProductBrank(this.value.brand).then(r => {
this.brandList = [r.data]
})
} else {
this.getProductBrandPage()
}
if(this.value.material){
this.$set(this, 'material', this.value.material)
}
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e)
}
if (this.value.usageIds) {
this.usageIds = this.value.usageIds.split(',') || []
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
}
if (this.value.boxGauge) {
const boxGauge = this.value.boxGauge.split('*')
if (boxGauge?.length === 3) {
this.boxGauge1 = boxGauge[0]
this.boxGauge2 = boxGauge[1]
this.boxGauge3 = boxGauge[2]
}
}
},
methods: {
getDictDatas,
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList = r.data.list
})
},
handleDelete() {
this.$emit('handle-delete')
},
onProductChange(product){
if (!product || this.readonly) {
return
}
this.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
}
},
watch: {
prodAttrIds(val) {
this.value.prodAttrIds = val.join(',')
},
usageIds(val) {
this.$nextTick(() => {
this.value.usageIds = val.join(',')
})
},
boxGauge1() {
if (this.boxGauge1 < 0 ) {
this.boxGauge1 = -this.boxGauge1
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
boxGauge2() {
if (this.boxGauge2 < 0 ) {
this.boxGauge2 = -this.boxGauge2
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
boxGauge3() {
if (this.boxGauge3 < 0 ) {
this.boxGauge3 = -this.boxGauge3
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
material(material){
this.value.material = material
},
'value.volume'() {
if (this.value.volume < 0) {
this.value.volume = -this.value.volume
}
},
'value.quantityAll'() {
if (this.value.quantityAll < 0) {
this.value.quantityAll = -this.value.quantityAll
}
},
'value.weight'() {
if (this.value.weight < 0) {
this.value.weight = -this.value.weight
}
},
'value.brand'(val){
if(!val) return
const index = this.brandList.findIndex(item => item.id == val)
getProductBrank(val).then(res => {
this.brandList.push(res.data)
})
},
"value.usageIds"(val) {
this.usageIds = val?.split(',') || []
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
},
"value.material"(val) {
this.material = val
},
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="app-container">
<h2>{{ title }}-{{ order.orderNo }}</h2>
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px; display: none">
<span>{{ $t("储位") }}{{ ($refs.area ? $refs.area.selected : []).join(",") }}</span>
<el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">{{ $t("选择") }}</el-button>
</div>
<h2>{{ $t("货物信息") }}</h2>
<el-table v-if="order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0" :data="order.orderItemVOList || []" style="width: 100%">
<el-table-column type="index" width="50" :label="$t('序号')"> </el-table-column>
<el-table-column prop="prodTitleZh" :label="$t('品名')">
<template v-slot="{ row }">
{{ row.prodTitleZh }}<br />
{{ row.prodTitleEn }}
</template>
</el-table-column>
<el-table-column :label="$t('入库货物属性')">
<template v-slot="{ row }">
<template v-if="row.warehouseInInfoVO">
{{ $t("品牌") }}{{ row.brandName }}<br />
{{ $t("箱数") }}{{ row.warehouseInInfoVO.cartonsNum }}<br />
{{ $t("体积") }}{{ row.warehouseInInfoVO.volume }}<br />
{{ $t("重量") }}{{ row.warehouseInInfoVO.weight }}Kg
</template>
<span v-else>{{ $t("暂无信息") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('到仓货物属性')">
<template v-slot="{ row }">
<template v-if="row.warehouseCheckInfoVO">
{{ $t("品牌") }}{{ row.brandName }}<br />
{{ $t("箱数") }}{{ row.warehouseCheckInfoVO.cartonsNum }}<br />
{{ $t("体积") }}{{ row.warehouseCheckInfoVO.volume }}<br />
{{ $t("重量") }}{{ row.warehouseCheckInfoVO.weight }}Kg
</template>
<span v-else>{{ $t("暂无信息") }}</span>
</template>
</el-table-column>
<el-table-column prop="expressNo" v-slot="{ row }" :label="$t('快递单号')">
{{ row.expressNo || (row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : "") }}
</el-table-column>
<el-table-column prop="createTime" :label="$t('最后操作时间')">
<template v-slot="{ row }">
{{ parseTime(row.updateTime) }}
</template>
</el-table-column>
<el-table-column prop="diffType" v-slot="{ row }" :label="$t('状态')">
<dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{ green: row.warehouseInInfoVO.diffType === 4 }" />
<span :class="{ red: row.itemStatus === 3 }" v-else>{{ row.itemStatus === 3 ? $t("少了") + row.num + $t("箱") : $t("待入仓") }}</span>
<span class="red" v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{ $t("箱") }}</span>
</el-table-column>
<el-table-column prop="address" :label="$t('操作')">
<template v-slot="{ row, column, $index }">
<warehouse :edit="true" :order-item-a="order.orderItemVOList[$index]" :order-item-b="orderItemList[$index]" :title="$t('修改')" :order="order" @close="getList"></warehouse>
</template>
</el-table-column>
</el-table>
<el-card v-if="order.parentOrderId" style="margin-top: 20px">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{ $t("标签箱号") }}</span>
</div>
<div v-for="(item, index) in label.orderLabelDtoList" :key="index" style="margin-bottom: 10px">
<el-input-number v-model="item.start" controls-position="right"></el-input-number>
-
<el-input-number v-model="item.end" controls-position="right"></el-input-number>
<el-button icon="el-icon-minus" circle v-show="index !== 0" @click="label.orderLabelDtoList.splice(index, 1)" style="margin-left: 10px"></el-button>
<el-button icon="el-icon-plus" circle @click="handleLabelAdd(index)"></el-button>
</div>
<div style="text-align: center">
<el-button type="primary" @click="handleLabelSubmit">{{ $t("修改箱号") }}</el-button>
</div>
</el-card>
<h2 v-if="orderSpecialNeeds.length > 0">{{ $t("特殊需求") }}</h2>
<el-form ref="form" :model="form" label-width="200px">
<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input-number v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" type="number" :min="0" step-strictly :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)"></el-input-number>
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" style="width: 100px">
<el-option v-for="item in currencyList" :key="item.id" :label="$i18n.locale === 'en_US' ? item.titleEn : item.titleZh" :value="item.id"> </el-option>
</el-select>
</el-form-item>
<h2>{{ $t("订单到仓数据") }}</h2>
<el-form-item :label="$t('到仓总方数')" style="width: 380px">
<el-input v-model="form.sumVolume" :placeholder="$t('请输入总方数')" readonly>
<span slot="append"></span>
</el-input>
</el-form-item>
<el-form-item :label="$t('到仓总重量')" style="width: 380px">
<el-input v-model="form.sumWeight" :placeholder="$t('请输入总重量')" readonly>
<span slot="append">kg</span>
</el-input>
</el-form-item>
<el-card style="margin-top: 15px">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{ $t("到仓影像") }}</span>
</div>
<div>
<image-and-video-upload readonly :fileSize="50" :isShowTip="true" :value="form.urls"></image-and-video-upload>
</div>
</el-card>
</el-form>
</div>
</template>
<script>
import { getCurrencyList } from "@/api/ecw/currency"
import { getLabelByOrder, getLabelWaitInByOrder, getOrder, getOrderWarehouseIn, getSpecialListByOrderId, listByOrderId, orderWarehouseInFinish, orderWarehouseInUpdateLabel, rollbackDelete, warehousePictureList } from "@/api/ecw/order"
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from "@/components/WarehouseAreaDialog"
import { DICT_TYPE } from "@/utils/dict"
import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
import imageUpload from "@/components/ImageUpload"
import { parseTime } from "@/utils/ruoyi"
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload"
import Warehouse from "@/views/ecw/order/warehousingTo/components/Warehouse"
export default {
name: "Warehousing",
components: {
orderBaseInfo,
WarehouseAreaDialog,
PrintTag,
PrintWarehouseReceipt,
imageUpload,
ImageAndVideoUpload,
Warehouse
},
mounted() {
if (this.$route.query.id) {
this.orderId = parseInt(this.$route.query.id || undefined)
this.getOrderItemList()
getSpecialListByOrderId(this.orderId).then((r) => (this.specialList = r.data))
this.getOrder()
// Promise.all([
// this.getOrder(),
// listByOrderId({ orderId: this.orderId }).then((r) => {
// this.form.orderLocationCreateReqVOList = r.data
// })
// ])
}
getCurrencyList().then((res) => (this.currencyList = res.data))
},
data() {
return {
parseTime,
DICT_TYPE,
areaVisible: false,
finishVisible: false,
warehousingVisible: false,
form: {
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: [],
exceptionUrls: [],
descZh: "",
manualExceptionType: [],
urls: [],
sumVolume: "",
sumWeight: ""
},
currencyList: [],
order: {},
orderId: undefined,
orderItemList: [],
specialList: [],
warehousing: undefined,
isShowPrintTag: false,
isShowPrint: false,
escapeBol: false,
label: {
orderId: 0,
orderLabelDtoList: [
{
end: 0,
start: 0
}
]
},
exceptionRules: {
manualExceptionType: [
{ required: true, message: "请勾选原因类型", trigger: "change" },
{
validator: (rule, value, callback) => {
if (value.length <= 0) {
callback(new Error("请勾选原因类型"))
}
callback()
},
trigger: "change"
}
]
}
}
},
methods: {
getOrderItemList() {
this.orderItemList = []
return getOrderWarehouseIn(this.orderId).then((r) => (this.orderItemList = r.data))
},
getList() {
this.getOrder()
this.getOrderItemList()
},
getWarehousePictureList() {
return warehousePictureList({
bizId: this.order.orderId,
type: 7
}).then((r) => {
this.form.urls = r.data.map((i) => i.url)
})
},
include() {
return (state, arr) => {
return arr.indexOf(state) > -1
}
},
exclude() {
return (state, arr) => {
return arr.indexOf(state) == -1
}
},
handleLabelSubmit() {
orderWarehouseInUpdateLabel({
...this.label,
orderId: this.orderId
}).then((r) => {
if (r.code === 0) {
this.$message.success(r.msg || this.$t("修改标签箱号成功"))
}
})
},
// 箱号标签回显
getLabelByOrder() {
getLabelByOrder(this.orderId).then((r) => {
if (r.code === 0 && !!r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data
} else {
// 没有历史数据,查默认值
getLabelWaitInByOrder(this.orderId).then((r) => {
console.log(r)
if (r.code === 0 && !!r.data) {
this.label.orderLabelDtoList = [r.data]
}
})
}
})
},
handleLabelAdd(index) {
this.label.orderLabelDtoList.splice(index + 1, 0, {
end: "",
start: ""
})
},
getTowSum() {
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this.form.sumVolume = this.order.sumVolume // || sumVolume
this.form.sumWeight = this.order.sumWeight // || sumWeight
},
getOrder() {
return getOrder(this.orderId)
.then((r) => {
this.order = r.data
this.getTowSum()
})
.then(() => {
this.getLabelByOrder()
this.getWarehousePictureList()
})
},
specialHas0() {
let result = false
this.form.orderSpecialNeedReceivableReqVoList.forEach((e) => {
if (e.receivableMoney === "0" || e.receivableMoney === "") {
result = true
}
})
return result
},
handleException() {
this.$refs.exceptionForm.validate((valid) => {
if (valid) {
this.handleSubmit()
} else {
this.$message.warning("请勾选原因类型")
}
})
},
async handleSubmit() {
if (this.specialHas0()) {
const confirm = await this.$confirm(this.$t("有特需费用为0或未填写,请问是否继续?"), this.$t("注意"), {
confirmButtonText: this.$t("继续"),
cancelButtonText: this.$t("取消"),
type: "warning"
})
if (confirm !== "confirm") {
return
}
}
let form = {
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
orderLocationCreateReqVOList: this.form.orderLocationCreateReqVOList,
orderId: this.order.orderId,
// urls: this.form.urls,
sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight,
isAppend: this.isAdd
}
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
}
if (this.escapeBol) {
form.exceptionUrls = this.form.exceptionUrls.length !== 0 ? this.form.exceptionUrls?.split(",") : []
form.descZh = this.form.descZh
form.manualExceptionType = this.form.manualExceptionType.join(",")
}
orderWarehouseInFinish(form).then((r) => {
if (r.code === 0) {
this.escapeBol = false
this.finishVisible = false
const message = !r.data ? this.$t("该订单已成功入仓,是否打印?") : `<h3>${this.$t("货物已入仓,存在异常")}</h3>${this.$t("该订单已成功入仓,是否打印?")}`
this.$confirm(message, this.$t("货物已入仓"), {
confirmButtonText: this.$t(""),
cancelButtonText: this.$t(""),
dangerouslyUseHTMLString: true
})
.then(() => {
this.isShowPrint = true
})
.catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success(this.$t("入仓成功"))
this.$tab.closePage()
})
}
})
},
handleWarehousingReturn(item) {
this.$confirm(item.prodTitleZh + this.$t("退仓后不可恢复,是否确认退仓?"), this.$t("确定要退仓?"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning"
})
.then(() => {
rollbackDelete({
orderId: item.orderId,
orderItemId: item.orderItemId
}).then(() => {
this.$message({
type: "success",
message: this.$t("货物退仓成功!")
})
this.getOrderItemList()
this.getOrder()
})
})
.catch((e) => {})
}
},
watch: {
orderSpecialNeeds(val) {
val.forEach((e) => {
this.form.orderSpecialNeedReceivableReqVoList.push({
id: e.id,
receivableMoney: e.transFee || "",
receivableMoneyCurrency: e.transCurrency || 3
})
})
}
},
computed: {
// 根据orderItemId获取入仓item
wareItem() {
return (orderItemId) => {
return this.orderItemList.find((item) => item.orderItemId == orderItemId)
}
},
isAdd() {
return this.$route.path === "/order/warehousingTo-add"
},
isEdit() {
return this.$route.path === "/order/warehousingTo-update"
},
title() {
return this.$i18n.locale === "en_US" ? this.$route.meta.titleEn : this.$route.name
},
orderSpecialNeedsDict() {
return this.$store.state.dict.dictDatas.order_special_needs
},
orderSpecialNeeds() {
const result = []
this.specialList.forEach((e) => {
const t = this.orderSpecialNeedsDict.find((f) => f.value === e.advanceType)
if (t) {
result.push({ ...e, label: t.label, labelEn: t.labelEn })
}
})
return result
},
warehouseId() {
return this.order?.logisticsInfoDto?.startWarehouseId
}
}
}
</script>
<style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red {
color: $--color-danger;
}
.green {
color: $--color-success;
}
</style>
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