Commit 4d737607 authored by dragondean@qq.com's avatar dragondean@qq.com

合单审核,新建订单优化

parent 325c8c1c
...@@ -61,3 +61,12 @@ export function exportChannelExcel(query) { ...@@ -61,3 +61,12 @@ export function exportChannelExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
//
export function getChannelListByIds(params){
return request({
url: '/ecw/channel/list',
method: 'get',
params
})
}
<!--拆单审核中的申请信息部分--> <!--拆单审核中的申请信息部分-->
<template> <template>
<div v-if="detail"> <div v-if="orders">
<el-table :data="detail.unMergeList.list"> <el-table :data="orders">
<el-table-column label="订单编号"> <el-table-column label="订单编号">
<template slot-scope="scope">{{scope.row.orderNo}}</template> <template slot-scope="scope">{{scope.row.orderNo}}</template>
</el-table-column> </el-table-column>
<el-table-column label="唛头"> <el-table-column label="唛头">
<template slot-scope="{row}">{{row.marks}}</template> <template slot-scope="{row}">{{row.marks}}</template>
</el-table-column> </el-table-column>
<el-table-column label="已到箱数/总箱数"> <!-- <el-table-column label="已到箱数/总箱数">
<template slot-scope="{row}">// TODO/{{row.sumNum}}</template> <template slot-scope="{row}">/{{row.sumNum}}/{{row.sumNum}}</template>
</el-table-column> </el-table-column> -->
<el-table-column label="下单统计"> <el-table-column label="下单统计">
<template slot-scope="{row}"> <template slot-scope="{row}">
22箱 44m³ 50kg {{row.costVO.totalNum}}22箱<br/>{{row.costVO.totalVolume}}<br/>{{row.costVO.totalWeight}}kg
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓你统计"> <el-table-column label="入仓你统计">
<template slot-scope="{row}">总箱数:1 总体积:m³ 总重量 110kg</template> <template slot-scope="{row}">
{{row.sumNum}}22箱<br/>{{row.sumVolume}}<br/>{{row.sumWeight}}kg
</template>
</el-table-column> </el-table-column>
<el-table-column label="入仓时间"> <el-table-column label="入仓时间">
<template slot-scope="{row}"> <template slot-scope="{row}">
// TODO {{row.rucangTime|parseTime}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="运输方式"> <el-table-column label="运输方式">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
</template>
</el-table-column> </el-table-column>
<el-table-column label="出货渠道"> <el-table-column label="出货渠道">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">
{{getChannelName(row.channelId)}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="始发仓"> <el-table-column label="始发仓">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">{{jsonParse(row.departureVO.departure).titleZh}}</template>
</el-table-column> </el-table-column>
<el-table-column label="目的仓"> <el-table-column label="目的仓">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">
{{jsonParse(row.objectiveVO.objective).titleZh}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="发货人"> <el-table-column label="发货人">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">
{{row.consignorVO.name}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="收货人"> <el-table-column label="收货人">
<template slot-scope="{row}">{{row.num}}</template> <template slot-scope="{row}">
{{row.consigneeVO.name}}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -48,31 +60,37 @@ ...@@ -48,31 +60,37 @@
<script> <script>
import {getApproval, getOrder} from '@/api/ecw/order' import {getApproval, getOrder} from '@/api/ecw/order'
import {getMergeListByMergeId} from '@/api/ecw/orderHandle' import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannel} from '@/api/ecw/channel' import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi'
export default { export default {
name: 'MergeDetail', name: 'MergeDetail',
filters: {parseTime},
props:{ props:{
id: [String, Number] id: [String, Number]
}, },
data(){ data(){
return { return {
detail: null, orders: null,
order: null, channels: []
channel: null
} }
}, },
watch:{ watch:{
id(){ id(){
this.getData() this.getData()
}
},
computed:{
jsonParse(){
return d => {
return JSON.parse(d)
}
}, },
/* detail(){ getChannelName(){
this.getOrder() return id => {
}, */ let channel = this.channels.find(item => item.channelId == id)
/* order(){ return channel ? channel.nameZh : '/'
if(this.order.channelId){ }
this.getChannel()
} }
} */
}, },
created(){ created(){
if(this.id){ if(this.id){
...@@ -82,19 +100,22 @@ export default { ...@@ -82,19 +100,22 @@ export default {
methods:{ methods:{
getData(){ getData(){
getMergeListByMergeId({id: this.id}).then(res => { getMergeListByMergeId({id: this.id}).then(res => {
this.detail = res.data this.orders = res.data
this.getChannels()
}) })
}, },
/* getOrder(){ getChannels(){
getOrder(this.detail.orderId).then(res => { let ids = []
this.order = res.data this.orders.forEach(order => {
if(order.channelId){
ids.push(order.channelId)
}
}) })
}, if(!ids.length) return false
getChannel(){ getChannelListByIds({ids: ids.join(',')}).then(res => {
getChannel(this.order.channelId).then(res => { this.channels = res.data
this.channel = res.data
}) })
} */ }
} }
} }
</script> </script>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-descriptions :column="3" border v-if="form.type.indexOf(1) < 0"> <el-descriptions :column="3" border v-if="form.type.indexOf(1) < 0">
<el-descriptions-item label="*发货人" :labelStyle="labelStyle"> <el-descriptions-item label="*发货人" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorContactsId" required error="发货人不能为空"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorContactsId">
<customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item label="*收货人" :labelStyle="labelStyle" > <el-descriptions-item label="*收货人" :labelStyle="labelStyle" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId" required error="收货人不能为空"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId">
<customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" type="2" /> <customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" type="2" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item label="*运输方式" :labelStyle="labelStyle"> <el-descriptions-item label="*运输方式" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="transportId" required error="请选择运输方式"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" /> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -64,14 +64,14 @@ ...@@ -64,14 +64,14 @@
</el-descriptions> </el-descriptions>
<el-descriptions :column="2" border> <el-descriptions :column="2" border>
<el-descriptions-item label="*始发城市" :labelStyle="labelStyle"> <el-descriptions-item label="*始发城市" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId" required error="始发地必选"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId">
<el-select v-model="form.departureId" placeholder="请选择始发地"> <el-select v-model="form.departureId" placeholder="请选择始发地">
<el-option v-for="item in exportCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="*目的城市" :labelStyle="labelStyle"> <el-descriptions-item label="*目的城市" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="objectiveId" required error="目的城市必选"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="objectiveId">
<el-select v-model="form.objectiveId" placeholder="请选择目的地"> <el-select v-model="form.objectiveId" placeholder="请选择目的地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
...@@ -80,7 +80,9 @@ ...@@ -80,7 +80,9 @@
<el-descriptions-item label="*请选择线路" :span="2" :labelStyle="labelStyle"> <el-descriptions-item label="*请选择线路" :span="2" :labelStyle="labelStyle">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="lineId">
<el-input :value="selectedRouter ? selectedRouter.startTitleZh + ' > ' + selectedRouter.destTitleZh : ''" readonly placeholder="请在右侧选择线路"></el-input> <el-input :value="selectedRouter ? selectedRouter.startTitleZh + ' > ' + selectedRouter.destTitleZh : ''" readonly placeholder="请在右侧选择线路"></el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<select size="5" v-model="form.lineId" style="min-width: 300px"> <select size="5" v-model="form.lineId" style="min-width: 300px">
...@@ -287,7 +289,9 @@ ...@@ -287,7 +289,9 @@
<el-descriptions :column="2" border> <el-descriptions :column="2" border>
<el-descriptions-item label="唛头"> <el-descriptions-item label="唛头">
<el-form-item label="" prop="marks" label-width="0" style="margin-bottom: 0" >
<el-input v-model="form.marks" placeholder=""></el-input> <el-input v-model="form.marks" placeholder=""></el-input>
</el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否控货"> <el-descriptions-item label="是否控货">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio" /> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio" />
...@@ -309,7 +313,7 @@ ...@@ -309,7 +313,7 @@
<dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable /> <dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="送货日期"> <el-descriptions-item label="送货日期">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="deliveryDate" required error="送货日期不能为空"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="deliveryDate">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -486,7 +490,15 @@ export default { ...@@ -486,7 +490,15 @@ export default {
}, },
// 表单校验 // 表单校验
rules: { rules: {
marks: [{required: true, message: '请填写唛头'}] marks : [{required: true, message: '请填写唛头'}],
consignorContactsId : [{required: true, message: '发货人不能为空'}],
consigneeContactsId : [{required: true, message: '收货人不能为空'}],
transportId : [{required: true, message: '请选择运输方式'}],
departureId : [{required: true, message: '请选择始发城市'}],
objectiveId : [{required: true, message: '请选择目的城市'}],
lineId : [{required: true, message: '请选择路线'}],
channelId : [{required: true, message: '请选择出货渠道'}],
deliveryDate : [{required: true, message: '请选择送货日期'}],
}, },
labelStyle: 'width:120px', labelStyle: 'width:120px',
showBatchImportDialog: false, // 显示批量导入弹窗 showBatchImportDialog: false, // 显示批量导入弹窗
......
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