Commit 6f257f86 authored by dcy's avatar dcy

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

parents f789d725 c6ab8d48
......@@ -214,9 +214,11 @@
label=""
label-width="0"
style="margin-bottom: 0"
required
:error="$t('账单号不能为空')"
prop="accountNumber"
:rules="[
{ required: true, message: '账单号不能为空', trigger: 'blur' },
]"
>
<el-input
v-model="form.accountNumber"
......@@ -463,6 +465,7 @@ export default {
this.handleSelectionChange([res.data])
this.list = this.multipleSelection
this.$set(this.form, 'supplierId', res.data.supplierId)
this.selectChange(this.form.supplierId)
})
}
if (that.$route.query.id && that.$route.query.id !== '0') {
......@@ -474,6 +477,7 @@ export default {
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'),
invoiceStatus: String(res.data.invoiceStatus),
}
this.$set(this.form,'supplierBankAccount',res.data.supplierBankAccount)
console.log(this.form)
})
......
......@@ -181,13 +181,13 @@
<el-form-item :label="$t('操作步骤')">
<el-select v-model="costObj.stepsId" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
<el-option v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('费用类型')">
<el-select v-model="costObj.feeType" :placeholder="$t('请选择费用类型')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.FEE_TYPE)" :key="type.value" :label="type.label" :value="type.value"></el-option>
<el-option v-for="item in this.getDictDatas(DICT_TYPE.FEE_TYPE)" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
......@@ -203,7 +203,7 @@
</el-form-item>
<el-form-item label="" label-width="0px">
<el-select v-model="costObj.currencyId" :placeholder="$t('请选择单位')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PRICE_UNIT)" :key="type.value" :label="type.label" :value="type.value"></el-option>
<el-option v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PRICE_UNIT)" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
......
......@@ -21,13 +21,13 @@
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('品名')" align="center" prop="title">
<template slot-scope="scope">
{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }}
<span v-if="scope.row.feeType!=5">{{ scope.row.titleZh + "(" + scope.row.titleEn + ")" }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" />
<el-table-column :label="$t('体积/重量')" align="center" prop="weight">
<template slot-scope="scope">
{{ scope.row.volume + "/" + scope.row.weight }}
<span v-if="scope.row.feeType!=5"> {{ scope.row.volume + "/" + scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('收入类型')" align="center" prop="feeType">
......@@ -513,10 +513,14 @@ export default {
},
WriteOffProportion(){
let total = 0
let amountTotal = 0
this.detailed.forEach(item => {
if(item.status){
amountTotal = NP.plus(amountTotal, item.writeOffAmount)
}
total = NP.plus(total, item.writeOffAmount)
})
let portion = NP.divide(total,this.form.receiptAccountList.find(item=>item.type=='total').writeOffAmount)
let portion = NP.divide(amountTotal,total)
return (portion*100).toFixed(2)
}
},
......
<template>
<div class="app-container">
<div slot="header" class="card-title">{{ $t('待收款') }}</div>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8" style="margin-right: 60px">
<div class="card-title">{{ $t('待收款') }}</div>
<el-button
style="float: right; margin-left: 10px"
type="primary"
......@@ -333,5 +334,6 @@ export default {
.card-title {
font-size: 18px;
font-weight: bold;
display: inline-block;
}
</style>
......@@ -60,7 +60,7 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-form-item :label="$t('自编号')">
<!-- <el-form-item :label="$t('自编号')">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
......@@ -68,8 +68,8 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('订单号')">
</el-form-item> -->
<!-- <el-form-item :label="$t('订单号')">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
......@@ -77,10 +77,13 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="handleQuery">{{ $t('查找') }}</el-button>
</el-form-item>
</el-row>
<el-row :span="24">
<el-form-item :label="$t('商品名称')">
<!-- <el-row :span="24"> -->
<!-- <el-form-item :label="$t('商品名称')">
<el-input
style="max-width: 188px"
v-model="queryParams.orderNo"
......@@ -88,8 +91,8 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('费用类型')">
</el-form-item> -->
<!-- <el-form-item :label="$t('费用类型')">
<dict-selector
:type="DICT_TYPE.FEE_TYPE"
v-model="queryParams.feeType"
......@@ -100,11 +103,9 @@
:type="DICT_TYPE.PAYMENT_TYPE"
v-model="queryParams.paymentType"
></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">{{ $t('查找') }}</el-button>
</el-form-item>
</el-row>
</el-form-item> -->
<!-- </el-row> -->
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
......@@ -359,8 +360,9 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
console.log(11)
this.queryParams.pageNo = 1;
// this.getList();
this.getList();
},
/** 新增按钮操作 */
handleAdd(id) {
......
......@@ -422,7 +422,7 @@ export default {
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? this.$t("启用") : this.$t("停用");
this.$modal.confirm(this.$t('确认要{action}编号为{id}的数据吗?', {action: text, id})).then(function() {
this.$modal.confirm(this.$t('确认要{action}编号为{id}的数据吗?', {action: text, id: row.id})).then(function() {
return updateNode(row);
}).then(() => {
......
......@@ -34,7 +34,8 @@
{{consignorData.company||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('社交软件')+':'">
{{consignorData.social||$t('')+' '+consignorData.socialNumber||''}}
<dict-tag :type="DICT_TYPE.SOCIAL" :value="consignorData.social" />
{{consignorData.socialNumber?('('+consignorData.socialNumber+')'):''}}
</el-descriptions-item>
</el-descriptions>
......@@ -55,7 +56,8 @@
{{consigneeData.company||$t('')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('社交软件')+':'">
{{consigneeData.social||$t('')+' '+consigneeData.socialNumber||''}}
<dict-tag :type="DICT_TYPE.SOCIAL" :value="consigneeData.social" />
{{consigneeData.socialNumber?('('+consigneeData.socialNumber+')'):''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4" class="card">
......@@ -105,8 +107,9 @@
<dict-tag :value="scope.row.unit" :type="DICT_TYPE.ECW_PACKAGING_TYPE" defaultable />
</template>
</el-table-column>
<el-table-column :label="$t('箱规') + '(m)'" width="120px" prop="boxGauge" />
<!-- <el-table-column :label="$t('箱规') + '(m)'" width="120px" prop="boxGauge" /> -->
<el-table-column :label="$t('体积') + '(m³)'" width="100px" prop="volume" />
<el-table-column :label="$t('数量')" width="100px" prop="quantity" />
<el-table-column :label="$t('重量') + '(kg)'" width="100px" prop="weight" />
<el-table-column :label="$t('货值') + '(RMB)'" width="100px" prop="worth" />
<el-table-column :label="$t('商品特性')" width="200px" prop="prodAttrName" />
......@@ -116,7 +119,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('运费')" width="200px">
<el-table-column :label="$t('成交价')" width="200px">
<template slot-scope="{row}">
<template v-if="row.charging ==1">
<template v-if="!row.seaFreight">未报价</template>
......@@ -172,25 +175,37 @@
{{list.estCostVO?list.estCostVO.insuranceFee: 0}} {{$t('美元')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总运费')">
<template v-for="item in clearanceFeeList">
<template v-if="freightFeeList.length>0" v-for="item in freightFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
</el-descriptions-item>
<template v-if="freightFeeList.length==0">
0
</template>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item :label="$t('总清关费')">
<template v-for="item in freightFeeList">
<template v-if="clearanceFeeList.length>0" v-for="item in clearanceFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
<template v-if="clearanceFeeList.length==0">
0
</template>
</el-descriptions-item>
<el-descriptions-item :label="$t('其他费用')">
<template v-for="item in otherFeeList">
<template v-if="otherFeeList.length>0" v-for="item in otherFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
<template v-if="otherFeeList.length==0">
0
</template>
</el-descriptions-item>
<el-descriptions-item :label="$t('原价')" :span="2">
<template v-for="item in originalFeeList">
<template v-if="originalFeeList.length>0" v-for="item in originalFeeList">
<div :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
</template>
<template v-if="originalFeeList.length==0">
0
</template>
</el-descriptions-item>
</el-descriptions>
......@@ -223,7 +238,7 @@
</el-table>
<el-descriptions :column="1" class="mt-20">
<el-descriptions-item :label="$t('优惠费用')" v-if="couponTotalAmountList && couponTotalAmountList.length">
<el-descriptions-item :label="$t('优惠费用')" v-if="couponTotalAmountList && couponTotalAmountList.length>0">
<div v-for="(item, discountIndex) in couponTotalAmountList" :key="discountIndex">
{{item.totalAmount}} {{currentcyMap[item.currencyId]}}
</div>
......@@ -357,6 +372,9 @@
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {calculationPrice} from '@/api/ecw/product'
import {getSupplier, getSupplierPage} from '@/api/ecw/supplier'
import Decimal from 'decimal.js'
window.Decimal= Decimal
export default {
name: "detail",
data() {
......@@ -371,6 +389,7 @@
//发货/收货人信息
consigneeData:{},
routerList:[],
fee:{},
channelName:'/',
tradeCityList:[],
productNames: {},
......@@ -399,6 +418,8 @@
return map
},
// 总有优惠金额
// 总有优惠金额
// 总有优惠金额
couponList(){
let arr = []
this.couponAvailableGroupDtoList.forEach(item => {
......@@ -436,7 +457,7 @@
},
// 其他费用
otherFeeList(){
return this.feeDtoList.filter(item => item.feeType == 1)
return this.feeDtoList.filter(item => item.feeType == 3)
},
// 原价(清关费 + 运费)
originalFeeList(){
......@@ -453,17 +474,62 @@
},
// 预计费用(原价 - 优惠金额)
estimatedCosts(){
// let arr = []
// this.originalFeeList.forEach(item => {
// let it = {...item}
// let coupon = this.couponList.find(coupon => coupon.reduceCurrencyId == item.currencyId)
// if(coupon){
// it.amount -= coupon.reduceAmount
// }
// arr.push(it)
// })
let arr = []
let withInsuranceFee = false
let withOtherFee = false
this.originalFeeList.forEach(item => {
let it = {...item}
let it = {
currencyId: item.currencyId,
amount: Decimal(item.amount)
}
let coupon = this.couponList.find(coupon => coupon.reduceCurrencyId == item.currencyId)
if(coupon){
it.amount -= coupon.reduceAmount
it.amount = it.amount.minus(coupon.reduceAmount)
}
if(this.list.otherFee && this.list.otherFeeCurrencyId == item.currencyId){
it.amount = it.amount.plus(this.list.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(!withOtherFee && this.list.otherFee){
let fee = {
currencyId: this.list.otherFeeCurrencyId,
amount: Decimal(this.list.otherFee)
}
// 如果保价费跟其他费用是同一种货币(都是美元)
if(!withInsuranceFee && this.fee && this.fee.insuranceFee && this.list.otherFeeCurrencyId == 1){
fee.amount = fee.amount.plus(this.fee.insuranceFee)
}
arr.push(fee)
}
// 没有累加保价费(没有美元计价)但是有保价费则需要加上去
if(!withInsuranceFee && this.fee && this.fee.insuranceFee){
arr.push({
currencyId: 1,
amount: Decimal(this.fee.insuranceFee)
})
}
return arr
},
}
},
created() {
getCurrencyList().then(res => this.currencyList = res.data)
......@@ -510,21 +576,43 @@
}
return labelname
},
getProductListWithDefaultValue(){
let arr = []
this.list.offerProdRespVOList.forEach(item => {
let tmp = {
"brand":item.brand,
"unit":item.unit,
"prodId":item.prodId,
"num":item.num,
"quantity":item.quantity,
"volume":item.volume,
"weight":item.weight,
"worth":item.worth,
"brandType":item.brandType||0,
"prodAttrIds":item.prodAttrIds
}
arr.push(tmp)
})
return arr
},
// 计算商品运费
calculationPrice(){
calculationPrice({
lineId: this.list.lineId,
transportId: this.list.transportId,
channelId: this.list.channelId,
prodConditionParamList: this.list.offerProdRespVOList,
prodConditionParamList: this.getProductListWithDefaultValue(),
consigneeCustomerContactsId: this.list.consigneeCustomerContactsId,
consignorCustomerContactsId: this.list.consignorCustomerContactsId,
customsType: this.list.customsType,
isCargoControl: this.list.control,
orderType: this.list.orderType,
}).then(res => {
this.$set(this, 'fee', res.data.costDto)
if(res.data.availableDto){
this.$set(this, 'couponTotalAmountList', res.data.availableDto.couponTotalAmountList)
this.$set(this, 'couponAvailableGroupDtoList', res.data.availableDto.couponAvailableGroupDtoList)
}
}).finally(() => {
this.calculating = false
})
......@@ -657,7 +745,7 @@
}).catch(() => {});
},
}
};
}
</script>
<style scoped>
......
......@@ -58,7 +58,7 @@
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('品名')" align="center" >
<el-table-column :label="$t('品名')">
<template slot-scope="scope">
<p>{{scope.row.prodTitleEn||''}}</p>
<p>{{scope.row.prodTitleZh||''}}</p>
......@@ -72,23 +72,22 @@
<p>{{$t('重量')}}{{scope.row.weight||0}}KG</p>
</template>
</el-table-column>
<el-table-column :label="$t('入库货物属性')" align="center" >
<el-table-column :label="$t('入库货物属性')">
<template slot-scope="scope">
<span>{{$t('箱规')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.boxGauge:0}}</span>
<p>
<span>{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" /></span>
<span>{{$t('箱数')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}&nbsp;&nbsp;</span>
<span>{{$t('体积')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}CBM&nbsp;&nbsp;</span>
<span>{{$t('重量')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}KG</span>
<p>{{$t('箱规')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.boxGauge:0}}</p>
<p>{{$t('品牌')}}<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" /></p>
<p>{{$t('箱数')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}&nbsp;&nbsp;</p>
<p>{{$t('体积')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}CBM&nbsp;&nbsp;</p>
<p>{{$t('重量')}}{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}KG
</p>
</template>
</el-table-column>
<el-table-column :label="$t('重货方数')" align="center" v-if="type=='order_heavy_cargo_exception'">
<el-table-column :label="$t('重货方数')" v-if="type=='order_heavy_cargo_exception'">
<template slot-scope="scope">
<span>{{scope.row.wvolume||0}}CBM</span>
</template>
</el-table-column>
<el-table-column :label="$t('泡货方数')" align="center" v-else >
<el-table-column :label="$t('泡货方数')" v-else >
<template slot-scope="scope">
<span>{{scope.row.vweight||0}}CBM</span>
</template>
......@@ -204,6 +203,9 @@ export default {
}
</script>
<style scoped>
.dialog-footer{
margin-top: 10px;
}
.filelist{
display: flex;
flex-wrap: wrap;
......@@ -222,4 +224,8 @@ export default {
.card{
margin-top: 20px;
}
p{
text-align: left;
margin: 0 !important;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment