Commit 3869d907 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents bf548869 3a057409
......@@ -40,26 +40,30 @@ const translateText = (text, fromLang = 'zh', toLang = 'en') => {
'Content-Length': querystring.stringify(params).length
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
try{
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)
});
});
res.on('end', () => {
console.log('翻译结果:', data);
resolve(JSON.parse(data).trans_result[0].dst)
req.on('error', (err) => {
console.error(err);
});
});
req.on('error', (err) => {
console.error(err);
});
req.write(querystring.stringify(params));
req.end();
}catch (e) {
console.log(text + " 翻译失败:" + e)
}
req.write(querystring.stringify(params));
req.end();
})
};
......@@ -96,10 +100,18 @@ 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 ++
try{
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
await new Promise(resolve => setTimeout(resolve, 1000))
......
......@@ -1023,3 +1023,12 @@ export function getParentOrder(orderId){
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,163 @@
"已下载": "Downloaded",
"待下载": "To be downloaded",
"重试": "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"
}
......@@ -30,6 +30,10 @@
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('业务编号')" prop="businessNo">
<el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编号')" clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......@@ -126,6 +130,7 @@ export default {
category: null,
status: null,
result: null,
}
};
},
......
......@@ -18,6 +18,10 @@
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"/>
</el-form-item>
<el-form-item :label="$t('业务编号')" prop="businessNo">
<el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编号')" clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......
......@@ -21,10 +21,10 @@
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"/>
</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
@keyup.enter.native="handleQuery"/>
</el-form-item> -->
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button>
......
......@@ -209,11 +209,11 @@
<script>
import {
deletebox,
getbox,
getboxPage,
exportboxExcel,
getNoticeList, dealCustomsSplitNotify, exportSeaPreloadGoodsList, zipDownload,
deletebox,
getbox,
getboxPage,
exportboxExcel,
getNoticeList, dealCustomsSplitNotify, exportSeaPreloadGoodsList, zipDownload, downloadLoadGoodsList,
} from "@/api/ecw/box";
import {
downloadFile,
......@@ -498,12 +498,9 @@ export default {
this.exportExcel(exportSeaPreloadGoodsList, { shipmentId: row.id }, this.$t("预装单") + `(${row.selfNo}).xlsx`)
break;
case "downloadLoadGoodsList":
downloadFile(
command,
{ shipmentId: row.id },
this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
downloadLoadGoodsList({ shipmentId: row.id }).then(res => {
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
break;
case "downloadReceivableList":
downloadFile(
......
......@@ -108,10 +108,15 @@
<script>
import {
getMakeBillList,
makeBillService,
getBillService,
deleteBillService, zipDownload, downloadReceivableList, makeAirBillService, downloadAirReceivableList,
getMakeBillList,
makeBillService,
getBillService,
deleteBillService,
zipDownload,
downloadReceivableList,
makeAirBillService,
downloadAirReceivableList,
downloadLoadGoodsList,
} from "@/api/ecw/box";
import {
getTotlContent,
......@@ -217,12 +222,15 @@ export default {
});
break;
case "downloadLoadGoodsList":
downloadFile(
downloadLoadGoodsList({ shipmentId: this.shipmentObj.id }).then(res => {
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
/*downloadFile(
type,
{ shipmentId: this.shipmentObj.id },
this.$t("已装单") + `(${this.shipmentObj.selfNo}).xlsx`,
"xlsx"
);
);*/
return;
case "downloadReceivableList":
const api = this.type == 'air' ? downloadAirReceivableList : downloadReceivableList;
......
......@@ -25,16 +25,6 @@
<el-button :disabled="shipmentObj.approvaling" size="small" type="primary" @click="()=>tallyClick('batch')">{{$t('批量理货')}}</el-button>
<el-button :disabled="shipmentObj.approvaling" size="small" type="primary" @click="()=>removeClick('batch')">{{$t('批量移出')}}</el-button>
</div>
<div v-if="false">
<template>
<el-input v-model="qrCode" :placeholder="$t('请输入二维码/条码编号')" clearable></el-input>
<el-button type="primary" @click="handlerBatchCreate('single')">{{$t('确定')}}</el-button>
<el-button type="primary" @click="handlerClick('batchInput',$t('批量输入'))">{{$t('批量输入')}}</el-button>
<el-button type="primary" @click="handlerClick('correction',$t('理货纠错'))">{{$t('理货纠错')}}</el-button>
<el-button type="primary" @click="handlerClick('correctionOrder',$t('批量理货纠错'))">{{$t('批量理货纠错')}}</el-button>
</template>
</div>
</el-row>
<el-row style="margin-top: 5px">
<el-table border :data="tallyList" @select="checkboxSelect" @select-all="checkboxSelect" max-height="600px">
......@@ -135,76 +125,6 @@
append-to-body
@cancel="currentTurnExceptionOrder=null"
@success="currentTurnExceptionOrder=null" />
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<!-- 装柜纠错 -->
<template v-if="dialogConfig.type === 'correction' && dialogConfig.dialogVisible">
<el-form ref="correctionForm" :rules="rules" :model="correctionObj" label-position="top">
<el-form-item :label="$t('装柜纠错(二维码/条形码编号)')" prop="qrCode">
<el-input v-model="correctionObj.qrCode" :placeholder="$t('请输入二维码/条形码编号')" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('correctionForm')">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row>
</template>
<!-- 批量装柜纠错(订单号) -->
<template v-if="dialogConfig.type === 'correctionOrder' && dialogConfig.dialogVisible">
<el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top">
<el-form-item :label="$t('装柜纠错') +'(' + $t('订单号') + ')'" prop="orderNo">
<el-input type="textarea" :rows="3" v-model="orderObj.orderNo" :placeholder="$t('请输入,多个以逗号分隔')" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('orderForm')">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row>
</template>
<!-- 装柜批量输入 -->
<template v-if="dialogConfig.type === 'batchInput' && dialogConfig.dialogVisible">
<el-form ref="batchForm" :rules="rules" :model="batchObj">
<el-form-item label="" prop="qrCode" class="two-element">
<el-input v-model="batchObj.qrCode" :placeholder="$t('请输入订单号')" clearable />
<el-button style="marginLeft:10px;" type="primary" @click="queryOrderInfo">{{$t('确定')}}</el-button>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('订单号')">
{{boxOrderInfo.orderNo}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('箱数')">
<el-input-number v-if="boxOrderInfo.isExternalWarehouse === 1" v-model="batchObj.boxNum" :min="0" :max="boxOrderInfo.num" />
<template v-else>
{{boxOrderInfo.num}}
</template>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('方数')">
{{getTotlContent(boxOrderInfo, ['volume'])}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('重量')">
{{getTotlContent(boxOrderInfo, ['weight'])}}
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row class="operate-button">
<el-button type="primary" :disabled="boxOrderInfo.orderId ? false : true" @click="batchLoad">{{$t('提交')}}</el-button>
<el-button @click="closeDialog2">{{$t('取消')}}</el-button>
</el-row>
</template>
</el-dialog>
</div>
</template>
......
......@@ -59,27 +59,14 @@
</el-select>
</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="resetQuery">{{$t('重置')}}</el-button>
<el-button @click="resetQuery">{{$t('重置')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportDetail" :loading="exportLoading" v-hasPermi="['ecw:achievement:export']">{{ $t('导出明细') }}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportStatistics" :loading="exportLoading" v-hasPermi="['ecw:achievement:export']">{{ $t('导出统计') }}</el-button>
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>{{$t('导出')}}</el-button> -->
</el-form-item>
</el-form>
<div class="total_num">
<span>{{ $t('开发客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span>
<span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div>
<total_num :total-data="totalData"></total_num>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
......@@ -145,10 +132,11 @@
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse'
import Total_num from "@/views/ecw/deptTarget/total_num.vue";
export default {
name: "EcwDepttargetAllachievement",
components: {},
components: {Total_num},
data() {
return {
// 遮罩层
......@@ -219,6 +207,12 @@
sumWeight:0,
sumVolume:0,
sumNum:0,
newTotalNum:0,
newTotalVolume:0,
newTotalWeight:0,
oldTotalNum:0,
oldTotalVolume:0,
oldTotalWeight:0,
},
myAchievementData:{},
warehouseList:[]
......@@ -313,6 +307,12 @@
this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
this.$set(this.totalData,'newTotalNum',this.myAchievementData.newTotalNum ||0 )
this.$set(this.totalData,'newTotalVolume',this.myAchievementData.newTotalVolume || 0 )
this.$set(this.totalData,'newTotalWeight',this.myAchievementData.newTotalWeight || 0)
this.$set(this.totalData,'oldTotalNum',this.myAchievementData.oldTotalNum || 0)
this.$set(this.totalData,'oldTotalVolume',this.myAchievementData.oldTotalVolume || 0 )
this.$set(this.totalData,'oldTotalWeight',this.myAchievementData.oldTotalWeight || 0)
this.loading = false;
});
},
......@@ -350,7 +350,11 @@
this.dateRangeCreateTime = [];
this.dateRangeStartTime = [];
this.dateRangeEndTime = [];
this.resetForm("queryForm");
this.resetForm("queryParams");
this.queryParams = {
pageNo: 1,
pageSize: 10
}
this.handleQuery();
},
/** 新增按钮操作 */
......@@ -481,10 +485,10 @@
// 执行导出
this.exportLoading = true;
exportDetailExcel(params).then(response => {
this.$download.excel(response, `${this.$t('业绩明细')}.xls`);
this.exportLoading = false;
}).catch(() => {
// this.$download.excel(response, `${this.$t('业绩明细')}.xls`);
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
}).finally(() => {
this.exportLoading = false;
});
},
/** 导出按钮操作 */
......@@ -516,7 +520,7 @@
.total_num{
display:flex;
align-items: center;
justify-content: center;
justify-content: left;
margin:20px 0;
font-size:15px;
}
......
......@@ -70,20 +70,7 @@
>{{$t('导出')}}</el-button> -->
</el-form-item>
</el-form>
<div class="total_num">
<span>{{ $t('开发客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span>
<span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div>
<total_num :total-data="totalData"></total_num>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
......@@ -147,10 +134,11 @@
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse'
import Total_num from "@/views/ecw/deptTarget/total_num.vue";
export default {
name: "EcwDepttargetMyachievement",
components: {},
components: {Total_num},
data() {
return {
// 遮罩层
......@@ -316,6 +304,12 @@
this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
this.$set(this.totalData,'newTotalNum',this.myAchievementData.newTotalNum ||0 )
this.$set(this.totalData,'newTotalVolume',this.myAchievementData.newTotalVolume || 0 )
this.$set(this.totalData,'newTotalWeight',this.myAchievementData.newTotalWeight || 0)
this.$set(this.totalData,'oldTotalNum',this.myAchievementData.oldTotalNum || 0)
this.$set(this.totalData,'oldTotalVolume',this.myAchievementData.oldTotalVolume || 0 )
this.$set(this.totalData,'oldTotalWeight',this.myAchievementData.oldTotalWeight || 0)
this.loading = false;
});
},
......
......@@ -69,20 +69,7 @@
>{{$t('导出')}}</el-button> -->
</el-form-item>
</el-form>
<div class="total_num">
<span>{{ $t('开发客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span>
<span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div>
<total_num :total-data="totalData" ></total_num>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
......@@ -147,10 +134,11 @@
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse'
import Total_num from "@/views/ecw/deptTarget/total_num.vue";
export default {
name: "EcwDepttargetMydeptachievement",
components: {},
components: {Total_num},
data() {
return {
// 遮罩层
......@@ -313,6 +301,12 @@
this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
this.$set(this.totalData,'newTotalNum',this.myAchievementData.newTotalNum ||0 )
this.$set(this.totalData,'newTotalVolume',this.myAchievementData.newTotalVolume || 0 )
this.$set(this.totalData,'newTotalWeight',this.myAchievementData.newTotalWeight || 0)
this.$set(this.totalData,'oldTotalNum',this.myAchievementData.oldTotalNum || 0)
this.$set(this.totalData,'oldTotalVolume',this.myAchievementData.oldTotalVolume || 0 )
this.$set(this.totalData,'oldTotalWeight',this.myAchievementData.oldTotalWeight || 0)
this.loading = false;
});
},
......@@ -491,14 +485,5 @@
<style scoped >
.total_num{
display:flex;
align-items: center;
justify-content: center;
margin:20px 0;
font-size:15px;
}
.total_num span{
margin: 0 8px;
}
</style>
<script>
export default {
name: "total_num",
props:{
totalData:{
type:Object,
default:()=>({})
}
}
}
</script>
<template>
<div>
<div class="total_num">
<span>{{ $t('新客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.newTotalNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.newTotalVolume}}</span>
<span>{{$t('总重量')}} {{totalData.newTotalWeight}}KG </span>
<span>{{ $t('旧客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.oldTotalNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.oldTotalVolume}}</span>
<span>{{$t('总重量')}} {{totalData.oldTotalWeight}}KG </span>
</div>
<div class="total_num">
<span>{{ $t('开发客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span>
<span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div>
</div>
</template>
<style scoped lang="scss">
.total_num{
display:flex;
align-items: center;
justify-content: left;
margin:20px 0;
font-size:15px;
}
.total_num span{
margin: 0 8px;
}
</style>
<template>
<el-dialog
:title="$t('选择订单商品')"
:visible.sync="visible"
append-to-body
width="90vw"
>
<el-table ref="multipleTable" :data="flatList" @selection-change="handleSelectionChange" :span-method="objectSpanMethod" class="table">
<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-column :label="$t('总箱数')" prop="cartonsNum"></el-table-column>
<el-table-column :label="$t('包装类型')" prop="specificationType">
<template #default="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('规格')" prop="boxGauge"></el-table-column>
<el-table-column :label="$t('总重量')" prop="weight"></el-table-column>
<el-table-column :label="$t('快递单号')" prop="expressNo"></el-table-column>
<el-table-column :label="$t('影像')" prop="quantityAll">
<template #default="{row}">
<el-button type="text" @click="curPictrues = row.pictureUrls">{{$t('查看影像')}}</el-button>
</template>
</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>
<media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog>
</el-dialog>
</template>
<script>
import {getOrderItemCommonAttr} from "@/api/ecw/order"
import MediaDialog from "@/views/ecw/order/stocking/components/MediaDialog.vue";
export default {
components: {MediaDialog},
props: {
orderId: {
type: Number,
default: undefined
},
warehouseInId:Number
},
data(){
return {
visible: true,
// 备选的商品明细
orderItemDetails: [],
multipleSelection:[],
curPictrues: null
}
},
watch:{
visible(val){
if (!val) {
this.$emit('close')
}
},
},
computed:{
flatList(){
let arr = []
this.orderItemDetails.forEach(item => {
item.orderWarehouseInCommonAttrVOList?.forEach((vo, index) => {
arr.push({...item, ...vo, index, span: index === 0 ? item.orderWarehouseInCommonAttrVOList?.length : 0})
})
})
return arr
}
},
async created() {
getOrderItemCommonAttr(this.orderId, this.warehouseInId || 0).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
},
objectSpanMethod({ row, column, rowIndex, columnIndex }){
if(columnIndex > 6){
return {
rowspan: row.span,
colspan: 1
}
}
return {
rowspan: 1,
colspan: 1
}
}
}
}
</script>
<style scoped lang="scss">
.table{
::v-deep{
th.el-table__cell.is-leaf, td.el-table__cell{
border-bottom: 1px solid #9b9b9b;
}
.el-checkbox__inner{
border:2px solid #9b9b9b;
}
}
}
</style>
......@@ -40,7 +40,7 @@ export default {
</script>
<template>
<el-dialog :visible.sync="show" :before-close="onBeforeClose">
<el-dialog :visible.sync="show" :before-close="onBeforeClose" append-to-body :title="$t('查看影像')">
<image-and-video-upload v-model="pictureUrls" readonly></image-and-video-upload>
</el-dialog>
</template>
<template>
<el-dialog
<el-dialog
:title="$t('添加新品名')"
:visible.sync="visible"
width="90vw"
......
......@@ -196,7 +196,12 @@
</el-table-column>
<el-table-column :label="$t('操作')">
<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
v-if="$index >= protectRowCount"
title="确定要删除该行记录吗?"
......@@ -469,7 +474,11 @@ export default {
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
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 => {
let bg = {}
if (e.boxGauge) {
......
......@@ -65,9 +65,15 @@
<el-button type="text" @click="showMedia(props.row)">{{$t('查看')}}</el-button>
</template>
</el-table-column>
<el-table-column prop="areaName" :label="$t(' ')" width="220px">
<el-table-column prop="areaName" width="220px">
<template v-slot="{row}">
<WarehouseRecordDetail v-model="row.orderWarehouseInDetailsVOList" @input="saveDetail(props.row)" />
<WarehouseRecordDetail
v-model="row.orderWarehouseInDetailsVOList"
@input="saveDetail(props.row)"
show-choose-order-item
:order-id="orderId"
:warehouse-in-id="row.id"
/>
<el-button class="pl-5 pr-5" size="mini" type="primary" @click="package(props.row, $t('修改打包'))">{{$t('修改')}}</el-button>
<el-button class="pl-5 pr-5" size="mini" type="danger" @click="package(props.row, $t('修改打包'))">{{$t('删除')}}</el-button>
</template>
......@@ -168,7 +174,9 @@
</template>
<el-button class="pl-5 pr-5" v-else size="mini" type="primary" @click="package(row, $t('修改打包'))">{{$t('修改打包')}}</el-button>
<el-button size="mini" type="danger" @click="rollback(row)">{{$t('退仓')}}</el-button>
<el-tooltip :content="$t('请确认货物打包完成再并箱')" :value="true" manual>
<el-button size="mini" type="danger" @click="rollback(row)">{{$t('并箱')}}</el-button>
</el-tooltip>
<el-button class="pl-5 pr-5" size="mini" type="info" @click="printTag">{{$t('打印标签')}}</el-button>
</el-button-group>
</template>
......@@ -491,9 +499,9 @@ export default {
this.$message.success(this.$t('操作成功'))
})
},
// 退仓
// 并箱
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({
orderId: this.orderId,
orderItemId: orderItem.orderItemId,
......
......@@ -783,7 +783,6 @@ export default {
|| this.warehousing.prodAttrIds?.split(',').map(e => +e)
|| []
}
this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh
......@@ -791,8 +790,10 @@ export default {
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls
this.form.usageIds = this.warehousing.usageIds?.split(',') || []
this.form.usageIds = this.warehousing.usageIds?this.warehousing.usageIds.split(',') : []
if (this.form.usageIds.length > 0 && this.form.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {}
if (e.boxGauge) {
......
......@@ -12,6 +12,13 @@
:visible.sync="dialogVisible"
width="1024px"
:before-close="handleClose">
<template v-slot:title>
<div class="flex flex-items-center">
<div class="title flex-1 flex flex-items-center">{{$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">
<WarehouseRecordDetailItem
......@@ -30,6 +37,12 @@
<el-button type="primary" @click="handleSave">确 定</el-button>
</span>
</el-dialog>
<choose-order-products
v-if="showChooseDialog"
:order-id="orderId"
:warehouse-in-id="warehouseInId"
@close="showChooseDialog=false"
@success="handleChooseOrderProducts"></choose-order-products>
</div>
</template>
......@@ -37,13 +50,15 @@
import ProductSelector from "@/components/ProductSelector/index.vue";
import WarehouseRecordDetailItem from "@/views/ecw/order/warehousing/components/WarehouseRecordDetailItem.vue";
import {getProductAttrList} from "@/api/ecw/productAttr";
import {getOrderItemCommonAttr} from "@/api/ecw/order";
import ChooseOrderProducts from "@/views/ecw/order/stocking/components/ChooseOrderProducts.vue";
/**
* 入仓明细弹窗
*/
export default {
name: 'WarehouseRecordDetail',
components: {WarehouseRecordDetailItem, ProductSelector},
components: {ChooseOrderProducts, WarehouseRecordDetailItem, ProductSelector},
props: {
value: {
......@@ -61,7 +76,11 @@ export default {
num:{
type:Number,
default:0
}
},
// 是否显示添加订单商品按钮
showChooseOrderItem:Boolean,
orderId: Number,
warehouseInId: Number
},
data() {
......@@ -69,7 +88,8 @@ export default {
dialogVisible: false,
dataList: [],
// 特性列表
attrList: []
attrList: [],
showChooseDialog: false
};
},
......@@ -158,6 +178,40 @@ export default {
}
this.$emit('input', this.dataList)
this.dialogVisible = false
},
handleShowChooseDialog(){
this.showChooseDialog = true
},
handleChooseOrderProducts(data){
this.showChooseDialog = false
if(!data?.length) return
// 如果最后一条是空的,则删除先
if(this.dataList?.length){
const index = this.dataList.length - 1
let lastItem = this.dataList[index]
if(!lastItem.prodId && !lastItem.brand && !lastItem.prodAttrIds && !lastItem.material && !lastItem.quantityAll){
this.dataList.splice(index, 1)
}
}
data.forEach(item => {
this.dataList.push({
"boxGauge": "",
"brand": item.brand,
"cartonsNum": undefined,
"createTime": "",
"expressNo": "",
"prodAttrIds": item.prodAttrIds,
"prodId": item.prodId,
"quantityAll": item.quantityAll,
"specificationType": undefined,
"unit": "",
"usageIds": item.usageIds || "",
"volume": undefined,
"weight": undefined,
"material": item.material
})
})
}
},
......@@ -173,5 +227,7 @@ export default {
</script>
<style scoped lang="scss">
.title{
font-size: 16px;
}
</style>
......@@ -153,17 +153,18 @@ export default {
}
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) {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e)
}
console.log(this.prodAttrIds)
if (this.value.usageIds) {
await this.$nextTick()
this.usageIds = this.value.usageIds.split(',') || []
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
}
if (this.value.boxGauge) {
......@@ -246,7 +247,23 @@ export default {
if (this.value.weight < 0) {
this.value.weight = -this.value.weight
}
}
},
'value.brand'(val){
if(!val) return
const index = this.brandList.findIndex(item => item.id == val)
getProductBrank(val).then(res => {
this.brandList.push(res.data)
})
},
"value.usageIds"(val) {
this.usageIds = val?.split(',') || []
if (this.usageIds.length > 0 && this.usageIds[0] === ''){
this.usageIds.splice(0, 1)
}
},
"value.material"(val) {
this.material = val
},
}
}
</script>
......
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