Commit ea359513 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'order_fee_update' into pre-release

parents d29b4b23 3f5d9139
......@@ -45,6 +45,14 @@ export function getOrderDetail(orderId) {
})
}
// 获得订单编辑详情
export function getFeeDraweeByFeeType(feeType) {
return request({
url: "/ecw/order/fee/drawee/" + feeType,
method: "get"
})
}
// 获得订单分页
export function getOrderPage(query) {
return request({
......
<!--批量加价-->
<template>
<div class="app-container">
<div class="page-title">{{$t('批量加价')}}</div>
<div class="page-title">
<span>{{ $t("批量加价") }}</span>
<!-- TODO 这里的批量申请费用需要跳转到和订单列表一致的批量订单费用申请页面 -->
<el-button type="primary" style="margin-left: 5px;" size="small" @click="batchOrderFeeApply(this.orderIds)">{{$t('批量申请费用')}}</el-button>
</div>
<div>
{{$t('运费或全包加价')}}
<!--货币-->
......@@ -51,6 +56,15 @@
<el-descriptions-item label="SO NO">
{{shipmentObj.bookSeaInfo ? shipmentObj.bookSeaInfo.sono : '' }}
</el-descriptions-item>
<el-descriptions-item :label="$t('装柜时间')">
{{shipmentObj.zgDate}}
</el-descriptions-item>
<el-descriptions-item :label="$t('到港时间')">
{{shipmentObj.dgDate}}
</el-descriptions-item>
<el-descriptions-item :label="$t('清关时间')">
{{shipmentObj.qgDate}}
</el-descriptions-item>
</el-descriptions>
</el-card>
......
......@@ -24,7 +24,8 @@
<div v-for="(item, index) in feeList" :key="item.id">
{{index + 1}}、【<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="item.feeType" />】,
<dict-tag :value="item.payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-tag>
{{ item.applicationFee }}{{ currencyName(item.applicationFeeCurrency) }}
{{$t('金额')}}{{ item.applicationFee }}{{ currencyName(item.applicationFeeCurrency) }}
<dict-tag :value="item.payer" :type="DICT_TYPE.DRAWEE" ></dict-tag>{{$t('付款')}}
{{$t('备注')}}{{ item.remarks || $t('')}}
</div>
</div>
......@@ -61,6 +62,7 @@ export default {
name: "BatchFeeApplicationDetail",
data(){
return{
DICT_TYPE,
order: null,
feeList: [],
currencyList:[]
......
......@@ -123,6 +123,7 @@
<!-- <dict-tag :type="DICT_TYPE.COMMISSION_ CURRENCY_TYPE" :value="FeeDetails.applicationFeeCurrency" />, -->
{{currencyName(FeeDetails.applicationFeeCurrency)}}
<dict-tag :value="FeeDetails.payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-tag>
<dict-tag :value="FeeDetails.payer" :type="DICT_TYPE.DRAWEE" ></dict-tag>{{ $t('付款') }},
【{{FeeDetails.remarks}}】
</div>
</div>
......
......@@ -49,6 +49,7 @@
:disabled="!scope.row.editMode && !!scope.row.status"
:type="DICT_TYPE.FEE_TYPE"
v-model="scope.row.feeType"
@change="updatePayer(scope.row)"
/>
</template>
</el-table-column>
......@@ -56,7 +57,7 @@
<template v-slot:default="scope">
<el-input
:disabled="!scope.row.editMode && !!scope.row.status"
v-model.number="scope.row.applicationFee"
v-model="scope.row.applicationFee" type="number"
></el-input>
</template>
</el-table-column>
......@@ -84,6 +85,16 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('付款人')">
<template v-slot="{ row }">
<dict-selector
:disabled="!row.editMode && !!row.status"
:type="DICT_TYPE.DRAWEE"
:filter="payerDictFilter"
v-model="row.payer"
/>
</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template v-slot:default="scope">
<el-input
......@@ -152,8 +163,7 @@
:disabled="!feeList.length && !editMode"
@click="submit"
>{{ $t("提交") }}
</el-button
>
</el-button>
<el-button
type="primary"
v-if="processInstanceId"
......@@ -190,7 +200,7 @@ import {
getFeeApplicationApproveByOrderId,
getBatchFeeByProcessId,
qetBatchFeeByBusinessId,
getBatchFeeByBusinessId, feeApplicationDelete,
getBatchFeeByBusinessId, feeApplicationDelete, getFeeDraweeByFeeType,
} from "@/api/ecw/order";
import {getDictDatas, DICT_TYPE} from "@/utils/dict";
import workFlow from "@/components/WorkFlow";
......@@ -278,16 +288,53 @@ export default {
this.list.splice(index, 1);
});
},
// 过滤订单状态筛选字典内容
payerDictFilter(item) {
if (item.value && item.value == 3) {
return false
}
return true
},
// 修改
modify(item) {
this.$set(item, "editMode", true);
},
updatePayer(item) {
console.log("变动的费用记录:", item);
this.$nextTick(() => {
// 根据新费用类型和索引更新payer付款人信息
this.orderDetails.drawee ? (this.orderDetails.drawee != 3 ? this.$set(item, "payer", this.orderDetails.drawee) : this.getDraweePayer(item)) : undefined; // 费用申请付款人
console.log("变动的费用记录:", item);
})
},
getDraweePayer(item) {
let feeType = item.feeType
if (feeType) {
getFeeDraweeByFeeType(feeType).then(res => {
console.log(res.data)
let drawee = res.data
console.log("自定义费用枚举值:", drawee)
if (drawee) {
if (this.orderDetails.customDraweeVOList && this.orderDetails.customDraweeVOList.length > 0) {
let customDrawee = this.orderDetails.customDraweeVOList.find(item => item.name == drawee)
console.log("自定义费用类型值:", customDrawee)
if (customDrawee) {
console.log("返回值:", customDrawee.value)
this.$set(item, "payer", customDrawee.value)
}
}
}
});
}
},
addCost() {
this.list.push({
orderId: this.orderId,
feeType: undefined, //费用申请类型
applicationFee: undefined, //金额
applicationFeeCurrency: undefined, // 费用申请货币类型
payer: this.orderDetails.drawee && this.orderDetails.drawee != 3 ? this.orderDetails.drawee : undefined, // 费用申请付款人
remarks: undefined,
receiveFlag: 0,
applicationAuthor: undefined,
......
......@@ -17,16 +17,24 @@
<el-form-item :label="$t('是否预付')">
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="orderItem.isPayAdvance" />
</el-form-item>
<el-form-item :label="$t('单价模式')">
<dict-selector
:type="DICT_TYPE.ECW_PRICE_TYPE"
v-model="orderItem.charging"
form-type="radio"
formatter="number"
/>
</el-form-item>
<el-row v-if="!orderItem.charging">
<el-row v-if="!orderItem.orgCharging">
<el-col :span="12">
<el-form-item :label="$t('旧运费')">
{{form.orgFreight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
{{form.orgFreight}} {{ currentMap[form.orgFreightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('旧清关费')">
{{form.orgClearanceFreight}} {{ currentMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
{{form.orgClearanceFreight}} {{ currentMap[form.orgClearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
......@@ -34,23 +42,29 @@
<el-col :span="12">
<el-form-item :label="$t('新运费')" style="width: 400px" prop="freight">
<el-input v-model="form.freight" type="number" class="w-100" />
{{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
<!--货币-->
<selector v-model="form.freightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100 ml-10" />
/ {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('新清关费')" style="width: 400px" prop="clearanceFreight">
<el-input v-model="form.clearanceFreight" type="number" class="w-100" />
{{ currentMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
<!--货币-->
<selector v-model="form.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100 ml-10" />
/ {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('旧全包价')" v-if="orderItem.charging">
{{form.orgFreight}} {{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
<el-form-item :label="$t('旧全包价')" v-if="orderItem.orgCharging">
{{form.orgFreight}} {{ currentMap[form.orgFreightCurrency] }} / {{ unitMap[form.freightVolume] }}
</el-form-item>
<el-form-item :label="$t('新全包价')" style="width: 400px" prop="clearanceFreight" v-if="orderItem.charging">
<el-input v-model="form.freight" type="number" class="w-100" />
{{ currentMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
<!--货币-->
<selector v-model="form.freightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100 ml-10" />
/ {{ unitMap[form.freightVolume] }}
</el-form-item>
</el-form>
......@@ -77,6 +91,8 @@ import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
import WorkFlow from '@/components/WorkFlow'
import {DICT_TYPE} from "@/utils/dict";
import selector from "@/components/Selector/index.vue";
export default {
name: "OrderSpecialDiscount",
......@@ -89,6 +105,7 @@ export default {
}
},
components: {
selector,
WorkFlow
},
created() {
......@@ -109,6 +126,7 @@ export default {
},
data() {
return {
DICT_TYPE,
// applyType: 1, // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
unitList:[],
// channelList:[],
......
......@@ -40,23 +40,43 @@
</el-table-column>
<el-table-column :label="$t('旧费用')" align="center">
<template v-slot="{row}">
<div v-if="!row.charging">
<div>{{$t('旧运费')}}:{{row.orgFreight}} {{ currentMap[row.freightCurrency] }} / {{ unitMap[row.freightVolume] }}</div>
<div>{{$t('旧清关费')}}:{{row.orgClearanceFreight}} {{ currentMap[row.clearanceFreightCurrency] }} / {{ unitMap[row.clearanceFreightVolume] }}</div>
<div v-if="!row.orgCharging">
<div>{{$t('旧运费')}}:{{row.orgFreight}} {{ currentMap[row.orgFreightCurrency] }} / {{ unitMap[row.freightVolume] }}</div>
<div>{{$t('旧清关费')}}:{{row.orgClearanceFreight}} {{ currentMap[row.orgClearanceFreightCurrency] }} / {{ unitMap[row.clearanceFreightVolume] }}</div>
</div>
<div v-else>
{{$t('旧全包价')}}:{{row.orgFreight}} {{ currentMap[row.freightCurrency] }} / {{ unitMap[row.freightVolume] }}
{{$t('旧全包价')}}:{{row.orgFreight}} {{ currentMap[row.orgFreightCurrency] }} / {{ unitMap[row.freightVolume] }}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('新费用')" align="center" width="300px">
<el-table-column :label="$t('单价模式')" align="left">
<template v-slot="{row}">
<dict-selector
:type="DICT_TYPE.ECW_PRICE_TYPE"
v-model="row.charging"
form-type="radio"
formatter="number"
/>
</template>
</el-table-column>
<el-table-column :label="$t('新费用')" align="center" width="400px">
<template v-slot="{row}">
<div v-if="!row.charging">
<div>{{$t('新运费')}}: <el-input v-model="row.freight" type="number" class="w-100" /> {{ currentMap[row.freightCurrency] }} / {{ unitMap[row.freightVolume] }}</div>
<div>{{$t('新清关费')}}: <el-input v-model="row.clearanceFreight" type="number" class="w-100" /> {{ currentMap[row.clearanceFreightCurrency] }} / {{ unitMap[row.clearanceFreightVolume] }}</div>
<div>{{$t('新运费')}}: <el-input v-model="row.freight" type="number" class="w-100" />
<!--货币-->
<selector v-model="row.freightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100 ml-10" />
/ {{ unitMap[row.freightVolume] }}</div>
<div>{{$t('新清关费')}}: <el-input v-model="row.clearanceFreight" type="number" class="w-100" />
<!--货币-->
<selector v-model="row.clearanceFreightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100 ml-10" />
/ {{ unitMap[row.clearanceFreightVolume] }}</div>
</div>
<div v-else>
{{$t('新全包价')}}: <el-input v-model="row.freight" type="number" class="w-100" />{{ currentMap[row.freightCurrency] }} / {{ unitMap[row.freightVolume] }}
{{$t('新全包价')}}: <el-input v-model="row.freight" type="number" class="w-100" />
<!--货币-->
<selector v-model="row.freightCurrency" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100 ml-10" />
/ {{ unitMap[row.freightVolume] }}
</div>
</template>
</el-table-column>
......@@ -85,6 +105,7 @@ import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
import WorkFlow from '@/components/WorkFlow'
import selector from "@/components/Selector/index.vue";
export default {
name: "OrderSpecialDiscount",
......@@ -97,6 +118,7 @@ export default {
}
},
components: {
selector,
WorkFlow
},
created() {
......
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