Commit 18983f23 authored by 我在何方's avatar 我在何方
parents cf42a904 9ab53b11
...@@ -402,4 +402,109 @@ export function downloadLoadGoods(params) { ...@@ -402,4 +402,109 @@ export function downloadLoadGoods(params) {
timeout: 120000, timeout: 120000,
params, 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) { ...@@ -81,3 +81,36 @@ export function getCustomerContactsListByCustomer(query) {
return Promise.resolve() 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) { ...@@ -150,3 +150,12 @@ export function batchAddPrice(data) {
data data
}) })
} }
// 批量加价空运
export function batchAddPriceAir(data) {
return request({
url: '/ecw/product-price/batchAddPriceAir',
method: 'put',
data
})
}
...@@ -98,6 +98,14 @@ export function getTradeCityList(query) { ...@@ -98,6 +98,14 @@ export function getTradeCityList(query) {
params: query params: query
}) })
} }
// 获得目的地国家
export function getTradeCountryList(query) {
return request({
url: '/ecw/region/getTradeCountryList',
method: 'get',
params: query
})
}
export function listByIds(params){ export function listByIds(params){
...@@ -106,4 +114,4 @@ export function listByIds(params){ ...@@ -106,4 +114,4 @@ export function listByIds(params){
method: 'get', method: 'get',
params params
}) })
} }
\ No newline at end of file
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </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-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
...@@ -126,6 +130,7 @@ export default { ...@@ -126,6 +130,7 @@ export default {
category: null, category: null,
status: null, status: null,
result: null, result: null,
} }
}; };
}, },
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"/> type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"/>
</el-form-item> </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-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"/> :end-placeholder="$t('结束日期')"/>
</el-form-item> </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 <el-input v-model="queryParams.businessNo" :placeholder="$t('请输入业务编号')" clearable
@keyup.enter.native="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> --> </el-form-item>
<el-form-item> <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="handleQuery">{{ $t('搜索') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button>
......
...@@ -71,16 +71,23 @@ ...@@ -71,16 +71,23 @@
</el-form> </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-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-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 :disabled="$attrs.shipmentObj.approvaling" type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button> <el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button @click="startCheckout">{{$t('确认出仓')}}</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { airCheckoutCreate } from "@/api/ecw/boxSea"; import { airCheckoutCreate } from "@/api/ecw/boxSea";
import startCheckout from "./checkout/startCheckout.vue";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils"; import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
...@@ -91,7 +98,7 @@ import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../ ...@@ -91,7 +98,7 @@ import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../
export default { export default {
name: "checkout", name: "checkout",
inheritAttrs: false, inheritAttrs: false,
components: { userSelect, ImageUpload }, components: { userSelect, ImageUpload, startCheckout },
data() { data() {
return { return {
// 空运出仓对象 // 空运出仓对象
...@@ -106,6 +113,7 @@ export default { ...@@ -106,6 +113,7 @@ export default {
//deliverType: [{ required: true, message: this.$t("必填"), trigger: "change" }], //deliverType: [{ required: true, message: this.$t("必填"), trigger: "change" }],
checkoutTime: [{ required: true, message: this.$t("必填"), trigger: "change" }] checkoutTime: [{ required: true, message: this.$t("必填"), trigger: "change" }]
}, },
dialogVisible: false
}; };
}, },
created() { created() {
...@@ -140,6 +148,13 @@ export default { ...@@ -140,6 +148,13 @@ export default {
cancel(type) { cancel(type) {
this.$emit("closeDialog", type); this.$emit("closeDialog", type);
}, },
/** 开始出仓 */
startCheckout() {
this.dialogVisible = true;
},
closeDialog1() {
this.dialogVisible = false;
},
}, },
}; };
</script> </script>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<span class="mr-10">-</span> <span class="mr-10">-</span>
<el-input v-model="item.endNum" class="mr-10"></el-input > <el-input v-model="item.endNum" class="mr-10"></el-input >
<span class="mr-10">/</span> <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> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
type:String, type:String,
default:'channelPriceStepClearanceList' default:'channelPriceStepClearanceList'
}, },
readonly: Boolean readonly: Boolean,
}, },
name: "packaging-type", name: "packaging-type",
components: {Template, WeightSelect, CurrencySelect}, components: {Template, WeightSelect, CurrencySelect},
...@@ -95,24 +95,24 @@ export default { ...@@ -95,24 +95,24 @@ export default {
} }
}, },
computed:{ computed:{
screenCom(){ // screenCom(){
let num = undefined // let num = undefined
if(this.keyArr === 'channelPriceStepClearanceList'){ // if(this.keyArr === 'channelPriceStepClearanceList'){
num = this.getDictDatas(this.DICT_TYPE.AIR_CUSTOM_CLEARANCE)[0]?.value // num = this.getDictDatas(this.DICT_TYPE.AIR_CUSTOM_CLEARANCE)[0]?.value
}else { // }else {
num = this.getDictDatas(this.DICT_TYPE. AIR_COMMODITY_CUSTOM_CLEARANCE)[0]?.value // num = this.getDictDatas(this.DICT_TYPE. AIR_COMMODITY_CUSTOM_CLEARANCE)[0]?.value
} // }
//
return num // return num
} // }
}, },
mounted() { mounted() {
this.value1 = this.value this.value1 = this.value
this.$nextTick(()=>{ // this.$nextTick(()=>{
if(!this.value1.airWeightLimit){ // if(!this.value1.airWeightLimit){
this.value1.airWeightLimit = this.screenCom // this.value1.airWeightLimit = this.screenCom
} // }
}) // })
this.$nextTick(()=>{ this.$nextTick(()=>{
if(this.value1[this.keyArr] && this.value1[this.keyArr].length === 0){ if(this.value1[this.keyArr] && this.value1[this.keyArr].length === 0){
this.addInterval() this.addInterval()
...@@ -120,11 +120,6 @@ export default { ...@@ -120,11 +120,6 @@ export default {
}) })
}, },
methods:{ methods:{
changeWeight(e){
this.value1[this.keyArr].forEach(item => {
item.weightUnit = e
})
},
setCurrency(e){ setCurrency(e){
this.value1[this.keyArr].forEach(item => { this.value1[this.keyArr].forEach(item => {
item.clearancePriceUnit = e item.clearancePriceUnit = e
...@@ -137,14 +132,11 @@ export default { ...@@ -137,14 +132,11 @@ export default {
}, },
addInterval(){ addInterval(){
let p = { let p = {
"channelId":'',
"clearancePrice":'', "clearancePrice":'',
"clearancePriceUnit": this.value1[this.keyArr].length && this.value1[this.keyArr][0].clearancePriceUnit ? this.value1[this.keyArr][0].clearancePriceUnit : '', "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, "clearanceVolumeUnit":this.value1[this.keyArr].length ? this.value1[this.keyArr][0].clearanceVolumeUnit : 6,
"endNum":'', "endNum":'',
"packagingId":'',
"startNum":'', "startNum":'',
"weightUnit": this.value1[this.keyArr].length ? this.value1[this.keyArr][0].weightUnit : 6
} }
this.value1[this.keyArr].push(p) this.value1[this.keyArr].push(p)
this.$forceUpdate(); this.$forceUpdate();
...@@ -152,10 +144,11 @@ export default { ...@@ -152,10 +144,11 @@ export default {
deleteFn(index){ deleteFn(index){
this.value1[this.keyArr].splice(index, 1) this.value1[this.keyArr].splice(index, 1)
this.$forceUpdate(); this.$forceUpdate();
} }
}, },
watch:{ watch:{
'value1.priceStepClearanceList':{ 'value1.priceStepClearanceCreateReqVOList':{
handler(val){ handler(val){
if(val && val.length === 0){ if(val && val.length === 0){
this.addInterval(); this.addInterval();
......
This diff is collapsed.
...@@ -59,27 +59,14 @@ ...@@ -59,27 +59,14 @@
</el-select> </el-select>
</el-form-item> </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="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="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="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" <!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>{{$t('导出')}}</el-button> --> >{{$t('导出')}}</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="total_num"> <total_num :total-data="totalData"></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>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> --> <!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
...@@ -145,10 +132,11 @@ ...@@ -145,10 +132,11 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse' import {getWarehouseList} from '@/api/ecw/warehouse'
import Total_num from "@/views/ecw/deptTarget/total_num.vue";
export default { export default {
name: "EcwDepttargetAllachievement", name: "EcwDepttargetAllachievement",
components: {}, components: {Total_num},
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -219,6 +207,12 @@ ...@@ -219,6 +207,12 @@
sumWeight:0, sumWeight:0,
sumVolume:0, sumVolume:0,
sumNum:0, sumNum:0,
newTotalNum:0,
newTotalVolume:0,
newTotalWeight:0,
oldTotalNum:0,
oldTotalVolume:0,
oldTotalWeight:0,
}, },
myAchievementData:{}, myAchievementData:{},
warehouseList:[] warehouseList:[]
...@@ -313,6 +307,12 @@ ...@@ -313,6 +307,12 @@
this.totalData.developWeight =this.myAchievementData.devTotalWeight this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum 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; this.loading = false;
}); });
}, },
...@@ -350,7 +350,11 @@ ...@@ -350,7 +350,11 @@
this.dateRangeCreateTime = []; this.dateRangeCreateTime = [];
this.dateRangeStartTime = []; this.dateRangeStartTime = [];
this.dateRangeEndTime = []; this.dateRangeEndTime = [];
this.resetForm("queryForm"); this.resetForm("queryParams");
this.queryParams = {
pageNo: 1,
pageSize: 10
}
this.handleQuery(); this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
...@@ -516,7 +520,7 @@ ...@@ -516,7 +520,7 @@
.total_num{ .total_num{
display:flex; display:flex;
align-items: center; align-items: center;
justify-content: center; justify-content: left;
margin:20px 0; margin:20px 0;
font-size:15px; font-size:15px;
} }
......
...@@ -70,20 +70,7 @@ ...@@ -70,20 +70,7 @@
>{{$t('导出')}}</el-button> --> >{{$t('导出')}}</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="total_num"> <total_num :total-data="totalData"></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>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> --> <!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
...@@ -147,10 +134,11 @@ ...@@ -147,10 +134,11 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse' import {getWarehouseList} from '@/api/ecw/warehouse'
import Total_num from "@/views/ecw/deptTarget/total_num.vue";
export default { export default {
name: "EcwDepttargetMyachievement", name: "EcwDepttargetMyachievement",
components: {}, components: {Total_num},
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -316,6 +304,12 @@ ...@@ -316,6 +304,12 @@
this.totalData.developWeight =this.myAchievementData.devTotalWeight this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum 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; this.loading = false;
}); });
}, },
......
...@@ -69,20 +69,7 @@ ...@@ -69,20 +69,7 @@
>{{$t('导出')}}</el-button> --> >{{$t('导出')}}</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="total_num"> <total_num :total-data="totalData" ></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>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> --> <!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
...@@ -147,10 +134,11 @@ ...@@ -147,10 +134,11 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse' import {getWarehouseList} from '@/api/ecw/warehouse'
import Total_num from "@/views/ecw/deptTarget/total_num.vue";
export default { export default {
name: "EcwDepttargetMydeptachievement", name: "EcwDepttargetMydeptachievement",
components: {}, components: {Total_num},
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -313,6 +301,12 @@ ...@@ -313,6 +301,12 @@
this.totalData.developWeight =this.myAchievementData.devTotalWeight this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum 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; this.loading = false;
}); });
}, },
...@@ -491,14 +485,5 @@ ...@@ -491,14 +485,5 @@
<style scoped > <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> </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 { ...@@ -939,6 +939,14 @@ export default {
'form.channelId'(){ 'form.channelId'(){
this.calculationPrice() this.calculationPrice()
if(this.form.lineId) this.getOfferData() if(this.form.lineId) this.getOfferData()
// 选择渠道后需要筛选目的城市和线路
// 有点卡,改异步
this.$nextTick(() => {
// 更新目的城市备选
this.getTradeCity()
// 更新线路备选
this.getOpenedRouterList()
})
}, },
'form.consigneeCountryCode'(){ 'form.consigneeCountryCode'(){
if(this.form.lineId) this.getOfferData() if(this.form.lineId) this.getOfferData()
...@@ -1086,7 +1094,7 @@ export default { ...@@ -1086,7 +1094,7 @@ export default {
this.productAttrList = (await getProductAttrList()).data this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data this.channelList = (await getChannelList()).data
this.tradeCityList = (await getTradeCityList()).data await this.getTradeCity()
this.currencyList = (await getCurrencyList()).data this.currencyList = (await getCurrencyList()).data
this.unitList = (await getUnitList()).data this.unitList = (await getUnitList()).data
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE) this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
...@@ -1110,6 +1118,13 @@ export default { ...@@ -1110,6 +1118,13 @@ export default {
}, },
methods: { methods: {
async getTradeCity(){
let query = {}
if(this.form.channelId){
query.channelId = this.form.channelId
}
this.tradeCityList = (await getTradeCityList(query)).data
},
onTableMounted(e){ onTableMounted(e){
// console.warn('onTableMounted', e) // console.warn('onTableMounted', e)
}, },
...@@ -1333,6 +1348,9 @@ export default { ...@@ -1333,6 +1348,9 @@ export default {
if(this.form.transportId){ if(this.form.transportId){
params.transportType = 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 if(!params.startCityId && !params.destCityId && !params.transportType) return false
getOpenedRouterList(params).then(res => this.routerList = res.data.filter(item => { getOpenedRouterList(params).then(res => this.routerList = res.data.filter(item => {
......
...@@ -224,18 +224,22 @@ ...@@ -224,18 +224,22 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<packaging-type key-arr="priceStepClearanceList" v-model="form"> <el-form-item label-width="150px" label="空运订单重量上限kg">
<el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button> <el-input-number v-model="form.airWeightLimit" controls-position="right" ></el-input-number>
</packaging-type>
<p v-if="lineNum"> </el-form-item>
<span> <!-- <packaging-type key-arr="priceStepClearanceList" v-model="form">-->
复制模板线路价格:{{lineNum}}个 <!-- <el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button>-->
</span> <!-- </packaging-type>-->
<span @click="toPriceManager(formCopy, true)" style="color: #0a84ff;cursor: pointer;"> <!-- <p v-if="lineNum">-->
查看《#{{$l(formCopy,'title')}}#》路线价格 <!-- <span>-->
</span> <!-- 复制模板线路价格:{{lineNum}}个-->
<el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button> <!-- </span>-->
</p> <!-- <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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button> <el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
...@@ -415,59 +419,59 @@ export default { ...@@ -415,59 +419,59 @@ export default {
}, },
methods: { methods: {
copyLine(val , bol){ // copyLine(val , bol){
this.formCopy = val; // this.formCopy = val;
let copy = ()=>{ // let copy = ()=>{
if(val.priceStepClearanceList.length === 0) return this.form.priceStepClearanceList = [] // if(val.priceStepClearanceList.length === 0) return this.form.priceStepClearanceList = []
this.form.airWeightLimit = val.airWeightLimit; // this.form.airWeightLimit = val.airWeightLimit;
val.priceStepClearanceList.forEach((item ,index) =>{ // val.priceStepClearanceList.forEach((item ,index) =>{
if(this.form.priceStepClearanceList[index]){ // if(this.form.priceStepClearanceList[index]){
this.form.priceStepClearanceList[index].clearancePrice = item.clearancePrice // this.form.priceStepClearanceList[index].clearancePrice = item.clearancePrice
this.form.priceStepClearanceList[index].clearancePriceUnit = item.clearancePriceUnit // this.form.priceStepClearanceList[index].clearancePriceUnit = item.clearancePriceUnit
this.form.priceStepClearanceList[index].clearanceVolumeUnit = item.clearanceVolumeUnit // this.form.priceStepClearanceList[index].clearanceVolumeUnit = item.clearanceVolumeUnit
this.form.priceStepClearanceList[index].endNum = item.endNum // this.form.priceStepClearanceList[index].endNum = item.endNum
this.form.priceStepClearanceList[index].startNum = item.startNum // this.form.priceStepClearanceList[index].startNum = item.startNum
this.form.priceStepClearanceList[index].weightUnit = item.weightUnit // this.form.priceStepClearanceList[index].weightUnit = item.weightUnit
}else { // }else {
let p = { // let p = {
"channelId":undefined, // "channelId":undefined,
"clearancePrice":item.clearancePrice, // "clearancePrice":item.clearancePrice,
"clearancePriceUnit":item.clearancePriceUnit, // "clearancePriceUnit":item.clearancePriceUnit,
"clearanceVolumeUnit":item.clearanceVolumeUnit, // "clearanceVolumeUnit":item.clearanceVolumeUnit,
"endNum":item.endNum, // "endNum":item.endNum,
"packagingId":undefined, // "packagingId":undefined,
"startNum":item.startNum, // "startNum":item.startNum,
"weightUnit":item.weightUnit // "weightUnit":item.weightUnit
} // }
this.form.priceStepClearanceList.push(p) // this.form.priceStepClearanceList.push(p)
} // }
}) // })
} // }
this.visible = false; // this.visible = false;
if(bol){ // if(bol){
let message = this.$l(this.form,'title') ? `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品#${this.$l(this.form,'title')}#中?` : `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品中?` // let message = this.$l(this.form,'title') ? `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品#${this.$l(this.form,'title')}#中?` : `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品中?`
this.$confirm(message, '提示', { // this.$confirm(message, '提示', {
confirmButtonText: '确定', // confirmButtonText: '确定',
cancelButtonText: '取消', // cancelButtonText: '取消',
type: 'warning' // type: 'warning'
}).then(() => { // }).then(() => {
// this.form.priceLineCount = val.id; // // this.form.priceLineCount = val.id;
this.lineNum = val.priceLineCount; // this.lineNum = val.priceLineCount;
this.form.productTemplateId = val.id; // this.form.productTemplateId = val.id;
this.form.isCopyProductPriceTemplate = true; // this.form.isCopyProductPriceTemplate = true;
copy() // copy()
this.open = true; // this.open = true;
}).catch(() => { // }).catch(() => {
this.open = true; // this.open = true;
}); // });
}else { // }else {
this.open = true; // this.open = true;
copy() // copy()
this.lineNum = 0 // this.lineNum = 0
this.form.isCopyProductPriceTemplate = false; // this.form.isCopyProductPriceTemplate = false;
} // }
this.$forceUpdate() // this.$forceUpdate()
}, // },
/** 获取产品属性列表 */ /** 获取产品属性列表 */
getAttrList() { getAttrList() {
getProductAttrList().then(response => { getProductAttrList().then(response => {
...@@ -556,6 +560,7 @@ export default { ...@@ -556,6 +560,7 @@ export default {
priceStepClearanceList:[], priceStepClearanceList:[],
isCopyProductPriceTemplate:false, isCopyProductPriceTemplate:false,
productTemplateId:undefined, productTemplateId:undefined,
}; };
this.lineNum = 0 this.lineNum = 0
this.resetForm("form"); this.resetForm("form");
...@@ -583,6 +588,7 @@ export default { ...@@ -583,6 +588,7 @@ export default {
if (this.queryParams.typeId) { if (this.queryParams.typeId) {
this.form.typeId = 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) { handleUpdate(row) {
...@@ -607,6 +613,7 @@ export default { ...@@ -607,6 +613,7 @@ export default {
this.form.couponIds = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId) this.form.couponIds = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
// this.reset() // this.reset()
}) })
}); });
}, },
verify(row){ verify(row){
...@@ -621,15 +628,15 @@ export default { ...@@ -621,15 +628,15 @@ export default {
if(!this.form.airWeightLimit){ if(!this.form.airWeightLimit){
return this.$message.warning('请输入空运订单重量上限') return this.$message.warning('请输入空运订单重量上限')
} }
if(this.form.priceStepClearanceList.length === 0){ // if(this.form.priceStepClearanceList.length === 0){
return this.$message.warning('阶梯定价输入不完整!') // return this.$message.warning('阶梯定价输入不完整!')
}else { // }else {
let bol = this.form.priceStepClearanceList.every(this.verify) // let bol = this.form.priceStepClearanceList.every(this.verify)
if(!bol){ // if(!bol){
return this.$message.warning('阶梯定价输入不完整!') // return this.$message.warning('阶梯定价输入不完整!')
} // }
//
} // }
//商品特性转字符串 //商品特性转字符串
this.form.attrId = this.form.attrArray.join(','); this.form.attrId = this.form.attrArray.join(',');
// 修改的提交 // 修改的提交
......
...@@ -411,7 +411,10 @@ export default { ...@@ -411,7 +411,10 @@ export default {
minWeightUnit, minWeightUnit,
needOrderInquiry, needOrderInquiry,
needBook, needBook,
needPay needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} = res.data } = res.data
const data = { const data = {
...@@ -432,7 +435,10 @@ export default { ...@@ -432,7 +435,10 @@ export default {
minWeightUnit, minWeightUnit,
needOrderInquiry, needOrderInquiry,
needBook, needBook,
needPay needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} }
// 海运需要填充货柜位置和订单方数上限 // 海运需要填充货柜位置和订单方数上限
if(this.type == 'sea'){ if(this.type == 'sea'){
......
...@@ -216,15 +216,6 @@ export default { ...@@ -216,15 +216,6 @@ export default {
// 获取模板数据(复制的源路线价格信息) // 获取模板数据(复制的源路线价格信息)
async getTemplateDetail(id){ async getTemplateDetail(id){
const res = await getProductPrice(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 { const {
allPrice, allPrice,
...@@ -244,7 +235,10 @@ export default { ...@@ -244,7 +235,10 @@ export default {
minWeightUnit, minWeightUnit,
needOrderInquiry, needOrderInquiry,
needBook, needBook,
needPay needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} = res.data } = res.data
const data = { const data = {
...@@ -265,7 +259,10 @@ export default { ...@@ -265,7 +259,10 @@ export default {
minWeightUnit, minWeightUnit,
needOrderInquiry, needOrderInquiry,
needBook, needBook,
needPay needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} }
this.$set(this, 'form', Object.assign({}, this.form, data)) this.$set(this, 'form', Object.assign({}, this.form, data))
......
This diff is collapsed.
<script> <script>
import {getPriceSnapshotList} from "@/api/ecw/productPrice"; 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 { export default {
name: "Logs", name: "Logs",
components: {ShowStepPriceItem, Template},
filters: {parseTime},
props:{ props:{
currencyMap:{ currencyMap:{
type:Object, type:Object,
...@@ -25,6 +30,7 @@ export default { ...@@ -25,6 +30,7 @@ export default {
} }
}, },
methods:{ methods:{
parseTime,
open(id){ open(id){
this.showLogsDialog = true this.showLogsDialog = true
this.loading = true this.loading = true
...@@ -61,57 +67,98 @@ export default { ...@@ -61,57 +67,98 @@ export default {
<!----阶梯定价--> <!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1"> <template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList"> <!--老的数据格式-->
<div class="mt-10"> <template v-if="row.detail.priceStepList">
{{index+1}}阶段 <template v-for="(item, index) in row.detail.priceStepList">
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}} <div class="mt-10">
</div> {{index+1}}阶段
<template v-if="row.detail.priceType != 1"> {{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div> </div>
<!--空运没有清关费, 不需要显示--> <template v-if="row.detail.priceType != 1">
<div v-if="type != 'air'" :key="item.specialDictType + '_clearance'" class="pl-10"> <div :key="index + '_freight'" class="pl-10" >
清关费: 运费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}} {{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> </div>
</template> </template>
<div v-else class="pl-10"> </template>
全包价: <template v-else-if="row.detail.priceType">
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}} <template v-for="(item, index) in row.detail.fullPriceStepList">
</div> <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> </template>
<template v-else> <template v-else>
<template v-if="row.detail.priceType != 1"> <template v-if="row.detail.priceType != 1">
<div> <div>
默认运费 {{$t('默认运费')}}
{{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}} {{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}}
</div> </div>
<div> <div>
默认清关费 {{$t('默认清关费')}}
{{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}} {{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}}
</div> </div>
</template> </template>
<div v-else> <div v-else>
全包价 {{$t('全包价')}}
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}} {{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div> </div>
<template v-for="(item, index) in row.detail.specialList"> <template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1"> <template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" > <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]}} {{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div> </div>
<div :key="item.specialDictType + '_clearance'" > <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]}} {{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div> </div>
</template> </template>
<div v-else> <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]}} {{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div> </div>
</template> </template>
......
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
}, },
showAdd: Boolean, showAdd: Boolean,
readonly: Boolean, readonly: Boolean,
stepTips: String,
value:{ value:{
type: Object, type: Object,
default: () => { default: () => {
...@@ -51,7 +52,8 @@ export default { ...@@ -51,7 +52,8 @@ export default {
}, },
computed:{ computed:{
packagingList(){ 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 dict.enable = true
this.value.packagingList.forEach(item => { this.value.packagingList.forEach(item => {
if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){ if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){
...@@ -97,32 +99,34 @@ export default { ...@@ -97,32 +99,34 @@ export default {
}, },
// 校验 // 校验
validate(){ validate(){
let valid = true
const index = this.index const index = this.index
const errors = []
// 区间设置检查 // 区间设置检查
if(index > 0 && !this.value.startNum){ if(index > 0 && !this.value.startNum){
valid = false errors.push(`请设置${this.priceName}${index+1}阶段的起始值`)
this.$message.error(`请设置第${index+1}阶段的起始值`)
} }
if(!this.value.endNum){ if(!this.value.endNum){
valid = false errors.push(`请设置${this.priceName}${index+1}阶段的结束值`)
this.$message.error(`请设置第${index+1}阶段的结束值`)
} }
// 价格检查 // 价格检查
if(!this.validatePrice(this.value[`${this.fieldPrefix}Price`])){ if(!this.validatePrice(this.value[`${this.fieldPrefix}Price`])){
valid = false errors.push(`请设置第${index+1}阶段的${this.priceName}`)
this.$message.error(`请设置第${index+1}阶段的${this.priceName}`)
} }
// 包装价格检查 // 包装价格检查
if(this.value.packagingList?.length){ if(this.value.packagingList?.length){
this.value.packagingList.forEach((item, i) => { this.value.packagingList.forEach((item, i) => {
if(item.packagingTypes?.length && !this.validatePrice(item.packagingPrice)){ if(item.packagingTypes?.length && !this.validatePrice(item.packagingPrice)){
valid = false errors.push(`请设置第${index+1}阶段的包装类型${i+1}${this.priceName}`)
this.$message.error(`请设置第${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 // 校验价格是否为空,可以是0
validatePrice(value){ validatePrice(value){
...@@ -163,6 +167,7 @@ export default { ...@@ -163,6 +167,7 @@ export default {
})" })"
value-field="id" value-field="id"
class="w-100" /> class="w-100" />
<div class="tips" v-if="stepTips">{{stepTips}}</div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认') + priceName"> <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"/> <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 { ...@@ -206,9 +211,10 @@ export default {
<!--包装类型价格--> <!--包装类型价格-->
<template v-for="(item, i) in value.packagingList"> <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> <template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div> <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> </template>
<el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block"> <el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block">
<el-option <el-option
...@@ -229,7 +235,7 @@ export default { ...@@ -229,7 +235,7 @@ export default {
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-link type="danger" @click.native="deletePackage(i)">{{$t('删除')}}</el-link> <el-link type="danger" @click.native="deletePackage(i)">{{$t('删除')}}</el-link>
</template> </template>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型,将被忽略')}}</div>
</el-form-item> </el-form-item>
</template> </template>
</div> </div>
......
...@@ -4,13 +4,18 @@ import Selector from "@/components/Selector/index.vue"; ...@@ -4,13 +4,18 @@ import Selector from "@/components/Selector/index.vue";
export default { export default {
name: "QuickSet.vue", name: "QuickSet.vue",
props:{ props:{
type:String,
unitList:{ unitList:{
type: Array, type: Array,
default: [] default(){
return []
}
}, },
currencyList:{ currencyList:{
type: Array, type: Array,
default: [] default(){
return []
}
}, },
value:{ value:{
type: Object, type: Object,
...@@ -28,6 +33,16 @@ export default { ...@@ -28,6 +33,16 @@ export default {
computed:{ computed:{
getUnit(){ getUnit(){
return (field, unitField) => { 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 if(!this.value[field]?.length) return null
return this.value[field][0][unitField] return this.value[field][0][unitField]
} }
...@@ -39,6 +54,9 @@ export default { ...@@ -39,6 +54,9 @@ export default {
if(!amount){ if(!amount){
return this.$message.error(this.$t('请输入加价金额')) return this.$message.error(this.$t('请输入加价金额'))
} }
if(this.type == 'sea'){
return this.batchSetSeaPrice(type, amount)
}
if(this.value?.priceType == 1){ if(this.value?.priceType == 1){
this.batchSetPrice("fullPriceStepList", 'all', amount) this.batchSetPrice("fullPriceStepList", 'all', amount)
}else if(type == 'transport'){ }else if(type == 'transport'){
...@@ -71,6 +89,37 @@ export default { ...@@ -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 @@ ...@@ -137,6 +137,8 @@
<el-button size="mini" type="primary" @click="serviceClick(scope.row)" v-if="scope.row.lineId != null" <el-button size="mini" type="primary" @click="serviceClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">{{$t('开通服务')}}</el-button> 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> </template>
</el-table-column> </el-table-column>
</el-table> </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