Commit 18983f23 authored by 我在何方's avatar 我在何方
parents cf42a904 9ab53b11
......@@ -402,4 +402,109 @@ export function downloadLoadGoods(params) {
timeout: 120000,
params,
})
}
/**
* 创建理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoSingleCreate(data) {
return request({
url: `/ecw/box-order-check-info/singleCreate`,
method: "post",
data: data
});
}
/**
* 批量创建理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoBatchCreate(data) {
return request({
url: `/ecw/box-order-check-info/batchCreate`,
method: "post",
data: data
});
}
/**
* 删除理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoSingleDelete(data) {
return request({
url: `/ecw/box-order-check-info/singleDelete`,
method: "post",
data: data
});
}
/**
* 批量删除理货和合包标签
*
* @export
* @param {*} data
* @return {*}
*/
export function checkInfoBatchDelete(data) {
return request({
url: `/ecw/box-order-check-info/batchDelete`,
method: "post",
data: data
});
}
/**
* 获取订单理货,合包编号列表
*
* @export
* @param {*} data
* @return {*}
*/
export function getOrderTagList(params) {
return request({
url: `/ecw/box-order-check-info/orderTagList`,
method: "get",
params
});
}
/**
* 根据箱号、订单号查找订单号码,理货和合包使用
*
* @export
* @param {*} data
* @return {*}
*/
export function searchLoadOrderByBoxNo(data) {
return request({
url: `/ecw/box-order-check-info/searchLoadOrderByBoxNo`,
method: "post",
data: data
});
}
/**
* 确认出仓
*
* @export
* @param {*} data
* @return {*}
*/
export function confirmAirCheckout(params) {
return request({
url: `/ecw/box-air-checkout/confirmAirCheckout`,
method: "get",
params
});
}
\ No newline at end of file
......@@ -81,3 +81,36 @@ export function getCustomerContactsListByCustomer(query) {
return Promise.resolve()
}
}
//全部列表数据
export function warehouseLinePage(params){
return request({
url:'/ecw/warehouse-line/page',
method:'get',
params,
})
}
//获得空运线路模板
export function getAirLineChannelTemplateList(params){
return request({
url:'/ecw/warehouse-line/get-air-line-channel-template-list',
method:'get',
params
})
}
// 根据线路id渠道列表和清关费(复制使用)
export function getAirLineChannelPackagingList(id){
return request({
url:'/ecw/warehouse-line/get-air-line-channel-packaging-list',
method:'get',
params:{lineId:id}
})
}
// 创建仓库线路的渠道包装
export function createWarehouseLineChannelPackaging(data){
return request({
url:'/ecw/warehouse-line/create-warehouse-line-channel-packaging',
method:'put',
data
})
}
......@@ -150,3 +150,12 @@ export function batchAddPrice(data) {
data
})
}
// 批量加价空运
export function batchAddPriceAir(data) {
return request({
url: '/ecw/product-price/batchAddPriceAir',
method: 'put',
data
})
}
......@@ -98,6 +98,14 @@ export function getTradeCityList(query) {
params: query
})
}
// 获得目的地国家
export function getTradeCountryList(query) {
return request({
url: '/ecw/region/getTradeCountryList',
method: 'get',
params: query
})
}
export function listByIds(params){
......@@ -106,4 +114,4 @@ export function listByIds(params){
method: 'get',
params
})
}
\ No newline at end of file
}
......@@ -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>
......
......@@ -71,16 +71,23 @@
</el-form>
<!-- 开始出仓 -->
<el-dialog :title="$t('开始出仓')" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body>
<startCheckout v-bind="$attrs" v-if="dialogVisible" v-on="$listeners" @closeDialog1="closeDialog1" />
</el-dialog>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button :disabled="$attrs.shipmentObj.approvaling" type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button @click="startCheckout">{{$t('确认出仓')}}</el-button>
</el-row>
</div>
</template>
<script>
import { airCheckoutCreate } from "@/api/ecw/boxSea";
import startCheckout from "./checkout/startCheckout.vue";
import userSelect from "./common/userSelect.vue";
import ImageUpload from "@/components/ImageUpload";
import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
......@@ -91,7 +98,7 @@ import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../
export default {
name: "checkout",
inheritAttrs: false,
components: { userSelect, ImageUpload },
components: { userSelect, ImageUpload, startCheckout },
data() {
return {
// 空运出仓对象
......@@ -106,6 +113,7 @@ export default {
//deliverType: [{ required: true, message: this.$t("必填"), trigger: "change" }],
checkoutTime: [{ required: true, message: this.$t("必填"), trigger: "change" }]
},
dialogVisible: false
};
},
created() {
......@@ -140,6 +148,13 @@ export default {
cancel(type) {
this.$emit("closeDialog", type);
},
/** 开始出仓 */
startCheckout() {
this.dialogVisible = true;
},
closeDialog1() {
this.dialogVisible = false;
},
},
};
</script>
......
......@@ -37,7 +37,7 @@
<span class="mr-10">-</span>
<el-input v-model="item.endNum" class="mr-10"></el-input >
<span class="mr-10">/</span>
<weight-select @change="changeWeight" :disabled="index > 0" v-model="item.weightUnit" :options="unitList"></weight-select>
<weight-select @change="setAirFreightWeight" :disabled="index > 0" v-model="item.clearanceVolumeUnit" :options="unitList"></weight-select>
</div>
</el-col>
</el-row>
......@@ -75,7 +75,7 @@ export default {
type:String,
default:'channelPriceStepClearanceList'
},
readonly: Boolean
readonly: Boolean,
},
name: "packaging-type",
components: {Template, WeightSelect, CurrencySelect},
......@@ -95,24 +95,24 @@ export default {
}
},
computed:{
screenCom(){
let num = undefined
if(this.keyArr === 'channelPriceStepClearanceList'){
num = this.getDictDatas(this.DICT_TYPE.AIR_CUSTOM_CLEARANCE)[0]?.value
}else {
num = this.getDictDatas(this.DICT_TYPE. AIR_COMMODITY_CUSTOM_CLEARANCE)[0]?.value
}
return num
}
// screenCom(){
// let num = undefined
// if(this.keyArr === 'channelPriceStepClearanceList'){
// num = this.getDictDatas(this.DICT_TYPE.AIR_CUSTOM_CLEARANCE)[0]?.value
// }else {
// num = this.getDictDatas(this.DICT_TYPE. AIR_COMMODITY_CUSTOM_CLEARANCE)[0]?.value
// }
//
// return num
// }
},
mounted() {
this.value1 = this.value
this.$nextTick(()=>{
if(!this.value1.airWeightLimit){
this.value1.airWeightLimit = this.screenCom
}
})
// this.$nextTick(()=>{
// if(!this.value1.airWeightLimit){
// this.value1.airWeightLimit = this.screenCom
// }
// })
this.$nextTick(()=>{
if(this.value1[this.keyArr] && this.value1[this.keyArr].length === 0){
this.addInterval()
......@@ -120,11 +120,6 @@ export default {
})
},
methods:{
changeWeight(e){
this.value1[this.keyArr].forEach(item => {
item.weightUnit = e
})
},
setCurrency(e){
this.value1[this.keyArr].forEach(item => {
item.clearancePriceUnit = e
......@@ -137,14 +132,11 @@ export default {
},
addInterval(){
let p = {
"channelId":'',
"clearancePrice":'',
"clearancePriceUnit": this.value1[this.keyArr].length && this.value1[this.keyArr][0].clearancePriceUnit ? this.value1[this.keyArr][0].clearancePriceUnit : '',
"clearanceVolumeUnit":this.value1[this.keyArr].length ? this.value1[this.keyArr][0].clearanceVolumeUnit : 6,
"endNum":'',
"packagingId":'',
"startNum":'',
"weightUnit": this.value1[this.keyArr].length ? this.value1[this.keyArr][0].weightUnit : 6
}
this.value1[this.keyArr].push(p)
this.$forceUpdate();
......@@ -152,10 +144,11 @@ export default {
deleteFn(index){
this.value1[this.keyArr].splice(index, 1)
this.$forceUpdate();
}
},
watch:{
'value1.priceStepClearanceList':{
'value1.priceStepClearanceCreateReqVOList':{
handler(val){
if(val && val.length === 0){
this.addInterval();
......
This diff is collapsed.
......@@ -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 )
this.$set(this.totalData,'newTotalVolume',this.myAchievementData.newTotalVolume)
this.$set(this.totalData,'newTotalWeight',this.myAchievementData.newTotalWeight)
this.$set(this.totalData,'oldTotalNum',this.myAchievementData.oldTotalNum)
this.$set(this.totalData,'oldTotalVolume',this.myAchievementData.oldTotalVolume)
this.$set(this.totalData,'oldTotalWeight',this.myAchievementData.oldTotalWeight)
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();
},
/** 新增按钮操作 */
......@@ -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 )
this.$set(this.totalData,'newTotalVolume',this.myAchievementData.newTotalVolume)
this.$set(this.totalData,'newTotalWeight',this.myAchievementData.newTotalWeight)
this.$set(this.totalData,'oldTotalNum',this.myAchievementData.oldTotalNum)
this.$set(this.totalData,'oldTotalVolume',this.myAchievementData.oldTotalVolume)
this.$set(this.totalData,'oldTotalWeight',this.myAchievementData.oldTotalWeight)
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 )
this.$set(this.totalData,'newTotalVolume',this.myAchievementData.newTotalVolume)
this.$set(this.totalData,'newTotalWeight',this.myAchievementData.newTotalWeight)
this.$set(this.totalData,'oldTotalNum',this.myAchievementData.oldTotalNum)
this.$set(this.totalData,'oldTotalVolume',this.myAchievementData.oldTotalVolume)
this.$set(this.totalData,'oldTotalWeight',this.myAchievementData.oldTotalWeight)
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>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item :label="$t('运输方式')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number"
clearable/>
</el-form-item>
<el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select multiple v-model="queryParams.startWarehouseIdList" :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIdArr">
<el-select multiple v-model="queryParams.destWarehouseIdList" multiple
:placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannel">
<el-select v-model="queryParams.shippingChannel" :placeholder="$t('请选择出货渠道')" clearable>
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId"
:key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
</el-form-item>
</el-form>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" type="index"/>
<el-table-column :label="$t('始发仓')" align="center">
<template slot-scope="{row}">
{{ $l(row, 'startWarehouseTitle') }}
</template>
</el-table-column>
<el-table-column :label="$t('目的仓')" align="center">
<template slot-scope="{row}">
{{ $l(row, 'destWarehouseTitle') }}
</template>
</el-table-column>
<el-table-column :label="$t('运输方式')" align="center">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('出货渠道')" align="center">
<template slot-scope="{row}">
{{ row.channelIds ? $l(row, 'channelNames') : '/' }}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="{row}">
<el-button v-if="row.transportType === 3" type="text" @click="$router.push({
path:'/offer/channel-route?id='+ row.id,
query:{
startWarehouseTitle:$l(row,'startWarehouseTitle'),
destWarehouseTitle: $l(row, 'destWarehouseTitle'),
}
})">空运渠道包装清关费
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
</div>
</template>
<script>
import {
createDeptTarget,
updateDeptTarget,
deleteDeptTarget,
getDeptTarget,
getDeptTargetPage,
exportDeptTargetExcel,
getCreateInitData,
getPersonTargetPage,
myAchievementByPage
} from "@/api/ecw/deptTarget";
import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel';
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse'
import {DICT_TYPE} from "@/utils/dict";
import {warehouseLinePage} from "@/api/ecw/customerContacts";
export default {
name: "all-routes-list",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 总条数
total: 0,
list: [],
// 是否显示弹出层
open: false,
tableOpen: false,
channelList: [],
// 查询参数
queryParams: {
page: 1,
rows: 10,
},
// 表单校验
myAchievementData: {},
warehouseList: []
};
},
computed: {
DICT_TYPE() {
return DICT_TYPE
},
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
},
activated() {
this.getChannelList();
this.getList();
},
created() {
this.getChannelList();
this.getList();
listServiceUser().then(r => {
this.customerServiceList = r.data;
})
getWarehouseList().then(res => {
this.warehouseList = res.data
})
},
methods: {
getChannelList() {
getChannelList().then(res => this.channelList = res.data)
},
customerServiceFn(val) {
if (this.customerServiceList.length > 0) {
let index = this.customerServiceList.findIndex(item => item.id === val.userId);
return index !== -1 ? this.customerServiceList[index]?.nickname : ''
} else {
return ''
}
},
/** 查询列表 */
getList() {
this.loading = true;
const params = {...this.queryParams}
// 执行查询
warehouseLinePage(params).then(r => {
this.loading = false;
this.list = r.data.list;
this.total = r.data.total
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
}
};
</script>
<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>
This diff is collapsed.
<script>
import {warehouseLinePage} from "@/api/ecw/customerContacts";
import {getWarehouseList} from "@/api/ecw/warehouse";
import Template from "@/views/cms/template/index.vue";
export default {
name: "airFreightRouteTemplate",
components: {Template},
props:{
lineId:{
default:''
}
},
data() {
return {
open: false,
warehouseList: [],
list: [],
total: 0,
form: {},
queryParams: {
page: 1,
rows: 10,
transportType:3,
startWarehouseIdList:[],
destWarehouseIdList: []
}
}
},
mounted() {
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
},
methods: {
getList() {
warehouseLinePage(this.queryParams).then(r => {
this.list = r.data.list;
this.total = r.data.total
})
},
copy(value) {
this.$emit('copy', value)
this.open = false
}
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
watch: {
open(value) {
if (value) {
this.getList();
}
}
}
}
</script>
<template>
<div>
<div @click="open = true;" style="display: inline-block">
<slot></slot>
</div>
<el-dialog :visible.sync="open">
<el-card>
<template #header>
<el-form inline>
<el-form-item label="始发地">
<el-select v-model="queryParams.startWarehouseIdList" @change="queryParams.page = 1;getList()" multiple :placeholder="$t('请选择始发地')">
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select @change="queryParams.page = 1;getList()" v-model="queryParams.destWarehouseIdList" multiple :placeholder="$t('请选择目的地')">
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<el-table border :data="list">
<el-table-column label="始发仓">
<template slot-scope="{row}">
{{ $l(row, 'startWarehouseTitle') }}
</template>
</el-table-column>
<el-table-column label="目的仓">
<template slot-scope="{row}">
{{ $l(row, 'destWarehouseTitle') }}
</template>
</el-table-column>
<el-table-column label="渠道数">
<template slot-scope="{row}">
{{ row.channelIds ? row.channelIds.split(',').length : 0 }}
</template>
</el-table-column>
<el-table-column>
<template slot-scope="{row}">
<el-button type="text" v-if="lineId !== row.id" @click="copy(row)">复制</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList"/>
</el-card>
</el-dialog>
</div>
</template>
<style scoped lang="scss">
</style>
......@@ -939,6 +939,14 @@ export default {
'form.channelId'(){
this.calculationPrice()
if(this.form.lineId) this.getOfferData()
// 选择渠道后需要筛选目的城市和线路
// 有点卡,改异步
this.$nextTick(() => {
// 更新目的城市备选
this.getTradeCity()
// 更新线路备选
this.getOpenedRouterList()
})
},
'form.consigneeCountryCode'(){
if(this.form.lineId) this.getOfferData()
......@@ -1086,7 +1094,7 @@ export default {
this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data
this.tradeCityList = (await getTradeCityList()).data
await this.getTradeCity()
this.currencyList = (await getCurrencyList()).data
this.unitList = (await getUnitList()).data
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
......@@ -1110,6 +1118,13 @@ export default {
},
methods: {
async getTradeCity(){
let query = {}
if(this.form.channelId){
query.channelId = this.form.channelId
}
this.tradeCityList = (await getTradeCityList(query)).data
},
onTableMounted(e){
// console.warn('onTableMounted', e)
},
......@@ -1333,6 +1348,9 @@ export default {
if(this.form.transportId){
params.transportType = this.form.transportId
}
if(this.form.channelId){
params.channelId = this.form.channelId
}
// 始发,目的和运输方式都没有的时候不获取
if(!params.startCityId && !params.destCityId && !params.transportType) return false
getOpenedRouterList(params).then(res => this.routerList = res.data.filter(item => {
......
......@@ -224,18 +224,22 @@
</div>
</div>
</el-form-item>
<packaging-type key-arr="priceStepClearanceList" v-model="form">
<el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button>
</packaging-type>
<p v-if="lineNum">
<span>
复制模板线路价格:{{lineNum}}个
</span>
<span @click="toPriceManager(formCopy, true)" style="color: #0a84ff;cursor: pointer;">
查看《#{{$l(formCopy,'title')}}#》路线价格
</span>
<el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button>
</p>
<el-form-item label-width="150px" label="空运订单重量上限kg">
<el-input-number v-model="form.airWeightLimit" controls-position="right" ></el-input-number>
</el-form-item>
<!-- <packaging-type key-arr="priceStepClearanceList" v-model="form">-->
<!-- <el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button>-->
<!-- </packaging-type>-->
<!-- <p v-if="lineNum">-->
<!-- <span>-->
<!-- 复制模板线路价格:{{lineNum}}个-->
<!-- </span>-->
<!-- <span @click="toPriceManager(formCopy, true)" style="color: #0a84ff;cursor: pointer;">-->
<!-- 查看《#{{$l(formCopy,'title')}}#》路线价格-->
<!-- </span>-->
<!-- <el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button>-->
<!-- </p>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
......@@ -415,59 +419,59 @@ export default {
},
methods: {
copyLine(val , bol){
this.formCopy = val;
let copy = ()=>{
if(val.priceStepClearanceList.length === 0) return this.form.priceStepClearanceList = []
this.form.airWeightLimit = val.airWeightLimit;
val.priceStepClearanceList.forEach((item ,index) =>{
if(this.form.priceStepClearanceList[index]){
this.form.priceStepClearanceList[index].clearancePrice = item.clearancePrice
this.form.priceStepClearanceList[index].clearancePriceUnit = item.clearancePriceUnit
this.form.priceStepClearanceList[index].clearanceVolumeUnit = item.clearanceVolumeUnit
this.form.priceStepClearanceList[index].endNum = item.endNum
this.form.priceStepClearanceList[index].startNum = item.startNum
this.form.priceStepClearanceList[index].weightUnit = item.weightUnit
}else {
let p = {
"channelId":undefined,
"clearancePrice":item.clearancePrice,
"clearancePriceUnit":item.clearancePriceUnit,
"clearanceVolumeUnit":item.clearanceVolumeUnit,
"endNum":item.endNum,
"packagingId":undefined,
"startNum":item.startNum,
"weightUnit":item.weightUnit
}
this.form.priceStepClearanceList.push(p)
}
})
}
this.visible = false;
if(bol){
let message = this.$l(this.form,'title') ? `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品#${this.$l(this.form,'title')}#中?` : `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品中?`
this.$confirm(message, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// this.form.priceLineCount = val.id;
this.lineNum = val.priceLineCount;
this.form.productTemplateId = val.id;
this.form.isCopyProductPriceTemplate = true;
copy()
this.open = true;
}).catch(() => {
this.open = true;
});
}else {
this.open = true;
copy()
this.lineNum = 0
this.form.isCopyProductPriceTemplate = false;
}
this.$forceUpdate()
},
// copyLine(val , bol){
// this.formCopy = val;
// let copy = ()=>{
// if(val.priceStepClearanceList.length === 0) return this.form.priceStepClearanceList = []
// this.form.airWeightLimit = val.airWeightLimit;
// val.priceStepClearanceList.forEach((item ,index) =>{
// if(this.form.priceStepClearanceList[index]){
// this.form.priceStepClearanceList[index].clearancePrice = item.clearancePrice
// this.form.priceStepClearanceList[index].clearancePriceUnit = item.clearancePriceUnit
// this.form.priceStepClearanceList[index].clearanceVolumeUnit = item.clearanceVolumeUnit
// this.form.priceStepClearanceList[index].endNum = item.endNum
// this.form.priceStepClearanceList[index].startNum = item.startNum
// this.form.priceStepClearanceList[index].weightUnit = item.weightUnit
// }else {
// let p = {
// "channelId":undefined,
// "clearancePrice":item.clearancePrice,
// "clearancePriceUnit":item.clearancePriceUnit,
// "clearanceVolumeUnit":item.clearanceVolumeUnit,
// "endNum":item.endNum,
// "packagingId":undefined,
// "startNum":item.startNum,
// "weightUnit":item.weightUnit
// }
// this.form.priceStepClearanceList.push(p)
// }
// })
// }
// this.visible = false;
// if(bol){
// let message = this.$l(this.form,'title') ? `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品#${this.$l(this.form,'title')}#中?` : `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品中?`
// this.$confirm(message, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// // this.form.priceLineCount = val.id;
// this.lineNum = val.priceLineCount;
// this.form.productTemplateId = val.id;
// this.form.isCopyProductPriceTemplate = true;
// copy()
// this.open = true;
// }).catch(() => {
// this.open = true;
// });
// }else {
// this.open = true;
// copy()
// this.lineNum = 0
// this.form.isCopyProductPriceTemplate = false;
// }
// this.$forceUpdate()
// },
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
......@@ -556,6 +560,7 @@ export default {
priceStepClearanceList:[],
isCopyProductPriceTemplate:false,
productTemplateId:undefined,
};
this.lineNum = 0
this.resetForm("form");
......@@ -583,6 +588,7 @@ export default {
if (this.queryParams.typeId) {
this.form.typeId = this.queryParams.typeId;
}
this.form.airWeightLimit = this.getDictDatas(this.DICT_TYPE. AIR_COMMODITY_CUSTOM_CLEARANCE)[0]?.value
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -607,6 +613,7 @@ export default {
this.form.couponIds = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
// this.reset()
})
});
},
verify(row){
......@@ -621,15 +628,15 @@ export default {
if(!this.form.airWeightLimit){
return this.$message.warning('请输入空运订单重量上限')
}
if(this.form.priceStepClearanceList.length === 0){
return this.$message.warning('阶梯定价输入不完整!')
}else {
let bol = this.form.priceStepClearanceList.every(this.verify)
if(!bol){
return this.$message.warning('阶梯定价输入不完整!')
}
}
// if(this.form.priceStepClearanceList.length === 0){
// return this.$message.warning('阶梯定价输入不完整!')
// }else {
// let bol = this.form.priceStepClearanceList.every(this.verify)
// if(!bol){
// return this.$message.warning('阶梯定价输入不完整!')
// }
//
// }
//商品特性转字符串
this.form.attrId = this.form.attrArray.join(',');
// 修改的提交
......
......@@ -411,7 +411,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} = res.data
const data = {
......@@ -432,7 +435,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
}
// 海运需要填充货柜位置和订单方数上限
if(this.type == 'sea'){
......
......@@ -216,15 +216,6 @@ export default {
// 获取模板数据(复制的源路线价格信息)
async getTemplateDetail(id){
const res = await getProductPrice(id)
// 填充商品、线路、价格信息、出货渠道(空运)
// this.form.productIdList = [res.data.productId]
/* 23-11-07要求不复制商品和线路 https://zentao.test.jdshangmen.com/bug-view-5145.html
this.selectedRoutes = [{
"lineId": res.data.warehouseLineId,
"channelId": res.data.shippingChannelId,
"transportId": res.data.warehouseLineDO.transportType,
"shippingChannelId":res.data.channelId
}]*/
// 要复制过来的字段
const {
allPrice,
......@@ -244,7 +235,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} = res.data
const data = {
......@@ -265,7 +259,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
}
this.$set(this, 'form', Object.assign({}, this.form, data))
......
This diff is collapsed.
<script>
import {getPriceSnapshotList} from "@/api/ecw/productPrice";
import {parseTime} from "../../../../utils/ruoyi";
import Template from "@/views/cms/template/index.vue";
import ShowStepPriceItem from "@/views/ecw/productPrice/components/ShowStepPriceItem.vue";
export default {
name: "Logs",
components: {ShowStepPriceItem, Template},
filters: {parseTime},
props:{
currencyMap:{
type:Object,
......@@ -25,6 +30,7 @@ export default {
}
},
methods:{
parseTime,
open(id){
this.showLogsDialog = true
this.loading = true
......@@ -61,57 +67,98 @@ export default {
<!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10">
{{index+1}}阶段
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
</div>
<template v-if="row.detail.priceType != 1">
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
<!--老的数据格式-->
<template v-if="row.detail.priceStepList">
<template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10">
{{index+1}}阶段
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
</div>
<!--空运没有清关费, 不需要显示-->
<div v-if="type != 'air'" :key="item.specialDictType + '_clearance'" class="pl-10">
清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
<template v-if="row.detail.priceType != 1">
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<!--空运没有清关费, 不需要显示-->
<div v-if="type != 'air'" :key="item.specialDictType + '_clearance'" class="pl-10">
清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else class="pl-10">
全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
<div v-else class="pl-10">
全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
<template v-else-if="row.detail.priceType">
<template v-for="(item, index) in row.detail.fullPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
:price-name="$t('全包价')"
field-prefix="all"
/>
</template>
</template>
<template v-else>
<template v-if="row.detail.freightPriceStepList && row.detail.freightPriceStepList.length">
<template v-for="(item, index) in row.detail.freightPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
:price-name="$t('运费')"
field-prefix="transport"
/>
</template>
</template>
<template v-if="row.detail.freightPriceStepList && row.detail.freightPriceStepList.length">
<template v-for="(item, index) in row.detail.freightPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
:price-name="$t('清关费')"
field-prefix="clearance"
/>
</template>
</template>
</template>
</template>
<template v-else>
<template v-if="row.detail.priceType != 1">
<div>
默认运费
{{$t('默认运费')}}
{{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}}
</div>
<div>
默认清关费
{{$t('默认清关费')}}
{{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
全包价
{{$t('全包价')}}
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div>
<template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 运费
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} {{$t('运费')}}}
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<div :key="item.specialDictType + '_clearance'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 清关费
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} {{$t('清关费')}}
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 全包价
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} {{$t('全包价')}}
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
......
......@@ -21,6 +21,7 @@ export default {
},
showAdd: Boolean,
readonly: Boolean,
stepTips: String,
value:{
type: Object,
default: () => {
......@@ -51,7 +52,8 @@ export default {
},
computed:{
packagingList(){
return getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE).map(dict => {
const dicts = JSON.parse(JSON.stringify(getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE)))
return dicts.map(dict => {
dict.enable = true
this.value.packagingList.forEach(item => {
if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){
......@@ -97,32 +99,34 @@ export default {
},
// 校验
validate(){
let valid = true
const index = this.index
const errors = []
// 区间设置检查
if(index > 0 && !this.value.startNum){
valid = false
this.$message.error(`请设置第${index+1}阶段的起始值`)
errors.push(`请设置${this.priceName}${index+1}阶段的起始值`)
}
if(!this.value.endNum){
valid = false
this.$message.error(`请设置第${index+1}阶段的结束值`)
errors.push(`请设置${this.priceName}${index+1}阶段的结束值`)
}
// 价格检查
if(!this.validatePrice(this.value[`${this.fieldPrefix}Price`])){
valid = false
this.$message.error(`请设置第${index+1}阶段的${this.priceName}`)
errors.push(`请设置第${index+1}阶段的${this.priceName}`)
}
// 包装价格检查
if(this.value.packagingList?.length){
this.value.packagingList.forEach((item, i) => {
if(item.packagingTypes?.length && !this.validatePrice(item.packagingPrice)){
valid = false
this.$message.error(`请设置第${index+1}阶段的包装类型${i+1}${this.priceName}`)
errors.push(`请设置第${index+1}阶段的包装类型${i+1}${this.priceName}`)
}
})
}
return valid
if(errors.length){
this.$notify.error({
title: this.$t("表单错误"),
message: errors.join(';\n')
});
}
return !errors.length
},
// 校验价格是否为空,可以是0
validatePrice(value){
......@@ -163,6 +167,7 @@ export default {
})"
value-field="id"
class="w-100" />
<div class="tips" v-if="stepTips">{{stepTips}}</div>
</el-form-item>
<el-form-item :label="$t('默认') + priceName">
<el-input-number v-model="value[`${fieldPrefix}Price`]" :placeholder="$t('整数或者两位小数')" :precision="2" :controls="false" class="w-100 mr-10"/>
......@@ -206,9 +211,10 @@ export default {
<!--包装类型价格-->
<template v-for="(item, i) in value.packagingList">
<el-form-item :label="$t('包装类型') + priceName + (i+1)">
<el-form-item :label="$t('包装类型') + priceName + (i+1)" :key="i">
<template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型将被忽略')}}</div>
</template>
<el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block">
<el-option
......@@ -229,7 +235,7 @@ export default {
<el-divider direction="vertical"></el-divider>
<el-link type="danger" @click.native="deletePackage(i)">{{$t('删除')}}</el-link>
</template>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型,将被忽略')}}</div>
</el-form-item>
</template>
</div>
......
......@@ -4,13 +4,18 @@ import Selector from "@/components/Selector/index.vue";
export default {
name: "QuickSet.vue",
props:{
type:String,
unitList:{
type: Array,
default: []
default(){
return []
}
},
currencyList:{
type: Array,
default: []
default(){
return []
}
},
value:{
type: Object,
......@@ -28,6 +33,16 @@ export default {
computed:{
getUnit(){
return (field, unitField) => {
if(this.type == 'sea'){
if(this.value.stepPrice && !this.value.priceStepList?.length){
return null
}
if(this.value.stepPrice){
return this.value.priceStepList[0][unitField]
}
return this.value[unitField]
}
// 后面是空运的
if(!this.value[field]?.length) return null
return this.value[field][0][unitField]
}
......@@ -39,6 +54,9 @@ export default {
if(!amount){
return this.$message.error(this.$t('请输入加价金额'))
}
if(this.type == 'sea'){
return this.batchSetSeaPrice(type, amount)
}
if(this.value?.priceType == 1){
this.batchSetPrice("fullPriceStepList", 'all', amount)
}else if(type == 'transport'){
......@@ -71,6 +89,37 @@ export default {
})
}
})
},
batchSetSeaPrice(type, amount){
console.log('快捷设置海运价格', type, amount)
if(!this.value.stepPrice){
if(!this.value.priceType){
this.setSeaPrice(this.value,"transport", amount)
this.setSeaPrice(this.value,"clearance",amount)
}else{
this.setSeaPrice(this.value,"all", amount)
}
return
}
this.value.priceStepList.forEach(item => {
if(!this.value.priceType){
this.setSeaPrice(item,"transport", amount)
this.setSeaPrice(item,"clearance",amount)
}else{
this.setSeaPrice(item,"all", amount)
}
})
},
setSeaPrice(parent, fieldPrefix, amount){
console.log(parent[`${fieldPrefix}Price`], ...arguments)
parent[`${fieldPrefix}Price`] = (parent[fieldPrefix + 'Price'] * 100 + amount * 100) / 100
if(!parent.specialList?.length) return
parent.specialList.forEach(special => {
console.log(special.specialDictType, special[fieldPrefix + 'Price'])
if(special[fieldPrefix + 'Price']){
special[fieldPrefix + 'Price'] = (special[fieldPrefix + 'Price'] * 100 + amount * 100) / 100
}
})
}
}
}
......
<script>
import Selector from "@/components/Selector/index.vue";
import Inputor from "@/components/Inputor/index.vue";
import Template from "@/views/cms/template/index.vue";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
export default {
name: "SeaPrice",
components: {Template, Inputor, Selector},
props:{
priceType: Number, // 1全包价,0清关费+运费
unitList:{
type: Array,
default: []
},
currencyList:{
type: Array,
default: []
},
readonly: Boolean,
value:{
type: Object,
default: () => {
return {
}
}
}
},
created() {
this.initSpecialPrice()
},
data(){
return {
}
},
methods:{
getDictDatas,
// 初始化特需加价
initSpecialPrice(){
if(!this.value.specialList){
this.$set(this.value, 'specialList', [])
}
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
if(!this.value.specialList.find(special => special.specialDictType == item.value)){
this.value.specialList.push({
allPrice: undefined, // 新建默认给0,否则默认是null
allPriceUnit: this.value[`allPriceUnit`],
allVolumeUnit: this.value[`allVolumeUnit`],
transportPrice: undefined, // 新建默认给0,否则默认是null
transportPriceUnit: this.value[`transportPriceUnit`],
transportVolumeUnit: this.value[`transportVolumeUnit`],
clearancePrice: undefined,
clearancePriceUnit: this.value[`clearancePriceUnit`],
clearanceVolumeUnit: this.value[`clearanceVolumeUnit`],
specialDictType: item.value
})
}
})
},
// 校验
validate(){
let valid = true
// 价格检查
if(this.priceType){
if(!this.validatePrice(this.value[`allPrice`])){
valid = false
this.$message.error(`请设置全包价`)
}
}else{
if(!this.validatePrice(this.value[`transportPrice`])){
valid = false
this.$message.error(`请设置运费`)
}
if(!this.validatePrice(this.value[`clearancePrice`])){
valid = false
this.$message.error(`请设置清关费`)
}
}
return valid
},
// 校验价格是否为空,可以是0
validatePrice(value){
if(value === undefined || value === null || value === ''){
return false
}
return true
},
}
}
</script>
<template>
<div>
<el-form-item :label="$t('默认运费')" v-if="!priceType">
<el-input-number v-model="value[`transportPrice`]" :placeholder="$t('整数或者两位小数')" :controls="false":disabled="readonly" class="w-100 mr-10"/>
<selector
:disabled="readonly"
v-model="value[`transportPriceUnit`]"
:options="currencyList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `transportPriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled="readonly"
v-model="value[`transportVolumeUnit`]"
:options="unitList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `transportVolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<el-form-item :label="$t('默认清关费')" v-if="!priceType">
<el-input-number v-model="value[`clearancePrice`]" :placeholder="$t('整数或者两位小数')" :disabled="readonly" :controls="false" class="w-100 mr-10"/>
<selector
:disabled="readonly"
v-model="value[`clearancePriceUnit`]"
:options="currencyList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `clearancePriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled="readonly"
v-model="value[`clearanceVolumeUnit`]"
:options="unitList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `clearanceVolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<el-form-item :label="$t('默认全包价')" v-if="priceType">
<el-input-number v-model="value[`allPrice`]" :placeholder="$t('整数或者两位小数')" :disabled="readonly" :controls="false" class="w-100 mr-10"/>
<selector
:disabled="readonly"
v-model="value[`allPriceUnit`]"
:options="currencyList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `allPriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled="readonly"
v-model="value[`allVolumeUnit`]"
:options="unitList"
:label-field="$l(null, 'title')"
@input="$emit('changeUnit', {
value: $event,
field: `allVolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<!--特性加价-->
<template v-for="(special, specialIndex) in value.specialList">
<div :key="specialIndex + 'transport'">
<el-form-item
v-if="!priceType"
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')"
>
<el-input-number v-model.number="special[`transportPrice`]" :controls="false" :min="0" :disabled="readonly" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="special[`transportPriceUnit`]" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special[`transportVolumeUnit`]" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
<el-form-item
v-if="!priceType"
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')"
>
<el-input-number v-model.number="special[`clearancePrice`]" :controls="false" :min="0" :disabled="readonly" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="special[`clearancePriceUnit`]" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special[`clearanceVolumeUnit`]" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
<el-form-item
v-if="priceType"
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')"
>
<el-input-number v-model.number="special[`allPrice`]" :controls="false" :min="0" :disabled="readonly" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="special[`allPriceUnit`]" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special[`allVolumeUnit`]" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
</div>
</template>
</div>
</template>
<style scoped lang="scss">
.bold {
font-weight: bold;
}
.text-lg{
font-size: 1.3rem;
}
.tips{
font-size: 1rem; color: red;
}
</style>
This diff is collapsed.
<script>
import Selector from "@/components/Selector/index.vue";
import Template from "@/views/cms/template/index.vue";
import {DICT_TYPE} from "@/utils/dict";
export default {
name: "ShowStepPriceItem",
components: {Template, Selector},
props: {
index: Number,
value: Object,
priceName: String,
fieldPrefix: String,
unitMap: {
type: Object,
default(){
return {}
}
},
currencyMap: {
type: Object,
default(){
return {}
}
}
},
computed:{
showPackages(){
return str => {
let arr = str.split(",")
return arr.map(item => {
return this.getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, item)
}).join(",")
}
}
}
}
</script>
<template>
<div>
<div class="mt-10">
{{$t("第{no}阶段", {no: index + 1})}} {{priceName}}
{{value.startNum}} - {{value.endNum}} {{unitMap[value.weightUnit]}}
</div>
<div class="pl-10" >
{{$t('默认') + priceName}}
{{value.transportPrice}} {{currencyMap[value[`${fieldPrefix}PriceUnit`]]}} / {{unitMap[value[`${fieldPrefix}VolumeUnit`]]}}
</div>
<!--特需加价-->
<div v-for="(special, specialIndex) in value.specialList">
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + priceName}}
{{special[`${fieldPrefix}Price`]}}
{{currencyMap[special[`${fieldPrefix}PriceUnit`]]}}
{{unitMap[special[`${fieldPrefix}VolumeUnit`]]}}
</div>
<!--包装价-->
<!--包装类型价格-->
<template v-for="(item, i) in value.packagingList">
{{$t('包装类型') + priceName + (i+1)}}
{{showPackages(item.packagingTypes)}}
{{item.packagingPrice}}
{{currencyMap[item.packagingPriceUnit]}}
{{unitMap[item.packagingVolumeUnit]}}
</template>
</div>
</template>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -137,6 +137,8 @@
<el-button size="mini" type="primary" @click="serviceClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">{{$t('开通服务')}}</el-button>
<!-- <el-button size="mini" type="danger" @click="$router.push('/offer/channel-route?lineId='+scope.row.lineId)" v-if="scope.row.lineId != null && scope.row.transportType == 3" >{{$t('渠道包装清关费')}}</el-button>-->
</template>
</el-table-column>
</el-table>
......
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