Commit 01ddb3ee authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents f0edbc4b db7fc613
const fs = require('fs'); const fs = require('fs');
const root = "./src" const root = "./src"
const savePath = "./src/i18n/languages/en_US.json"
let allFiles = [] let allFiles = []
const savePath = "./src/i18n/languages/en_US.json"
const crypto = require('crypto');
const https = require('https');
const querystring = require('querystring');
// 你的百度翻译API的App ID和密钥
const appId = "20230911001813245"
const appKey = "lJlOnktUO0pn8G_MZ10O"
const translateText = (text, fromLang = 'zh', toLang = 'en') => {
return new Promise((resolve, reject) => {
// 百度翻译API的接口地址
const apiUrl = "https://fanyi-api.baidu.com/api/trans/vip/translate";
// 构建请求参数
const params = {
q: text,
from: fromLang,
to: toLang,
appid: appId,
salt: Math.random().toString().slice(2),
sign: ''
};
// 生成签名
const signStr = appId + text + params.salt + appKey;
params.sign = require('crypto').createHash('md5').update(signStr).digest('hex');
// 发送HTTP POST请求
const options = {
hostname: 'fanyi-api.baidu.com',
port: 443,
path: '/api/trans/vip/translate',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': querystring.stringify(params).length
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('翻译结果:', data);
resolve(JSON.parse(data).trans_result[0].dst)
});
});
req.on('error', (err) => {
console.error(err);
});
req.write(querystring.stringify(params));
req.end();
})
};
function getFiles(dir){ function getFiles(dir){
let files = fs.readdirSync(dir) let files = fs.readdirSync(dir)
files.forEach(file => { files.forEach(file => {
let path = dir + '/' + file let path = dir + '/' + file
if(fs.lstatSync(path).isDirectory()){ if(fs.lstatSync(path).isDirectory()){
getFiles(path) getFiles(path)
}else allFiles.push(path) }else allFiles.push(path)
}) })
} }
getFiles(root) getFiles(root)
/* allFiles = [
'src/views/ecw/box/shippingSea/utils.js',
'src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js'
]
console.log(allFiles) */
let messages = new Set() let messages = new Set()
allFiles.forEach(file => { allFiles.forEach(file => {
let data = fs.readFileSync(file, {encoding: 'utf-8'}) let data = fs.readFileSync(file, {encoding: 'utf-8'})
let matched = data.matchAll(/\$t\([\'\"]{1}([^\"\']+)[\'\"]{1}/g) let matched = data.matchAll(/\$t\([\'\"]{1}([^\"\']+)[\'\"]{1}/g)
let i = 0 let i = 0
for(let item of matched){ for(let item of matched){
i ++ i ++
messages.add(item[1]) messages.add(item[1])
} }
}) })
let obj = require(savePath) let obj = require(savePath)
Array.from(messages).forEach(word => { Array.from(messages).forEach(word => {
if(!obj[word])obj[word] = "" if(!obj[word])obj[word] = ""
})
let autoTransCnt = 0
async function translate(obj){
// 对未翻译内容调用百度翻译进行翻译操作,有变量的不做处理
for(let text in obj){
if(obj[text] || text.includes('{'))continue
const textEn = await translateText(text)
console.log(`${text} => ${textEn}\n`)
obj[text] = textEn
autoTransCnt ++
// 账号请求频率限制1ps
await new Promise(resolve => setTimeout(resolve, 1000))
}
}
translate(obj).then(res => {
fs.writeFileSync(savePath, JSON.stringify(obj, null, 4))
console.log(messages)
console.warn(`本次共提取 ${messages.size} 个待翻译内容,保存于${savePath}`)
console.log(`已调用百度api自动翻译 ${autoTransCnt} 个内容\n`)
console.log("done!")
}) })
fs.writeFileSync(savePath, JSON.stringify(obj, null, 4))
console.log(messages)
console.warn(`本次共提取 ${messages.size} 个待翻译内容,保存于${savePath}`)
\ No newline at end of file
...@@ -46,6 +46,9 @@ export default { ...@@ -46,6 +46,9 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.items-center{
align-items: center;
}
.flex-between{ .flex-between{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -75,16 +78,16 @@ $sizes: 0, 5, 10,20,30,50,75,100,150,200,300,500,800,1000; ...@@ -75,16 +78,16 @@ $sizes: 0, 5, 10,20,30,50,75,100,150,200,300,500,800,1000;
margin-top: #{$item}px !important; margin-top: #{$item}px !important;
} }
.pl-#{$item}{ .pl-#{$item}{
margin-left: #{$item}px !important; padding-left: #{$item}px !important;
} }
.pr-#{$item}{ .pr-#{$item}{
margin-right: #{$item}px !important; padding-right: #{$item}px !important;
} }
.pb-#{$item}{ .pb-#{$item}{
margin-bottom: #{$item}px !important; padding-bottom: #{$item}px !important;
} }
.pt-#{$item}{ .pt-#{$item}{
margin-top: #{$item}px !important; padding-top: #{$item}px !important;
} }
.w-#{$item}{ .w-#{$item}{
width: #{$item}px !important; width: #{$item}px !important;
......
...@@ -70,3 +70,10 @@ export function taskTodoCount(){ ...@@ -70,3 +70,10 @@ export function taskTodoCount(){
} }
) )
} }
// 用户角标数据
export function userMark(){
return request({
url:'/system/user/profile/user-mark',
})
}
...@@ -54,6 +54,15 @@ export function exportboxExcel(query) { ...@@ -54,6 +54,15 @@ export function exportboxExcel(query) {
}); });
} }
// 导出预装单-异步
export function exportPreloadGoodsList(query) {
return request({
url: "/ecw/box-preload-goods/downloadPreloadGoodsList",
method: "get",
params: query
});
}
// 创建费用登记 // 创建费用登记
export function createCost(data) { export function createCost(data) {
if (data.id) { if (data.id) {
...@@ -134,6 +143,15 @@ export function makeBillService(params) { ...@@ -134,6 +143,15 @@ export function makeBillService(params) {
}); });
} }
// 空运制作提单
export function makeAirBillService(params) {
return request({
url: "/shipment/make-bill-of-lading/airMake",
method: "get",
params,
});
}
// 创建制作提货单 // 创建制作提货单
export function createBillService(data) { export function createBillService(data) {
return request({ return request({
...@@ -190,7 +208,6 @@ export function getBillService(params) { ...@@ -190,7 +208,6 @@ export function getBillService(params) {
export function zipDownload(params) { export function zipDownload(params) {
return request({ return request({
url: "/shipment/make-bill-of-lading/zipDownload", url: "/shipment/make-bill-of-lading/zipDownload",
responseType: "blob",
method: "get", method: "get",
timeout: 120000, timeout: 120000,
params, params,
...@@ -220,6 +237,15 @@ export function getNoticeList(data) { ...@@ -220,6 +237,15 @@ export function getNoticeList(data) {
}); });
} }
// 空运出货提示
export function getAirNoticeList(data) {
return request({
url: "/shipment/box/airNoticeList",
method: "post",
data,
});
}
/** /**
* 根据订单ID下载提货单 * 根据订单ID下载提货单
* *
...@@ -287,7 +313,6 @@ export function downloadCustomFiles(params) { ...@@ -287,7 +313,6 @@ export function downloadCustomFiles(params) {
export function downloadLoadGoodsList(params) { export function downloadLoadGoodsList(params) {
return request({ return request({
url: "/ecw/box-preload-goods/downloadLoadGoodsList", url: "/ecw/box-preload-goods/downloadLoadGoodsList",
responseType: "blob",
timeout: 3*60*1000, timeout: 3*60*1000,
method: "get", method: "get",
params, params,
...@@ -309,13 +334,21 @@ export function downloadPreloadGoodsList(params) { ...@@ -309,13 +334,21 @@ export function downloadPreloadGoodsList(params) {
export function downloadReceivableList(params) { export function downloadReceivableList(params) {
return request({ return request({
url: "/ecw/box-preload-goods/downloadReceivableList", url: "/ecw/box-preload-goods/downloadReceivableList",
responseType: "blob",
timeout: 3*60*1000, timeout: 3*60*1000,
method: "get", method: "get",
params, params,
}); });
} }
// 空运的应收汇总下载
export function downloadAirReceivableList(params) {
return request({
url: "/ecw/box-preload-goods/downloadAirBillReceivable",
method: "get",
params,
});
}
// 下载提单copy // 下载提单copy
export function downloadLadingCopy(params) { export function downloadLadingCopy(params) {
return request({ return request({
...@@ -365,7 +398,6 @@ export function exportSettlementExcel(params) { ...@@ -365,7 +398,6 @@ export function exportSettlementExcel(params) {
return request({ return request({
url: "/shipment/box/export-shipment-summary", url: "/shipment/box/export-shipment-summary",
method: "get", method: "get",
responseType: "blob",
params, params,
}); });
} }
import request from "@/utils/request";
// 创建出货
export function createbox(data) {
return request({
url: "/shipment/box/createAir",
method: "post",
data: data,
});
}
// 更新出货
export function updatebox(data) {
return request({
url: "/shipment/box/update",
method: "put",
data: data,
});
}
/**
* 订舱
*
* @export
* @param {*} data
* @return {*}
*/
export function booking(data) {
if (data.id) {
return request({
url: "/shipment/box-book-air/update",
method: "put",
data,
});
}
return request({
url: "/shipment/box-book-air/create",
method: "post",
data,
});
}
/**
* 获得待预装分页
*
* @export
* @param {*} data
* @return {*}
*/
export function preloadPage(data) {
return request({
url: "/ecw/box-preload-goods/preloadPageAir",
method: "post",
data,
});
}
/**
* 预装
*
* @export
* @param {*} data
* @return {*}
*/
export function createGoods(data) {
return request({
url: "/ecw/box-preload-goods/createAir",
method: "post",
data,
});
}
/***************************** 合包 start **********************************/
/**
* 获得获得合包箱分页
*
* @export
* @param {*} data
* @return {*}
*/
export function getMergePkgList(params) {
return request({
url: "/ecw/box-merge-pkg/page",
method: "get",
params,
});
}
/**
* 创建合包箱
*
* @export
* @param {*} data
* @return {*}
*/
export function createMergePkg(data) {
return request({
url: "/ecw/box-merge-pkg/create",
method: "post",
data,
});
}
/**
* 更新合包箱
*
* @export
* @param {*} data
* @return {*}
*/
export function updateMergePkg(data) {
return request({
url: "/ecw/box-merge-pkg/update",
method: "put",
data,
});
}
/**
* 删除合包箱
*
* @export
* @param {*} data
* @return {*}
*/
export function deleteMergePkg(id) {
return request({
url: `/ecw/box-merge-pkg/delete?id=`+id,
method: "delete",
});
}
/**
* 获得未装箱列表分页
*
* @export
* @param {*} data
* @return {*}
*/
export function getUnPkgPage(params) {
return request({
url: "/ecw/box-merge-pkg/getUnPkgPage",
method: "get",
params,
});
}
/**
* 获得已装箱列表分页
*
* @export
* @param {*} data
* @return {*}
*/
export function getPkgPageByPkgId(params) {
return request({
url: "/ecw/box-merge-pkg/getPkgPageByPkgId",
method: "get",
params,
});
}
/**
* 创建合包订单
*
* @export
* @param {*} data
* @return {*}
*/
export function createPkgOrder(data) {
return request({
url: "/ecw/box-pkg-order/create",
method: "post",
data,
});
}
/**
* 批量创建合包订单
*
* @export
* @param {*} data
* @return {*}
*/
export function createBatchPkgOrder(data) {
return request({
url: "/ecw/box-pkg-order/createBatch",
method: "post",
data,
});
}
/**
* 移出合包订单
*
* @export
* @param {*} data
* @return {*}
*/
export function deleteRelate(pkgId, orderId) {
return request({
url: `/ecw/box-pkg-order/deleteRelate`,
method: "delete",
headers:{
'Content-type': 'application/x-www-form-urlencoded'
},
data: 'pkgId='+pkgId+'&orderId='+orderId
});
}
/**
* 批量移出合包订单
*
* @export
* @param {*} data
* @return {*}
*/
export function deleteBatchRelate(data) {
return request({
url: `/ecw/box-pkg-order/deleteBatchRelate`,
method: "post",
data: data
});
}
/**
* 获得封箱数据
*
* @export
* @param {*} data
* @return {*}
*/
export function getMergePkgInfoById(id) {
return request({
url: "/ecw/box-merge-pkg/getMergePkgInfoById?id="+id,
method: "get"
});
}
/**
* 获得封箱标签数据
*
* @export
* @param {*} data
* @return {*}
*/
export function getMergeTagById(id) {
return request({
url: "/ecw/box-merge-pkg/getMergeTagById?id="+id,
method: "get"
});
}
/**
* 完成合包
*
* @export
* @param {*} data
* @return {*}
*/
export function finishMergePkg(shipmentId) {
return request({
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,
});
}
return request({
url: "/ecw/box-air-fly/create",
method: "post",
data,
});
}
/***************************** 起运 end *******************************/
/**
* 获取出货订单列表
*
* @export
* @param {*} data
* @return {*}
*/
export function shipmentOrderList(shipmentId) {
return request({
url: "/shipment/box/shipmentOrderList?shipmentId="+shipmentId,
method: "get"
});
}
/**
* 更新订单到港状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateOrderArrival(data) {
return request({
url: `/ecw/box-arrival-air/updateOrderArrival`,
method: "post",
data: data
});
}
/**
* 更新所有订单到港状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateAllOrderArrival(data) {
return request({
url: `/ecw/box-arrival-air/updateAllOrderArrival`,
method: "post",
data: data
});
}
/**
* 更新订单清关状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateOrderClearance(data) {
return request({
url: `/ecw/box-clearance/updateOrderClearance`,
method: "post",
data: data
});
}
/**
* 更新所有订单清关状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateAllOrderClearance(data) {
return request({
url: `/ecw/box-clearance/updateAllOrderClearance`,
method: "post",
data: data
});
}
/**
* 获取线路配置
*
* @export
* @param {*} data
* @return {*}
*/
export function getLineInfo(params) {
return request({
url: `/ecw/warehouse/getLineInfo`,
method: "get",
params
});
}
\ No newline at end of file
...@@ -331,6 +331,50 @@ export function settlementCreate(data) { ...@@ -331,6 +331,50 @@ export function settlementCreate(data) {
}); });
} }
/**
* 空运出货
*
* @export
* @param {*} data
* @return {*}
*/
export function airShipmentCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-air-shipment/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-air-shipment/create",
method: "post",
data,
});
}
/**
* 空运出仓
*
* @export
* @param {*} data
* @return {*}
*/
export function airCheckoutCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-air-checkout/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-air-checkout/create",
method: "post",
data,
});
}
/** /**
* 出货审核 * 出货审核
* *
...@@ -790,6 +834,21 @@ export function batchUnload(data) { ...@@ -790,6 +834,21 @@ export function batchUnload(data) {
}); });
} }
/**
* 批量到仓
*
* @export
* @param {*} data
* @return {*}
*/
export function airBatchUnload(data) {
return request({
url: "/ecw/box-load-info/airBatchUnload",
method: "post",
data,
});
}
/** /**
* 单个卸柜 * 单个卸柜
* *
...@@ -805,6 +864,21 @@ export function singleUnload(data) { ...@@ -805,6 +864,21 @@ export function singleUnload(data) {
}); });
} }
/**
* 单个到仓
*
* @export
* @param {*} data
* @return {*}
*/
export function airSingleUnload(data) {
return request({
url: "/ecw/box-load-info/airSingleUnload",
method: "post",
data,
});
}
/** /**
* 一键卸柜 * 一键卸柜
* *
...@@ -820,6 +894,22 @@ export function allUnload(data) { ...@@ -820,6 +894,22 @@ export function allUnload(data) {
}); });
} }
/**
* 一键到仓
*
* @export
* @param {*} data
* @return {*}
*/
export function airAllUnload(data) {
return request({
url: "/ecw/box-load-info/airAllUnload",
method: "post",
data,
});
}
/** /**
* 异常 * 异常
* *
......
...@@ -78,4 +78,13 @@ export function updateEndtime(data){ ...@@ -78,4 +78,13 @@ export function updateEndtime(data){
method: 'put', method: 'put',
data data
}) })
} }
\ No newline at end of file
// 更新投放状态
export function updatePutonStatus(data){
return request({
url: '/product/coupon/update/putonStatus',
method: 'put',
data
})
}
...@@ -131,23 +131,23 @@ export function waiteConfirmExportExcel(query) { ...@@ -131,23 +131,23 @@ export function waiteConfirmExportExcel(query) {
* @param query * @param query
* @return {*} * @return {*}
*/ */
export function waitDistributionExportExcel(query) { // export function waitDistributionExportExcel(query) {
return request({ // return request({
url: '/ecw/customer/wait-distribution-export-excel', // url: '/ecw/customer/wait-distribution-export-excel',
method: 'get', // method: 'get',
params: query, // params: query,
responseType: 'blob' // responseType: 'blob'
}) // })
} // }
// 公海池客户列表导出 // 公海池客户列表导出
export function publicExportExcel(query) { // export function publicExportExcel(query) {
return request({ // return request({
url: '/ecw/customer/public-export-excel', // url: '/ecw/customer/public-export-excel',
method: 'get', // method: 'get',
params: query, // params: query,
responseType: 'blob' // responseType: 'blob'
}) // })
} // }
export function indirectCustomerExportExcel(query) { export function indirectCustomerExportExcel(query) {
return request({ return request({
url: '/ecw/indirect-customer/export-excel', url: '/ecw/indirect-customer/export-excel',
...@@ -434,3 +434,64 @@ export function getCustomerOperatelog(params){ ...@@ -434,3 +434,64 @@ export function getCustomerOperatelog(params){
params params
}) })
} }
//全部导出
export function customerExportExcel(){
return request({
url:'/ecw/customer/export-excel',
method:'get'
})
}
// 导出我的客户列表
//全部导出
export function mineExportExcel(){
return request({
url:'/ecw/customer/mine-export-excel',
method:'get'
})
}
// 导出我的待接收客户
export function waiteConfirEexportExcel(){
return request({
url:'/ecw/customer/waite-confirm-export-excel',
method:'get'
})
}
//公海池客户列表导出
export function publicExportExcel(){
return request({
url:'/ecw/customer/public-export-excel',
method:'get'
})
}
//待分配客户
export function waitDistributionExportExcel(){
return request({
url:'/ecw/customer/wait-distribution-export-excel',
method:'get'
})
}
//导出潜在客户
export function potentialExportExcel(){
return request({
url:'ecw/customer/potential-export-excel',
method:'get'
})
}
// 导出部门客户
export function deptExportExcel(){
return request({
url:'ecw/customer/dept-export-excel',
method:'get'
})
}
export function recycleUnconfirmedCustomer(data){
return request({
url:'ecw/customer/recycle-unconfirmed-customer',
method:'put',
data
})
}
...@@ -103,4 +103,13 @@ export function getWarehousingVolume(params){ ...@@ -103,4 +103,13 @@ export function getWarehousingVolume(params){
}) })
} }
// 获取装柜或出仓重量
export function getBoxedWeight(params){
return request({
url:'/ecw/future-box/getBoxedWeight',
method:'get',
params
})
}
...@@ -142,4 +142,20 @@ export function exportDeptOfferExcel(query) { ...@@ -142,4 +142,20 @@ export function exportDeptOfferExcel(query) {
params: query, params: query,
responseType: 'blob' responseType: 'blob'
}) })
}
// 报价单
export function getOfferSelect(params) {
return request({
url: '/ecw/offer/select',
method: 'get',
params
})
}
// 报价单
export function getOfferCheck(params) {
return request({
url: '/ecw/offer/check',
method: 'get',
params
})
} }
\ No newline at end of file
...@@ -52,6 +52,15 @@ export function getOrderPage(query) { ...@@ -52,6 +52,15 @@ export function getOrderPage(query) {
}) })
} }
// 获得订单列表
export function getOrderList(query) {
return request({
url: '/ecw/order/list',
method: 'get',
params: query
})
}
// 导出订单 Excel // 导出订单 Excel
export function exportOrderExcel(query) { export function exportOrderExcel(query) {
return request({ return request({
...@@ -623,7 +632,6 @@ export function orderExportSearch(params){ ...@@ -623,7 +632,6 @@ export function orderExportSearch(params){
url: '/ecw/order/export/search', url: '/ecw/order/export/search',
method: 'GET', method: 'GET',
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'arraybuffer',
params params
}) })
} }
...@@ -632,7 +640,6 @@ export function orderExportSearch(params){ ...@@ -632,7 +640,6 @@ export function orderExportSearch(params){
export function orderExportMySearch(params){ export function orderExportMySearch(params){
return request({ return request({
url: '/ecw/order/export/my/search', url: '/ecw/order/export/my/search',
responseType: 'arraybuffer',
method: 'GET', method: 'GET',
timeout: 5 * 60000, timeout: 5 * 60000,
params params
...@@ -644,7 +651,6 @@ export function orderExportDeptSearch(params){ ...@@ -644,7 +651,6 @@ export function orderExportDeptSearch(params){
return request({ return request({
url: '/ecw/order/export/dept/search', url: '/ecw/order/export/dept/search',
method: 'GET', method: 'GET',
responseType: 'arraybuffer',
timeout: 5 * 60000, timeout: 5 * 60000,
params params
}) })
...@@ -657,7 +663,6 @@ export function exportAbnormal(params){ ...@@ -657,7 +663,6 @@ export function exportAbnormal(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -669,7 +674,6 @@ export function exportHeavyOrder(params){ ...@@ -669,7 +674,6 @@ export function exportHeavyOrder(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -680,7 +684,6 @@ export function exportReturnOrder(params){ ...@@ -680,7 +684,6 @@ export function exportReturnOrder(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -691,7 +694,6 @@ export function exportSaleRepay(params){ ...@@ -691,7 +694,6 @@ export function exportSaleRepay(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -703,7 +705,6 @@ export function exportCustomsDatas(params){ ...@@ -703,7 +705,6 @@ export function exportCustomsDatas(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -715,7 +716,6 @@ export function exportShippingDatas(params){ ...@@ -715,7 +716,6 @@ export function exportShippingDatas(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -727,7 +727,6 @@ export function exportShipFee(params){ ...@@ -727,7 +727,6 @@ export function exportShipFee(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -739,7 +738,6 @@ export function exportUnload(params){ ...@@ -739,7 +738,6 @@ export function exportUnload(params){
method: 'get', method: 'get',
params: params, params: params,
timeout: 5 * 60000, timeout: 5 * 60000,
responseType: 'blob'
}) })
} }
...@@ -813,6 +811,119 @@ export function splitItemUpdate(data){ ...@@ -813,6 +811,119 @@ export function splitItemUpdate(data){
data data
}) })
} }
// 待备货(可出)订单列表
export function canShipmentPage(params){
return request({
url: '/air/order/data/scope/can/shipment/page',
method: 'get',
params
})
}
// 待出订单列表
export function waitingShipmentPage(params){
return request({
url: '/air/order/data/scope/waiting/shipment/page',
method: 'get',
params
})
}
// 备货订单列表
export function canReadyStockShipmentPage(params){
return request({
url: '/air/order/can-ready-stock/shipment/page',
method: 'get',
params
})
}
// 确认订单可出
export function setCanShipment(orderId){
return request({
url: '/air/order/can/shipment/' + orderId,
method: 'put',
})
}
// 批量可出
export function batchCanShipment(orderIdList){
return request({
url: '/air/order/can/shipment/',
method: 'put',
data: {orderIdList}
})
}
// 导出备货订单
export function exportReadyStock(params){
return request({
url: '/ecw/order/export/ready-stock/search',
method: 'get',
params,
responseType: 'blob'
})
}
// 导出可出订单
export function exportCanShipment(params){
return request({
url: '/ecw/order/export/can-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){
return request({
url: '/order/order-warehouse-in/no-need-to-pack',
method: 'get',
params: {orderItemId}
})
}
// 完成打包
export function finishPacked(data){
return request({
url: '/order/order-warehouse-in/finish-packed',
method: 'post',
data
})
}
// 完成备货
export function finishStock(data){
return request({
url: '/order/order-warehouse-in/finish-stocked',
method: 'put',
data
})
}
// 批量转异
export function batchException(data){
return request({
url: '/air/order/manual-exception/batch',
method: 'put',
data
})
}
// 打包记录列表
export function orderItemPackLogPage(params){
return request({
url: '/order/item-pack-log/page',
method: 'get',
params
})
}
// 上传报关资料 // 上传报关资料
export function warehousePictureCreate(data) { export function warehousePictureCreate(data) {
return request({ return request({
...@@ -888,3 +999,27 @@ export function exportOrderSummaryByContainerNumber(params){ ...@@ -888,3 +999,27 @@ export function exportOrderSummaryByContainerNumber(params){
responseType: 'blob' responseType: 'blob'
}) })
} }
// 查询权限范围内待出订单数量
export function getWaitingShipmentCount(){
return request({
url: '/air/order/data/scope/waiting/shipment/count',
method: 'get'
})
}
// 空运订单不可出
export function setCanNotShipment(orderId){
return request({
url: '/air/order/not/can/shipment/' + orderId,
method: 'put',
})
}
// 查看母订单
export function getParentOrder(orderId){
return request({
url: '/ecw/order/getParentOrder?orderId=' + orderId,
method: 'get'
})
}
...@@ -112,7 +112,7 @@ export function getBmpDetailByBusinessId(businessId) { ...@@ -112,7 +112,7 @@ export function getBmpDetailByBusinessId(businessId) {
// 导出订单异常 Excel // 导出订单异常 Excel
export function exportExcel(params) { export function exportExcel(params) {
return request({ return request({
url: '/ecw/order-exception/export-excel', url: '/ecw/order-exception/export-excel-async',
method: 'get', method: 'get',
timeout: 30*60*1000, timeout: 30*60*1000,
params, params,
...@@ -129,6 +129,24 @@ export function getOrderExcptionResult(query) { ...@@ -129,6 +129,24 @@ export function getOrderExcptionResult(query) {
}) })
} }
// 根据订单ID,异常ID获取价格
export function getOrderExceptionChannelPriceList(data) {
return request({
url: '/order/exception-channel-price/getOrderExceptionChannelPriceList',
method: 'post',
data: data
})
}
// 根据工作流中传的业务ID,获取不可出渠道异常详细信息
export function getExceptionDetailByBusinessId(query) {
return request({
url: '/ecw/order-exception/getExceptionDetailByBusinessId',
method: 'get',
params: query
})
}
// 参数查询获得订单统计 // 参数查询获得订单统计
export function getStatistics(query) { export function getStatistics(query) {
return request({ return request({
...@@ -136,4 +154,4 @@ export function getStatistics(query) { ...@@ -136,4 +154,4 @@ export function getStatistics(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
\ No newline at end of file
...@@ -112,9 +112,9 @@ export function createSplitItem(data) { ...@@ -112,9 +112,9 @@ export function createSplitItem(data) {
} }
// 删除订单拆单项 // 删除订单拆单项
export function deleteSplitItem(id) { export function deleteSplitItem(id, shipmentSplit = false) {
return request({ return request({
url: '/order/split-item/delete?id=' + id, url: '/order/split-item/delete?id=' + id + '&shipmentSplit=' + shipmentSplit,
method: 'delete' method: 'delete'
}) })
} }
......
...@@ -26,7 +26,14 @@ export function updateProduct(data) { ...@@ -26,7 +26,14 @@ export function updateProduct(data) {
data: data data: data
}) })
} }
// 获得空运产品的路线价格数量
export function countByProductIdAndTransportType(params){
return request({
url:'/ecw/product-price/countByProductIdAndTransportType',
method:'get',
params
})
}
// 删除产品 // 删除产品
export function deleteProduct(id) { export function deleteProduct(id) {
return request({ return request({
...@@ -61,13 +68,21 @@ export function getProductPage(query) { ...@@ -61,13 +68,21 @@ export function getProductPage(query) {
}) })
} }
// 获得产品ID
export function getProductIds(params) {
return request({
url: '/ecw/product/simpleIdList',
params,
method: 'get'
})
}
// 导出产品 Excel // 导出产品 Excel
export function exportProductExcel(query) { export function exportProductExcel(query) {
return request({ return request({
url: '/ecw/product/export-excel', url: '/ecw/product/export-excel',
method: 'get', method: 'get',
params: query, params: query
responseType: 'blob'
}) })
} }
......
...@@ -50,7 +50,6 @@ export function exportProductPriceExcel(query) { ...@@ -50,7 +50,6 @@ export function exportProductPriceExcel(query) {
method: 'get', method: 'get',
timeout: 3*60*1000, timeout: 3*60*1000,
params: query, params: query,
responseType: 'blob'
}) })
} }
...@@ -106,4 +105,22 @@ export function getProductPriceGetPrice(query) { ...@@ -106,4 +105,22 @@ export function getProductPriceGetPrice(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
\ No newline at end of file
// 更新单询
export function updateOrderInquiry(data) {
return request({
url: '/ecw/product-price/updateOrderInquiry',
method: 'put',
data: data
})
}
// 批量加价
export function batchAddPrice(data) {
return request({
url: '/ecw/product-price/batchAddPrice',
method: 'put',
data
})
}
...@@ -158,3 +158,11 @@ export function createAuditIdCard(data){ ...@@ -158,3 +158,11 @@ export function createAuditIdCard(data){
data data
}) })
} }
//会员详情
export function memberUserGet(params){
return request({
url:'/member/user/info',
method:'get',
params
})
}
import request from '@/utils/request'
import axios from "axios";
// 下载日志分页
export function downloadPage(params) {
return request({
url: '/system/download-log/page',
method: 'get',
params
})
}
// 下载
export function download(id){
return request({
url: 'system/download-log/down/' + id
})
}
// 获取文件二进制
export function downloadFileResponse(url){
return axios.get(url, {responseType: 'blob'})
}
// 重试
export function retry(id){
return request({
url: '/system/download-log/retry/' + id
})
}
// 删除
export function deleteLog(id){
return request({
url: '/system/download-log/del/' + id
})
}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 735 849" fill="#409eff"><defs><style>.cls-1{fill:none;}</style></defs><title>资源 4</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path d="M235,619c-2-5-3-14-3-19h0c2-103,89-187,193-187a193,193,0,0,1,136,57,15,15,0,0,0,11,4h0c13,0,20-16,11-26l-2-2a222,222,0,0,0-89-53,122,122,0,0,0,56-103c0-67-55-122-122-122a122,122,0,0,0-67,225,222,222,0,0,0-89,53,219,219,0,0,0-67,153c0,3,0,19,5,32s30,24,41,24H448a15,15,0,0,0,15-15h0a15,15,0,0,0-15-15H249s-11,0-14-6Zm97-329a93,93,0,0,1,93-93c50,0,92,42,92,92a93,93,0,1,1-185,1Zm0,0"/><polygon class="cls-1" points="22 96 735 96 725 849 12 849 22 96"/><path d="M614,0H154A102,102,0,0,0,52,102v95h0v3h1c2,12,11,20,23,20a24,24,0,0,0,23-20h0V125a77,77,0,0,1,77-77H592a77,77,0,0,1,77,77V687a77,77,0,0,1-77,77H176a77,77,0,0,1-77-77V606a24,24,0,0,0-47-1h0V711A102,102,0,0,0,154,814H614A102,102,0,0,0,716,711V102A102,102,0,0,0,614,0Zm0,0"/><path d="M26,299H128a26,26,0,1,0,0-51H26a26,26,0,1,0,0,51Z"/><path d="M154,532a26,26,0,0,0-26-26H26a26,26,0,1,0,0,51H128a26,26,0,0,0,26-26Z"/><path d="M52,363v84a24,24,0,0,0,47,0V363a24,24,0,0,0-47,0Z"/><path d="M309,314"/><rect x="456" y="559" width="175" height="30" rx="15" ry="15"/><rect x="456" y="559" width="175" height="30" rx="15" ry="15" transform="translate(1117 30) rotate(90)"/></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 716 814" fill="#409eff"><defs><style>.cls-1{fill:none;}</style></defs><title>资源 5</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path d="M614,0H154A102,102,0,0,0,52,102v95h0v3h1c2,12,11,20,23,20a24,24,0,0,0,23-20h0V125a77,77,0,0,1,77-77H592a77,77,0,0,1,77,77V687a77,77,0,0,1-77,77H176a77,77,0,0,1-77-77V606a24,24,0,0,0-47-1h0V711A102,102,0,0,0,154,814H614A102,102,0,0,0,716,711V102A102,102,0,0,0,614,0Zm0,0"/><path d="M26,299H128a26,26,0,1,0,0-51H26a26,26,0,1,0,0,51Z"/><path d="M154,532a26,26,0,0,0-26-26H26a26,26,0,1,0,0,51H128a26,26,0,0,0,26-26Z"/><path d="M52,363v84a24,24,0,0,0,47,0V363a24,24,0,0,0-47,0Z"/><path d="M309,314"/><path d="M289,218c-71,53-80,170-17,288S432,682,534,651c26-8,52-31,52-56,0-44-51-132-88-139-11-2-23,2-43,10l-6,3-5,2-15,7h-3l-3-4c-5-6-12-15-18-26l-2-3a302,302,0,0,1-22-44h0l12-5,7-3,7-3,5-3c14-6,22-11,26-16,26-28-26-166-68-174-25-5-56,4-79,19l-2,2Zm75,14c5,1,21,25,33,57,6,16,10,32,13,44v2a73,73,0,0,1,1,11v2h-3l-15,8-10,5-12,5-16,7h-4c-1-1-2,2-8,20,11,46,57,122,85,122h9l7-4,13-6,6-3,6-3h3l17-6h5c18,3,59,75,59,104,0,6-13,18-27,22-83,25-165-26-220-128s-49-201,7-242c15-11,37-18,53-15Zm0,0"/><rect class="cls-1" x="229" y="190" width="357" height="469.26"/></g></g></svg>
...@@ -57,8 +57,11 @@ export default { ...@@ -57,8 +57,11 @@ export default {
} }
}, },
computed:{ computed:{
dicts(){
return this.getList(this.type)
},
dictList(){ dictList(){
return this.getList(this.type).filter(this.filter) return this.dicts.filter(this.filter)
}, },
formattedList(){ formattedList(){
let arr = [] let arr = []
...@@ -104,7 +107,7 @@ export default { ...@@ -104,7 +107,7 @@ export default {
}, },
setValueSync(){ setValueSync(){
if(this.value === null || this.value === undefined || this.value === ''){ if(this.value === null || this.value === undefined || this.value === ''){
return this.valueSync = this.multiple ? [] : this.value return this.valueSync = this.multiple ? [] : this.value
} }
if(this.multiple){ if(this.multiple){
let value = this.value || [] let value = this.value || []
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<div> <div>
<el-upload <el-upload
v-if="!readonly" v-if="!readonly"
v-show="fileList.length < 20"
multiple multiple
:action="uploadImgUrl" :action="uploadImgUrl"
list-type="picture-card" list-type="picture-card"
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip && !readonly"> <div class="el-upload__tip" slot="tip" v-if="showTip && !readonly" v-show="fileList.length < 20">
{{ $t('请上传') }} {{ $t('请上传') }}
<template v-if="fileSize">{{ $t('大小不超过') }}<b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <br> <template v-if="fileSize">{{ $t('大小不超过') }}<b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <br>
<template v-if="fileType">{{ $t('格式为') }}<b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>{{ $t('的文件') }}</div> <template v-if="fileType">{{ $t('格式为') }}<b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>{{ $t('的文件') }}</div>
......
...@@ -4,32 +4,39 @@ ...@@ -4,32 +4,39 @@
<el-descriptions-item :label="$t('唛头')">{{ order.marks }}</el-descriptions-item> <el-descriptions-item :label="$t('唛头')">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item :label="$t('已到箱数/总箱数')">{{ order.sumNum }}/{{ order.costVO.totalNum }}</el-descriptions-item> <el-descriptions-item :label="$t('已到箱数/总箱数')">{{ order.sumNum }}/{{ order.costVO.totalNum }}</el-descriptions-item>
<el-descriptions-item :label="$t('订单状态')"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item> <el-descriptions-item :label="$t('订单状态')"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式') + '(' + $t('渠道') + ')'">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag> ({{ order.channelName }})
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('始发地')">{{ order.logisticsInfoDto.startTitleZh || '' }}<span v-if="order.isExternalWarehouse" style="color: red">{{ $t('(外部仓)') }}</span></el-descriptions-item> <el-descriptions-item :label="$t('始发地')">{{ order.logisticsInfoDto.startTitleZh || '' }}<span v-if="order.isExternalWarehouse" style="color: red">{{ $t('(外部仓)') }}</span></el-descriptions-item>
<el-descriptions-item :label="$t('目的地')">{{ order.logisticsInfoDto.destTitleZh || '' }}</el-descriptions-item> <el-descriptions-item :label="$t('目的地')">{{ order.logisticsInfoDto.destTitleZh || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人姓名')">{{ order.consignorVO && order.consignorVO.name || ''}}</el-descriptions-item> <el-descriptions-item :label="$t('发货人姓名')">{{ order.consignorVO && order.consignorVO.name || ''}}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司')">{{ order.consignorVO && order.consignorVO.company || '' }}</el-descriptions-item> <el-descriptions-item :label="$t('发货人公司')">{{ order.consignorVO && order.consignorVO.company || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人电话')">{{ order.consignorVO && (order.consignorVO.countryCode + order.consignorVO.phone) || '' }}</el-descriptions-item> <el-descriptions-item :label="$t('发货人电话')">{{ order.consignorVO && ('+' + order.consignorVO.countryCode + order.consignorVO.phone) || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人姓名')">{{ order.consigneeVO && order.consigneeVO.name || ''}}</el-descriptions-item> <el-descriptions-item :label="$t('收货人姓名')">{{ order.consigneeVO && order.consigneeVO.name || ''}}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司')">{{ order.consigneeVO && order.consigneeVO.company || '' }}</el-descriptions-item> <el-descriptions-item :label="$t('收货人公司')">{{ order.consigneeVO && order.consigneeVO.company || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人电话')">{{ order.consigneeVO &&(order.consigneeVO.countryCode + order.consigneeVO.phone) || '' }}</el-descriptions-item> <el-descriptions-item :label="$t('收货人电话')">{{ order.consigneeVO &&('+' + order.consigneeVO.countryCode + order.consigneeVO.phone) || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('送货时间')">{{ order.deliveryDate || '' }}</el-descriptions-item> <el-descriptions-item :label="$t('送货时间')">{{ order.deliveryDate || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('入仓类型')">{{ getDictDataLabel(DICT_TYPE.ECW_WAREHOUSING_TYPE, order.warehouseType) }}</el-descriptions-item> <el-descriptions-item :label="$t('入仓类型')">{{ getDictDataLabel(DICT_TYPE.ECW_WAREHOUSING_TYPE, order.warehouseType) }}</el-descriptions-item>
<el-descriptions-item :label="$t('订单号')">{{ order.orderNo }}</el-descriptions-item> <el-descriptions-item :label="$t('订单号')">{{ order.orderNo }}</el-descriptions-item>
<el-descriptions-item v-if="stocking" :label="$t('出货渠道')">{{ order.channelName }}</el-descriptions-item>
<el-descriptions-item v-if="stocking" :label="$t('可出特性')">{{ order.channelAttrName }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
<script> <script>
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict" import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictTag from "@/components/DictTag/index.vue";
export default { export default {
name: "orderBaseInfo", name: "orderBaseInfo",
components: {DictTag},
props: { props: {
order: Object order: Object,
// 是否备货,如果页面引用需要显示可出特性和渠道
stocking: Boolean
}, },
data () { data () {
......
...@@ -44,13 +44,20 @@ export default { ...@@ -44,13 +44,20 @@ export default {
status: { status: {
type: [String, Number], type: [String, Number],
default: null default: null
},
// 为true时阻挡第一次$emit('change'),用于阻止入仓修改初始化时时覆盖了已修改的入仓属性
protectOnce: {
type: Boolean,
default: false
} }
}, },
data(){ data(){
return { return {
index: null, index: null,
list:[], list:[],
loading: false loading: false,
// 是否阻止过$emit('change')
hasProtectOnce: false
} }
}, },
watch:{ watch:{
...@@ -58,11 +65,20 @@ export default { ...@@ -58,11 +65,20 @@ export default {
let productId = val !== '' && val !== null ? this.list[val].id : null let productId = val !== '' && val !== null ? this.list[val].id : null
// console.log('index val', val, oldVal, productId) // console.log('index val', val, oldVal, productId)
this.$emit('input', productId) this.$emit('input', productId)
this.$emit('change', val !== '' && val !== null ? this.list[val] : null) if (this.protectOnce && !this.hasProtectOnce) {
this.hasProtectOnce = true
} else {
this.$emit('change', val !== '' && val !== null ? this.list[val] : null)
}
}, },
value(val){ value(val){
// console.log('初始化内容', val) // console.log('初始化内容', val)
this.init() this.init()
},
// 类型变了,清空内容
productType(){
this.list = []
} }
}, },
created(){ created(){
......
...@@ -3,18 +3,19 @@ ...@@ -3,18 +3,19 @@
<div class="flex-1"> <div class="flex-1">
<el-card> <el-card>
<div slot="header" class="header"> <div slot="header" class="header">
<el-select v-model="queryParams.typeId" :placeholder="$t('选择类型')" style="width:120px" clearable> <el-select v-model="queryParams.typeId" :placeholder="$t('选择类型')" style="width:120px" clearable @change="getList" :disabled="loading">
<el-option v-for="item in typeList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in typeList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> </el-select>
<el-select v-model="queryParams.attrId" :placeholder="$t('选择属性')" style="width:120px" clearable> <el-select v-model="queryParams.attrId" :placeholder="$t('选择属性')" style="width:120px" clearable @change="getList" :disabled="loading">
<el-option v-for="item in attrList" :key="item.id" :label="item.attrName" :value="item.id" /> <el-option v-for="item in attrList" :key="item.id" :label="item.attrName" :value="item.id" />
</el-select> </el-select>
<el-input v-model="queryParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable /> <el-input v-model="queryParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable :disabled="loading"/>
<el-button type="primary" @click="reLoad">{{$t('搜索')}}</el-button> <el-button type="primary" @click="reLoad" :loading="loading">{{$t('搜索')}}</el-button>
<div v-if="showAll"> <div v-if="showAll">
<el-checkbox :label="$t('全选') + `(${total > 500 ? $t('最多500') : $t('{total}个', {total})})`" @change="toggleAll" :disabled="isAllProduct"></el-checkbox> <el-checkbox :label="$t('全选') + `(${total > 500 ? $t('最多500') : $t('{total}个', {total})})`" @change="toggleAll" :disabled="isAllProduct || loading"></el-checkbox>
<el-checkbox :label="$t('全选库内商品(共{cnt}个)', {cnt: allTotal})" v-model="isAllProduct"></el-checkbox> <el-checkbox :label="$t('全选库内商品(共{cnt}个)', {cnt: allTotal})" v-model="isAllProduct" :disabled="loading"></el-checkbox>
<el-checkbox v-if="showFiltered && enableFiltered" :label="$t('根据商品搜索结果(共{cnt}个)', {cnt: total})" v-model="isAllFiltered" :disabled="loading"></el-checkbox>
</div> </div>
</div> </div>
<div class="list"> <div class="list">
...@@ -27,8 +28,10 @@ ...@@ -27,8 +28,10 @@
</div> </div>
<div class="flex-1 ml-10"> <div class="flex-1 ml-10">
<el-card style="height:100%"> <el-card style="height:100%">
<div slot="header" class="header"> <div slot="header" class="header flex">
{{$t('已选{cnt}个产品', {cnt: isAllProduct ? total : choosedList.length})}} <div class="flex-1 flex items-center">{{$t('已选{cnt}个产品', {cnt: isAllProduct || isAllFiltered ? total : choosedList.length})}}</div>
<el-button :disabled="!choosedList.length" type="text" @click="clearAll">{{$t('全部清除')}}</el-button>
</div> </div>
<div class="list"> <div class="list">
<div class="item" v-for="(choosed) in choosedList" :key="choosed.id" :data-data="JSON.stringify(choosed)"> <div class="item" v-for="(choosed) in choosedList" :key="choosed.id" :data-data="JSON.stringify(choosed)">
...@@ -41,7 +44,7 @@ ...@@ -41,7 +44,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getProductPage, getProductList } from '@/api/ecw/product' import {getProductPage, getProductList, getProductIds} from '@/api/ecw/product'
import { getProductTypeList } from '@/api/ecw/productType' import { getProductTypeList } from '@/api/ecw/productType'
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductAttrList } from '@/api/ecw/productAttr'
...@@ -54,10 +57,13 @@ export default { ...@@ -54,10 +57,13 @@ export default {
} }
}, },
showAll: Boolean, showAll: Boolean,
isall: Boolean isall: Boolean,
// 是否允许勾选全部搜索结果,优惠券那边无法回显所以不能启用,编辑路线价格等不需要回显的场景可以启用
enableFiltered: Boolean
}, },
data() { data() {
return { return {
loading: false,
list: [], list: [],
page: 1, page: 1,
pages: 1, pages: 1,
...@@ -73,7 +79,10 @@ export default { ...@@ -73,7 +79,10 @@ export default {
choosedList: [], choosedList: [],
typeList: [], typeList: [],
attrList: [], attrList: [],
isAllProduct: false isAllProduct: false,
isAllFiltered: false, // 是否全部搜索结果
// 是否显示搜索结果勾选,有筛选条件才显示
showFiltered: false
} }
}, },
computed: { computed: {
...@@ -99,6 +108,11 @@ export default { ...@@ -99,6 +108,11 @@ export default {
this.choosedList = [] this.choosedList = []
this.$emit('setall', isAllProduct) this.$emit('setall', isAllProduct)
}, },
isAllFiltered(isAllFiltered){
this.choosedList = []
this.isAllProduct = false
this.$emit('setFiltered', isAllFiltered)
},
defaultIds(newValue, oldValue){ defaultIds(newValue, oldValue){
if(!oldValue || !oldValue.length){ if(!oldValue || !oldValue.length){
this.loadDefaultProds() this.loadDefaultProds()
...@@ -156,21 +170,23 @@ export default { ...@@ -156,21 +170,23 @@ export default {
this.getList() this.getList()
}, },
getList() { getList() {
this.loading = true
getProductPage(this.queryParams).then(res => { getProductPage(this.queryParams).then(res => {
this.list = res.data.list //.concat(res.data.list || []) this.list = res.data.list //.concat(res.data.list || [])
this.page = res.data.page this.page = res.data.page
this.pages = res.data.pages this.pages = res.data.pages
this.total = res.data.total this.total = res.data.total
// this.choosedList = [] //搜搜重置,数据回显
/* if (this.defaultIds.length > 0) { // 必须在搜索之后才显示勾选,这个时候才有数量
this.defaultIds.map(item => { this.showFiltered = !!this.queryParams.attrId || !!this.queryParams.titleZh || !!this.queryParams.typeId
this.list.map(items => { }).finally(() => {
if (items.id == item) { this.loading = false
this.choosedList.push(items) })
} },
}) // 获得指定条件的商品的全部ID
}) getFilteredIds(){
} */ return getProductIds(this.queryParams).then(res => {
return res.data
}) })
}, },
toggleCheck(item, checked) { toggleCheck(item, checked) {
...@@ -189,6 +205,11 @@ export default { ...@@ -189,6 +205,11 @@ export default {
this.choosedList.forEach((choosed, index) => { this.choosedList.forEach((choosed, index) => {
if (choosed.id == item.id) this.choosedList.splice(index, 1) if (choosed.id == item.id) this.choosedList.splice(index, 1)
}) })
},
// 清除全部
async clearAll() {
await this.$confirm(this.$t('确定要全部清除么?'))
this.choosedList = []
} }
} }
} }
......
<template> <template>
<div> <div>
<div class="filters mb-10"> <div class="filters mb-10" v-if="showFilter">
{{$t('运输方式')}} <template v-if="!type">
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" clearable style="width:150px" /> {{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" />
</template>
{{$t('始发地')}}: {{$t('始发地')}}:
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable> <el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
...@@ -14,12 +15,15 @@ ...@@ -14,12 +15,15 @@
<el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> </el-select>
{{$t('出货渠道')}}: <template v-if="type != 'sea'">
<el-select :placeholder="$t('请选择目渠道')" v-model="channelId" clearable> {{$t('出货渠道')}}:
<el-select :placeholder="$t('请选择目渠道')" v-model="channelId" clearable>
<el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId" /> <el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId" />
</el-select> </el-select>
</template>
</div> </div>
<div class="mb-10 flex-row"> <div class="mb-10 flex-row" v-if="showFilter">
<el-radio-group v-model="checkAll"> <el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio> <el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio> <el-radio :label="false">{{$t('全不选')}}</el-radio>
...@@ -46,11 +50,20 @@ ...@@ -46,11 +50,20 @@
{{$l(row, 'destTitle')}} {{$l(row, 'destTitle')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('渠道')" prop="startTitleZh"> <el-table-column :label="$t('渠道')" prop="startTitleZh" v-if="[3,4].indexOf(+item.value) > -1">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{$l(row.channel, 'name')}} {{$l(row.channel, 'name')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="showAttr" :label="$t('商品特性')" prop="startTitleZh">
<template slot-scope="{row}">
<!--{{ getAttrNames(row.attrId) }}-->
<template v-if="row.channel && row.channel.attrNameList">
{{row.channel.attrNameList.join(',')}}
</template>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" prop=""> <el-table-column :label="$t('操作')" prop="">
<template slot="header"> <template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox> <el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox>
...@@ -70,12 +83,21 @@ ...@@ -70,12 +83,21 @@
import {getChannelList} from '@/api/ecw/channel' import {getChannelList} from '@/api/ecw/channel'
import {getTradeCityList} from '@/api/ecw/region' import {getTradeCityList} from '@/api/ecw/region'
import {openedRouterList} from '@/api/ecw/warehouse' import {openedRouterList} from '@/api/ecw/warehouse'
import {getProductAttrList} from "@/api/ecw/productAttr";
import Template from "@/views/cms/template";
export default { export default {
props:{ components: {Template},
value: { props:{
type: Array value: {
}, type: Array
option: Object },
option: Object,
// 类型,sea海运,air空运
type: String,
showFilter:{
type: Boolean,
default: true
}
}, },
data(){ data(){
return { return {
...@@ -91,6 +113,7 @@ export default { ...@@ -91,6 +113,7 @@ export default {
hideMap: {}, // 折叠状态 hideMap: {}, // 折叠状态
checkAll: null, checkAll: null,
groupChecker: {}, // 分组全选状态 groupChecker: {}, // 分组全选状态
attrList:[], // 商品特性
inited: false inited: false
} }
...@@ -116,12 +139,14 @@ export default { ...@@ -116,12 +139,14 @@ export default {
}) })
return ids return ids
}, },
// 根据选择的渠道筛选
availChannelList(){ availChannelList(){
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId) return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
}, },
filteredRouterList(){ filteredRouterList(){
let transportTypeList = [] let transportTypeList = []
this.transportTypeDicts this.transportTypeDicts
.filter(this.transportFilter)
.filter(transport => !this.channelId || transport.cssClass == 'channel') .filter(transport => !this.channelId || transport.cssClass == 'channel')
.forEach(item => { .forEach(item => {
if(this.transportType === null || this.transportType == '' || this.transportType == item.value){ if(this.transportType === null || this.transportType == '' || this.transportType == item.value){
...@@ -153,6 +178,25 @@ export default { ...@@ -153,6 +178,25 @@ export default {
} }
}) })
return transportTypeList return transportTypeList
},
// 是否显示商品特性(渠道)
showAttr(){
return this.type == 'air'
},
// 显示产品特性
getAttrName(){
return (id) => {
let item = this.attrList.find(item => item.id === +id)
if(!item) return ''
return this.$l(item, 'attrName')
}
},
// 显示多个商品特性
getAttrNames(){
return (ids) => {
if(!ids) return ''
return ids.split(',').filter( item => !!item).map(id => this.getAttrName(id)).join(',')
}
} }
}, },
watch:{ watch:{
...@@ -193,7 +237,12 @@ export default { ...@@ -193,7 +237,12 @@ export default {
}, },
// 显示的路线发生变化之后,清空已勾选的路线 // 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){ filteredRouterList(){
if(this.inited)this.selectedRoutes = [] if(this.inited){
this.selectedRoutes = []
Object.keys(this.groupChecker).forEach(key => {
this.groupChecker[key] = false
})
}
} }
}, },
async created(){ async created(){
...@@ -209,8 +258,21 @@ export default { ...@@ -209,8 +258,21 @@ export default {
if(this.value && this.value.length){ if(this.value && this.value.length){
this.selectedRoutes = this.value this.selectedRoutes = this.value
} }
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
await this.$nextTick()
this.inited = true
}, },
methods:{ methods:{
getAttrList(){
getProductAttrList().then(res => {
this.attrList = res.data
})
},
changeOption(){ changeOption(){
if(!this.option) return if(!this.option) return
this.importCity = +this.option.importCity || null this.importCity = +this.option.importCity || null
...@@ -249,6 +311,8 @@ export default { ...@@ -249,6 +311,8 @@ export default {
} }
}) */ }) */
if(selected){ if(selected){
// 先判断是否已勾选
if(this.getSelectedIndex(router) > -1) return
this.selectedRoutes.push({ this.selectedRoutes.push({
lineId: router.id, lineId: router.id,
channelId: router.channel.channelId, channelId: router.channel.channelId,
...@@ -266,15 +330,6 @@ export default { ...@@ -266,15 +330,6 @@ export default {
return this.selectedRoutes.findIndex(item => { return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.channelId == router.channel.channelId return item.lineId == router.id && item.channelId == router.channel.channelId
}) })
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
// break
}
})
return index */
}, },
SpanMethod({ row, column, rowIndex, columnIndex }){ SpanMethod({ row, column, rowIndex, columnIndex }){
if (columnIndex < 2 ) { if (columnIndex < 2 ) {
...@@ -291,7 +346,13 @@ export default { ...@@ -291,7 +346,13 @@ export default {
// 折叠,展开 // 折叠,展开
toggleHide(value){ toggleHide(value){
this.$set(this.hideMap, value, !this.hideMap[value]) this.$set(this.hideMap, value, !this.hideMap[value])
} },
// 运输方式筛选
transportFilter(item){
// 未指定类型则全部可用
if(!this.type) return true
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
},
} }
} }
</script> </script>
......
<template> <template>
<el-select v-model="valueSync" :multiple="multiple" :disabled="disabled" :filterable="filterable" :placeholder="$t('请选择')"> <el-select :clearable="clearable" v-model="valueSync" :multiple="multiple" :disabled="disabled" :filterable="filterable" :placeholder="$t('请选择')">
<el-option v-for="item in optionsFormated" :key="item.key" :label="item.label" :value="item.value" /> <el-option v-for="item in optionsFormated" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
export default { export default {
data(){ data(){
return { return {
valueSync: null valueSync: undefined
} }
}, },
props:{ props:{
...@@ -47,10 +47,12 @@ export default { ...@@ -47,10 +47,12 @@ export default {
}, },
watch:{ watch:{
valueSync(val){ valueSync(val){
this.$emit('input', val) console.log('valueSync变化', val, this.value)
this.$emit('input', val)
}, },
value(value){ value(value){
this.valueSync = value console.log('value传值变化', value, this.valueSync)
if(value !== undefined)this.valueSync = value
}, },
optionsFormated(){ optionsFormated(){
this.setDefault() this.setDefault()
...@@ -77,4 +79,4 @@ export default { ...@@ -77,4 +79,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
...@@ -192,7 +192,12 @@ export default { ...@@ -192,7 +192,12 @@ export default {
this.dialogVisible = false this.dialogVisible = false
if (this.isEditing || this.warehouseInId) { if (this.isEditing || this.warehouseInId) {
updateWarehouseInLocation(data).then(() => { updateWarehouseInLocation({
"orderId": this.orderId,
"orderItemId": this.orderItemId,
"orderLocationUpdateReqVOList": data,
"warehouseInId": this.warehouseInId
}).then(() => {
this.$message.success('储位修改成功') this.$message.success('储位修改成功')
}) })
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<el-form label-position="left" label-width="100px"> <el-form label-position="left" label-width="100px">
<el-form-item :label="$t('抄送')"> <el-form-item :label="$t('抄送')">
<el-select v-model="valueSync" multiple :placeholder="$t('请选择抄送人')" style="width:100%" filterable > <el-select v-model="valueSync" multiple :placeholder="$t('请选择抄送人')" style="width:100%" filterable :disabled="disabled" >
<el-option <el-option
v-for="item in users" v-for="item in users"
:key="item.id" :key="item.id"
...@@ -45,7 +45,8 @@ export default { ...@@ -45,7 +45,8 @@ export default {
taskData: { // 任务实例的数据。传递时,可展示 UserTask 审核相关的信息 taskData: { // 任务实例的数据。传递时,可展示 UserTask 审核相关的信息
type: Array, type: Array,
default: () => [], default: () => [],
} },
disabled: Boolean
}, },
data(){ data(){
return { return {
...@@ -87,4 +88,4 @@ export default { ...@@ -87,4 +88,4 @@ export default {
.workflow ::v-deep .my-process-designer{ .workflow ::v-deep .my-process-designer{
height: auto; height: auto;
} }
</style> </style>
\ No newline at end of file
This diff is collapsed.
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
<el-image style="width: 22px;height: 20px;cursor: pointer;" :src="unreadMessage" @click="notRead"></el-image> <el-image style="width: 22px;height: 20px;cursor: pointer;" :src="unreadMessage" @click="notRead"></el-image>
</el-badge> </el-badge>
<el-badge :value="downloadCnt ? downloadCnt : '' " class="right-menu-item badge">
<el-image style="width: 22px;height: 20px;cursor: pointer;" :src="unDownload" @click="handleDownload"></el-image>
</el-badge>
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
...@@ -80,17 +83,22 @@ import RuoYiDoc from '@/components/RuoYi/Doc' ...@@ -80,17 +83,22 @@ import RuoYiDoc from '@/components/RuoYi/Doc'
import {getLocale, saveLocale} from "@/utils/db"; import {getLocale, saveLocale} from "@/utils/db";
import unreadMessage from "@/assets/images/unread-message.png" import unreadMessage from "@/assets/images/unread-message.png"
import helpIcon from "@/assets/images/help.png" import helpIcon from "@/assets/images/help.png"
import unDownload from "@/assets/images/download.png"
import i18n from '@/i18n' import i18n from '@/i18n'
export default { export default {
data() { data() {
return { return {
unreadMessage, unreadMessage,
helpIcon, helpIcon,
unDownload,
// locale: getLocale(), // locale: getLocale(),
// 枚举 // 枚举
// langDatas: LangEnum.LANG, // langDatas: LangEnum.LANG,
notReadTotal:0,//要去取VUEX里面的未读数据总数,我不会,登录之后要调得到当前人未读记录总数接口放到VUEX中 notReadTotal:0,//要去取VUEX里面的未读数据总数,我不会,登录之后要调得到当前人未读记录总数接口放到VUEX中
lang: i18n.locale, // 当前语言 lang: i18n.locale, // 当前语言
// 未下载文件数量
notDownload: 0
} }
}, },
created() { created() {
...@@ -98,7 +106,7 @@ export default { ...@@ -98,7 +106,7 @@ export default {
if(process.env.NODE_ENV != 'development'){ if(process.env.NODE_ENV != 'development'){
setInterval(() => { setInterval(() => {
this.updateMessage() this.updateMessage()
}, 10000) }, 20000)
} }
this.updateMessage() this.updateMessage()
...@@ -140,7 +148,10 @@ export default { ...@@ -140,7 +148,10 @@ export default {
}, },
matterNum(){ matterNum(){
return this.$store.state.user.matterNum return this.$store.state.user.matterNum
} },
downloadCnt(){
return this.$store.state.user.download
}
}, },
watch:{ watch:{
lang(val){ lang(val){
...@@ -150,9 +161,11 @@ export default { ...@@ -150,9 +161,11 @@ export default {
} }
}, },
methods: { methods: {
handleDownload(){
this.$router.push('/system/download')
},
updateMessage(){ updateMessage(){
this.$store.dispatch('getNotMessage'); this.$store.dispatch('getUserBadge');
this.$store.dispatch('getToDoList');
}, },
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
...@@ -162,7 +175,7 @@ export default { ...@@ -162,7 +175,7 @@ export default {
saveLocale(value) saveLocale(value)
}, */ }, */
async logout() { async logout() {
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => { this.$modal.confirm(this.$t('确定注销并退出系统吗?'), this.$t('提示')).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/'; location.href = '/';
}) })
......
...@@ -10,20 +10,32 @@ export default { ...@@ -10,20 +10,32 @@ export default {
title: { title: {
type: String, type: String,
default: '' default: ''
} },
badge: Number
}, },
render(h, context) { render(h, context) {
const { icon, title } = context.props const { icon, title, badge } = context.props
const vnodes = [] const vnodes = []
if (icon) { if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>) vnodes.push(<svg-icon icon-class={icon} test="1"/>)
} }
if (title) { if (title) {
vnodes.push(<span slot='title'>{(title)}</span>) vnodes.push(<span><span>{(title)}</span><span class="badge">{badge}</span></span>)
} }
return vnodes return vnodes
} }
} }
</script> </script>
<style lang="scss" scoped>
.badge:not(:empty){
background: red;
color: #fff;
padding: 2px 8px;
font-size: 12px;
border-radius: 10px;
margin-left: 5px;
}
</style>
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="$l(onlyOneChild.meta, 'title')" /> <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="$l(onlyOneChild.meta, 'title')" :badge="badge" />
</el-menu-item> </el-menu-item>
</app-link> </app-link>
</template> </template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title"> <template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="$l(item.meta, 'title')" /> <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="$l(item.meta, 'title')" :badge="badge" />
</template> </template>
<sidebar-item <sidebar-item
v-for="child in item.children" v-for="child in item.children"
...@@ -54,6 +54,11 @@ export default { ...@@ -54,6 +54,11 @@ export default {
this.onlyOneChild = null this.onlyOneChild = null
return {} return {}
}, },
computed:{
badge(){
return this.$store.getters.badgeData[this.item.meta?.badgeField]
}
},
methods: { methods: {
hasOneShowingChild(children = [], parent) { hasOneShowingChild(children = [], parent) {
if (!children) { if (!children) {
......
...@@ -28,6 +28,7 @@ import { mapGetters, mapState } from "vuex"; ...@@ -28,6 +28,7 @@ import { mapGetters, mapState } from "vuex";
import Logo from "./Logo"; import Logo from "./Logo";
import SidebarItem from "./SidebarItem"; import SidebarItem from "./SidebarItem";
import variables from "@/assets/styles/variables.scss"; import variables from "@/assets/styles/variables.scss";
import {getWaitingShipmentCount} from "@/api/ecw/order";
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
...@@ -52,6 +53,9 @@ export default { ...@@ -52,6 +53,9 @@ export default {
isCollapse() { isCollapse() {
return !this.sidebar.opened; return !this.sidebar.opened;
} }
},
created() {
this.$store.dispatch('getBadgeData')
} }
}; };
</script> </script>
...@@ -278,13 +278,14 @@ export const constantRoutes = [ ...@@ -278,13 +278,14 @@ export const constantRoutes = [
name: 'allocatedCustomerEdit', name: 'allocatedCustomerEdit',
meta: {title:'编辑客户',titleEn:'Edit Customer', icon: ''} meta: {title:'编辑客户',titleEn:'Edit Customer', icon: ''}
}, },
// {
// path: 'add-edit/:customerId(\\d+)',
// component: (resolve) => import('@/views/ecw/customer/edit'),
// props: true,
// name: 'customerEdit',
// meta: {title: '新建客户',titleEn:'New customer', icon: ''}
// },
{ {
path: 'add-edit/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'customerEdit',
meta: {title: '新建客户',titleEn:'New customer', icon: ''}
},{
path: 'perfect/:customerId(\\d+)', path: 'perfect/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'), component: (resolve) => import('@/views/ecw/customer/edit'),
props: true, props: true,
...@@ -466,6 +467,34 @@ export const constantRoutes = [ ...@@ -466,6 +467,34 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '/boxAir',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'query/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/queryAir'),
props: true,
name: 'shippingDetail',
meta: {titleZh: '出货详情', titleEn: "Shipping Details", icon: '', activeMenu: '/shipment/boxDetail'}
},
{
path: 'shippingAir/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shippingAir/shippingAir'),
props: true,
name: 'shippingAir',
meta: {titleZh: '空运出货操作', titleEn: "Ocean shipment operation", icon: '', activeMenu: '/shipment/boxAir'}
},
{
path: 'batch_markup',
component: (resolve) => import('@/views/ecw/box/batchMarkup'),
name: 'batchMarkup',
meta: {titleZh: '批量加价', titleEn: "Batch Markup", icon: '', activeMenu: '/boxSeaAir'}
}
]
},
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
......
...@@ -17,6 +17,8 @@ const getters = { ...@@ -17,6 +17,8 @@ const getters = {
defaultRoutes:state => state.permission.defaultRoutes, defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters, sidebarRouters:state => state.permission.sidebarRouters,
// 数据字典 // 数据字典
dict_datas: state => state.dict.dictDatas dict_datas: state => state.dict.dictDatas,
// 角标数据
badgeData: state => state.user.badgeData
} }
export default getters export default getters
...@@ -56,7 +56,8 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -56,7 +56,8 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
titleEn: route.nameEn, titleEn: route.nameEn,
icon: route.icon, icon: route.icon,
noCache: !route.keepalive, // 不缓存,如果需要缓存则需要组件名称能对应上 noCache: !route.keepalive, // 不缓存,如果需要缓存则需要组件名称能对应上
componentPath: route.component componentPath: route.component,
badgeField: route.badgeField
} }
route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar) route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar)
// 处理 component 属性 // 处理 component 属性
......
...@@ -6,6 +6,9 @@ const state = { ...@@ -6,6 +6,9 @@ const state = {
} }
// 获取页面的缓存名称 // 获取页面的缓存名称
const getViewName = (view) => { const getViewName = (view) => {
if(!view.meta?.componentPath){
return view.fullPath
}
return view.meta.componentPath.split('/').map(item => item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()).join('') return view.meta.componentPath.split('/').map(item => item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()).join('')
} }
......
import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login' import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import {getNotReadInternalMessageTotal,} from '@/api/system/internalMessage' import {getNotReadInternalMessageTotal,} from '@/api/system/internalMessage'
import {taskTodoCount} from "@/api/bpm/task"; import {taskTodoCount, userMark} from "@/api/bpm/task";
import {getWaitingShipmentCount} from "@/api/ecw/order";
const user = { const user = {
state: { state: {
...@@ -12,7 +13,12 @@ const user = { ...@@ -12,7 +13,12 @@ const user = {
roles: [], roles: [],
permissions: [], permissions: [],
notMessage:0, notMessage:0,
matterNum:0 matterNum:0,
download: 0,
badgeData:{
// 待出订单数量
waitingShipment: 0
}
}, },
mutations: { mutations: {
...@@ -39,6 +45,12 @@ const user = { ...@@ -39,6 +45,12 @@ const user = {
}, },
SET_TODO:(state, matterNum) => { SET_TODO:(state, matterNum) => {
state.matterNum = matterNum; state.matterNum = matterNum;
},
SET_DOWNLOAD(state, cnt){
state.download = cnt;
},
SET_BADGE_DATA(state, data){
state.badgeData = Object.assign({}, state.badgeData, data)
} }
}, },
...@@ -178,6 +190,27 @@ const user = { ...@@ -178,6 +190,27 @@ const user = {
reject(err) reject(err)
}) })
}) })
},
// 获取用户角标,包括未读消息、待办事项,下载数据
getUserBadge({commit}){
return new Promise((resolve,reject) =>{
userMark().then(r => {
commit('SET_TODO',r.data.todoCount)
commit('SET_UNREAD',r.data.notReadInternalMessageCount)
commit('SET_DOWNLOAD',r.data.fileWaitDownCount + r.data.fileMakeQueuingCount + r.data.fileMakeProgressCount)
resolve()
}).catch(err => {
reject(err)
})
})
},
// 获取菜单角标数据,当前只有空运待出
getBadgeData({commit}){
// 查询待出订单数量 waitingShipment
getWaitingShipmentCount().then(res => {
console.log('getWaitingShipmentCount', res.data)
commit('SET_BADGE_DATA', { waitingShipment: res.data}, )
})
} }
} }
} }
......
...@@ -129,7 +129,7 @@ input, textarea{ ...@@ -129,7 +129,7 @@ input, textarea{
} }
.el-scrollbar__view{ .el-scrollbar__view{
overflow-x: hidden; /*overflow-x: hidden;*/
} }
.el-rate{ .el-rate{
......
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token' const TokenKey = 'Jd-Admin-Token'
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return Cookies.get(TokenKey)
......
...@@ -120,7 +120,11 @@ export const DICT_TYPE = { ...@@ -120,7 +120,11 @@ export const DICT_TYPE = {
ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部) ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部)
ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型 ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型
ECW_FEE_SOURCE: 'fee_source', // 费用来源 ECW_FEE_SOURCE: 'fee_source', // 费用来源
STOCK_UP_EXCEPTION_TYPE: 'stock_up_exception_type', // 备货异常类型,
ORDER_ITEM_PACK_STATUS: 'order_item_pack_status', // 空运备货打包状态
RECEIPT_FEE_TYPE:'receipt_fee_type', RECEIPT_FEE_TYPE:'receipt_fee_type',
DOWNLOAD_LOG_STATUS: 'download_log_status', // 下载日志状态
DOWNLOAD_TYPE: 'download_type', // 下载类型
//--------ecw--------- //--------ecw---------
CUSTOMER_STATUS: 'customer_status', CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source', CUSTOMER_SOURCE: 'customer_source',
...@@ -189,7 +193,11 @@ export const DICT_TYPE = { ...@@ -189,7 +193,11 @@ export const DICT_TYPE = {
MANUAL_EXCEPTION_TYPE:'manual_exception_type', MANUAL_EXCEPTION_TYPE:'manual_exception_type',
APPLY_STATUS:'apply_status',//特价申请审核状态 APPLY_STATUS:'apply_status',//特价申请审核状态
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type', WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
WAREHOUSING_RECORD_DETAIL_USAGE: 'warehousing_record_detail_usage', // 入仓规格类型
ECW_AUTH_TYPE:'auth_type',//品牌授权 ECW_AUTH_TYPE:'auth_type',//品牌授权
OREER_ITEM_USAGE:'order_item_usage',//用途
NEED_ORDER_INQUIRY: 'need_order_inquiry', // 是否需要単询
EXCEPTION_SELECT_FILED:'exception_select_filed', EXCEPTION_SELECT_FILED:'exception_select_filed',
ECASH_INIT:'ecash_init', //e-cash ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type', FEE_TYPE:'receivable_fee_type',
...@@ -199,6 +207,7 @@ export const DICT_TYPE = { ...@@ -199,6 +207,7 @@ export const DICT_TYPE = {
ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求 ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求
ORDER_ABNORMAL_STATE:'order_abnormal_state', ORDER_ABNORMAL_STATE:'order_abnormal_state',
TARGET_TYPE:'target_type',//部门业绩目标类型 TARGET_TYPE:'target_type',//部门业绩目标类型
CEBE_UNIT:'cube_unit',//目标单位
RECEIPT_ITEM_STATE:'receipt_item_state',//收款单明细状态 RECEIPT_ITEM_STATE:'receipt_item_state',//收款单明细状态
// ========== 出货模块 ========== // ========== 出货模块 ==========
BOX_SHIPPING_TRAILER_STATUS: 'shipping_trailer_status', // 拖车状态 BOX_SHIPPING_TRAILER_STATUS: 'shipping_trailer_status', // 拖车状态
...@@ -209,10 +218,12 @@ export const DICT_TYPE = { ...@@ -209,10 +218,12 @@ export const DICT_TYPE = {
BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位 BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常 BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程 BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
BOX_AIR_SHIPMENT_PROCESS: 'air_shipment_process', // 空运出货
BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程 BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型 BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型 BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型
BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state', BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state',
BOX_AIR_SHIPMENT_STATE: 'air_shipment_status',
BOX_INSPECTION_TIME_CUSTOMS: 'inspection_time_customs', // 校验时间-报关 BOX_INSPECTION_TIME_CUSTOMS: 'inspection_time_customs', // 校验时间-报关
BOX_INSPECTION_TIME_SHIPPING: 'inspection_time_shipping', // 校验时间-起运 BOX_INSPECTION_TIME_SHIPPING: 'inspection_time_shipping', // 校验时间-起运
BOX_INSPECTION_TIME_ARRIVAL: 'inspection_time_arrival', // 校验时间-到港 BOX_INSPECTION_TIME_ARRIVAL: 'inspection_time_arrival', // 校验时间-到港
...@@ -220,10 +231,17 @@ export const DICT_TYPE = { ...@@ -220,10 +231,17 @@ export const DICT_TYPE = {
BOX_CUSTOMS_ERROR_TYPE: "customs_error_type",// 报关异常状态 BOX_CUSTOMS_ERROR_TYPE: "customs_error_type",// 报关异常状态
BOX_SHIPPING_ERROR_TYPE: "shipping_error_type",// 起运异常状态 BOX_SHIPPING_ERROR_TYPE: "shipping_error_type",// 起运异常状态
BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态 BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态
BOX_FLYING_ERROR_TYPE: 'flying_error_type',// 航班异常状态
SETTLEMENT_STATUS: 'settlement_status', // 结算状态 SETTLEMENT_STATUS: 'settlement_status', // 结算状态
FLYING_TICKET_EXCEPTION: 'flying_ticket_exception', // 起飞异常
ARRIVAL_TICKET_EXCEPTION: 'arrival_ticket_exception', // 到港异常
CLEARANCE_TICKET_EXCEPTION: 'clearance_ticket_exception', // 清关异常
APP_TYPE:"app_type", //系统类型 APP_TYPE:"app_type", //系统类型
AIR_SHIPMENT_PROCESS:'air_shipment_process' AIR_SHIPMENT_PROCESS:'air_shipment_process',
AIR_CUSTOM_CLEARANCE:'air_custom _clearance', //渠道清关费
AIR_COMMODITY_CUSTOM_CLEARANCE:'air_commodity_custom _clearance'//商品渠道清关费,
} }
/** /**
......
...@@ -10,6 +10,7 @@ export function checkPermi(value) { ...@@ -10,6 +10,7 @@ export function checkPermi(value) {
const permissions = store.getters && store.getters.permissions const permissions = store.getters && store.getters.permissions
const permissionDatas = value const permissionDatas = value
const all_permission = "*:*:*"; const all_permission = "*:*:*";
console.log(permissionDatas)
const hasPermission = permissions.some(permission => { const hasPermission = permissions.some(permission => {
return all_permission === permission || permissionDatas.includes(permission) return all_permission === permission || permissionDatas.includes(permission)
......
...@@ -405,23 +405,67 @@ export default { ...@@ -405,23 +405,67 @@ export default {
id: this.processInstance.businessKey id: this.processInstance.businessKey
}, },
// 不可出渠道异常审核 // 不可出渠道异常审核
// not_shiping_channel:{ not_shiping_channel:{
// component: () => import('@/views/ecw/order/components/NotShipingChannel'), component: () => import('@/views/ecw/order/components/NotShipingChannel'),
// id: this.processInstance.businessKey, id: this.processInstance.businessKey,
// path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath
// }, },
// 出货批量加价审核 // 出货批量加价审核
// box_batch_markup:{ box_batch_markup:{
// component: () => import('@/views/ecw/box/components/batchMakeUpDetail.vue'), component: () => import('@/views/ecw/box/components/batchMakeUpDetail.vue'),
// processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
// type: this.processInstance.processDefinition?.formCustomViewPath type: this.processInstance.processDefinition?.formCustomViewPath
// }, },
// 可获移交详情 // 可获移交详情
customer_handover_details:{ customer_handover_details:{
component: () => import('@/views/ecw/customer/components/customer-handover-details.vue'), component: () => import('@/views/ecw/customer/components/customer-handover-details.vue'),
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath type: this.processInstance.processDefinition?.formCustomViewPath
} },
// 出货审核
air_shipment: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: 'shipment'
},
//排单分拣审核
shipment_order_sorting: {
component: "shippingDetail",
processId: this.processInstance.businessKey
},
// 出货反审
shipment_review: {
component: "shippingDetail",
processId: this.processInstance.businessKey
},
// 删单退场
customs_declare_remove: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: 'deleteExit'
},
// 空运到仓审核
air_warehouse: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: 'air_warehouse'
},
// 空运到仓审核
air_warehouse_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
type: 'air_warehouse'
},
revoke_clear:{
component:() => import("@/views/ecw/box/components/RevokeClear"),
id: this.processInstance.businessKey
},
// 重量超限
over_weight_exception:{
component: () => import('@/views/ecw/order/exception/components/overweightException'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
} }
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim()) console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()] return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column :label="$t('流程编号')" align="center" prop="instanceId" width="320"/> <el-table-column :label="$t('流程编号')" align="center" prop="instanceId" width="320"/>
<el-table-column :label="$t('业务编号')" align="center" prop="businessNo" />
<el-table-column :label="$t('流程名称')" align="center" prop="processName"/> <el-table-column :label="$t('流程名称')" align="center" prop="processName"/>
<!-- <el-table-column :label="$t('业务编号')" align="center" prop="processName"/> --> <!-- <el-table-column :label="$t('业务编号')" align="center" prop="processName"/> -->
<el-table-column :label="$t('流程分类')" align="center" prop="categoryId"> <el-table-column :label="$t('流程分类')" align="center" prop="categoryId">
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"/> :end-placeholder="$t('结束日期')"/>
</el-form-item> </el-form-item>
<<!-- el-form-item :label="$t('业务编号')" prop="businessNo"> <!-- el-form-item :label="$t('业务编号')" prop="businessNo">
<el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编号')" clearable <el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编号')" clearable
@keyup.enter.native="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> --> </el-form-item> -->
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<dict-tag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="scope.row.category"/> <dict-tag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="scope.row.category"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('当前审批节点')" align="center" prop="name" width="200"/> <el-table-column :label="$t('当前审批节点')" align="center" prop="name" width="200"/>
<!-- <el-table-column :label="$t('状态')" align="center" prop="" width="200" >{{ $t('缺少字段') }}</el-table-column> --> <!-- <el-table-column :label="$t('状态')" align="center" prop="" width="200" >{{ $t('缺少字段') }}</el-table-column> -->
<!-- <el-table-column :label="$t('流程发起人')" align="center" prop="processInstance.startUserNickname" width="120"/>--> <!-- <el-table-column :label="$t('流程发起人')" align="center" prop="processInstance.startUserNickname" width="120"/>-->
......
This diff is collapsed.
<template>
<div class="shipping-update-error">
<div class="message-title">{{$t(`您确定撤销${cancelClearInfo.orderNo}已清关状态吗?`)}}</div>
<el-form ref="arrivalForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item :label="$t('撤销理由')" prop="clEstTime">
<el-input v-if="!flag" v-model="cusClearanceObj.applyReason" type="textarea" :rows="4"></el-input>
<template v-else>
{{apply.applyReason}}
</template>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button v-if="!flag" type="primary" @click="onSubmit">{{$t('确定')}}</el-button>
<el-button v-if="flag" type="primary" @click="$router.push({path: '/bpm/process-instance/detail', query: {id: apply.bpmProcessId}})">{{$t('审核中')}}</el-button>
<el-button v-if="flag" plain type="primary" @click="canclAudit">{{$t('取消审核')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</el-row>
</div>
</template>
<script>
import { approvalCreate } from "@/api/ecw/boxSea";
import {cancelProcessInstance} from "@/api/bpm/processInstance";
export default {
name: "updateError",
inheritAttrs: false,
components: {},
props: {
shipmentObj: Object,
cancelClearInfo: Object,
},
data() {
return {
// 到港对象
cusClearanceObj: {},
// 校验
rules: {
applyReason: [
{ required: true, message: this.$t("必填"), trigger: "change" },
]
},
apply: {},
flag: false
};
},
created() {
let orders = this.shipmentObj.clearanceInfo?.clearanceOrderBackList
let order = orders.find(item=>item.orderId == this.cancelClearInfo.orderId)
console.log(order,11,this.cancelClearInfo.orderId,orders);
if(order){
this.apply = order
if(this.apply.approvalStatus == 1){
this.flag = true
}
}
},
methods: {
onSubmit() {
this.$refs["arrivalForm"].validate((valid) => {
if (valid) {
approvalCreate({
shipmentId: this.shipmentObj.id,
approvalStatus: 0,
approvalType: 21,
orderId: this.cancelClearInfo.orderId,
applyReason: this.cusClearanceObj.applyReason
}).then(()=>{
this.$message.success("成功");
this.cancel()
})
}
});
},
/* 取消审核 */
canclAudit() {
cancelProcessInstance(this.apply.bpmProcessId, this.$t("取消审核")).then(() => {
this.$emit("closeDialog","edit");
});
},
cancel() {
this.$emit("closeDialog","edit");
},
},
};
</script>
<style lang="scss" scoped>
.shipping-update-error {
.message-title {
text-align: center;
font-size: 20px;
margin: 0 20px 10px;
}
}
</style>
<template>
<el-dialog :title="orderNo + $t('订单转异')" center :visible.sync="show" v-bind="$attrs" :close-on-click-modal="false" :before-close="cancel">
<el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules">
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="form.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="form.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleException">{{$t('确认转异')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import imageUpload from "@/components/ImageUpload/index.vue";
import {batchException} from "@/api/ecw/order";
export default {
components: {imageUpload},
props:{
orderNo:{
type: String,
},
orderId:{
type: Number,
}
},
data(){
return {
show: false,
form: {
manualExceptionType: [],
exceptionUrls: '',
descZh: ''
},
exceptionRules:{}
}
},
async created(){
this.$nextTick()
this.show = true
},
methods:{
cancel(){
this.show = false
this.$emit('cancel');
},
handleException(){
if(!this.form.manualExceptionType.length){
return this.$message.error(this.$t('请选择异常类型'))
}
batchException({
orderIds: [this.orderId],
manualExceptionType: this.form.manualExceptionType.join(","),
exceptionUrls: this.form.exceptionUrls?.split(",") || [],
descZh: this.form.descZh
}).then(res=>{
this.$message.success(this.$t('操作成功'));
this.show = false
this.$emit('success');
})
}
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div v-if="order">
<el-descriptions :column="4" v-if="order" :colon="false">
<el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{order.channelName}}
</el-descriptions-item>
<el-descriptions-item :label="$t('订单状态')">
{{order.statusMsg}}
</el-descriptions-item>
<el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
<el-descriptions-item :label="$t('始发仓')">
{{order.logisticsInfoDto.startTitleZh}}
</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')" :span="2">
{{order.logisticsInfoDto.destAddressZh}}
</el-descriptions-item>
<!-- 优惠申请 -->
<el-descriptions-item :label="$t('申请理由')" :span="4">
<div class="bold">
{{applyReason}}
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getBoxApproval} from "@/api/ecw/box";
/*
撤销清关审核
*/
export default {
name: 'RevokeClear',
props:{
id: [String, Number]
},
data(){
return {
order: null,
applyReason: null
}
},
created(){
if(this.id){
// id是出货审核ID
getBoxApproval({id: this.id}).then(res => {
this.applyReason = res.data.applyReason
getOrder(res.data.orderId).then(res => {
this.order = res.data
})
})
}
}
}
</script>
<style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
.bold{
font-weight: bold;
}
</style>
<template>
<div class="app-approvalShipping">
<h1>{{$t('申请信息')}}{{$t('出货信息')}}</h1>
<el-descriptions :column="6" border>
<el-descriptions-item :label="$t('自编号')">{{boxBackVO.selfNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="boxBackVO.transportType" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{getShipChannelName(boxBackVO.shippingChannelId)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('柜型')">
{{cabinetLabel}}
</el-descriptions-item>
<el-descriptions-item :label="$t('体积/重量')">
{{getVolumeWeight(loadDetail.totalStatistics)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('货柜状态')">
{{boxBackVO.shipmentStatusText}}
</el-descriptions-item>
</el-descriptions>
<div v-if="approvalInfo.applyReason">
<h1>{{$t('申请原因')}}</h1>
<div>
{{approvalInfo.applyReason}}
</div>
</div>
<el-table :data="loadDetail.sectionOrderList" border class="mt-10">
<el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<template v-slot="{row}">
<el-button type="text" @click="jumpOrderDetail(row)">{{row.orderNo}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('货物信息')" align="center" width="500px">
<template v-slot="{row}">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
<div>{{index+1}}{{$l(item, 'prodTitle')}}</div>
</div>
</section>
</template>
</el-table-column>
<el-table-column :label="$t('收费箱数')" align="center" prop="num"></el-table-column>
<el-table-column :label="$t('收费体积')" align="center" prop="chargeVolume"></el-table-column>
<el-table-column :label="$t('收费重量')" align="center" prop="chargeWeight"></el-table-column>
<el-table-column :label="$t('加价金额')" align="center">
<template slot-scope="{row}" v-if="details">
<div>
{{$t('运费')}}{{details.freightFee || 0}}{{ currencyMap[details.freightCurrencyId]}}/{{unitMap[details.freightUnitId]}}
</div>
<div>
{{$t('清关费')}}{{details.clearanceFee || 0}}{{ currencyMap[details.clearanceCurrencyId]}}/{{unitMap[details.clearanceUnitId]}}
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { approvalDetail } from "@/api/ecw/box";
import { getSeaStatus, getTotlContent } from "../shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from "@/api/ecw/channel";
import Decimal from "decimal.js";
import Template from "@/views/cms/template/index.vue";
import {getUnitList} from "@/api/ecw/unit";
import {getCurrencyList} from "@/api/ecw/currency";
/**
* 批量加价审核详情
*/
export default {
name: "BatchMakeUpDetail",
components: {Template},
props: {
processId: {
type: [Number, String],
},
type: String,
},
data() {
return {
unitList:[],
currencyList:[],
approvalInfo: {},
boxBackVO: {},
loadDetail: {},
// 柜型
cabinetLabel: "",
//渠道
channelList: [],
// 弹出配置
dialogConfig: {
title: "",
visible: false,
},
srcStrs: [],
};
},
created() {
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getChannelList().then((res) => (this.channelList = res.data));
},
methods: {
getTotlContent,
/* 获取详情 */
getApprovalDetail(processId) {
approvalDetail({ approvalId: processId }).then((res) => {
this.approvalInfo = res.data.approvalInfo;
this.boxBackVO = res.data.boxBackVO;
this.loadDetail = res.data.loadDetail;
});
},
/* 获取柜型 */
getCabinetLabel(cabinetId) {
getCabinetPage(null).then((response) => {
const cabinetList = response.data.list;
for (const cabinetItem of cabinetList) {
if (cabinetItem.id == cabinetId) {
this.cabinetLabel = cabinetItem.name;
break;
}
}
});
},
/* 合计 */
calcSum(goodsList) {
let sum = 0;
goodsList.forEach((element) => {
sum = Decimal.add(sum, element.num).toNumber();
});
return sum;
},
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push("/order/detail?orderId=" + row.orderId);
},
},
watch: {
processId: {
immediate: true,
handler(val) {
this.getApprovalDetail(val);
},
},
boxBackVO(val) {
// 柜型
this.getCabinetLabel(val.cabinetId);
},
},
computed: {
/* 渠道 */
getShipChannelName() {
return (shippingChannelId) => {
for (const channelItem of this.channelList) {
if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, "name");
}
}
};
},
/* 体积重量 */
getVolumeWeight() {
return (total) => {
return this.getTotlContent(total);
};
},
/* 是否显示卸柜箱数 */
isShowColumn() {
return (shippingVO) => {
return getSeaStatus(shippingVO) >= 182 ? true : false;
};
},
details(){
if(!this.approvalInfo) return null
return JSON.parse(this.approvalInfo?.details)
},
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
},
};
</script>
<style lang="scss" scoped>
.el-image {
border-radius: 5px;
background-color: #ebeef5;
box-shadow: 0 0 5px 1px #ccc;
::v-deep .el-image__inner {
transition: all 0.3s;
cursor: pointer;
&:hover {
transform: scale(1.2);
}
}
::v-deep .image-slot {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
color: #909399;
font-size: 30px;
}
}
</style>
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<el-form ref="costForm" :model="costObj" :rules="rules" label-width="80px"> <el-form ref="costForm" :model="costObj" :rules="rules" label-width="80px">
<el-form-item :label="$t('操作步骤')" prop="opStepType"> <el-form-item :label="$t('操作步骤')" prop="opStepType">
<el-select v-if="flag=='sea'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')"> <el-select v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> <el-option v-for="type in getDictDatas(DICT_TYPE[this.process])" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select> </el-select>
<el-select v-if="flag=='seaAir'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')"> <!--<el-select v-if="flag=='seaAir'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> <el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select> </el-select>-->
</el-form-item> </el-form-item>
<el-form-item :label="$t('费用类型')" prop="costType"> <el-form-item :label="$t('费用类型')" prop="costType">
...@@ -51,6 +51,7 @@ import { getSupplierPage } from "@/api/ecw/supplier"; ...@@ -51,6 +51,7 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box"; import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils"; import { serviceMsg } from "./shippingSea/utils";
import { getCurrencyList } from "@/api/ecw/currency"; import { getCurrencyList } from "@/api/ecw/currency";
import {getDictDatas} from "@/utils/dict";
export default { export default {
name: "costForm", name: "costForm",
...@@ -70,9 +71,21 @@ export default { ...@@ -70,9 +71,21 @@ export default {
price: [{ required: true, message: this.$t("金额不能为空"), trigger: "blur" }], price: [{ required: true, message: this.$t("金额不能为空"), trigger: "blur" }],
priceUnit: [{ required: true, message: this.$t("金额单位不能为空"), trigger: "blur" }] priceUnit: [{ required: true, message: this.$t("金额单位不能为空"), trigger: "blur" }]
}, },
flag: 'sea' // flag: 'sea'
}; };
}, },
computed:{
flag(){
return this.$attrs.flag || 'sea'
},
process(){
return {
'air': 'BOX_AIR_SHIPMENT_PROCESS',
'sea': 'BOX_SHIPPING_PROCESS',
'seaAir': 'BOX_SEA_AIR'
}[this.flag]
}
},
created() { created() {
// 供应商 // 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => { getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
...@@ -84,11 +97,12 @@ export default { ...@@ -84,11 +97,12 @@ export default {
getCurrencyList().then((res) => { getCurrencyList().then((res) => {
this.currencyList = res.data ?? []; this.currencyList = res.data ?? [];
}); });
if(this.$attrs.shipmentObj.bosType == 'seaAir'){ /*if(this.$attrs.shipmentObj.bosType == 'seaAir'){
this.flag = 'seaAir'; this.flag = 'seaAir';
} }*/
}, },
methods: { methods: {
getDictDatas,
submit() { submit() {
this.$refs["costForm"].validate((valid) => { this.$refs["costForm"].validate((valid) => {
if (valid) { if (valid) {
......
<template>
<div class="shippingSea-dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('运输方式')" prop="transportType">
<el-radio-group v-model="form.transportType">
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{$l(dict, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId">
<el-select v-model="form.shippingChannelId" :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" :placeholder="$t('请选择始发地')">
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" :placeholder="$t('请选择目的地')">
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的港清关')" prop="destinationClearanceSelect">
<el-radio-group v-model="form.destinationClearance">
<el-radio v-if="form.destinationClearance != 2" :label="1">
{{$t('我司')}}
<el-tooltip effect="dark" :content="$t('我司承接')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</el-radio>
<el-radio v-else :label="2">
{{$t('我司')}}
<el-tooltip effect="dark" :content="$t('我司承接')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</el-radio>
<el-radio :label="3">
{{$t('客户')}}
<el-tooltip effect="dark" :content="$t('客户自清')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.destinationClearance===1 || form.destinationClearance===2" prop="destinationClearance" :rules="[
{ required: true, message: this.$t('清关方式不能为空'), trigger: 'blur' }
]">
<el-radio-group v-model="form.destinationClearance">
<el-radio :label="1">{{$t('我司清关')}}</el-radio>
<el-radio :label="2">{{$t('合作方清关')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('发货方式')" prop="deliveryType">
<el-radio-group v-model="form.deliveryType">
<el-radio :label="1">{{$t('多票')}}</el-radio>
<el-radio :label="2">{{$t('单票')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</div>
</div>
</template>
<script>
import { createbox, updatebox } from "@/api/ecw/boxAir";
import { getChannelList } from '@/api/ecw/channel'
export default {
name: "editAirForm",
inheritAttrs: false,
props: {
transportTypes: Array,
warehouseList: Array,
cabinetList: Array,
shipmentObj: Object,
},
created() {
this.form = { ...this.shipmentObj };
if(this.form.destinationClearance && this.form.destinationClearance != 3){
this.form.destinationClearanceSelect = 1
}else{
this.form.destinationClearanceSelect = 3
}
this.getChannelList()
},
data() {
return {
// 表单参数
form: { },
channelList: [],
// 表单校验
rules: {
shippingChannelId: [
{ required: true, message: this.$t('出货渠道不能为空'), trigger: 'blur' }
],
startWarehouseId: [
{ required: true, message: this.$t('始发地不能为空'), trigger: 'blur' }
],
destWarehouseId: [
{ required: true, message: this.$t('目的地不能为空'), trigger: 'blur' }
]
}
};
},
watch:{
'form.destinationClearanceSelect'(){
if(!this.form.destinationClearance){
this.$set(this.form, 'destinationClearance', 1)
}
}
},
methods: {
getChannelList() {
getChannelList().then((res) => (this.channelList = res.data))
},
/*destinationClearanceSelect(val) {
this.$set(this.form,'destinationClearance',val)
},*/
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return
}
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('修改成功'))
this.$emit("closeDialog", "edit");
})
return
}
// 添加的提交
createbox(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('新增成功'))
this.$emit("closeDialog", "edit");
})
})
},
/** 取消按钮 */
cancel() {
this.$emit("closeDialog");
},
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
};
</script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
This diff is collapsed.
...@@ -88,10 +88,13 @@ ...@@ -88,10 +88,13 @@
{{row.orderReportNumber || 0}} {{row.orderReportNumber || 0}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已装柜方数')" align="center" prop="loadingNumber" > <el-table-column :label="$t('装柜或出仓方数')" align="center" prop="loadingNumber" >
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.loadingNumber || 0}} {{row.loadingNumber || 0}}
</template> </template>
</el-table-column>
<el-table-column label="装柜或出仓重量" prop="loadingWeight">
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -105,8 +108,8 @@ ...@@ -105,8 +108,8 @@
<div>{{row.hqNumber}}个40HQ</div> <div>{{row.hqNumber}}个40HQ</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('未来计划方数')" align="center" prop="futurePlanNumber" /> <el-table-column :label="$t('未来计划')" align="center" prop="futurePlanNumber" />
<el-table-column :label="$t('未来实际方数')" align="center" prop="actualNumber" /> <el-table-column :label="$t('未来实际')" align="center" prop="actualNumber" />
<el-table-column :label="$t('创建人')" align="center" prop="createName" /> <el-table-column :label="$t('创建人')" align="center" prop="createName" />
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -158,26 +161,29 @@ ...@@ -158,26 +161,29 @@
<el-form-item :label="$t('自单代报订单方数')"> <el-form-item :label="$t('自单代报订单方数')">
{{form.orderReportNumber}} m³ {{form.orderReportNumber}} m³
</el-form-item> </el-form-item>
<el-form-item :label="$t('已装柜方数')"> <el-form-item :label="$t('装柜或出仓方数')">
{{form.loadingNumber}} m³ {{form.loadingNumber}} m³
</el-form-item> </el-form-item>
<el-form-item :label="$t('装柜或出仓重量')">
{{form.loadingWeight}} kG
</el-form-item>
<el-form-item label=""> <el-form-item label="">
<div> <div>
{{$t('未来')}} <el-input v-model="form.futureNumber" class="w-100"></el-input> {{$t('天货柜数')}} {{$t('未来')}} <el-input v-model="form.futureNumber" class="w-100"></el-input> {{$t('天')}}
</div> </div>
<div class="mt-10"> <div v-if="form.transportType !== '3'" class="mt-10">
<el-input v-model="form.gpNumber" class="w-100" /> &times; 40GP <el-input v-model="form.gpNumber" class="w-100" /> &times; 40GP
<el-input v-model="form.hqNumber" class="w-100 ml-10" /> &times; 40HQ <el-input v-model="form.hqNumber" class="w-100 ml-10" /> &times; 40HQ
</div> </div>
<div class="mt-10"> <div class="mt-10">
{{$t('未来{futureNumber}天计划方数',{futureNumber: form.futureNumber})}}: {{$t('未来{futureNumber}天计划{unit}',{futureNumber: form.futureNumber,unit:form.transportType === '1' ? '立方' : '重量'})}}:
<el-input v-model="form.futurePlanNumber" class="w-100"></el-input> <el-input v-model="form.futurePlanNumber" class="w-100"></el-input> {{form.transportType === '1' ? 'm3' : 'kg'}}
</div> </div>
<div class="mt-10"> <div class="mt-10">
{{$t('未来{futureNumber}天实际方数',{futureNumber: form.futureNumber})}}: {{$t('未来{futureNumber}天实际{unit}',{futureNumber: form.futureNumber,unit:form.transportType === '1' ? '立方' : '重量'})}}:
<el-input v-model="form.actualNumber" class="w-100"></el-input> <el-input v-model="form.actualNumber" class="w-100"></el-input> {{form.transportType === '1' ? 'm3' : 'kg'}}
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -190,7 +196,21 @@ ...@@ -190,7 +196,21 @@
</template> </template>
<script> <script>
import { createFutureBox, updateFutureBox, deleteFutureBox, getFutureBox, getFutureBoxPage, exportFutureBoxExcel, getBoxedVolume, getToBeWareHousedVolume,getWareHousedVolume,getExceptionVolume, getOrderReportVolume,getWarehousingVolume} from "@/api/ecw/futureBox"; import {
createFutureBox,
updateFutureBox,
deleteFutureBox,
getFutureBox,
getFutureBoxPage,
exportFutureBoxExcel,
getBoxedVolume,
getToBeWareHousedVolume,
getWareHousedVolume,
getExceptionVolume,
getOrderReportVolume,
getWarehousingVolume,
getBoxedWeight
} from "@/api/ecw/futureBox";
import {getCabinetPage} from "@/api/ecw/cabinet"; import {getCabinetPage} from "@/api/ecw/cabinet";
import { getChannelList } from '@/api/ecw/channel'; import { getChannelList } from '@/api/ecw/channel';
import { getWarehouseList } from "@/api/ecw/warehouse" import { getWarehouseList } from "@/api/ecw/warehouse"
...@@ -310,7 +330,8 @@ export default { ...@@ -310,7 +330,8 @@ export default {
}) */ }) */
// 查询渠道 // 查询渠道
getChannelList().then((res) => (this.channelList = res.data)); getChannelList().then((res) => (
this.channelList = res.data));
/* this.transportTypes = this.getDictDatas( /* this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2"); */ ).filter((item) => item.value == "1" || item.value == "2"); */
...@@ -359,7 +380,7 @@ export default { ...@@ -359,7 +380,7 @@ export default {
objectiveId: this.form.destWarehouseId objectiveId: this.form.destWarehouseId
} }
// 空运才需要渠道 // 空运才需要渠道
if(data.transportId == 4){ if(data.transportId == 4 || data.transportId == 3){
data.channelId = this.form.shippingChannelId data.channelId = this.form.shippingChannelId
} }
// 获得已封柜方数 // 获得已封柜方数
...@@ -387,6 +408,10 @@ export default { ...@@ -387,6 +408,10 @@ export default {
getWarehousingVolume(data).then(res => { getWarehousingVolume(data).then(res => {
this.$set(this.form, 'warehousingNumber', res.data || 0) this.$set(this.form, 'warehousingNumber', res.data || 0)
}) })
// 获取装柜出货重量
getBoxedWeight(data).then(res =>{
this.$set(this.form,'loadingWeight', res.data || 0)
})
}, },
setDefaultVolume(){ setDefaultVolume(){
this.$set(this.form, 'loadingNumber', 0) this.$set(this.form, 'loadingNumber', 0)
...@@ -434,6 +459,7 @@ export default { ...@@ -434,6 +459,7 @@ export default {
actualNumber: undefined, actualNumber: undefined,
shippingChannelId: undefined, shippingChannelId: undefined,
status: undefined, status: undefined,
loadingWeight:undefined,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提单制作')" prop="ladingBillStatus"> <el-form-item :label="$t('提单制作')" prop="ladingBillStatus">
<el-select v-model="queryParams.ladingBillStatus" :placeholder="$t('请选择提单制作状态')" clearable size="small"> <el-select v-model="queryParams.ladingBillStatus" :placeholder="$t('请选择提单制作状态')" clearable size="small">
<el-option v-for="(item,index) in ladingBillStatusData" :key="index" :label="item" :value="index"> <el-option v-for="(item,index) in ladingBillStatusData" :key="index" :label="item" :value="index">
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
...@@ -119,6 +121,7 @@ ...@@ -119,6 +121,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('日期')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('日期')" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span> <span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span>
...@@ -210,7 +213,7 @@ import { ...@@ -210,7 +213,7 @@ import {
getbox, getbox,
getboxPage, getboxPage,
exportboxExcel, exportboxExcel,
getNoticeList, dealCustomsSplitNotify, getNoticeList, dealCustomsSplitNotify, exportPreloadGoodsList, zipDownload,
} from "@/api/ecw/box"; } from "@/api/ecw/box";
import { import {
downloadFile, downloadFile,
...@@ -284,7 +287,7 @@ export default { ...@@ -284,7 +287,7 @@ export default {
countryList: [], countryList: [],
// 通知列表 // 通知列表
noticeList: [], noticeList: [],
allUsers: [], allUsers: []
}; };
}, },
computed: { computed: {
...@@ -486,12 +489,13 @@ export default { ...@@ -486,12 +489,13 @@ export default {
break; break;
case "downloadPreloadGoodsList": case "downloadPreloadGoodsList":
downloadFile( // downloadFile(
command, // command,
{ shipmentId: row.id }, // { shipmentId: row.id },
this.$t("预装单") + `(${row.selfNo}).xlsx`, // this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx" // "xlsx"
); // );
this.exportExcel(exportPreloadGoodsList, { shipmentId: row.id }, this.$t("预装单") + `(${row.selfNo}).xlsx`)
break; break;
case "downloadLoadGoodsList": case "downloadLoadGoodsList":
downloadFile( downloadFile(
...@@ -510,12 +514,13 @@ export default { ...@@ -510,12 +514,13 @@ export default {
); );
break; break;
case "zipDownload": case "zipDownload":
downloadFile( /* downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t("提货单") + `(${row.selfNo}).zip`, this.$t("提货单") + `(${row.selfNo}).zip`,
"zip" "zip"
); );*/
this.exportExcel(zipDownload, { shipmentId: row.id }, this.$t("提货单") + `(${row.selfNo}).zip`)
break; break;
case "downloadAgentListFiles": case "downloadAgentListFiles":
case "downloadSoncapFiles": case "downloadSoncapFiles":
...@@ -544,6 +549,20 @@ export default { ...@@ -544,6 +549,20 @@ export default {
this.$set(this.dialogCfg, "open", true); this.$set(this.dialogCfg, "open", true);
} }
}, },
// 通用导出函数
exportExcel(func, params, fileName = null){
this.exportLoading = true;
func(params).then(res => {
console.log({res})
if(!fileName){
fileName = this.$t('订单')
}
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
// this.$download.excel(res, fileName + '.xls');
}).finally(() => {
this.exportLoading = false
})
},
/* 分页 */ /* 分页 */
pageChange(page) { pageChange(page) {
this.pageParam.page = page; this.pageParam.page = page;
......
...@@ -145,10 +145,10 @@ ...@@ -145,10 +145,10 @@
<editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" /> <editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'cost'"> <template v-if="dialogCfg.dialogType === 'cost'">
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" flag="seaAir" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" /> <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" flag="seaAir" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'"> <template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" /> <ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
......
This diff is collapsed.
...@@ -192,10 +192,10 @@ ...@@ -192,10 +192,10 @@
<editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" /> <editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template> </template>
<template v-if="dialogConfig.type === 'cost'"> <template v-if="dialogConfig.type === 'cost'">
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" /> <costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" flag="sea" />
</template> </template>
<template v-if="dialogConfig.type === 'error'"> <template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" /> <regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" flag="sea" />
</template> </template>
<template v-if="dialogConfig.type === 'updateError'"> <template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" /> <updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" />
...@@ -639,6 +639,11 @@ export default { ...@@ -639,6 +639,11 @@ export default {
} else { } else {
return getTotlContent(secStatistics); return getTotlContent(secStatistics);
} }
},
// 异常登记和费用登记用到的标识
flag(){
// 地址中有seaAir则表示海空联运,否则就是海运
return this.$route.fullPath.toLowerCase().indexOf('seaair') > -1 ? 'seaAir' : 'air'
} }
}, },
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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