Commit 6bc49b26 authored by 我在何方's avatar 我在何方
parents 0526f443 c2ad22ec
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<div class="form-section"> <div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId"> <el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" @input="calculationPrice" class="w-200"/> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" class="w-200"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" prop="channelId"> <el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" prop="channelId">
<selector <selector
...@@ -102,7 +102,6 @@ ...@@ -102,7 +102,6 @@
:options="channelList" :options="channelList"
value-field="channelId" value-field="channelId"
label-field="nameZh" label-field="nameZh"
@input="calculationPrice"
class="w-200" class="w-200"
></selector> ></selector>
</el-form-item> </el-form-item>
...@@ -801,8 +800,7 @@ export default { ...@@ -801,8 +800,7 @@ export default {
'form.objectiveId'(){ 'form.objectiveId'(){
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
'form.transportId'(transportId){ 'form.transportId'(transportId, oldTransportId){
// 海空联运默认数据 // 海空联运默认数据
if(transportId == 4){ if(transportId == 4){
this.$set(this.form.transportVO, Object.assign(this.form.transportVO, { this.$set(this.form.transportVO, Object.assign(this.form.transportVO, {
...@@ -815,15 +813,27 @@ export default { ...@@ -815,15 +813,27 @@ export default {
})) }))
} }
this.getOpenedRouterList() this.getOpenedRouterList()
// 更换运输方式之后,之前选择的路线会失效,需要重新选择
if(oldTransportId && oldTransportId != transportId && transportId != this.selectedRouter?.transportType){
console.log('重置路线',oldTransportId, transportId, this.selectedRouter?.transportType)
this.$set(this.form, 'lineId', undefined)
}
}, },
'form.channelId'(){ 'form.channelId'(){
this.getOpenedRouterList() this.getOpenedRouterList()
this.calculationPrice('form.channelId')
}, },
'form.lineId'(lineId){ 'form.lineId'(lineId){
let router = this.routerList.find(item => item.id == lineId) let router = this.routerList.find(item => item.id == lineId)
if(!router) return if(router){
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
}
this.$nextTick(() => {
this.calculationPrice('form.lineId')
})
}, },
'form.transportVO.packageTypeArr'(val){ 'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', val.join(',')) this.$set(this.form.transportVO, 'packageType', val.join(','))
...@@ -922,17 +932,17 @@ export default { ...@@ -922,17 +932,17 @@ export default {
}) })
} }
this.calculationPrice() this.calculationPrice('onProductChange')
}, },
onLineChange(row){ /* onLineChange(row){
this.calculationPrice() this.calculationPrice()
// this.updateEnabledTransports() // this.updateEnabledTransports()
}, }, */
onChannelChange(row){ onChannelChange(row){
this.calculationPrice() this.calculationPrice('onChannelChange')
}, },
onProductAttrChange(row, attr){ onProductAttrChange(row, attr){
this.calculationPrice() this.calculationPrice('onProductAttrChange')
}, },
addProduct(data){ addProduct(data){
this.form.prodCreateReqVOList.push(data || {prodAttrArr:[]}) this.form.prodCreateReqVOList.push(data || {prodAttrArr:[]})
...@@ -1027,7 +1037,8 @@ export default { ...@@ -1027,7 +1037,8 @@ export default {
}) })
}, },
// 计算商品运费 // 计算商品运费
calculationPrice(){ calculationPrice(tag){
console.log('calculationPrice@', tag)
let calcable = true let calcable = true
if(!this.form.prodCreateReqVOList.length) return if(!this.form.prodCreateReqVOList.length) return
this.form.prodCreateReqVOList.forEach(item => { this.form.prodCreateReqVOList.forEach(item => {
...@@ -1037,7 +1048,14 @@ export default { ...@@ -1037,7 +1048,14 @@ export default {
} }
item.brandType = item.brand item.brandType = item.brand
}) })
if(this.calculating || !calcable) return false if(this.calculating || !calcable){
console.log('不满足费用计算条件,清空已获取的费用信息')
this.form.prodCreateReqVOList.forEach(item => {
delete item.fee
})
this.fee = {}
return false
}
this.calculating = true this.calculating = true
console.log('calculationPrice') console.log('calculationPrice')
...@@ -1045,7 +1063,7 @@ export default { ...@@ -1045,7 +1063,7 @@ export default {
calculationPrice({ calculationPrice({
lineId: this.form.lineId, lineId: this.form.lineId,
transportId: this.form.transportId, transportId: this.form.transportId,
channelId: this.form.channelId, channelId: [3,4].indexOf(this.form.transportId) > -1 ? this.form.channelId : undefined,
prodConditionParamList: this.getProductListWithDefaultValue(), prodConditionParamList: this.getProductListWithDefaultValue(),
consigneeCustomerContactsId: this.form.consigneeCustomerContactsId, consigneeCustomerContactsId: this.form.consigneeCustomerContactsId,
consignorCustomerContactsId: this.form.consignorCustomerContactsId, consignorCustomerContactsId: this.form.consignorCustomerContactsId,
......
<template>
<!-- 订单获取入仓记录 -->
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false" width="1000px">
<el-table v-if="warehouseItem && warehouseItem.orderWarehouseInBackItemDoList" :data="warehouseItem.orderWarehouseInBackItemDoList">
<el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum" />
<el-table-column :label="$t('入仓类型')" prop="cartonsNum">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" :value="row.specificationType" />
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" prop="unit">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGING_TYPE" :value="row.unit" />
</template>
</el-table-column>
<el-table-column :label="$t('长')" prop="boxGauge">
<template slot-scope="{row}">
{{row.boxGauge.split('*')[0]}}
</template>
</el-table-column>
<el-table-column :label="$t('宽')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[1]}}
</template>
</el-table-column>
<el-table-column :label="$t('高')" prop="boxGauge" >
<template slot-scope="{row}">
{{row.boxGauge.split('*')[2]}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '(m³)'" prop="volume" />
<el-table-column :label="$t('重量') + '(kg)'" prop="weight" />
<el-table-column :label="$t('数量(个)')" prop="quantityAll" />
<el-table-column :label="$t('快递单号')" prop="expressNo" />
<el-table-column :label="$t('入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { getOrder, getOrderWarehouseIn } from '@/api/ecw/order'
import { DICT_TYPE } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
export default {
filters: {parseTime},
props:{
order: Object, // order 和 orderId 二选一
orderId: Number,
orderItemId: Number,
},
data(){
return {
orderDetail: null,
warehouseList: null
}
},
computed:{
info(){
return this.orderDetail || this.order
},
orderItem(){
if(!this.info) return null
return this.info.orderItemVOList.find(item => item.orderItemId == this.orderItemId)
},
warehouseItem(){
if(!this.warehouseList) return []
return this.warehouseList.find(item => item.orderItemId == this.orderItemId) || []
},
title(){
if(!this.orderItem) return '-'
return this.$l(this.orderItem, 'prodTitle') + ' - ' + this.$t('入仓记录')
}
},
created(){
this.show = true
if(!this.order && this.orderId){
getOrder(this.orderId).then(res => {
this.orderDetail = res.data
})
}
this.getOrderWarehouseIn()
},
methods:{
closeDialog(){
this.show = false
this.$emit('close');
},
getOrderWarehouseIn(){
getOrderWarehouseIn(this.info.orderId).then(res => {
this.warehouseList = res.data
})
}
}
}
</script>
\ No newline at end of file
...@@ -120,7 +120,8 @@ ...@@ -120,7 +120,8 @@
<el-table-column prop="num" :label="$t('填单件数')" width="90px"/> <el-table-column prop="num" :label="$t('填单件数')" width="90px"/>
<el-table-column prop="sumNum" :label="$t('入仓件数')" width="90px"> <el-table-column prop="sumNum" :label="$t('入仓件数')" width="90px">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.warehouseInInfoVO ? row.warehouseInInfoVO.cartonsNum : 0}} <el-link type="primary" @click.native="showWarehouseLogs(row)">{{row.warehouseInInfoVO ? row.warehouseInInfoVO.cartonsNum : 0}}</el-link>
<div v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.isMultiSpecification">(多规格)</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unit" :label="$t('单位')" width="90px"> <el-table-column prop="unit" :label="$t('单位')" width="90px">
...@@ -242,6 +243,7 @@ ...@@ -242,6 +243,7 @@
<print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" /> <print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" />
<print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" /> <print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" />
<warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
</div> </div>
</template> </template>
...@@ -255,11 +257,12 @@ import {getCurrencyList} from '@/api/ecw/currency' ...@@ -255,11 +257,12 @@ import {getCurrencyList} from '@/api/ecw/currency'
import {getReceivableListByOrderId} from '@/api/ecw/receipt' import {getReceivableListByOrderId} from '@/api/ecw/receipt'
import { getChannel } from '@/api/ecw/channel'; import { getChannel } from '@/api/ecw/channel';
import {listByIds} from '@/api/ecw/region' import {listByIds} from '@/api/ecw/region'
import WarehouseDetail from './components/WarehouseDetail';
export default { export default {
name: "detail", name: "detail",
components: { components: {
PrintWarehouseReceipt, PrintLadingBill PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail
}, },
filters: { filters: {
customsTypeFilter(e, customsTypeList) { customsTypeFilter(e, customsTypeList) {
...@@ -290,7 +293,9 @@ export default { ...@@ -290,7 +293,9 @@ export default {
unitList:[], unitList:[],
feeList: [], feeList: [],
channelName: '/', channelName: '/',
region: '' region: '',
orderWarehouseIn: null, // 入仓详情
showWarehouseInItemId: null, // 当前显示的入仓
} }
}, },
computed:{ computed:{
...@@ -374,6 +379,15 @@ export default { ...@@ -374,6 +379,15 @@ export default {
}, },
downloadPackingList(){ downloadPackingList(){
window.open(this.order.packingListUrl) window.open(this.order.packingListUrl)
},
// 显示入仓记录
showWarehouseLogs(row){
this.showWarehouseInItemId = row.orderItemId
},
getWarehouseIn(){
getOrderWarehouseIn(this.order.id).then(res => {
this.orderWarehouseIn = res.data
})
} }
} }
}; };
......
...@@ -791,7 +791,7 @@ export default { ...@@ -791,7 +791,7 @@ export default {
// 勾选外部仓则添加一个默认的,取消则删除默认的空的 // 勾选外部仓则添加一个默认的,取消则删除默认的空的
if(!isExternalWarehouse){ if(!isExternalWarehouse){
this.$set(this.form, 'externalWarehouseDtoList', []) this.$set(this.form, 'externalWarehouseDtoList', [])
}else if(!this.form.externalWarehouseDtoList.length){ }else if(!this.form.externalWarehouseDtoList || !this.form.externalWarehouseDtoList.length){
this.$set(this.form, 'externalWarehouseDtoList', [{}]) this.$set(this.form, 'externalWarehouseDtoList', [{}])
} }
}, },
......
...@@ -238,12 +238,7 @@ ...@@ -238,12 +238,7 @@
</template> </template>
<!-- 合单,拆单 --> <!-- 合单,拆单 -->
<template v-if=" <template v-if=" (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState">
exclude(scope.row.status, [0,2]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
scope.row.shipmentState < 320 &&
exclude(scope.row.inWarehouseState, [201])
">
<el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item>
</template> </template>
......
<template> <template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="$t('管理折扣')"> <el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="title">
<el-form ref="form" :model="form" label-width="120px" :rules="rules"> <el-form ref="form" :model="form" label-width="120px" :rules="rules">
<!-- 海运是重货,空运是泡货 --> <!-- 海运是重货,空运是泡货 -->
...@@ -72,6 +72,11 @@ export default { ...@@ -72,6 +72,11 @@ export default {
this.$set(this.form, 'ccIds', this.ccIdArr.join(',')) this.$set(this.form, 'ccIds', this.ccIdArr.join(','))
} }
}, },
computed:{
title(){
return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请')
}
},
methods: { methods: {
handleSubmit(){ handleSubmit(){
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<el-form ref="form" :model="addDialog.form" label-width="80px"> <el-form ref="form" :model="addDialog.form" label-width="80px">
<el-form-item :label="$t('客户名称')">{{ addDialog.form.customerName }}</el-form-item> <el-form-item :label="$t('客户名称')">{{ addDialog.form.customerName }}</el-form-item>
<el-form-item :label="$t('收费模式')"> <el-form-item :label="$t('授权类型')">
<dict-selector v-model="addDialog.form.authType" :type="DICT_TYPE.ECW_AUTH_TYPE"></dict-selector> <dict-selector v-model="addDialog.form.authType" :type="DICT_TYPE.ECW_AUTH_TYPE"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('授权时间')" v-if="addDialog.form.authType==1"> <el-form-item :label="$t('授权时间')" v-if="addDialog.form.authType==1">
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="用户名称" prop="username"> <el-form-item label="用户名称" prop="username">
<el-input v-model="queryParams.username" placeholder="请输入用户名称" clearable style="width: 240px" <el-input v-model="queryParams.username" placeholder="请输入用户名或昵称" clearable style="width: 240px"
@keyup.enter.native="handleQuery"/> @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="手机号码" prop="mobile"> <el-form-item label="手机号码" prop="mobile">
......
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