Commit defe1e96 authored by dragondean@qq.com's avatar dragondean@qq.com

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

parents 4df61f41 3b5eb410
<template>
<div style="width: 100%;min-width: 100px">
<el-select v-model="val">
<el-option :value="item.id" :label="$l(item, 'title') + item.fuhao" v-for="(item) in options"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "currency-select",
props:{
options:{
type:Array,
default:()=>[]
},
value:{
type: [Number,String],
default:undefined,
}
},
data(){
return{
val:''
}
},
created() {
this.val = this.value;
},
watch:{
val(){
this.$emit('input',this.val)
},
value(val){
console.log(val,'valllll')
this.val = val;
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<el-row type="flex" align="align" :gutter="10" >
<el-col :span="3">空运订单重量上限(kg)</el-col>
<el-col :span="6" ><el-input v-model="value1.airWeightLimit"></el-input></el-col>
<el-col :span="6">
<slot></slot>
</el-col>
</el-row>
<h1>空运清关费</h1>
<div v-for="(item ,index) in value1.channelPriceStepClearanceList">
<el-row :gutter="10">
<el-col :span="4">
{{index + 1 }}阶梯定价方案:
</el-col>
<el-col :span="6">
<el-button type="primary" @click="addInterval" v-if="index === 0" >
添加区间
</el-button>
<el-button type="danger" @click="deleteFn(index)" v-else>
删除
</el-button>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="3">
{{index + 1}}阶梯
</el-col>
<el-col :span="9">
<div style="display: flex;align-items: center;">
<el-input v-model="item.startNum"></el-input> - <el-input v-model="item.endNum" ></el-input > /
<weight-select v-model="item.weightUnit" :options="unitList"></weight-select>
</div>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="3" >
空运清关费
</el-col>
<el-col :span="9">
<div style="display: flex;align-items: center;">
<el-input v-model="item.clearancePrice"></el-input>
<currency-select :options="currencyList" v-model="item.clearancePriceUnit"></currency-select>
/ <weight-select :options="unitList" v-model="item.clearanceVolumeUnit"></weight-select>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import {getCurrencyPage} from "@/api/ecw/currency";
import CurrencySelect from "@/views/ecw/channel/componrnts/currency-select.vue";
import {getUnitList} from "@/api/ecw/unit";
import WeightSelect from "@/views/ecw/channel/componrnts/weight-select.vue";
export default {
props:{
value:{
type:Object,
default:()=>({channelPriceStepClearanceList:[]})
}
},
name: "packaging-type",
components: {WeightSelect, CurrencySelect},
created() {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getUnitList().then(res => this.unitList = res.data)
},
data(){
return {
currencyList:[],
unitList:[],
value1:{
airWeightLimit:undefined,
packagingTypes:undefined,
channelPriceStepClearanceList:[],
},
}
},
mounted() {
this.value1 = this.value
console.log(this.value1,'value1')
this.$nextTick(()=>{
if(this.value1.channelPriceStepClearanceList.length === 0){
this.addInterval()
}
})
},
methods:{
addInterval(){
let p = {
"channelId":'',
"clearancePrice":'',
"clearancePriceUnit":'',
"clearanceVolumeUnit":'',
"endNum":'',
"packagingId":'',
"startNum":'',
"weightUnit":''
}
this.value1.channelPriceStepClearanceList.push(p)
},
deleteFn(index){
this.value1.channelPriceStepClearanceList.splice(index, 1)
}
},
watch:{
value1:{
handler(val){
this.$emit('input', val)
},
deep:true
},
value:{
handler(val){
this.value1 = val;
},
deep:true
}
}
}
</script>
<style scoped>
.el-row {
margin-bottom: 10px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
</style>
<template>
<div style="min-width: 100px;width: 100%;">
<el-select v-model="val">
<el-option v-for="(item, index) in options" :value="item.id" :key="index" :label="$l(item ,'title')" ></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "weight-select",
props:{
options:{
type:Array,
default:()=>[]
},
value:{
type:[String,Number]
}
},
created() {
this.val = this.value;
},
data(){
return{
val:''
}
},
watch:{
val(){
this.$emit('input', this.val)
},
value(val){
this.val = val;
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-card shadow="never">
<div slot="header" class="clearfix">
<span>{{ $t('渠道信息') }}</span>
......@@ -85,16 +83,38 @@
</el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item :label="$t('渠道代理')" prop="channelAgent">
<el-input
v-model="form.channelAgent"
:placeholder="$t('请输入渠道代理')"
/>
</el-form-item>
</el-col> -->
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="可出商品特性">
<el-select multiple v-model="form.attrId">
<el-option v-for="(item, index) in attrList" :value="item.id" :label="$l(item, 'attrName')"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div style="display: flex; justify-content: space-between;">
<h1>
渠道包装列表
</h1>
<div>
<el-button type="primary" @click="addPackaging" >添加包装类型</el-button>
<el-button type="text" @click="dialogVisible = true;">选择渠道包装模板</el-button>
</div>
</div>
<el-row :gutter="20" v-for="(itemm, index) in form.channelPackagingList" :key="index">
<el-col :span="2">包装类型{{index + 1}}</el-col>
<el-col :span="5">
<el-select multiple v-model="itemm.packagingTypes" >
<el-option v-for="item in getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE)" :value="item.value" :key="item.value" :label="$l(item, 'label')" :disabled="deletePackagingTypes.includes(item.value) && !itemm.packagingTypes.includes(item.value)" ></el-option>
</el-select>
</el-col>
<el-col :span="16">
<packaging-type v-if="form.channelPackagingList.length" v-model="form.channelPackagingList[index]">
<el-button @click="deleteFn(index)" type="danger">删除包装类型{{index + 1}}</el-button>
</packaging-type>
</el-col>
</el-row>
<el-form-item :label="$t('备注-中文')" prop="remarksZh">
<el-input
v-model="form.remarksZh"
......@@ -134,29 +154,48 @@
<el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
<el-button @click="$router.back()">{{ $t('返回列表') }}</el-button>
</div>
</div>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="60%">
<index-dialog @copyFn="copyFn"></index-dialog>
<span slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="dialogVisible = false" type="primary">关 闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
createChannel,
updateChannel,
deleteChannel,
getChannel,
getChannelPage,
exportChannelExcel,
} from "@/api/ecw/channel";
import {getWarehouseList} from '@/api/ecw/warehouse'
import {getExpressPage} from '@/api/ecw/express'
import PackagingType from "@/views/ecw/channel/componrnts/packaging-type.vue";
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict";
import {getProductAttrList} from "@/api/ecw/productAttr";
import indexDialog from "@/views/ecw/channel/index-dialog.vue";
export default {
components: {PackagingType,indexDialog},
data() {
return {
dialogVisible:false,
form: {
channelCostCreateReqVO:{}
channelCostCreateReqVO:{},
channelPackagingList:[],
attrId:[],
},
rules: {},
expressList:[],
warehouseList: [],
warehouseIdsArr:[]
warehouseIdsArr:[],
attrList:[]
};
},
watch:{
......@@ -169,7 +208,12 @@ export default {
this.wareHouseIdsArr = val?.split(',') || []
} */
},
async created() {
mounted() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
async created() {
// 获得仓库
await getWarehouseList().then(res => {
this.warehouseList = res.data
......@@ -180,8 +224,11 @@ export default {
if (this.$route.query.id) {
getChannel(this.$route.query.id).then((res) => {
this.$set(this, 'form', res.data)
console.log('this.form.warehouseIds', this.form.warehouseIds)
this.$set(this, 'form', {... res.data})
this.form.attrId = this.form.attrId.split(',').map(i => +i)
this.form.channelPackagingList.forEach(item =>{
item.packagingTypes = item.packagingTypes.split(',') || []
})
if(this.form.warehouseIds.length){
this.warehouseIdsArr = this.form.warehouseIds.split(',')?.filter(item => !!item)
}
......@@ -190,6 +237,16 @@ export default {
},
computed:{
DICT_TYPE() {
return DICT_TYPE
},
deletePackagingTypes(){
let a = []
this.form.channelPackagingList.forEach(item => {
a.push(...item.packagingTypes)
})
return a
}
/* wareHouseIdsArr:{
get(){
return this.form.wareHouseIds?.split(',') || []
......@@ -201,23 +258,69 @@ export default {
} */
},
methods: {
getDictDatas,
copyFn(val){
this.form.channelPackagingList = [];
this.dialogVisible = false;
getChannel(val).then((res) => {
res.data.channelPackagingList.forEach((item,index) =>{
if(!this.form.channelPackagingList[index]){
this.form.channelPackagingList[index] = { airWeightLimit:undefined, packagingTypes:[], channelPriceStepClearanceList:[],}
}
item.channelPriceStepClearanceList.forEach((itemm, indexx) => {
let p = { "channelId":'',
"clearancePrice":'',
"clearancePriceUnit":'',
"clearanceVolumeUnit":'',
"endNum":'',
"packagingId":'',
"startNum":'',
"weightUnit":''}
if(!this.form.channelPackagingList[index].channelPriceStepClearanceList[indexx]){
this.form.channelPackagingList[index].channelPriceStepClearanceList[indexx] = p;
}
let it = this.form.channelPackagingList[index].channelPriceStepClearanceList[indexx]
this.form.channelPackagingList[index].channelPriceStepClearanceList[indexx] = {...p,...it,clearancePrice:itemm.clearancePrice,clearancePriceUnit:itemm.clearancePriceUnit,clearanceVolumeUnit:itemm.clearanceVolumeUnit} ;
})
})
});
},
deleteFn(index){
this.form.channelPackagingList.splice(index, 1)
},
//添加包装类型
addPackaging(){
let p = {
airWeightLimit:undefined,
packagingTypes:[],
channelPriceStepClearanceList:[],
}
this.form.channelPackagingList.push(p)
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
this.form.warehouseIds = this.warehouseIdsArr.join(',')
this.form.warehouseIds = this.warehouseIdsArr.join(',')
let form = JSON.parse(JSON.stringify(this.form))
let attrId = this.form.attrId
attrId = attrId.join(',')
form.attrId = attrId
form.channelPackagingList.forEach(item =>{
item.packagingTypes = item.packagingTypes.join(',')
})
// 修改的提交
if (this.form.channelId != null) {
updateChannel(this.form).then((response) => {
updateChannel(form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.$router.back();
});
return;
}
// 添加的提交
createChannel(this.form).then((response) => {
createChannel(form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.$router.back();
});
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('名称')" prop="nameZh">
<el-input v-model="queryParams.nameZh" :placeholder="$t('请输入名称')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="名称-英文" prop="nameEn">
<el-input v-model="queryParams.nameEn" placeholder="请输入名称-英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('内部名称')" prop="internalNameZh">
<el-input v-model="queryParams.internalNameZh" :placeholder="$t('请输入内部名称')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="内部名称-英文" prop="internalNameEn">
<el-input v-model="queryParams.internalNameEn" placeholder="请输入内部名称-英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('类型编码')" prop="typeNumber">
<el-input v-model="queryParams.typeNumber" :placeholder="$t('请输入类型编码')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="仓库ID字符串" prop="warehouseIds">
<el-input v-model="queryParams.warehouseIds" placeholder="请输入仓库ID字符串" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('排序')" prop="sort">
<el-input v-model="queryParams.sort" :placeholder="$t('请输入排序')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('快递ID')" prop="expressId">
<el-input v-model="queryParams.expressId" :placeholder="$t('请输入快递ID')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('预计时间')">
<el-input v-model="queryParams.etaTime" :placeholder="$t('预计到达天数')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('渠道代理')" prop="channelAgent">
<el-input v-model="queryParams.channelAgent" :placeholder="$t('请输入渠道代理')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('备注')" prop="remarksZh">
<el-input v-model="queryParams.remarksZh" :placeholder="$t('请输入备注-中文')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="备注-英文" prop="remarksEn">
<el-input v-model="queryParams.remarksEn" placeholder="请输入备注-英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item label="状态(0:禁用 1:启用)" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态(0:禁用 1:启用)" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select>
</el-form-item> -->
<!-- <el-form-item :label="$t('创建时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</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>
</el-form-item>
</el-form>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('渠道ID')" align="center" prop="channelId" />
<el-table-column :label="$t('名称')" align="center" prop="nameZh">
<template slot-scope="{row}">{{$l(row, 'name')}}</template>
</el-table-column>
<el-table-column :label="$t('内部名称')" align="center" prop="internalNameZh">
<template slot-scope="{row}">{{$l(row, 'internalName')}}</template>
</el-table-column>
<el-table-column :label="$t('包装数量')" prop="packagingCount">
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="copyFn(scope.row)">
复制
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</template>
<script>
import {getChannelPage, exportChannelExcel } from "@/api/ecw/channel";
export default {
name: "EcwChannelIndex",
components: {
},
data() {
return {
// 遮罩层
loading: false,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 渠道管理列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeEtaTime: [],
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
activated() {
this.getList();
},
methods: {
copyFn(val){
this.$emit('copyFn',val.channelId)
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
// 执行查询
getChannelPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNo: 1,
pageSize: 10
}
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
return this.$router.push('create_channel')
},
/** 修改按钮操作 */
handleUpdate(row) {
return this.$router.push('edit_channel?id=' + row.channelId)
},
/** 删除按钮操作 */
handleDelete(row) {
const channelId = row.channelId;
this.$modal.confirm(this.$t('是否确认删除渠道管理编号为{channelId}的数据项?'),{channelId} ).then(function() {
return deleteChannel(channelId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeEtaTime, 'etaTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有渠道管理数据项?').then(() => {
this.exportLoading = true;
return exportChannelExcel(params);
}).then(response => {
this.$download.excel(response, '渠道列表.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<style lang="scss">
.left {
.el-tag {
background-color: #e6f6fd;
border: 1px solid #ccecfb;
display: inline-block;
height:auto;
padding: 0 10px;
line-height: 30px;
font-size: 12px;
color: #02a1e9;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
}
}
</style>
<template>
<div>
<el-row type="flex" align="align" :gutter="10" >
<el-col :span="3">空运订单重量上限(kg)</el-col>
<el-col :span="6" ><el-input></el-input></el-col>
<el-col :span="6"><el-button type="danger">删除包装类型1</el-button></el-col>
</el-row>
<h1>空运清关费</h1>
<el-row :gutter="10">
<el-col :span="4">
第1阶梯定价方案:
</el-col>
<el-col :span="6">
<el-button type="primary">
添加区间
</el-button>
<el-button type="danger">
删除
</el-button>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="3">
第1阶梯
</el-col>
<el-col :span="6">
<div style="display: flex;align-items: center;">
<el-input></el-input> - <el-input></el-input> / <el-input></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="3" >
空运清关费
</el-col>
<el-col :span="6">
<div style="display: flex;align-items: center;">
<el-input></el-input><el-input></el-input> / <el-input></el-input>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: "packaging-type"
}
</script>
<style scoped>
.el-row {
margin-bottom: 10px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
</style>
......@@ -44,6 +44,11 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="归属仓库">
<el-checkbox-group v-model="value">
<el-checkbox v-for="(item ,index) in warehouseList" :key="item.id" :label="item.id">
{{$l(item,'title')}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -72,7 +77,11 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="可出商品特性"></el-form-item>
<el-form-item label="可出商品特性">
<el-select multiple value>
<el-option v-for="(item, index) in attrList" :value="item.id" :label="$l(item, 'attrName')"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div style="display: flex; justify-content: space-between;">
......@@ -86,7 +95,7 @@
</div>
<el-row :gutter="20">
<el-col :span="2">包装类型1:</el-col>
<el-col :span="5"><el-input></el-input></el-col>
<el-col :span="5"> <dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE"></dict-selector></el-col>
<el-col :span="16">
<packaging-type></packaging-type>
</el-col>
......@@ -107,11 +116,35 @@
</template>
<script>
import PackagingType from "@/views/ecw/channelMnage/componrnts/packaging-type.vue";
import PackagingType from "@/views/ecw/channel/componrnts/packaging-type.vue";
import {getProductAttrList} from "@/api/ecw/productAttr";
import {getWarehouseList} from "@/api/ecw/warehouse";
import {DICT_TYPE} from "@/utils/dict";
export default {
name: "edit",
components: {PackagingType}
computed: {
DICT_TYPE() {
return DICT_TYPE
}
},
components: {PackagingType},
data(){
return{
attrList:[],
warehouseList:[],
value:[]
}
},
created() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
getWarehouseList({tradeType:2}).then(r =>{
console.log('r',r.data)
this.warehouseList = r.data
})
}
}
</script>
......
......@@ -22,6 +22,10 @@
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<!-- v2.0空运专线,显示出货渠道 -->
<el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
{{channelName}}
</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}}
</el-descriptions-item>
......@@ -163,6 +167,8 @@ import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview'
import {getProduct} from '@/api/ecw/product'
import {getProductPriceGetPrice} from '@/api/ecw/productPrice'
import { getChannel } from '@/api/ecw/channel';
import {getDictData, getDictDatas} from '@/utils/dict'
export default {
name: "Pending",
......@@ -181,7 +187,8 @@ export default {
timers:"", //时间戳
FilePreAll:[], // 预览数组
TragetPic:{},
currencyList:[]
currencyList:[],
channelName:'/'
};
},
computed:{
......@@ -192,6 +199,9 @@ export default {
})
return map
},
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
},
created() {
getCurrencyList().then(res => this.currencyList = res.data)
......@@ -201,6 +211,11 @@ export default {
this.getOrders()
}
},
watch:{
'orderData.channelId'(){
this.getChannel()
},
},
methods: {
/** 查询列表 */
getList() {
......@@ -218,6 +233,12 @@ export default {
this.loading = false;
});
},
getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh
})
},
checkCode(data){
if(data.indexOf('+')==-1){
return '+'+data
......@@ -254,11 +275,22 @@ export default {
lineId: this.orderData.logisticsInfoDto.lineId,
channelId: this.orderData.logisticsInfoDto.channelId
}
let url = '../../lineProject/product-price/edit?' + (new URLSearchParams(params)).toString()
let url = ''
if([3,4].indexOf(this.orderData.transportId) > -1){
url = '../../lineProject/product-price/edit-air?' + (new URLSearchParams(params)).toString()
}else{
url = '../../lineProject/product-price/edit-sea?' + (new URLSearchParams(params)).toString()
}
getProductPriceGetPrice(queryParams).then(res=>{
console.log(res)
if(res.data){
url = '../../lineProject/product-price/edit?action=update&id='+res.data.id
if([3,4].indexOf(+this.orderData.transportId) > -1){
url = '../../lineProject/product-price/edit-air?action=update&id='+res.data.id
}else{
url = '../../lineProject/product-price/edit-sea?action=update&id='+res.data.id
}
}
return this.$router.push(url)
})
......
......@@ -26,6 +26,7 @@
<el-row>
<el-form-item :label="$t('运输路线')+':'" >
<span v-if="orderData">{{ $t('') }}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />{{ $t('') }}</span>
<span v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">{{ $t('') }}{{channelName}}{{ $t('') }}</span>
{{orderData?getRouterNameById():''}}
</el-form-item>
</el-row>
......@@ -173,16 +174,28 @@
</template>
</el-table-column>
<el-table-column :label="$t('填单箱数')" prop="num" />
<!-- v2.0 入仓特性异常 -->
<el-table-column :label="$t('填单特性')" prop="prodAttrIds">
<template slot-scope="scope">
{{getProdAtrr(scope.row.prodAtrIds)}}
</template>
</el-table-column>
<el-table-column :label="$t('入仓箱数')">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}
</template>
</el-table-column>
<!-- v2.0 入仓特性异常 -->
<el-table-column :label="$t('入仓特性')" prop="num">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO&&scope.row.warehouseInInfoVO.prodAtrIds?getProdAtrr(scope.row.warehouseInInfoVO.prodAtrIds):''}}
</template>
</el-table-column>
<el-table-column :label="$t('方数')" prop="volume">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}
</template>
</el-table-column>
<el-table-column :label="$t('方数')" prop="volume">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}
</template>
</el-table-column>
<el-table-column :label="$t('重量')" prop="weight">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}
......@@ -493,6 +506,7 @@
import {cancelProcessInstance} from '@/api/bpm/processInstance'
import {getCustomer} from '@/api/ecw/customer'
import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr'
export default {
name: "PrepayDeal",
components: {
......@@ -531,16 +545,19 @@
customerData:{},//归属客户
customerServiceList:[],//客户经理
productId1:null,
productId2:null
productId2:null,
productAttrList:[], // 商品属性
channelName:'/'
};
},
created() {
async created() {
if(this.$route.query.id){
this.orderExceptionId = this.$route.query.id
this.handlerParams.orderExceptionId = this.$route.query.id
this.getList()
}
this.productAttrList = (await getProductAttrList()).data
listServiceUser().then(r=>{
this.customerServiceList = r.data;
})
......@@ -567,7 +584,10 @@
})
this.region = region
})
}
},
'orderData.channelId'(){
this.getChannel()
},
},
computed: {
currencyMap(){
......@@ -586,6 +606,17 @@
}
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId)
}
},
getProdAtrr(ids){
if(!ids) return ''
let attr = []
let attrIds = ids.split(',')
this.productAttrList.forEach(item=>{
if(attrIds.indexOf(item.id)!==-1){
attr.push(this.$l(item, 'attrName'))
}
})
return attr.join(',')
}
},
methods: {
......@@ -598,6 +629,12 @@
if(label.length>0) return label[0].titleZh
return ''
},
getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh
})
},
getList() {
let that = this
that.loading = true;
......
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