Commit abd127f1 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents b891f236 b871f627
...@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站 ...@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站
# 捷道管理系统/开发环境 # 捷道管理系统/开发环境
VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com' VUE_APP_BASE_API = 'https://apitest.groupage.cn'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
...@@ -18,4 +18,4 @@ VUE_APP_TENANT_ENABLE = false ...@@ -18,4 +18,4 @@ VUE_APP_TENANT_ENABLE = false
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true
# 百度统计 # 百度统计
VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
\ No newline at end of file
...@@ -40,26 +40,30 @@ const translateText = (text, fromLang = 'zh', toLang = 'en') => { ...@@ -40,26 +40,30 @@ const translateText = (text, fromLang = 'zh', toLang = 'en') => {
'Content-Length': querystring.stringify(params).length 'Content-Length': querystring.stringify(params).length
} }
}; };
try{
const req = https.request(options, (res) => { const req = https.request(options, (res) => {
let data = ''; let data = '';
res.on('data', (chunk) => { res.on('data', (chunk) => {
data += chunk; data += chunk;
});
res.on('end', () => {
console.log('翻译结果:', data);
resolve(JSON.parse(data).trans_result[0].dst)
});
}); });
res.on('end', () => { req.on('error', (err) => {
console.log('翻译结果:', data); console.error(err);
resolve(JSON.parse(data).trans_result[0].dst)
}); });
});
req.on('error', (err) => { req.write(querystring.stringify(params));
console.error(err); req.end();
}); }catch (e) {
console.log(text + " 翻译失败:" + e)
}
req.write(querystring.stringify(params));
req.end();
}) })
}; };
...@@ -96,10 +100,20 @@ async function translate(obj){ ...@@ -96,10 +100,20 @@ async function translate(obj){
// 对未翻译内容调用百度翻译进行翻译操作,有变量的不做处理 // 对未翻译内容调用百度翻译进行翻译操作,有变量的不做处理
for(let text in obj){ for(let text in obj){
if(obj[text] || text.includes('{'))continue if(obj[text] || text.includes('{'))continue
const textEn = await translateText(text) // 只有空格的不翻译
console.log(`${text} => ${textEn}\n`) if(text.trim() === '')continue
obj[text] = textEn try{
autoTransCnt ++ const textEn = await translateText(text)
console.log(`${text} => ${textEn}\n`)
obj[text] = textEn
autoTransCnt ++
// 每次翻译后保存一次,防止意外退出导致的数据丢失
fs.writeFileSync(savePath, JSON.stringify(obj, null, 4))
}catch (e) {
console.log(text + " 翻译失败:" + e)
}
// 账号请求频率限制1ps // 账号请求频率限制1ps
await new Promise(resolve => setTimeout(resolve, 1000)) await new Promise(resolve => setTimeout(resolve, 1000))
......
...@@ -1023,3 +1023,12 @@ export function getParentOrder(orderId){ ...@@ -1023,3 +1023,12 @@ export function getParentOrder(orderId){
method: 'get' method: 'get'
}) })
} }
// 获取订单入仓商品明细通用属性集合,用于备货选择订单商品到明细
export function getOrderItemCommonAttr(orderId, excludeOrderWarehouseInId){
return request({
url: '/order/order-warehouse-in/get-order-warehouse-in-common-attr-list',
method: 'get',
params: {orderId, excludeOrderWarehouseInId}
})
}
...@@ -4348,5 +4348,202 @@ ...@@ -4348,5 +4348,202 @@
"已下载": "Downloaded", "已下载": "Downloaded",
"待下载": "To be downloaded", "待下载": "To be downloaded",
"重试": "retry ", "重试": "retry ",
"会员详情": "Member Details" "会员详情": "Member Details",
"全部清除": "Clear All",
"确定要全部清除么?": "Are you sure you want to clear all?",
"已选择{n}条路线": "{n} routes have been selected",
"清关费加价": "Customs clearance fee markup",
"撤销理由": "Reason for revocation",
"我司承接": "Our company undertakes",
"客户自清": "Customer self clearance",
"请选择目的港清关": "Please select the destination port for customs clearance",
"请选择发货方式": "Please select the shipping method",
"方数(分拣/已装)": "Quantity (sorted/loaded)",
"重量(分拣/已装)": "Weight (sorted/loaded)",
"起飞时间": "Takeoff time",
"此出货单状态未到提单节点": "This shipment status has not arrived at the bill of lading node",
"刷新成功": "Refresh successful",
"更新所选订单到港状态": "Update selected order arrival status",
"更新全部订单到港状态": "Update all order arrival status",
"更新所选订单清关状态": "Update the customs clearance status of the selected order",
"更新全部订单清关状态": "Update the customs clearance status of all orders",
"撤销清关申请": "Revoke customs clearance application",
"更新起飞异常状态": "Update takeoff abnormal status",
"操作步骤必填": "Operation steps are mandatory",
"票异常必填": "Ticket Exception Required",
"是否更新订单动态": "Update order dynamics",
"到港情况": "Arrival situation",
"一次到港": "One arrival at the port",
"多次到港": "Multiple arrivals to the port",
"已到港订单": "Orders that have arrived at the port",
"关键字:": "Keywords:",
"请输入订单号、提单号、唛头": "Please enter the order number, bill of lading number, and shipping mark",
"到港状态": "Arrival status",
"未到港": "Not arrived at the port",
"批量选择": "Batch selection",
"控货中": "In control of goods",
"已放完货": "The goods have been released completely",
"部分控货": "Partial control of goods",
"请先选择订单": "Please select the order first",
"订舱代理": "Booking Agent",
"请选择订舱代理": "Please select a booking agent",
"出仓箱数": "Number of outgoing boxes",
"出仓件数与计划出仓件数不一致,请检查": "The number of outgoing items does not match the planned number of outgoing items. Please check",
"清关情况": "Customs clearance situation",
"一次清关": "One customs clearance",
"多次清关": "Multiple customs clearances",
"已清关订单": "Customs cleared orders",
"已清关": "Customs cleared",
"封箱标签": "Sealing label",
"长度保留两位小数": "Length to two decimal places",
"cm": "Cm",
"宽度保留两位小数": "Width to two decimal places",
"高度保留两位小数": "Height to two decimal places",
"全部分拣": "Sort All",
"分拣柜": "Sorting cabinet",
"泡货比": "Bubble ratio",
"(混箱)": "(Mixed box)",
"箱明细": "Box details",
"理货纠错": "Tallying correction",
"批量理货纠错": "Batch tally correction",
"预计二程起飞时间": "Estimated departure time for the second leg",
"请先通过完成到仓审核": "Please complete the warehouse audit first",
"提交完成到仓审核": "Submit for warehouse review upon completion",
"到仓审核中": "In warehouse review",
"请选择到仓时间": "Please select the time of arrival at the warehouse",
"确认到仓?": "Confirmed to warehouse?",
"存在未到港或未清关的订单": "There are orders that have not arrived at the port or have not been cleared through customs",
"请先完成到港操作": "Please complete the arrival operation first",
"空运-分拣": "Air freight - sorting",
"到仓反审": "Reverse review upon arrival at the warehouse",
"确定移除货物吗?": "Are you sure to remove the goods?",
"空运订单重量上限": "Air freight order weight limit",
"空运清关费": "Air freight customs clearance fee",
"已发布,投放中": "Released, in the process of deployment",
"取消投放": "Cancel placement",
"投放": "Advertising",
"1天内过期": "Expires within 1 day",
"还有{days}天到期": "Due in {days} days",
"请选择客户经理。": "Please select an account manager.",
"回收客户": "Recycling customers",
"是否要回收当前{name}": "",
"回收成功。": "Recycling successful.",
"已完成目标值": "Target value completed",
"请输入目标单位": "Please enter the target unit",
"新客户:": "New customers:",
"旧客户:": "Old customers:",
"清关费未报价": "Unquoted customs clearance fee",
"原泡重": "Original foam weight",
"新泡重": "New foam weight",
"用途": "purpose",
"混箱": "Mixed box",
"打包前入仓影像": "Pre packaging warehouse image",
"打包后入仓影像": "Packaging and warehousing images",
"暂无影像": "No images available at the moment",
"提单是否显示价格": "Does the bill of lading display the price",
"核销比例": "Verification ratio",
"是指由发货人与收货人约定在货物的国际运输过程中,我司作为第三方对该货物货权的控制;需由发货人授权我司放货的情况下收货人才能提取该票货物的一种交易方式": "It refers to the agreement between the shipper and the consignee that our company, as a third party, controls the ownership of the goods during international transportation; A transaction method in which the consignee can only retrieve the goods on the bill of lading if the shipper authorizes our company to release the goods",
"我司全代 : 该货物的出口手续由我司代为办理 ; 自单代报: 该货物由发货人提供相关出口单证并委托我司代为办理 ;混单代报该货物有以上两种情况出现": "Our company will handle the export procedures for the goods on our behalf; Self declaration: The shipper shall provide relevant export documents for the goods and entrust our company to handle them on their behalf; There are two situations where the goods are mixed and reported on behalf of others",
"如需我司打包,请勾选相应选项,费用付款人及打包要求可备注补充": "If you need our company to package, please check the corresponding option. The payer and packaging requirements can be noted and supplemented",
"不可出": "Unable to leave",
"确定设置订单{orderNo}不可出么?": "Are you sure you want to set the order {orderNo} not to be issued?",
"预计运费/清关费": "Estimated freight/customs clearance fee",
"处理备注": "Processing remarks",
"详细说明": "elaborate on",
"注意:收款后无法修改备货信息,请先联系仓库确认订单备货完成": "Attention: After receiving payment, the stocking information cannot be modified. Please contact the warehouse first to confirm that the order stocking is completed",
"货值三分之一占运费和清关费总和比例": "The proportion of one-third of the value of goods to the total freight and customs clearance fees",
"渠道包装超限品名列表": "List of Channel Packaging Overlimit Product Names",
"重量超限改价审核中": "Weight exceeding limit and price change review in progress",
"取消重量超限改价审核": "Cancel weight limit and price change review",
"请输入空运订单上限": "Please enter the upper limit for air freight orders",
"请先去设置运费或清关费本身的货币单位、计价单位": "Please first set the currency unit and pricing unit for the shipping or customs clearance fees themselves",
"选择订单商品": "Select order items",
"添加新商品": "Add new product",
"影像": "image",
"请确认货物打包完成再并箱": "Please confirm that the goods have been packed and then combined into boxes",
"并箱": "Combined box",
"并箱后不可恢复,是否确认并箱?": "After merging, it cannot be restored. Are you sure to merge?",
"新建订单成功": "New order successfully created",
"您的订舱号": "Your booking number",
"复制订单信息": "Copy order information",
"复制成功": "Copy successful",
"复制失败": "copy failed",
"此阶梯未设置阶梯和价格,将会被忽略": "This ladder has no ladder or price set and will be ignored",
"此阶梯价信息设置不完整": "This tiered pricing information setting is incomplete",
"第{steps}阶梯设置不完整": "The {steps} step setting is incomplete",
"已选择{route}条路线,{product}个商品;确认提交修改?": "{route} selected, {product} products; Confirm submitting modifications?",
"是否含阶梯价": "Does it include tiered pricing",
"*针对所有价格减价": "*Reduce prices for all items",
"商品清关费价格": "Price of customs clearance fee for goods",
"未设置清关费": "No customs clearance fee set",
"已选择{route}条路线,确认提交?": "{route} has been selected, confirm submission?",
"缺少阶梯价格设置": "Lack of tiered pricing settings",
"单询": "Single inquiry",
"复制模板": "Copy Template",
"取消单询": "Cancel single inquiry",
"单询异常": "Single inquiry exception",
"海运订单国家代码-海运订单城市代码-空运订单国家代码-空运自编号国家代码,没有可填0-": "Sea freight order country code - Sea freight order city code - Air freight order country code - Air freight self number country code, no 0 can be filled in-",
"海运目的国家简称-海运目的城市简称-空运订单编号目的国家简称-空运自编号目的国简称,\\n注意:如果没有海运业务的城市设置,请将海运目的国家简称-海运目的城市简称设置为->0-0,前置的参数不能为空": "Shipping Destination Country Abbreviation - Shipping Destination City Abbreviation - Air Transport Order Number Destination Country Abbreviation - Air Transport Self numbered Destination Country Abbreviation. \\ n Note: If there is no city setting for shipping business, please set the Shipping Destination Country Abbreviation - Shipping Destination City Abbreviation to ->0-0, and the preceding parameters cannot be empty",
"空运发件人": "Airfreight sender",
"空运发件人英文": "Air freight sender in English",
"空运发件公司地址": "Air freight shipping company address",
"空运发件公司地址英文": "Air freight shipping company address in English",
"空运收货人": "Air freight consignee",
"空运收货人英文": "Air freight consignee in English",
"空运收货地址": "Air freight delivery address",
"空运收货地址英文": "Air freight delivery address in English",
"代码不能为空": "Code cannot be empty",
"保函证书": "Letter of Guarantee Certificate",
"公司信息": "Company Information",
"会员编号": "Member ID",
"会员昵称": "Member nickname",
"绑定邮箱": "Bind email",
"生日": "birthday",
"上次登录": "Last login",
"档口": "Gear opening",
"公司简介": "Company Introduction",
"认证信息": "Certification information",
"企业": "enterprise",
"身份证认证状态": "Identity card authentication status",
"角标字段": "Subscript field",
"不清楚请留空,已设勿改": "Unclear, please leave blank. It has been set to remain unchanged",
"出仓纠错": "Out of warehouse correction",
"批量出仓纠错": "Batch outbound error correction",
"未出仓": "Not yet out of warehouse",
"出仓纠错(二维码/条形码编号)": "Out of warehouse correction (QR code/barcode number)",
"开始出仓": "Start warehouse release",
"装箱纠错": "Packing error correction",
"批量装箱纠错": "Batch packing error correction",
"计划/已装": "Planned/Installed",
"计划/已理": "Planned/Planned",
"已理": "Reasonable",
"未理": "Unreasoned",
"理货纠错(二维码/条形码编号)": "Correction of tally errors (QR code/barcode number)",
"仍有订单未理货,请完成所有订单箱号标签扫码后完成理货": "There are still orders that have not been tally. Please scan all order box number labels and complete the tally",
"所属目的国家": "Destination country",
" ": "",
"区间设置不完整,将被忽略": "Incomplete interval settings will be ignored",
"{n}个全包阶梯价": "",
"{n}个运费阶梯价": "",
"{n}个清关费阶梯价": "",
"已选择{route}条路线,{product}个商品": "",
";确认提交修改?": "; Confirm submitting modifications?",
"空运{type}设置": "",
"未选择包装类型将被忽略": "No packaging type selected will be ignored",
"请输入加价金额": "Please enter the markup amount",
"运费快捷加价": "Quick freight markup",
"提交运费": "Submit shipping fee",
"清关费快捷加价": "Quick increase in customs clearance fees",
"提交清关费": "Submit customs clearance fee",
"全包价快捷加价": "Quick and all inclusive price increase",
"提交全包价": "Submit full package price",
"第{no}阶段": "",
"线路重量上限": "Upper limit of line weight",
"包含": "contain",
"不包含": "Excluding",
"等于": "equal to",
"运费+清关费": "Freight+customs clearance fee",
"未设置全包价阶梯价": "No fully inclusive tiered pricing has been set",
"未设置运费阶梯价": "No freight tiered pricing has been set",
"渠道包装清关费": "Channel packaging customs clearance fee"
} }
...@@ -466,6 +466,12 @@ export default { ...@@ -466,6 +466,12 @@ export default {
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath
}, },
// 线路重量超限
line_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()]
......
...@@ -485,10 +485,10 @@ ...@@ -485,10 +485,10 @@
// 执行导出 // 执行导出
this.exportLoading = true; this.exportLoading = true;
exportDetailExcel(params).then(response => { exportDetailExcel(params).then(response => {
this.$download.excel(response, `${this.$t('业绩明细')}.xls`); // this.$download.excel(response, `${this.$t('业绩明细')}.xls`);
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
this.exportLoading = false; }).finally(() => {
}).catch(() => { this.exportLoading = false;
}); });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
......
...@@ -896,13 +896,20 @@ export default { ...@@ -896,13 +896,20 @@ export default {
} }
}, },
// 目的地 // 目的地
'form.objectiveId'(objectiveId, oldObjectiveId){ async 'form.objectiveId'(objectiveId, oldObjectiveId){
this.getOpenedRouterList() // 重新获取路线
// 修改目的地后需要重新选择路线 await this.getOpenedRouterList()
if(oldObjectiveId && oldObjectiveId != objectiveId && !this.initing){ // 如果已选择的路线不在可用路线里则重置
console.log('修改目的地,重置lineId', oldObjectiveId, objectiveId) if(this.form.lineId && !this.routerList.find(item => item.id == this.form.lineId)){
this.$set(this.form, 'lineId', null) this.$set(this.form, 'lineId', null)
} }
// 重新获取渠道
await this.getChannelList()
// 如果已选择的渠道不在可用渠道里则重置
if(this.form.channelId && !this.channelList.find(item => item.channelId == this.form.channelId)){
this.$set(this.form, 'channelId', null)
}
}, },
'form.transportId'(transportId, oldTransportId){ 'form.transportId'(transportId, oldTransportId){
// 空运 // 空运
...@@ -941,11 +948,19 @@ export default { ...@@ -941,11 +948,19 @@ export default {
if(this.form.lineId) this.getOfferData() if(this.form.lineId) this.getOfferData()
// 选择渠道后需要筛选目的城市和线路 // 选择渠道后需要筛选目的城市和线路
// 有点卡,改异步 // 有点卡,改异步
this.$nextTick(() => { this.$nextTick(async () => {
// 更新目的城市备选 // 更新目的城市备选
this.getTradeCity() await this.getTradeCity()
// 如果已选择城市,在切换后不可用则重置
if(this.form.objectiveId && !this.importList.find(item => item.id == this.form.objectiveId)){
this.$set(this.form, 'objectiveId', null)
}
// 更新线路备选 // 更新线路备选
this.getOpenedRouterList() await this.getOpenedRouterList()
// 如果已选择路线且切换后原路线不可用则重置
if(this.form.lineId && !this.routerList.find(item => item.id == this.form.lineId)){
this.$set(this.form, 'lineId', null)
}
}) })
}, },
'form.consigneeCountryCode'(){ 'form.consigneeCountryCode'(){
...@@ -1093,7 +1108,7 @@ export default { ...@@ -1093,7 +1108,7 @@ export default {
}) })
this.productAttrList = (await getProductAttrList()).data this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data await this.getChannelList()
await this.getTradeCity() await this.getTradeCity()
this.currencyList = (await getCurrencyList()).data this.currencyList = (await getCurrencyList()).data
this.unitList = (await getUnitList()).data this.unitList = (await getUnitList()).data
...@@ -1125,6 +1140,12 @@ export default { ...@@ -1125,6 +1140,12 @@ export default {
} }
this.tradeCityList = (await getTradeCityList(query)).data this.tradeCityList = (await getTradeCityList(query)).data
}, },
async getChannelList(){
let query = {
cityId: this.form.objectiveId
}
this.channelList = (await getChannelList(query)).data
},
onTableMounted(e){ onTableMounted(e){
// console.warn('onTableMounted', e) // console.warn('onTableMounted', e)
}, },
......
...@@ -288,10 +288,10 @@ export default { ...@@ -288,10 +288,10 @@ export default {
if(row.orderItemId){ if(row.orderItemId){
var productData = this.orderData.orderItemVOList.find(item=>item.orderItemId==row.orderItemId) var productData = this.orderData.orderItemVOList.find(item=>item.orderItemId==row.orderItemId)
if(productData){ if(productData){
if(row.orderExceptionType=='customs_fee_not_quote_exception'&&productData.prodId){ // if(row.orderExceptionType=='customs_fee_not_quote_exception'&&productData.prodId){
this.$router.push('/product/product-list?prodId=' + productData.prodId) // this.$router.push('/product/product-list?prodId=' + productData.prodId)
return // return
}else{ // }else{
getProduct(productData.prodId).then(res=>{ getProduct(productData.prodId).then(res=>{
let params = { let params = {
product_id: productData.prodId, product_id: productData.prodId,
...@@ -334,7 +334,7 @@ export default { ...@@ -334,7 +334,7 @@ export default {
+'&exportCity='+this.orderData.logisticsInfoDto.startCityId+'&importCity='+this.orderData.logisticsInfoDto.destCityId */ +'&exportCity='+this.orderData.logisticsInfoDto.startCityId+'&importCity='+this.orderData.logisticsInfoDto.destCityId */
}) })
} // }
} }
}else{ }else{
return this.$confirm(this.$t('数据缺少orderItemId参数,确定要跳转设置路线价格么?')).then(res => { return this.$confirm(this.$t('数据缺少orderItemId参数,确定要跳转设置路线价格么?')).then(res => {
......
<template>
<el-dialog
:title="$t('选择订单商品')"
:visible.sync="visible"
append-to-body
width="90vw"
>
<el-table ref="multipleTable" :data="orderItemDetails" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column :label="$t('品名')" prop="name">
<template #default="{row}">{{$l(row, "prodName")}}</template>
</el-table-column>
<el-table-column :label="$t('品牌')" prop="brand">
<template #default="{row}">{{$l(row, "brandName")}}</template>
</el-table-column>
<el-table-column :label="$t('材质')" prop="material">
<template #default="{row}">{{$l(row, "materialLabel")}}</template>
</el-table-column>
<el-table-column :label="$t('商品特性')" prop="attr">
<template #default="{row}">{{$l(row, "prodAttrNames")}}</template>
</el-table-column>
<el-table-column :label="$t('用途')" prop="unit">
<template #default="{row}">{{$l(row, "usageNames")}}</template>
</el-table-column>
<el-table-column :label="$t('数量')" prop="quantityAll"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSubmit">{{$t('确定')}}</el-button>
<el-button @click="handleClose">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</template>
<script>
import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBrank"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {finishPacked, getOrderItemCommonAttr, orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
import Template from "@/views/cms/template/index.vue";
export default {
props: {
orderId: {
type: Number,
default: undefined
},
warehouseInId:Number
},
data(){
return {
visible: true,
// 备选的商品明细
orderItemDetails: [],
multipleSelection:[]
}
},
watch:{
visible(val){
if (!val) {
this.$emit('close')
}
},
},
async created() {
getOrderItemCommonAttr(this.orderId, this.warehouseInId).then(res => {
this.orderItemDetails = res.data
})
},
methods: {
handleSelectionChange(e){
console.log("handleSelectionChange", e)
this.multipleSelection = e
},
handleSubmit(){
// 品名+品牌+材质+商品特性+用途一致的会合并,数量累加
// https://zentao.test.jdshangmen.com/task-view-3423.html
let arr = []
this.multipleSelection.forEach(item => {
let index = arr.findIndex(i => {
return i.prodId == item.prodId && i.brand == item.brand && i.material == item.material && i.prodAttrIds == item.prodAttrIds && i.usageIds == item.usageIds
})
if (index == -1) {
arr.push({...item})
} else {
arr[index].quantityAll += item.quantityAll
}
})
this.$emit("success", arr)
},
handleClose() {
this.visible = false
}
}
}
</script>
<style scoped>
</style>
...@@ -196,7 +196,12 @@ ...@@ -196,7 +196,12 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}"> <template v-slot="{ row, column, $index}">
<WarehouseRecordDetail v-model="form.table[$index].orderWarehouseInDetailsVOList" /> <WarehouseRecordDetail
v-model="form.table[$index].orderWarehouseInDetailsVOList"
show-choose-order-item
:order-id="order.orderId"
:warehouse-in-id="row.id"
/>
<el-popconfirm <el-popconfirm
v-if="$index >= protectRowCount" v-if="$index >= protectRowCount"
title="确定要删除该行记录吗?" title="确定要删除该行记录吗?"
...@@ -469,7 +474,11 @@ export default { ...@@ -469,7 +474,11 @@ export default {
this.form.type = this.warehousing.type this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType this.form.feeType = this.warehousing.feeType
this.form.usageIds = this.warehousing.usageIds?.split(',') this.form.usageIds = this.warehousing.usageIds?.split(',')
/* 下面的代码产生异常,且目的不明,先注释掉
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
*/
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => { this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {} let bg = {}
if (e.boxGauge) { if (e.boxGauge) {
......
...@@ -491,9 +491,9 @@ export default { ...@@ -491,9 +491,9 @@ export default {
this.$message.success(this.$t('操作成功')) this.$message.success(this.$t('操作成功'))
}) })
}, },
// 退仓 // 并箱
async rollback(orderItem){ async rollback(orderItem){
this.$confirm(this.$l(orderItem, 'prodTitle') + this.$t("退仓后不可恢复,是否确认退仓"), this.$t('提示')).then(() => { this.$confirm(this.$l(orderItem, 'prodTitle') + this.$t("并箱后不可恢复,是否确认并箱"), this.$t('提示')).then(() => {
return rollbackDelete({ return rollbackDelete({
orderId: this.orderId, orderId: this.orderId,
orderItemId: orderItem.orderItemId, orderItemId: orderItem.orderItemId,
......
...@@ -12,6 +12,13 @@ ...@@ -12,6 +12,13 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="1024px" width="1024px"
:before-close="handleClose"> :before-close="handleClose">
<template v-slot:title>
<div class="flex flex-items-center">
<div class="title flex-1 flex flex-items-center">{{$t('选择订单商品')}}</div>
<el-button v-if="showChooseOrderItem" type="primary" size="mini" @click="handleShowChooseDialog">选择订单商品</el-button>
<div style="width: 100px"><!--占位,防止被关闭按钮挡住--></div>
</div>
</template>
<el-form v-if="dialogVisible"> <el-form v-if="dialogVisible">
<WarehouseRecordDetailItem <WarehouseRecordDetailItem
...@@ -30,6 +37,12 @@ ...@@ -30,6 +37,12 @@
<el-button type="primary" @click="handleSave">确 定</el-button> <el-button type="primary" @click="handleSave">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<choose-order-products
v-if="showChooseDialog"
:order-id="orderId"
:warehouse-in-id="warehouseInId"
@close="showChooseDialog=false"
@success="handleChooseOrderProducts"></choose-order-products>
</div> </div>
</template> </template>
...@@ -37,13 +50,15 @@ ...@@ -37,13 +50,15 @@
import ProductSelector from "@/components/ProductSelector/index.vue"; import ProductSelector from "@/components/ProductSelector/index.vue";
import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue"; import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue";
import {getProductAttrList} from "@/api/ecw/productAttr"; import {getProductAttrList} from "@/api/ecw/productAttr";
import {getOrderItemCommonAttr} from "@/api/ecw/order";
import ChooseOrderProducts from "@/views/ecw/order/stocking/components/ChooseOrderProducts.vue";
/** /**
* 入仓明细弹窗 * 入仓明细弹窗
*/ */
export default { export default {
name: 'WarehouseRecordDetail', name: 'WarehouseRecordDetail',
components: {WarehouseRecordDetailItem, ProductSelector}, components: {ChooseOrderProducts, WarehouseRecordDetailItem, ProductSelector},
props: { props: {
value: { value: {
...@@ -61,7 +76,11 @@ export default { ...@@ -61,7 +76,11 @@ export default {
num:{ num:{
type:Number, type:Number,
default:0 default:0
} },
// 是否显示添加订单商品按钮
showChooseOrderItem:Boolean,
orderId: Number,
warehouseInId: Number
}, },
data() { data() {
...@@ -69,7 +88,8 @@ export default { ...@@ -69,7 +88,8 @@ export default {
dialogVisible: false, dialogVisible: false,
dataList: [], dataList: [],
// 特性列表 // 特性列表
attrList: [] attrList: [],
showChooseDialog: false
}; };
}, },
...@@ -158,6 +178,40 @@ export default { ...@@ -158,6 +178,40 @@ export default {
} }
this.$emit('input', this.dataList) this.$emit('input', this.dataList)
this.dialogVisible = false this.dialogVisible = false
},
handleShowChooseDialog(){
this.showChooseDialog = true
},
handleChooseOrderProducts(data){
this.showChooseDialog = false
if(!data?.length) return
// 如果最后一条是空的,则删除先
if(this.dataList?.length){
const index = this.dataList.length - 1
let lastItem = this.dataList[index]
if(!lastItem.prodId && !lastItem.brand && !lastItem.prodAttrIds && !lastItem.material && !lastItem.quantityAll){
this.dataList.splice(index, 1)
}
}
data.forEach(item => {
this.dataList.push({
"boxGauge": "",
"brand": item.brand,
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": item.prodAttrIds,
"prodId": item.prodId,
"quantityAll": item.quantityAll,
"specificationType": undefined,
"unit": "",
"usageIds": item.usageIds || "",
"volume": undefined,
"weight": undefined,
"material": item.material
})
})
} }
}, },
...@@ -173,5 +227,7 @@ export default { ...@@ -173,5 +227,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.title{
font-size: 16px;
}
</style> </style>
...@@ -153,16 +153,14 @@ export default { ...@@ -153,16 +153,14 @@ export default {
} }
if(this.value.material){ if(this.value.material){
this.material = this.value.material this.$set(this, 'material', this.value.material)
} }
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) { if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e) this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e)
} }
console.log(this.prodAttrIds)
if (this.value.usageIds) { if (this.value.usageIds) {
await this.$nextTick()
this.usageIds = this.value.usageIds.split(',') || [] this.usageIds = this.value.usageIds.split(',') || []
} }
...@@ -246,7 +244,23 @@ export default { ...@@ -246,7 +244,23 @@ export default {
if (this.value.weight < 0) { if (this.value.weight < 0) {
this.value.weight = -this.value.weight this.value.weight = -this.value.weight
} }
} },
'value.brand'(val){
if(!val) return
const index = this.brandList.findIndex(item => item.id == val)
getProductBrank(val).then(res => {
this.brandList.push(res.data)
})
},
"value.usageIds"(val) {
this.usageIds = val?.split(',') || []
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
},
"value.material"(val) {
this.material = val
},
} }
} }
</script> </script>
......
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