Commit 403dc8f5 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/release2.2new' into release2.2new

parents 68fc6c96 c69474fe
......@@ -136,7 +136,8 @@ export default {
border-top: 1px solid gray;
font-size: 14px;
line-height: 25px;
grid-template-columns: repeat(2, 1fr);
word-wrap: break-word;
grid-template-columns: repeat(2, 100px);
> p:first-child {
border-right: 1px solid gray;
}
......
......@@ -310,7 +310,7 @@
<el-descriptions :column="5" border>
<el-descriptions-item :label="$t('保价费')">
{{fee.insuranceFee || 0}} {{$t('美元')}}
{{fee.insuranceFee || 0}} {{ selectedRouter ? currencyMap[selectedRouter.currencyUnit || 1] : '' }}
</el-descriptions-item>
<el-descriptions-item :label="$t('总运费')">
<template v-for="item in freightFeeList">
......@@ -730,8 +730,6 @@ export default {
// 预计费用(原价 - 优惠金额 + 其他费用 + 保价费)
estimatedCosts(){
let arr = []
let withInsuranceFee = false
let withOtherFee = false
this.originalFeeList.forEach(item => {
let it = {
currencyId: item.currencyId,
......@@ -741,50 +739,31 @@ export default {
if(coupon){
it.amount = it.amount.minus(coupon.reduceTotalAmount)
}
if(this.form.otherFee && this.form.otherFeeCurrencyId == item.currencyId){
it.amount = it.amount.plus(this.form.otherFee)
withOtherFee = true
}
// 保价费(美元)
if(item.currencyId == 1 && this.fee && this.fee.insuranceFee){
it.amount = it.amount.plus(this.fee.insuranceFee)
withInsuranceFee = true
}
arr.push(it)
})
// 没有累加保价费(没有美元计价)但是有保价费则需要加上去
if(!withInsuranceFee && this.fee && this.fee.insuranceFee){
let fee = Decimal(this.fee.insuranceFee)
// 如果没有美元费用,且保价费和其他费用币种相同(都是美元)
if(this.form.otherFeeCurrencyId == 1 && this.form.otherFee){
withOtherFee = true
fee = fee.plus(new Decimal(this.form.otherFee || 0))
}
// 累加保价费
const insuranceFeeIndex = arr.findIndex(item => item.currencyId == this.insuranceFeeCurrency)
if(insuranceFeeIndex > -1){
arr[insuranceFeeIndex].amount = arr[insuranceFeeIndex].amount.plus(this.fee.insuranceFee || 0)
}else{
arr.push({
currencyId: 1,
amount: fee
currencyId: this.insuranceFeeCurrency,
amount: Decimal(this.fee.insuranceFee || 0)
})
}
// 如果没有累加其他费用,则另外增加货币
if(!withOtherFee && this.form.otherFee){
let fee = {
// 累加其他费用
const otherFeeIndex = arr.findIndex(item => item.currencyId == this.form.otherFeeCurrencyId)
if(otherFeeIndex > -1){
arr[otherFeeIndex].amount = arr[otherFeeIndex].amount.plus(this.form.otherFee || 0)
}else{
arr.push({
currencyId: this.form.otherFeeCurrencyId,
amount: Decimal(this.form.otherFee)
}
// 如果保价费跟其他费用是同一种货币(都是美元)
if(!withInsuranceFee && this.fee && this.fee.insuranceFee && this.form.otherFeeCurrencyId == 1){
fee.amount = fee.amount.plus(this.fee.insuranceFee)
}
arr.push(fee)
amount: Decimal(this.form.otherFee || 0)
})
}
return arr
},
// 路线开通的服务
......@@ -792,6 +771,10 @@ export default {
if(!this.selectedRouter || !this.selectedRouter.otherService) return []
return this.selectedRouter.otherService.split(',')
},
// 保价费单位(路线里设置,默认美元)
insuranceFeeCurrency() {
return this.selectedRouter?.currencyUnit || 1;
},
// 是否可以添加商品
canAddProduct(){
if(!this.form.lineId){
......
......@@ -26,11 +26,9 @@
style="width: 80mm; margin: 0 auto;" :id="'order-print-tag' + item.num"
:style="{display: index == 0 ? 'block':'none' }"
:key="item.num">
<div style="float: left; width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; " >
<img :src="item.url" :alt="item.url" style="width: 26mm" />
<p style=" text-align: center; height: 5mm; font-size: 3mm; -webkit-margin-before: 0em; -webkit-margin-after: 0em; margin-top: 0mm; " >
{{item.tag}}
</p>
<div style="float: left; text-align: center; width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; " >
<img class="qrcode" src="" :alt="item.url" style="width: 26mm" />
<p class="tag" style=" text-align: center; height: 5mm; font-size: 3mm; -webkit-margin-before: 0em; -webkit-margin-after: 0em; margin-top: 0mm; " >{{item.tag}}</p>
<p style="margin-top: -1mm; text-align: center">
<span style="text-align: center; font-weight: 600; font-size: 6mm" >{{item.num}}</span>
</p>
......@@ -73,6 +71,7 @@
import {printTag} from '@/api/ecw/order'
import {parseTime} from '@/utils/ruoyi'
import lodop from '@/utils/lodop'
import QRCode from "qrcode";
export default {
filters: {parseTime},
......@@ -136,12 +135,18 @@ export default {
if(!this.printTags.length){
return this.$message.error(this.$t('指定区域无可打印标签'))
}
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
this.currentNo = this.form.start
this.step = 'preview'
this.$nextTick(async () => {
const first = document.getElementsByClassName('order-print-tag-item')[0]
const tag = first.getElementsByClassName('tag')[0].innerText
const qrcode = await QRCode.toDataURL(tag, {margin: 1})
first.getElementsByClassName('qrcode')[0].setAttribute("src", qrcode)
})
})
},
print(){
......@@ -152,18 +157,22 @@ export default {
if(items.length > 1000){
this.$alert(this.$t('标签超过1000需要耐心等候标签生成,请稍候'))
}
lodop().then(LODOP => {
lodop().then(async(LODOP) => {
LODOP.PRINT_INIT(this.title);
LODOP.SET_PRINT_STYLE("FontSize",18);
LODOP.SET_PRINT_STYLE("Bold",1);
// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
LODOP.SET_PRINT_PAGESIZE(0, 800, 600, "TAG");
for(let i in items){
LODOP.ADD_PRINT_HTM("2mm",0,800,600, items[i].innerHTML);
let i = 0;
for(let item of items){
const tag = item.getElementsByClassName('tag')[0].innerText
const qrcode = await QRCode.toDataURL(tag, {margin: 1})
item.getElementsByClassName('qrcode')[0].setAttribute("src", qrcode)
LODOP.ADD_PRINT_HTM("2mm",0,800,600, item.innerHTML);
if(i < items.length){
LODOP.NewPage()
}
i++
}
LODOP.PREVIEW();
......
......@@ -175,9 +175,9 @@
</el-table-column>
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" >
<template slot-scope="scope">
<p v-if="scope.row.orderExceptionType!='order_doc_exception'||scope.row.customsType==1">{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
<p v-if="scope.row.customsType==1">{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
<p style="color:#ff4949" v-else>{{scope.row.totalBox+$t('箱/')+scope.row.warehousingBox+$t('')}}</p>
<dict-tag style="color:#ff4949" v-if="scope.row.orderExceptionType=='order_doc_exception'&&scope.row.customsType!=1" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType"></dict-tag>
<dict-tag style="color:#ff4949" v-if="scope.row.customsType!=1" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center">
......
......@@ -89,11 +89,10 @@ import {
qetBatchFeeByBusinessId, getBatchFeeByBusinessId
} from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import Template from "@/views/cms/template";
import workFlow from "@/components/WorkFlow";
export default {
name: "feeApplication",
components: {Template,workFlow},
components: {workFlow},
props:{
orderId:[Number, String],
dialogVisible:{
......@@ -136,9 +135,9 @@ export default {
getFeeApplicationApproveByOrderId(this.orderId).then(res => {
if(res.data.formId){
this.processInstanceId = res.data.formId
getBatchFeeByBusinessId(res.data.orderApprovalId).then(res => {
/*getBatchFeeByBusinessId(res.data.orderApprovalId).then(res => {
this.list = res.data
})
})*/
}
})
},
......
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