Commit 9cbec865 authored by 我在何方's avatar 我在何方
parents 9f7501fd bc8b1378
...@@ -1015,3 +1015,11 @@ export function setCanNotShipment(orderId){ ...@@ -1015,3 +1015,11 @@ export function setCanNotShipment(orderId){
method: 'put', method: 'put',
}) })
} }
// 查看母订单
export function getParentOrder(orderId){
return request({
url: '/ecw/order/getParentOrder?orderId=' + orderId,
method: 'get'
})
}
<template> <template>
<el-select v-model="valueSync" :multiple="multiple" :disabled="disabled" :filterable="filterable" :placeholder="$t('请选择')"> <el-select :clearable="clearable" v-model="valueSync" :multiple="multiple" :disabled="disabled" :filterable="filterable" :placeholder="$t('请选择')">
<el-option v-for="item in optionsFormated" :key="item.key" :label="item.label" :value="item.value" /> <el-option v-for="item in optionsFormated" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
......
...@@ -233,6 +233,9 @@ export const DICT_TYPE = { ...@@ -233,6 +233,9 @@ export const DICT_TYPE = {
BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态 BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态
BOX_FLYING_ERROR_TYPE: 'flying_error_type',// 航班异常状态 BOX_FLYING_ERROR_TYPE: 'flying_error_type',// 航班异常状态
SETTLEMENT_STATUS: 'settlement_status', // 结算状态 SETTLEMENT_STATUS: 'settlement_status', // 结算状态
FLYING_TICKET_EXCEPTION: 'flying_ticket_exception', // 起飞异常
ARRIVAL_TICKET_EXCEPTION: 'arrival_ticket_exception', // 到港异常
CLEARANCE_TICKET_EXCEPTION: 'clearance_ticket_exception', // 清关异常
APP_TYPE:"app_type", //系统类型 APP_TYPE:"app_type", //系统类型
AIR_SHIPMENT_PROCESS:'air_shipment_process', AIR_SHIPMENT_PROCESS:'air_shipment_process',
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('票异常')" :rules="[{required: true,message: this.$t('票异常必填'),trigger: 'blur'}]" prop="billAbnId"> <el-form-item :label="$t('票异常')" :rules="[{required: true,message: this.$t('票异常必填'),trigger: 'blur'}]" prop="billAbnId">
<el-select v-model="errorObj.billAbnId" :placeholder="$t('请选择票异常')"> <el-select v-model="errorObj.billAbnId" :placeholder="$t('请选择票异常')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> <el-option v-for="type in this.getDictDatas(DICT_TYPE[this.regprocess])" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('异常情况')"> <el-form-item :label="$t('异常情况')">
...@@ -52,6 +52,7 @@ import { abnormalCreate } from "@/api/ecw/boxSea"; ...@@ -52,6 +52,7 @@ import { abnormalCreate } from "@/api/ecw/boxSea";
import { serviceMsg } from "./shippingSea/utils"; import { serviceMsg } from "./shippingSea/utils";
import userSelect from "./shippingSea/nodePage/common/userSelect.vue"; import userSelect from "./shippingSea/nodePage/common/userSelect.vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { log } from 'bpmn-js-token-simulation';
/** /**
* 异常登记 * 异常登记
...@@ -88,6 +89,25 @@ export default { ...@@ -88,6 +89,25 @@ export default {
'sea': 'BOX_SHIPPING_PROCESS', 'sea': 'BOX_SHIPPING_PROCESS',
'seaAir': 'BOX_SEA_AIR' 'seaAir': 'BOX_SEA_AIR'
}[this.flag] }[this.flag]
},
regprocess(){
var data = ''
this.$set(this.errorObj, 'billAbnId', null)
switch(this.errorObj.opStep){
case '10':
data = 'FLYING_TICKET_EXCEPTION'
break;
case '12':
data = 'ARRIVAL_TICKET_EXCEPTION'
break
case '13':
data = 'CLEARANCE_TICKET_EXCEPTION'
break
default:
data = 'BOX_SHIPPING_TICKET_EXCEPTION'
break
}
return data
} }
}, },
created() { created() {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-form-item :label="$t('预计开船时间')"> <el-form-item :label="$t('预计开船时间')">
{{getSailingTime()}} {{getSailingTime()}}
</el-form-item> </el-form-item>
<el-form-item :label="$t('实际开船时间')"> <el-form-item :label="$t('实际开船时间')" prop="dtRealShipTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="departureObj.dtRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="departureObj.dtRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<p class="message-area">{{$t('订单状态与短信通知,将到指定时间更新与发送')}}</p> <p class="message-area">{{$t('订单状态与短信通知,将到指定时间更新与发送')}}</p>
<p class="message-area" v-show="showMsg">{{$t('实际开船实际与预计时间不符')}}</p> <p class="message-area" v-show="showMsg">{{$t('实际开船实际与预计时间不符')}}</p>
...@@ -51,6 +51,9 @@ export default { ...@@ -51,6 +51,9 @@ export default {
dtEstArrivalTime: [ dtEstArrivalTime: [
{ required: true, message: this.$t("必填"), trigger: "change" }, { required: true, message: this.$t("必填"), trigger: "change" },
], ],
dtRealShipTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
]
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-form-item :label="$t('到仓时间')"> <el-form-item :label="$t('到仓时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('卸柜时间')"> <el-form-item :label="$t('卸柜时间')" prop="ulBoxTime" :rules="[{ required: true, message: this.$t('必填'), trigger: 'blue' }]">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="unloadingObj.ulBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="unloadingObj.ulBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</el-form-item> </el-form-item>
<!--空运多一个出货渠道筛选--> <!--空运多一个出货渠道筛选-->
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="channelList.length"> <el-form-item :label="$t('出货渠道')" prop="channelId" v-if="channelList.length">
<selector :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector> <selector :clearable="true" :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('特需')" prop="packageType"> <el-form-item :label="$t('特需')" prop="packageType">
<el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable > <el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable >
...@@ -343,9 +343,17 @@ ...@@ -343,9 +343,17 @@
</template> </template>
<!-- 合单,拆单 --> <!-- 合单,拆单 -->
<template v-if=" (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState && scope.row.status > 3 && exclude(scope.row.inWarehouseState, [204,205,206,212,213])"> <!--可出后不显示拆单(经确认合单也不显示) https://zentao.test.jdshangmen.com/bug-view-5322.html-->
<template
v-if=" ([3,4].indexOf(scope.row.transportId) < 0 || scope.row.airShipment < 2) &&
(scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314))
&& !scope.row.abnormalState && scope.row.status > 3
&& exclude(scope.row.inWarehouseState, [204,205,206,212,213])">
<el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" v-hasPermi="['ecw:order:merge']">{{$t('合单申请')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" v-hasPermi="['ecw:order:merge']">{{$t('合单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" v-hasPermi="['ecw:order:split']">{{$t('拆单申请')}}</el-dropdown-item>
<el-dropdown-item
@click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)"
v-hasPermi="['ecw:order:split']">{{$t('拆单申请')}}</el-dropdown-item>
</template> </template>
<!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击--> <!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击-->
...@@ -353,7 +361,7 @@ ...@@ -353,7 +361,7 @@
<el-dropdown-item @click.native="splitRevoke(scope.row)" v-hasPermi="['ecw:order:split_revoke']">{{$t('撤销拆单')}}</el-dropdown-item> <el-dropdown-item @click.native="splitRevoke(scope.row)" v-hasPermi="['ecw:order:split_revoke']">{{$t('撤销拆单')}}</el-dropdown-item>
</template> </template>
<template v-if="scope.row.parentOrderId"> <template v-if="scope.row.parentOrderId">
<el-dropdown-item @click.native="$router.push('./detail?orderId=' + scope.row.parentOrderId)">{{$t('查看母订单')}}</el-dropdown-item> <el-dropdown-item @click.native="showParentOrder(scope.row)">{{$t('查看母订单')}}</el-dropdown-item>
</template> </template>
...@@ -558,6 +566,7 @@ import { ...@@ -558,6 +566,7 @@ import {
exportShippingDatas, exportShippingDatas,
exportShipFee, exportShipFee,
exportUnload, splitCancelApply, orderSplitRevoke, setCanShipment, setCanNotShipment exportUnload, splitCancelApply, orderSplitRevoke, setCanShipment, setCanNotShipment
,getParentOrder
} from "@/api/ecw/order"; } from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */ /* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag' import PrintTag from './components/PrintTag'
...@@ -919,6 +928,7 @@ export default { ...@@ -919,6 +928,7 @@ export default {
rows: 10, rows: 10,
packageTypeArr: [] packageTypeArr: []
} }
this.queryParams.channelId = ''
this.noParam.value = '' this.noParam.value = ''
this.prodParam.value = '' this.prodParam.value = ''
this.dateFilter = [] this.dateFilter = []
...@@ -1012,6 +1022,12 @@ export default { ...@@ -1012,6 +1022,12 @@ export default {
this.$message(this.$t('操作成功')) this.$message(this.$t('操作成功'))
this.getList() this.getList()
}) })
},
// 查看母订单
showParentOrder(row){
getParentOrder(row.orderId).then(res => {
this.$router.push('./detail?orderId=' + res.data.orderId)
})
} }
} }
}; };
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" prop="number"> <el-form-item :label="$t('出货渠道')" prop="number">
<selector :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector> <selector clearable :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('特需')" prop="packageType"> <el-form-item :label="$t('特需')" prop="packageType">
<el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable > <el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable >
...@@ -258,7 +258,7 @@ import {getChannelList} from "@/api/ecw/channel"; ...@@ -258,7 +258,7 @@ import {getChannelList} from "@/api/ecw/channel";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload"; import ImageAndVideoUpload from "@/components/ImageAndVideoUpload";
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "EcwPeddingList", name: "EcwOrderPenddinglist",
components: { components: {
Template, Template,
UserSelector, UserSelector,
...@@ -406,6 +406,7 @@ export default { ...@@ -406,6 +406,7 @@ export default {
rows: 10 rows: 10
} }
this.dateFilter = [] this.dateFilter = []
this.queryParams.channelId = ''
this.handleQuery(); this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{orderData.channelName|| '/'}}
</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')" > <el-descriptions-item :label="$t('始发地')" >
<template v-if="orderData.logisticsInfoDto"> <template v-if="orderData.logisticsInfoDto">
{{$l(orderData.logisticsInfoDto, 'startTitle')}} {{$l(orderData.logisticsInfoDto, 'startTitle')}}
...@@ -143,6 +146,7 @@ ...@@ -143,6 +146,7 @@
</span> </span>
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
<span>{{$t('发往')}}{{importCityName(item.dstWarehouseId)}}</span> <span>{{$t('发往')}}{{importCityName(item.dstWarehouseId)}}</span>
<span class="ml-10" v-if="item.channelName">{{$t('出货渠道')}}:{{item.channelName}}</span>
</p> </p>
</div> </div>
<div> <div>
...@@ -552,7 +556,7 @@ export default { ...@@ -552,7 +556,7 @@ export default {
loading:false, loading:false,
open:false, open:false,
form:{ form:{
channelId: null
}, },
importCityList:[], importCityList:[],
selectedUsers:[], selectedUsers:[],
...@@ -609,7 +613,7 @@ export default { ...@@ -609,7 +613,7 @@ export default {
} }
Promise.all([this.getList(), this.getOrder()]).then(res => { Promise.all([this.getList(), this.getOrder()]).then(res => {
if(this.orderData.inWarehouseState != 207 && this.splitData.length){ if(this.orderData.inWarehouseState != 207 && this.splitData.length){
// this.reset() this.reset()
} }
// 空运需要获取货币和体积单位 // 空运需要获取货币和体积单位
......
<template>
<el-dialog
:title="$t('添加新品名')"
:visible.sync="visible"
width="90vw"
>
<el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<span style="min-width: 200px;margin-right: 15px;display: inline-block">
<product-selector
v-model="form.prodId"
/>
</span>
<el-button type="text" @click="isShowProduct = true">{{ $t('添加新品名') }}</el-button>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<span>
<product-selector
lang="En"
v-model="form.prodId"
/>
</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">
{{$t('非填单货物')}}
</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="4">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form.warehouseInProdAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('用途')" style="margin-top: 20px">
<el-checkbox-group v-model="form.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete" :disabled="form.table.length < protectRowCount"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table
:data="form.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum" :prop="`table.${$index}.cartonsNum`">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form.table[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)" width="110px">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="`table.${$index}.boxGauge1`">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)" width="110px">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="`table.${$index}.boxGauge2`">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)" width="110px">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="`table.${$index}.boxGauge3`">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)" width="110px">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume" :prop="`table.${$index}.volume`">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)" width="110px">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight" :prop="`table.${$index}.weight`">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll">
<el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')" width="150px">
<template v-slot="{r,c,$index}">
<el-form-item>
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-if="visible"
v-model="form.table[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('备注')">
<template v-slot="{r,c,$index}">
<el-form-item>
<el-input v-model="form.table[$index].remark" type="textarea" show-word-limit maxlength="100" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<WarehouseRecordDetail v-model="form.table[$index].orderWarehouseInDetailsVOList" />
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">{{$t('删除')}}</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="pictureUrls" ></image-and-video-upload>
</div>
</el-card>
<span slot="footer">
<el-button type="primary" @click="handleSubmit">{{ $t('完成打包') }}</el-button>
<el-button @click="handleClose">{{ $t('返回')}}</el-button>
</span>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="添加商品" :visible.sync="isShowProduct" width="550px" append-to-body>
<el-form ref="productForm" :model="productForm" :rules="productRules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="productForm.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="types in typeList" :key="types.id" :label="types.titleZh" :value="types.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input v-model="productForm.titleZh" :placeholder="$t('请输入中文标题')" />
</el-form-item>
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input v-model="productForm.titleEn" :placeholder="$t('请输入英文标题')" />
</el-form-item>
<el-form-item :label="$t('商品特性')" prop="attrArray">
<el-select v-model="productForm.attrArray" :placeholder="$t('选择商品特性')" clearable multiple>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{$t('确定')}}</el-button>
<el-button @click="productCancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</el-dialog>
</template>
<script>
import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBrank"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {finishPacked, orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
export default {
name: "Package",
components: {
ImageAndVideoUpload,
WarehouseRecordDetail,
ProductSelector,
WarehouseAreaSelect,
WorkFlow
},
props: {
title: {
type: String,
default: undefined
},
order: {
type: Object,
default: undefined
},
// 是否集运
isJiyun: {
type: Boolean,
default: false
},
// 是否修改
edit: {
type: Boolean,
default: false
},
// 订单信息中的商品项
orderItemA: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
},
// 入仓的商品项
orderItemB: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
}
},
mounted() {
this.getAttrList()
this.getTypeList()
},
computed: {
isAdd() {
return this.$route.path === "/order/warehousing-add"
},
warehousing(){
return {...this.orderItemA, ...this.orderItemB}
},
orderId(){
return this.order.orderId
},
brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || ''
},
brandObject1(){
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
isBeian(){
if (this.form.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form.recordMode]
}
if (this.brandObject.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject.filing]
} else {
return ''
}
},
isBeian1(){
if (this.form1.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form1.recordMode]
}
if (this.brandObject1.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject1.filing]
} else {
return ''
}
},
/**
* 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType(){
const feeType = this.form.feeType
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
feeType1(){
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
warehouseId(){
return this.order.adjustToDestWarehouseId || this.order?.logisticsInfoDto?.startWarehouseId
}
},
watch: {
visible(val){
if (val) {
this.getProductBrandPage(this.warehousing.brandName)
this.handleBrandChange(parseInt(this.form.brand))
} else {
this.$emit('close')
}
},
'form.brand'(){
this.handleBrandChange()
},
'form.prodId'(){
this.handleBrandChange()
}
},
data(){
return {
DICT_TYPE,
getDictDataLabel,
getDictDatas,
activeName: 'first',
visible: false,
form: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
warehouseInProdAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: undefined,
feeType: undefined,
recordMode: undefined,
usageIds:[]
},
brandList: [],
formRules: {
prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}],
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}],
},
tableFormRules: {
cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}],
boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}],
boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}],
volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}],
weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}],
// quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
},
selectedUsers: undefined,
// 入仓修改正在审核中
isEditing: false,
// 审批业务id
formId: '',
// 追加时被保护的行数
protectRowCount: -1,
// 添加商品弹窗
isShowProduct: false,
productForm: {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
},
productRules: {
typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }],
},
//类型列表
typeList: [],
// 特性列表
attrList: [],
pictureUrls: []
}
},
async created() {
this.visible = true
this.$nextTick()
this.pictureUrls = this.orderItemB.pictureUrls || []
this.handleAdd()
},
methods: {
handleClose() {
this.visible = false
},
handleVolume(index, val){
setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.form1.table : this.form.table)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000 + 0.000001)?.toFixed(2) || ''
} else {
result = ''
}
if (result === '0.00') result = '0.01';
(val === 1 ? this.form1.table : this.form.table)[index].volume = result
}, 0)
},
handleSubmit() {
if (this.form.warehouseInProdAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['tableForm'].validate(valid1 => {
console.log("表单校验", valid1)
if (!valid1) {
return
}
// 复制数据副本,避免修改格式后原数据被影响
const table = JSON.parse(JSON.stringify(this.form.table))
table.forEach(({orderWarehouseInDetailsVOList}) => {
})
// 首次入仓、入仓补充
return finishPacked({
brand: this.form.brand,
prodId: this.form.prodId,
feeType: this.form.feeType,
usageIds: this.form.usageIds.join(','),
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
type: 1,// 非下单货物
orderId: this.order.orderId,
orderWarehouseInItemDtoList: table.map(e => {
if(!e.orderWarehouseInDetailsVOList){
e.orderWarehouseInDetailsVOList = []
}
e.orderWarehouseInDetailsVOList = e.orderWarehouseInDetailsVOList.map(item => {
if(Array.isArray(item.prodAttrIds)){
item.prodAttrIds = item.prodAttrIds.join(',')
}
if(Array.isArray(item.usageIds)){
item.usageIds = item.usageIds.join(',')
}
return item
})
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
pictureUrls: this.pictureUrls
}).then(r => {
if (r.data) {
this.$message.success('打包成功')
this.handleClose()
} else {
this.$message.success('打包失败')
}
})
})
},
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList = r.data.list
})
},
handleBrandChange(){
if(!this.form.prodId || !this.form.brand) return
getFeeTypeByOrderProduct({
brandId: parseInt(this.form.brand),
productId: this.form.prodId,
orderId: this.orderId
}).then(r => {
if(r.code === 0){
this.$set(this.form, 'feeType', parseInt(r.data.feeType))
this.$set(this.form,'recordMode', parseInt(r.data.recordMode))
}
})
},
handleDelete(val) {
if (val === 1) {
this.form1.table.pop()
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ''
if (val !== 1) { // 货物入仓
let hasCartonsNum = 0
this.form.table.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
}
const form = {...this.form}
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/
form.table.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
"boxGauge3": this.isJiyun ? 0 : '',
"cartonsNum": cartonsNum > 0 ? cartonsNum : '',
"expressNo": "",
"quantityAll": undefined,
"unit": "1",
"volume": '',
"weight": '',
specificationType: '1',
table: [],
orderLocationBackVOList
})
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
/** 获取产品类型列表 */
getTypeList() {
getProductTypeList().then(response => {
this.typeList = response.data;
})
},
productSubmit(){
this.$refs["productForm"].validate(valid => {
if (!valid) {
return;
}
//商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',')
// 添加的提交
addProduct(this.productForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') {
this.form.prodId = response.data
this.form.warehouseInProdAttrIds = this.productForm.attrArray
} else {
this.form1.prodId = response.data
this.form1.warehouseInProdAttrIds = this.productForm.attrArray
}
this.productCancel()
})
})
},
productCancel(){
this.isShowProduct = false
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
}
</script>
<style scoped>
</style>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:visible.sync="visible" :visible.sync="visible"
width="90vw" width="90vw"
> >
<el-form ref="form" :model="form" :rules="formRules" label-width="80px"> <el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2"> <el-descriptions border :column="2">
<el-descriptions-item> <el-descriptions-item>
...@@ -241,7 +242,6 @@ import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue"; ...@@ -241,7 +242,6 @@ import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue";
export default { export default {
name: "Package", name: "Package",
components: { components: {
ImageAndVideoUpload, ImageAndVideoUpload,
WarehouseRecordDetail, WarehouseRecordDetail,
......
...@@ -5,10 +5,17 @@ ...@@ -5,10 +5,17 @@
<order-base-info :order="order" stocking></order-base-info> <order-base-info :order="order" stocking></order-base-info>
<h2>{{$t('货物信息')}}</h2> <div class="flex items-center">
<div class="flex-1 page-title">{{$t('货物信息')}}</div>
<el-button type="primary" @click="showNewProductDialog=true">{{$t('添加新品名')}}</el-button>
</div>
<!--
未入仓的不显示 https://zentao.test.jdshangmen.com/bug-view-5292.html
-->
<el-table <el-table
v-if="order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0" v-if="order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0"
:data="order.orderItemVOList || []" :data="order.orderItemVOList.filter(item => !!wareItem(item.orderItemId).orderWarehouseInBackItemDoList.length) || []"
default-expand-all default-expand-all
style="width: 100%"> style="width: 100%">
<!--入仓记录--> <!--入仓记录-->
...@@ -144,20 +151,24 @@ ...@@ -144,20 +151,24 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
:label="$t('打包状态')"> :label="$t('打包状态')" width="100">
<template v-slot="{row}"> <template v-slot="{row}">
<dict-tag :type="DICT_TYPE.ORDER_ITEM_PACK_STATUS" :value="wareItemPackStatus(row.orderItemId)" /> <dict-tag :type="DICT_TYPE.ORDER_ITEM_PACK_STATUS" :value="wareItemPackStatus(row.orderItemId)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
:label="$t('操作')"> :label="$t('操作')" width="220">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button-group>
<template v-if="wareItemPackStatus(row.orderItemId) == 1"> <template v-if="wareItemPackStatus(row.orderItemId) == 1">
<el-button size="mini" type="warning" @click="noNeedPack(row)">{{$t('无需打包')}}</el-button> <el-button size="mini" type="warning" @click="noNeedPack(row)">{{$t('无需打包')}}</el-button>
<el-button size="mini" type="primary" @click="package(row, $t('打包'))">{{$t('打包')}}</el-button> <el-button size="mini" type="primary" @click="package(row, $t('打包'))">{{$t('打包')}}</el-button>
</template> </template>
<el-button v-else size="mini" type="primary" @click="package(row, $t('修改打包'))">{{$t('修改打包')}}</el-button> <el-button v-else size="mini" type="primary" @click="package(row, $t('修改打包'))">{{$t('修改打包')}}</el-button>
<el-button size="mini" type="danger" @click="rollback(row)">{{$t('退仓')}}</el-button>
</el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -231,6 +242,11 @@ ...@@ -231,6 +242,11 @@
v-if="!!packageOrderItem" v-if="!!packageOrderItem"
@close="onPackageClose" @close="onPackageClose"
></package> ></package>
<new-product
:order="order"
v-if="showNewProductDialog"
@close="onPackageClose"
></new-product>
<media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog> <media-dialog v-if="curPictrues" :value="curPictrues" @close="curPictrues=null"></media-dialog>
</div> </div>
</template> </template>
...@@ -243,7 +259,7 @@ import { ...@@ -243,7 +259,7 @@ import {
getOrder, getOrder,
getOrderWarehouseIn, getOrderWarehouseIn,
getSpecialListByOrderId, getSpecialListByOrderId,
noNeedPack, noNeedPack, rollbackDelete,
warehousePictureList warehousePictureList
} from '@/api/ecw/order' } from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo" import orderBaseInfo from "@/components/OrderBaseInfo"
...@@ -274,7 +290,8 @@ export default { ...@@ -274,7 +290,8 @@ export default {
PrintWarehouseReceipt, PrintWarehouseReceipt,
imageUpload, imageUpload,
ImageAndVideoUpload, ImageAndVideoUpload,
Package Package,
NewProduct: () => import('@/views/ecw/order/stocking/components/NewProduct.vue')
}, },
mounted() { mounted() {
...@@ -343,7 +360,9 @@ export default { ...@@ -343,7 +360,9 @@ export default {
packageWarehouseItem: null, packageWarehouseItem: null,
productAttrList: [], productAttrList: [],
// 当前查看的影像 // 当前查看的影像
curPictrues: null curPictrues: null,
// 是否显示添加新品弹窗
showNewProductDialog: false
} }
}, },
...@@ -434,6 +453,7 @@ export default { ...@@ -434,6 +453,7 @@ export default {
onPackageClose(){ onPackageClose(){
this.packageOrderItem=null; this.packageOrderItem=null;
this.packageOrderItem=null; this.packageOrderItem=null;
this.showNewProductDialog = false
this.getList() this.getList()
}, },
showMedia(orderItem){ showMedia(orderItem){
...@@ -461,6 +481,19 @@ export default { ...@@ -461,6 +481,19 @@ export default {
finishPacked(data).then(res => { finishPacked(data).then(res => {
this.$message.success(this.$t('操作成功')) this.$message.success(this.$t('操作成功'))
}) })
},
// 退仓
async rollback(orderItem){
this.$confirm(this.$l(orderItem, 'prodTitle') + this.$t("退仓后不可恢复,是否确认退仓?"), this.$t('提示')).then(() => {
return rollbackDelete({
orderId: this.orderId,
orderItemId: orderItem.orderItemId,
isPackagingRollback: true
})
}).then(res =>{
this.$message.success(this.$t('操作成功'))
this.getList()
})
} }
}, },
watch: { watch: {
......
...@@ -93,7 +93,8 @@ export default { ...@@ -93,7 +93,8 @@ export default {
"unit": "", "unit": "",
"usageIds": "", "usageIds": "",
"volume": undefined, "volume": undefined,
"weight": undefined "weight": undefined,
"material": undefined
}] }]
} else { } else {
this.dataList = JSON.parse(JSON.stringify(this.value)) this.dataList = JSON.parse(JSON.stringify(this.value))
...@@ -119,7 +120,8 @@ export default { ...@@ -119,7 +120,8 @@ export default {
"unit": "", "unit": "",
"usageIds": "", "usageIds": "",
"volume": undefined, "volume": undefined,
"weight": undefined "weight": undefined,
"material": undefined
}) })
}, },
handleDelete(index) { handleDelete(index) {
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('材质')">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="material" clearable :disabled="readonly"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('商品特性')"> <el-form-item :label="$t('商品特性')">
<el-checkbox-group v-model="prodAttrIds"> <el-checkbox-group v-model="prodAttrIds">
...@@ -38,7 +43,7 @@ ...@@ -38,7 +43,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item :label="$t('用途')"> <el-form-item :label="$t('用途')">
<el-checkbox-group v-model="usageIds"> <el-checkbox-group v-model="usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox> <el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox>
...@@ -46,7 +51,7 @@ ...@@ -46,7 +51,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10"> <!--<el-row :gutter="10">
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('长')"> <el-form-item :label="$t('长')">
<el-input v-model="boxGauge1" type="number" :disabled="readonly" /> <el-input v-model="boxGauge1" type="number" :disabled="readonly" />
...@@ -72,9 +77,9 @@ ...@@ -72,9 +77,9 @@
<el-input v-model="value.volume" type="number" :disabled="readonly" /> <el-input v-model="value.volume" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>-->
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4"> <!--<el-col :span="4">
<el-form-item :label="$t('快递单号')"> <el-form-item :label="$t('快递单号')">
<el-input v-model="value.expressNo" :disabled="readonly" /> <el-input v-model="value.expressNo" :disabled="readonly" />
</el-form-item> </el-form-item>
...@@ -83,7 +88,7 @@ ...@@ -83,7 +88,7 @@
<el-form-item :label="$t('包装类型')"> <el-form-item :label="$t('包装类型')">
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit" :disabled="readonly"></dict-selector> <dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit" :disabled="readonly"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>-->
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('数量')"> <el-form-item :label="$t('数量')">
<el-input v-model="value.quantityAll" type="number" :disabled="readonly" /> <el-input v-model="value.quantityAll" type="number" :disabled="readonly" />
...@@ -131,7 +136,7 @@ export default { ...@@ -131,7 +136,7 @@ export default {
brandList: [], brandList: [],
prodAttrIds: [], prodAttrIds: [],
usageIds: [], usageIds: [],
material: '',
boxGauge1: '', boxGauge1: '',
boxGauge2: '', boxGauge2: '',
boxGauge3: '', boxGauge3: '',
...@@ -147,6 +152,10 @@ export default { ...@@ -147,6 +152,10 @@ export default {
this.getProductBrandPage() this.getProductBrandPage()
} }
if(this.value.material){
this.material = this.value.material
}
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) { if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e) this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e)
} }
...@@ -220,6 +229,9 @@ export default { ...@@ -220,6 +229,9 @@ export default {
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3 this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2) this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
}, },
material(material){
this.value.material = material
},
'value.volume'() { 'value.volume'() {
if (this.value.volume < 0) { if (this.value.volume < 0) {
this.value.volume = -this.value.volume this.value.volume = -this.value.volume
......
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item v-if="channel" :label="$t('出货渠道')"> <el-form-item v-if="type === 'air'" :label="$t('出货渠道')">
{{$l(channel, 'name')}} {{channel ? $l(channel, 'name') : '/'}}
</el-form-item> </el-form-item>
</template> </template>
<!--有路线则不显示路线选择器--> <!--有路线则不显示路线选择器-->
...@@ -227,15 +227,18 @@ ...@@ -227,15 +227,18 @@
<el-button @click="quickSet" type="primary" :disabled="!quickForm.plus && !quickForm.minus">{{$t('确定')}}</el-button> <el-button @click="quickSet" type="primary" :disabled="!quickForm.plus && !quickForm.minus">{{$t('确定')}}</el-button>
</div> </div>
</el-col> </el-col>
<el-col :span="12" v-else-if="readonly && type === 'air'"> <!--
<!--商品清关费--> 甲方要求不显示清关费 https://zentao.test.jdshangmen.com/bug-view-5298.html
-->
<!--<el-col :span="12" v-else-if="readonly && type === 'air'">
&lt;!&ndash;商品清关费&ndash;&gt;
<h2>{{$t('商品清关费价格')}}</h2> <h2>{{$t('商品清关费价格')}}</h2>
<packaging-type v-if="product && product.priceStepClearanceList && product.priceStepClearanceList.length" <packaging-type v-if="product && product.priceStepClearanceList && product.priceStepClearanceList.length"
:value="product" key-arr="priceStepClearanceList" readonly/> :value="product" key-arr="priceStepClearanceList" readonly/>
<div v-else> <div v-else>
{{$t('未设置清关费')}} {{$t('未设置清关费')}}
</div> </div>
</el-col> </el-col>-->
</el-row> </el-row>
</el-card> </el-card>
...@@ -273,6 +276,7 @@ ...@@ -273,6 +276,7 @@
<el-card class="mt-10" v-if="readonly"> <el-card class="mt-10" v-if="readonly">
<el-descriptions :column="1"> <el-descriptions :column="1">
<el-descriptions-item :label="$t('状态')">{{ statusName(form) }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{form.createTime|parseTime}}</el-descriptions-item> <el-descriptions-item :label="$t('创建时间')">{{form.createTime|parseTime}}</el-descriptions-item>
<el-descriptions-item :label="$t('创建人')">{{form.creatorName}}</el-descriptions-item> <el-descriptions-item :label="$t('创建人')">{{form.creatorName}}</el-descriptions-item>
<el-descriptions-item :label="$t('最新修改时间')">{{form.updateTime|parseTime}}</el-descriptions-item> <el-descriptions-item :label="$t('最新修改时间')">{{form.updateTime|parseTime}}</el-descriptions-item>
...@@ -380,6 +384,7 @@ import {openedRouterList} from '@/api/ecw/warehouse' ...@@ -380,6 +384,7 @@ import {openedRouterList} from '@/api/ecw/warehouse'
import Decimal from "decimal.js"; import Decimal from "decimal.js";
import {getChannel} from "@/api/ecw/channel"; import {getChannel} from "@/api/ecw/channel";
import PackagingType from "@/views/ecw/channel/componrnts/packaging-type.vue"; import PackagingType from "@/views/ecw/channel/componrnts/packaging-type.vue";
import {getStatusName} from './util'
export default { export default {
components: {PackagingType, RoutersSelector, ProductSelector, Selector, Inputor }, components: {PackagingType, RoutersSelector, ProductSelector, Selector, Inputor },
filters: {parseTime}, filters: {parseTime},
...@@ -422,6 +427,9 @@ export default { ...@@ -422,6 +427,9 @@ export default {
} }
}, },
computed: { computed: {
statusName(){
return getStatusName
},
routerOption(){ routerOption(){
return this.$route.query return this.$route.query
}, },
...@@ -582,12 +590,7 @@ export default { ...@@ -582,12 +590,7 @@ export default {
if(this.$route.query.action == 'update'){ if(this.$route.query.action == 'update'){
let res = await getProductPrice(this.$route.query.id) let res = await getProductPrice(this.$route.query.id)
this.$set(this, 'form', res.data) this.$set(this, 'form', res.data)
// 显示渠道
if(this.form.shippingChannelId){
getChannel(this.form.shippingChannelId).then(res => {
this.channel = res.data
})
}
if(this.form.needPay){ if(this.form.needPay){
this.needPay = true this.needPay = true
} }
...@@ -669,12 +672,12 @@ export default { ...@@ -669,12 +672,12 @@ export default {
// 如果指定了始发,目的仓和运输方式,渠道,则是从未报价异常跳转过来的,固定一个路线 // 如果指定了始发,目的仓和运输方式,渠道,则是从未报价异常跳转过来的,固定一个路线
if(this.$route.query.startWarehouseId){ if(this.$route.query.startWarehouseId){
openedRouterList({ const res = await openedRouterList({
destCityId: this.$route.query.importCity, destCityId: this.$route.query.importCity,
lineId: this.$route.query.lineId, lineId: this.$route.query.lineId,
startCityId: this.$route.query.exportCity, startCityId: this.$route.query.exportCity,
transportType: this.$route.query.transportId transportType: this.$route.query.transportId
}).then(res => { })
console.log("open ---> ", res) console.log("open ---> ", res)
this.lineList = [ this.lineList = [
Object.assign({ Object.assign({
...@@ -682,9 +685,10 @@ export default { ...@@ -682,9 +685,10 @@ export default {
lineId:this.$route.query.lineId, lineId:this.$route.query.lineId,
shippingChannelId: this.$route.query.channelId, shippingChannelId: this.$route.query.channelId,
warehouseLineDO: {... res.data[0]} warehouseLineDO: {... res.data[0]}
})]
}) })
]
// 后面会根据这个渠道ID获取渠道信息
this.form.shippingChannelId = this.$route.query.channelId
} }
} }
...@@ -710,6 +714,13 @@ export default { ...@@ -710,6 +714,13 @@ export default {
this.$set(this.form, 'productId', +this.$route.query.product_id) this.$set(this.form, 'productId', +this.$route.query.product_id)
} }
// 显示渠道(修改或者从异常处理等进入携带了渠道参数)
if(this.form.shippingChannelId && this.type == 'air'){
getChannel(this.form.shippingChannelId).then(res => {
this.channel = res.data
})
}
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
......
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
<el-option v-for="city in destCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" /> <el-option v-for="city in destCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否预付')" prop="needPay">
<el-select v-model="queryParams.needPay" :placeholder="$t('请选择')" clearable>
<el-option :label="$t('是')" value="1"></el-option>
<el-option :label="$t('否')" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('上架状态')" prop="auditStatus"> <el-form-item :label="$t('上架状态')" prop="auditStatus">
<dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/> <dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/>
</el-form-item> </el-form-item>
...@@ -47,7 +52,12 @@ ...@@ -47,7 +52,12 @@
<el-option :label="$t('黑名单')" value="blacklist_1"></el-option> <el-option :label="$t('黑名单')" value="blacklist_1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否单询')" prop="needOrderInquiry">
<el-select v-model="queryParams.needOrderInquiry" :placeholder="$t('请选择')" clearable>
<el-option :label="$t('是')" value="1"></el-option>
<el-option :label="$t('否')" value="0"></el-option>
</el-select>
</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>
...@@ -157,12 +167,15 @@ ...@@ -157,12 +167,15 @@
{{ getCurrencyTitle(scope.row.priceStepList[0].transportPriceUnit) + '/' + getUnitTitle(scope.row.priceStepList[0].transportVolumeUnit)}} {{ getCurrencyTitle(scope.row.priceStepList[0].transportPriceUnit) + '/' + getUnitTitle(scope.row.priceStepList[0].transportVolumeUnit)}}
<br /> <br />
<template v-if="[3,4].indexOf(+scope.row.warehouseLineDO.transportType) > -1"> <template v-if="[3,4].indexOf(+scope.row.warehouseLineDO.transportType) > -1">
<!--空运的清关费--> <!--
<template v-if="scope.row.clearPriceStepList.length"> 空运的清关费
根据要求隐藏列表的空运清关费 https://zentao.test.jdshangmen.com/bug-view-5298.html
-->
<!--<template v-if="scope.row.clearPriceStepList.length">
{{$t('清关费')}}:{{ getCurrencySymbol(scope.row.clearPriceStepList[0].clearancePriceUnit) + scope.row.clearPriceStepList[0].clearancePrice}}&nbsp; {{$t('清关费')}}:{{ getCurrencySymbol(scope.row.clearPriceStepList[0].clearancePriceUnit) + scope.row.clearPriceStepList[0].clearancePrice}}&nbsp;
{{ getCurrencyTitle(scope.row.clearPriceStepList[0].clearancePriceUnit) + '/' + getUnitTitle(scope.row.clearPriceStepList[0].clearanceVolumeUnit)}} {{ getCurrencyTitle(scope.row.clearPriceStepList[0].clearancePriceUnit) + '/' + getUnitTitle(scope.row.clearPriceStepList[0].clearanceVolumeUnit)}}
</template> </template>
<template v-else>{{$t('暂无清关费设置')}}</template> <template v-else>{{$t('暂无清关费设置')}}</template>-->
</template> </template>
<template v-else> <template v-else>
<!--海运的清关费--> <!--海运的清关费-->
...@@ -281,7 +294,10 @@ ...@@ -281,7 +294,10 @@
</div> </div>
</el-col> </el-col>
<!--空运的清关费单独显示--> <!--空运的清关费单独显示-->
<el-col :span="12" v-if="[3,4].indexOf(+showMoreStepPriceItem.warehouseLineDO.transportType) > -1"> <!--
甲方要求不显示清关费 https://zentao.test.jdshangmen.com/bug-view-5298.html
-->
<!-- <el-col :span="12" v-if="[3,4].indexOf(+showMoreStepPriceItem.warehouseLineDO.transportType) > -1">
<template v-if="showMoreStepPriceItem.clearPriceStepList.length"> <template v-if="showMoreStepPriceItem.clearPriceStepList.length">
<div v-for="(item, index) in showMoreStepPriceItem.clearPriceStepList"> <div v-for="(item, index) in showMoreStepPriceItem.clearPriceStepList">
<div class="page-title"> <div class="page-title">
...@@ -297,7 +313,7 @@ ...@@ -297,7 +313,7 @@
</div> </div>
</template> </template>
<template v-else>{{$t('暂无清关费设置')}}</template> <template v-else>{{$t('暂无清关费设置')}}</template>
</el-col> </el-col>-->
</el-row> </el-row>
</el-dialog> </el-dialog>
...@@ -330,6 +346,7 @@ import {arrryToKeyedObjectBy} from '@/utils/index' ...@@ -330,6 +346,7 @@ import {arrryToKeyedObjectBy} from '@/utils/index'
import { getProduct } from '@/api/ecw/product'; import { getProduct } from '@/api/ecw/product';
import {parseTime} from '@/utils/ruoyi' import {parseTime} from '@/utils/ruoyi'
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
import {getStatusName} from "./util";
export default { export default {
name: "EcwProductpriceIndex", name: "EcwProductpriceIndex",
filters: {parseTime}, filters: {parseTime},
...@@ -467,23 +484,7 @@ export default { ...@@ -467,23 +484,7 @@ export default {
}, },
// 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定 // 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定
statusName() { statusName() {
return row => { return getStatusName
//判断价格是否过期
let validateStartDate = row.validateStartDate;
let validateEndDate = row.validateEndDate;
let notSetPrice = false;
let nowDate = new Date().getTime();
if(validateStartDate && validateStartDate > nowDate) {
notSetPrice = true;
}
if(validateEndDate && validateEndDate < nowDate) {
notSetPrice = true;
}
let setPriceText = notSetPrice ? '(' + this.$t('已过期') + ')' : '';
if(row.blacklist) return this.$t('黑名单') // + setPriceText;
if(row.auditStatus === AuditStatusEnum.PASS) return this.$t('已上架') // + setPriceText;
return this.$t('已下架') + setPriceText;
}
}, },
// 根据运输方式获取名称 // 根据运输方式获取名称
......
import {AuditStatusEnum} from "@/utils/constants";
import i18n from '@/i18n'
export const getStatusName = (row) => {
//判断价格是否过期
let validateStartDate = row.validateStartDate;
let validateEndDate = row.validateEndDate;
let notSetPrice = false;
let nowDate = new Date().getTime();
if(validateStartDate && validateStartDate > nowDate) {
notSetPrice = true;
}
if(validateEndDate && validateEndDate < nowDate) {
notSetPrice = true;
}
let setPriceText = notSetPrice ? '(' + i18n.t('已过期') + ')' : '';
if(row.blacklist) return i18n.t('黑名单') // + setPriceText;
if(row.auditStatus === AuditStatusEnum.PASS) return i18n.t('已上架') // + setPriceText;
return i18n.t('已下架') + setPriceText;
}
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