Commit 476e44dc authored by dragondean@qq.com's avatar dragondean@qq.com
parents f716c4dc d10ea10b
...@@ -73,3 +73,19 @@ export function cancelAdjustApply(data){ ...@@ -73,3 +73,19 @@ export function cancelAdjustApply(data){
data data
}) })
} }
//调仓审核
export function warehouseApprovalCancel(params,reason){
return request({
url: `/order/order-warehouse-approval/cancel/${params}`,
method:'get',
params:{reason}
})
}
// 调仓-查看最近的调仓纪录和审核状态
export function adjustLastWithStatus(params){
return request({
url:'/order/order-warehouse-in/adjust-last-with-status',
method:'get',
params,
})
}
...@@ -163,3 +163,19 @@ export function getBrankByCustomer(data){ ...@@ -163,3 +163,19 @@ export function getBrankByCustomer(data){
data, data,
}) })
} }
//
export function levelLogPage(params){
return request({
url:'/customer/level-log/page',
method:'get',
params
})
}
//获取信用等级日志列表
export function customerCreditLogPage(params){
return request({
url:'/customer/credit-log/page',
method:'get',
params
})
}
...@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){ ...@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){
}) })
} }
// 创建特殊 // 批量更新特需
export function specialNeedCreate(data){ export function specialNeedCreate(data){
return request({ return request({
url:'ecw/order-special-need/create', url:'ecw/order-special-need/updateBatch',
method:'post', method:'put',
data:data, data,
}) })
} }
// 创建特殊 // 创建特殊
...@@ -403,3 +403,11 @@ export function exportPackingList(){ ...@@ -403,3 +403,11 @@ export function exportPackingList(){
responseType: 'blob' responseType: 'blob'
}) })
} }
//获得特需
export function orderSpecialNeedGet(params){
return request({
url:'/ecw/order-special-need/get',
method:'get',
params
})
}
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
f.selected = false f.selected = false
if(f.positionList) f.positionList.forEach(g => { if(f.positionList) f.positionList.forEach(g => {
// 位置 // 位置
g.children.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
k.selected = false k.selected = false
}) })
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
// 区域被选,清空该区域下的位置 // 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList.forEach(g => { if(warehouse.positionList) warehouse.positionList.forEach(g => {
g.children.forEach(k => { g.children?.forEach(k => {
k.selected = false k.selected = false
}) })
}) })
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
let hasSelected = false let hasSelected = false
parentAre.positionList.forEach(g => { parentAre.positionList.forEach(g => {
// 位置 // 位置
g.children.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
if (k.selected) hasSelected = true if (k.selected) hasSelected = true
}) })
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
else if(f.positionList) f.positionList.forEach(g => { else if(f.positionList) f.positionList.forEach(g => {
// 位置 // 位置
if (g.selected) result.push(k.code) if (g.selected) result.push(k.code)
g.children.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
if (k.selected) result.push(k.code) if (k.selected) result.push(k.code)
}) })
......
...@@ -94,14 +94,18 @@ ...@@ -94,14 +94,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber" /> <el-table-column label="方数(预装/已装)" align="center" prop="">
<el-table-column label="重量(预装/已装)" align="center" prop="weight" /> <template slot-scope="{row}">
{{row.boxStatistics.volume}}/{{row.boxStatistics.loadVolume}}
<el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(预装/已装)" align="center" prop="weight">
<template slot-scope="{row}">
{{row.boxStatistics.weight}}/{{row.boxStatistics.loadWeight}}
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="shipmentStatusText" />
<el-table-column label="日期" align="center" prop="createTime" width="180"> <el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
}; };
}, },
created() { created() {
this.getBoxInfo();
// 仓库 // 仓库
getWarehouseList().then((r) => { getWarehouseList().then((r) => {
this.warehouseList = r.data; this.warehouseList = r.data;
...@@ -100,6 +99,9 @@ export default { ...@@ -100,6 +99,9 @@ export default {
this.allUsers = data.list ?? []; this.allUsers = data.list ?? [];
}); });
}, },
activated() {
this.getBoxInfo();
},
methods: { methods: {
/* 获取仓库 */ /* 获取仓库 */
importCityName(id) { importCityName(id) {
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>--> <!-- <el-table-column label="始发仓" prop="startWarehouseName"></el-table-column>-->
<el-table-column label="目的地" prop="objectiveName"></el-table-column> <el-table-column label="目的地" prop="objectiveName"></el-table-column>
<el-table-column label="始发仓" prop="startWarehouseName">
</el-table-column>
<el-table-column label="发货人"> <el-table-column label="发货人">
<template v-slot="{row}"> <template v-slot="{row}">
<div> <div>
...@@ -52,6 +54,7 @@ ...@@ -52,6 +54,7 @@
{{ row.consignorName }} {{ row.consignorName }}
</p> </p>
<p> <p>
{{row.consignorPhone}}
</p> </p>
</div> </div>
</div> </div>
...@@ -64,28 +67,34 @@ ...@@ -64,28 +67,34 @@
{{ row.consigneeName }} {{ row.consigneeName }}
</p> </p>
<p> <p>
{{ row.consigneePhone }} {{ row.consigneePhone}}
</p> </p>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column>
<template v-slot="{row}">
<el-button @click="canceLtiaoCang(row)" type="text" v-if="row.inWarehouseState === 10">
取消调仓
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<el-row style="margin-top: 30px">
<el-col :span="8">
<div style="text-align: right;">
{{ list[0] && list[0].adjustToStartWarehouseName ? list[0].adjustToStartWarehouseName : list[0] && list[0].startWarehouseName ? list[0].startWarehouseName : '' }}
</div>
</el-col>
<el-col :span="3"><div style="text-align:center">
调至
</div></el-col>
<el-col :span="8"><el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select></el-col>
</el-row>
<div style="display: flex;justify-content:center; margin-top: 20px"> <div style="display: flex;justify-content:center; margin-top: 20px">
<div style="width: 200px; margin: 0 10px"> <div style="width: 200px; margin: 0 10px">
{{ list[0] && list[0].startWarehouseName ? list[0].startWarehouseName : '' }} </div>
<div>
</div> </div>
<div style="width: 200px;"> <div style="width: 200px;">
<el-select v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select>
</div> </div>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -95,12 +104,17 @@ ...@@ -95,12 +104,17 @@
<div style="padding: 20px"> <div style="padding: 20px">
<work-flow xmlkey="warehouse_transfer" v-model="params.copyUserId"/> <work-flow xmlkey="warehouse_transfer" v-model="params.copyUserId"/>
</div> </div>
<div style="text-align: center"> <div style="text-align: center" v-if="!adjustmentBol">
<el-button style="margin-right: 50px" v-if="adjustmentBol">审核中</el-button> <el-button style="margin-right: 50px" @click="submit">提交申请</el-button>
<el-button v-else style="margin-right: 50px" @click="submit" :disabled="isSubmit">提交申请</el-button>
<el-button @click="$emit('update:dialogVisible',false)">取消</el-button> <el-button @click="$emit('update:dialogVisible',false)">取消</el-button>
</div> </div>
<!-- <warehouseDetails></warehouseDetails>--> <div style="text-align: center" v-else>
<el-button @click="()=>{
$router.push({path:'/bpm/process-instance/detail',query:{id:this.applyStatus.orderWarehouseApprovalBackVO.formId}})
}">审核中</el-button>
<el-button @click="cancellationOfOrder" >取消审核</el-button>
<el-button @click="$emit('update:dialogVisible',false)" >取消</el-button>
</div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -108,10 +122,10 @@ ...@@ -108,10 +122,10 @@
<script> <script>
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { import {
adjustApplyStatus, cancelAdjustApply, adjustApplyStatus, adjustLastWithStatus, cancelAdjustApply,
ecwOrderList, ecwOrderList,
orderWarehouseInAdjustApply, orderWarehouseInAdjustApply,
warehouseAdjustmentList, warehouseAdjustmentList, warehouseApprovalCancel,
} from "@/api/ecw/batchSingleApplication"; } from "@/api/ecw/batchSingleApplication";
import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition"; import {getProcessDefinitionBpmnXMLByKey} from "@/api/bpm/definition";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails"; import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
...@@ -148,18 +162,8 @@ export default { ...@@ -148,18 +162,8 @@ export default {
} }
}, },
computed: { computed: {
isSubmit() {
let flag = true;
if (this.list.length === 1 && this.list[0].status === 5) {
flag = false
} else {
let l = this.list.map(e => e.startWarehouseId)
if (this.list.every(e => e.status === 5) && [...new Set(l)].length === 1) flag = false
}
return flag;
},
adjustmentBol() { adjustmentBol() {
return this.list.some(e => e.inWarehouseState === 10) return this.applyStatus?.orderWarehouseAdjustBackVO?.status === 1
} }
}, },
data() { data() {
...@@ -176,6 +180,8 @@ export default { ...@@ -176,6 +180,8 @@ export default {
warehouseOutId: undefined, warehouseOutId: undefined,
copyUserId: [], copyUserId: [],
}, },
applyStatus:{}//调仓-查看状态
} }
}, },
methods: { methods: {
...@@ -183,12 +189,18 @@ export default { ...@@ -183,12 +189,18 @@ export default {
getOrderPage({orderIdList: this.orderList}).then(r => { getOrderPage({orderIdList: this.orderList}).then(r => {
this.list = r.data.list this.list = r.data.list
warehouseAdjustmentList({id: this.list[0].startWarehouseId}).then(r => this.availableWarehouse = r.data) warehouseAdjustmentList({id: this.list[0].startWarehouseId}).then(r => this.availableWarehouse = r.data)
adjustLastWithStatus({orderId:this.list[0].orderId,lang:0}).then(r =>{
this.applyStatus = r.data
if(r.data?.orderWarehouseAdjustBackVO?.status === 1){
this.params.warehouseInId = r.data.orderWarehouseAdjustBackVO?.warehouseInId
}
})
}) })
}, },
submit() { submit() {
let p = this.list.map(e => e.orderId).join(','); let p = this.list.map(e => e.orderId).join(',');
this.params.orderIds = p; this.params.orderIds = p;
this.params.warehouseOutId = this.list[0].startWarehouseId; this.params.warehouseOutId = this.list[0].adjustToStartWarehouseId ? this.list[0].adjustToStartWarehouseId : this.list[0].startWarehouseId;
this.params.orderNo = this.list[0].orderNo this.params.orderNo = this.list[0].orderNo
orderWarehouseInAdjustApply(this.params).then(r => { orderWarehouseInAdjustApply(this.params).then(r => {
if (r.code === 0) { if (r.code === 0) {
...@@ -197,34 +209,25 @@ export default { ...@@ -197,34 +209,25 @@ export default {
} }
}) })
}, },
async canceLtiaoCang(row) { cancellationOfOrder(){
let res = await adjustApplyStatus({orderId: row.orderId}) this.$prompt('请输入审核调仓原因', '提示', {
if (res.data.isBatch) {
this.$message.warning('批量提提交请耐心等待')
} else {
this.$prompt('请问您是否要取消调仓?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', }).then(({ value }) => {
}).then((val) => { warehouseApprovalCancel(this.applyStatus.orderWarehouseApprovalBackVO.id,value) .then(r => {
cancelAdjustApply({orderId: row.orderId, reason: val.value}).then(r => { if(r.data){
if (r.code === 0) { this.$message.success('取消调仓成功')
this.$message({ this.$emit('update:dialogVisible',false)
type: 'success',
message: '取消调仓成功!'
});
this.getOrderListFn()
} }
}) })
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消' message: '取消成功'
}); });
}); });
} }
},
} }
} }
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-form label-width="180px" label-position="left"> <el-form label-width="180px" label-position="left">
<el-form-item label="特殊要求"> <el-form-item label="特殊要求">
<el-checkbox-group v-model="advanceType"> <el-checkbox-group v-model="advanceType">
<el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :disabled="advanceTypeList.includes(item.value)" :label="item.value" >{{item.label}}</el-checkbox> <el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :label="item.value" >{{item.label}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item> <el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<script> <script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {specialNeedCreate} from "@/api/ecw/order"; import {specialNeedCreate,getSpecialListByOrderId} from "@/api/ecw/order";
export default { export default {
name: "specialNeeds", name: "specialNeeds",
props:{ props:{
...@@ -41,12 +41,9 @@ export default { ...@@ -41,12 +41,9 @@ export default {
type:[String,Number], type:[String,Number],
}, },
show:Boolean, show:Boolean,
advanceTypes:String,
}, },
computed:{ computed:{
advanceTypeList(){
return !!this.advanceTypes ? this.advanceTypes.split(',') : []
}
}, },
data(){ data(){
return{ return{
...@@ -62,7 +59,6 @@ export default { ...@@ -62,7 +59,6 @@ export default {
submit(){ submit(){
this.specialNeedsList.forEach(i => { this.specialNeedsList.forEach(i => {
i.todoDetail = this.todoDetail i.todoDetail = this.todoDetail
}) })
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1) let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
specialNeedCreate(p).then(r=>{ specialNeedCreate(p).then(r=>{
...@@ -86,6 +82,20 @@ export default { ...@@ -86,6 +82,20 @@ export default {
payType:'' payType:''
}) })
}) })
//特需回显
getSpecialListByOrderId(this.orderId).then(r => {
r.data.forEach(i => {
this.advanceType.push(i.advanceType)
let index = this.specialNeedsList.findIndex(item => i.advanceType == item.advanceType)
this.specialNeedsList.splice(index,1, { advanceType:i.advanceType,
orderId:this.orderId,
id:i.id,
transFee:i.transFee,//预计金额
transCurrency:i.transCurrency,//运输费币种
payType:i.payType})
})
})
}else { }else {
this.specialNeedsList = [] this.specialNeedsList = []
this.advanceType = [] this.advanceType = []
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="入仓时间"> label="入仓时间">
<template v-slot="{row}">
{{parseTime(row.rucangTime)}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="运输方式"> label="运输方式">
...@@ -54,10 +57,22 @@ ...@@ -54,10 +57,22 @@
<el-table-column <el-table-column
label="发货人"> label="发货人">
<template v-slot="{row}"> <template v-slot="{row}">
<div></div> <p>
{{row.consignorName}}
</p>
<p>
{{row.consignorPhone}}
</p>
</template> </template>
</el-table-column> </el-table-column>
<
<el-table-column <el-table-column
header-align="center"
align="center"
prop="columnProp"
label="columnLabel"
>
</el-table-column>
label="收货人"> label="收货人">
<template v-slot="{row}"> <template v-slot="{row}">
<p> <p>
...@@ -211,7 +226,7 @@ export default { ...@@ -211,7 +226,7 @@ export default {
warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( r => { warehouseApprovalGetByFormId({formId:this.processInstanceID}).then( r => {
this.FeeDetails = r.data this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(r.data.details) this.FeeDetails.details = JSON.parse(r.data.details)
getOrderPage({orderIdList:r.data.orderIds}).then(res=>{ getOrderPage({orderIdList:r.data.adjustActualOrderIds}).then(res=>{
this.list = res.data.list this.list = res.data.list
}) })
......
<template>
<div>
<el-dialog
title="选择储位"
:visible.sync="opened"
width="600px"
:before-close="handleClose()"
v-bind="$attrs"
>
<el-tabs v-model="activeName" type="card" @tab-click="activeWarehouse = {}">
<el-tab-pane v-if="item.warehouseId === warehouseId" :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="index">
<div>
<div style="text-align: center">区域</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="i">
<div
class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
@click="handleSelectWarehouse(warehouse)"
>
{{ warehouse.name }}
</div>
</el-col>
</el-row>
</div>
</div>
<div>
<div style="text-align: center">仓位</div>
<div class="position-group">
<div class="position" v-for="position in activeWarehouse.positionList" :key="item.id">
<div
class="position-item"
v-for="item in position.children"
@click="handleSelectPosition(item)"
:class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
</div>
</div>
</div>
<el-divider></el-divider>
已选择:{{ selected.join(', ') }}
<el-divider></el-divider>
</el-tab-pane>
</el-tabs>
<span slot="footer">
<el-button @click="opened = false">关 闭</el-button>
<el-button type="primary" @click="handleSubmit()">提 交</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getByWarehouseId } from '@/api/ecw/warehouseArea'
export default {
name: 'warehouseLocation',
props: {
visible: {
type: Boolean,
default: false
},
value: Array,
orderId: Number,
cityId: {
type: Number,
default: undefined
},
warehouseId: {
type: Number,
default: undefined
},
},
data() {
return {
opened: false,
area: [],
activeName: '0',
selectedWarehouse: [],
selectedPosition: [],
activeWarehouse: {}
};
},
watch: {
visible(val) {
if (val) {
this.opened = true
getByWarehouseId({cityId: this.cityId,}).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
f.selected = false
if(f.positionList) f.positionList.forEach(g => {
// 位置
if(g.children)g.children.forEach(k => {
// 子位置
k.selected = false
})
})
})
})
this.area = area
})
} else {
}
},
opened(val) {
if (val) {
} else {
this.$emit('update:visible', false)
}
}
},
methods: {
handleSubmit() {
this.$emit('input', this.inputValue)
this.opened = false
},
handleClose() {},
handleSelectWarehouse(warehouse) {
this.activeWarehouse = warehouse
if (!!warehouse.selected) {
warehouse.selected = false
} else {
warehouse.selected = true
// 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList.forEach(g => {
if(g.children)g.children.forEach(k => {
k.selected = false
})
})
}
},
handleSelectPosition(position) {
if (!!position.selected) {
position.selected = false
// 反选位置时,检查父区域下是否所有位置被反选,若是,选父区域
const parentAre = this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId)
if (!parentAre.selected) {
// 检查父区域下是否所有位置被反选
let hasSelected = false
parentAre.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
if (k.selected) hasSelected = true
})
})
// 所有子位置被反选,选父区域
if (!hasSelected) parentAre.selected = true
}
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
}
},
mounted() {
console.log('area dialog mounted')
},
computed: {
// code array
selected() {
const result = []
this.area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
if (f.selected) result.push(f.code)
else if(f.positionList) f.positionList.forEach(g => {
// 位置
if (g.selected) result.push(k.code)
if(g.children)g.children.forEach(k => {
// 子位置
if (k.selected) result.push(k.code)
})
})
})
})
return result
},
inputValue(){
const result = []
this.area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
if (f.selected) result.push({
orderId: this.orderId,
wareId: f.pid,
areaId: f.id
})
else if(f.positionList) f.positionList.forEach(g => {
// 位置
if (g.selected) result.push({
orderId: this.orderId,
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else if(g.children)g.children.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
})
})
})
})
return result
}
}
}
</script>
<style scoped>
.warehouse-block{
background-color: white;
border-radius: 5px;
height: 42px;
line-height: 42px;
text-align: center;
margin-bottom: 15px;
cursor: pointer;
transition: 0.5s;
box-shadow: #bfbfbf 3px 3px 14px 0;
user-select: none;
}
.warehouse-block:hover{
opacity: 0.9;
transition: 0.5s;
transform: scale(1.02);
box-shadow: #8f8f8f 7px 5px 14px 0;
}
.warehouse-block-active{
box-shadow: #7e9dbd 7px 5px 14px 0;
transform: scale(1.04);
}
.warehouse-block-selected{
color: #ffffff;
background-color: #4085e3;
}
.position-group{
display: flex;
background-color: #EFEFEF;
border: 1px #EFEFEF solid;
gap: 1px;
min-height: 64px;
}
.position{
width: 20%;
height: 64px;
display: flex;
flex-direction: column;
gap: 1px;
user-select: none;
}
.position-item{
width: 100%;
background-color: #FFFFFF;
flex: 1;
cursor: pointer;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.position-item:hover{
background-color: #d7dbe3;
}
.position-item-active{
background-color: #4085e3;
color: white;
}
.position-item-active:hover{
background-color: #4085e3;
opacity: 0.8;
}
</style>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-table-column label="调仓编号" prop="id"></el-table-column> <el-table-column label="调仓编号" prop="id"></el-table-column>
<el-table-column label="调出仓库" prop="warehouseOutName" ></el-table-column> <el-table-column label="调出仓库" prop="warehouseOutName" ></el-table-column>
<el-table-column label="调入仓库" prop="warehouseInName"></el-table-column> <el-table-column label="调入仓库" prop="warehouseInName"></el-table-column>
<el-table-column label="申请人" prop="creator"></el-table-column> <el-table-column label="申请人" prop="creatorName"></el-table-column>
<el-table-column label="申请时间"> <el-table-column label="申请时间">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.createTime)}} {{parseTime(row.createTime)}}
...@@ -67,9 +67,6 @@ ...@@ -67,9 +67,6 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button v-if="row.status === 4" type="text">
撤销
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -78,6 +75,9 @@ ...@@ -78,6 +75,9 @@
<el-descriptions-item label="储位"> <el-descriptions-item label="储位">
<div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} 区</div></div> <div v-for="item in storageSpaceList" style="display: flex;"><div>{{item.warehouseName ? item.warehouseName : ''}}</div><div>{{item.warehouseName ? item.regionName :''}} 区</div></div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item v-if="type == 2" label="选择储位">
<div @click="areaVisible = true" style="color: #0a84ff;cursor: pointer;">选择储位</div>
</el-descriptions-item>
<el-descriptions-item label="调拨目标仓">{{ warehouseDetails && warehouseDetails.warehouseInName ? warehouseDetails.warehouseInName : '' }}</el-descriptions-item> <el-descriptions-item label="调拨目标仓">{{ warehouseDetails && warehouseDetails.warehouseInName ? warehouseDetails.warehouseInName : '' }}</el-descriptions-item>
<el-descriptions-item label="物流公司"> <el-descriptions-item label="物流公司">
<el-select v-model="params.logisticsCompany" > <el-select v-model="params.logisticsCompany" >
...@@ -90,20 +90,22 @@ ...@@ -90,20 +90,22 @@
<el-descriptions-item label="联系电话"> <el-descriptions-item label="联系电话">
<el-input v-model="params.phone"></el-input> <el-input v-model="params.phone"></el-input>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出仓日期"> <el-descriptions-item label="出仓日期" >
<el-date-picker <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="params.deliveryDate" v-model="params.deliveryDate"
type="date" type="date"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="到仓日期">--> <el-descriptions-item label="到仓日期" v-if="type == 2">
<!-- <el-date-picker--> <el-date-picker
<!-- v-model="params.deliveryDate"--> value-format="yyyy-MM-dd HH:mm:ss"
<!-- type="date"--> v-model="params.arrivalDate"
<!-- placeholder="选择日期">--> type="date"
<!-- </el-date-picker>--> placeholder="选择日期">
<!-- </el-descriptions-item>--> </el-date-picker>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider content-position="left"> <el-divider content-position="left">
出仓影像 出仓影像
...@@ -114,11 +116,31 @@ ...@@ -114,11 +116,31 @@
<el-input v-model="params.deliveryRemark" type="textarea"></el-input> <el-input v-model="params.deliveryRemark" type="textarea"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div style="margin-bottom: 30px; text-align: center;">
<el-button v-if="type == 1" @click="submit">确认出仓</el-button> <el-button v-if="type == 1" @click="submit" size="medium">确认出仓</el-button>
<el-button v-else @click="submit2">确认到仓</el-button> <el-button v-else @click="submit2(true)" size="medium" >确认到仓</el-button>
<el-button @click="$tab.closeOpenPage({path:'/order/order'})">返回</el-button> <el-button v-if="type == 2" @click="escapeBol = true;">转异</el-button>
<el-button v-if="type == 1" size="medium" @click="cancellationOfOrder">取消调仓</el-button>
<el-button size="medium" @click="$tab.closeOpenPage({path:'/order/order'})">返回</el-button>
</div> </div>
<warehouse-location ref="area" :city-id="warehouseDetails.warehouseInShi" :visible.sync="areaVisible" v-model="params.orderLocationCreateReqVOList" :warehouse-id="warehouseDetails.warehouseInId" :order-id="Number(orderId)"></warehouse-location>
<el-dialog :title="'订单转异'" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200">
<el-form-item label="原因类型">
<dict-selector v-model="params.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item label="附件">
<image-upload v-model="params.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item label="详细信息">
<el-input v-model="params.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submit2(false)">转异完成并入仓</el-button>
<el-button @click="escapeBol = false">取消</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -128,7 +150,7 @@ import { ...@@ -128,7 +150,7 @@ import {
getAdjustInfo, getAdjustInfo,
getOrder, listByOrderId, getOrder, listByOrderId,
orderWarehouseInGetAdjustInfo, orderWarehouseInGetAdjustInfo,
orderWarehousePicturePage, warehouseAdjustArrived, warehouseAdjustPage, orderWarehousePicturePage, warehouseAdjustArrived,
warehouseAdjustSendOut warehouseAdjustSendOut
} from "@/api/ecw/order"; } from "@/api/ecw/order";
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
...@@ -136,13 +158,18 @@ import {DICT_TYPE} from '@/utils/dict'; ...@@ -136,13 +158,18 @@ import {DICT_TYPE} from '@/utils/dict';
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index"; import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index";
import {getSupplierPage} from "@/api/ecw/supplier"; import {getSupplierPage} from "@/api/ecw/supplier";
import {getByWarehouseId} from "@/api/ecw/warehouseArea"; import {getByWarehouseId} from "@/api/ecw/warehouseArea";
let STATUS = {1:'审核中', 2:'已通过', 3:'已拒绝', 4:'已出仓', 5:'已到仓'} import {adjustLastWithStatus, warehouseApprovalCancel} from "@/api/ecw/batchSingleApplication";
import warehouseLocation from "@/views/ecw/order/components/warehouseLocation";
import imageUpload from "@/components/ImageUpload";
let STATUS = {1:'申请中', 2:'通过', 3:'不通过', 4:'已取消', 5:'已出仓',6:'已到仓'}
export default { export default {
name: "transferWarehousing", name: "transferWarehousing",
components: { components: {
ImageAndVideoUpload, ImageAndVideoUpload,
Template, Template,
ordeDetailsForm, ordeDetailsForm,
warehouseLocation,
imageUpload
}, },
props: { props: {
orderId: [String, Number], orderId: [String, Number],
...@@ -150,6 +177,8 @@ export default { ...@@ -150,6 +177,8 @@ export default {
}, },
data() { data() {
return { return {
areaVisible:false,
escapeBol:false,
STATUS, STATUS,
orderDetails: {}, orderDetails: {},
DICT_TYPE, DICT_TYPE,
...@@ -162,14 +191,60 @@ export default { ...@@ -162,14 +191,60 @@ export default {
logisticsCompany:undefined, logisticsCompany:undefined,
logisticsNo: "", logisticsNo: "",
phone: "", phone: "",
urls: [] urls: [],
arrivalDate:'',
orderLocationCreateReqVOList:[],
manualExceptionType:0,
descZh:'',
exceptionUrls:[]
}, },
warehouseInShi:'',
expressList:[], expressList:[],
storageSpaceList:[], storageSpaceList:[],
applyStatus:{}
} }
}, },
created() { computed:{
exWarehouse(){
return {
deliveryDate: this.params.deliveryDate,
deliveryRemark: this.params.deliveryRemark,
id: this.params.id,
logisticsCompany: this.params.logisticsCompany,
logisticsNo:this.params.logisticsNo,
phone: this.params.logisticsNo,
urls: this.params.urls,
}
},
toWarehouseAbnormal(){
return {
arrivalDate: this.params.arrivalDate,
arrivalRemark: this.params.arrivalRemark,
descZh: this.params.descZh,
id: this.params.id,
manualExceptionType:this.params.manualExceptionType,
orderLocationCreateReqVOList: this.params.orderLocationCreateReqVOList,
urls: this.params.urls,
exceptionUrls:this.params.exceptionUrls.split(','),
}
},
toWarehouse(){
return {
arrivalDate: this.params.arrivalDate,
arrivalRemark: this.params.arrivalRemark,
id: this.params.id,
urls: this.params.urls,
}
}
},
created() {
if(this.type == 1){
adjustLastWithStatus({orderId:this.orderId,lang:0}).then(r =>{
this.applyStatus = r.data})
}
getSupplierPage({ pageNo: 1, pageSize: 10000}).then(r => { getSupplierPage({ pageNo: 1, pageSize: 10000}).then(r => {
this.expressList = r.data.list; this.expressList = r.data.list;
}) })
...@@ -184,7 +259,7 @@ export default { ...@@ -184,7 +259,7 @@ export default {
}) })
} }
orderWarehouseInGetAdjustInfo({orderId: this.orderId, lang: 0}).then(r => { orderWarehouseInGetAdjustInfo({orderId: this.orderId, lang: 0}).then(r => {
this.warehouseDetails = r.data[0] this.warehouseDetails = r.data[r.data.length - 1]
listByOrderId({orderId:this.orderId}).then(res => { listByOrderId({orderId:this.orderId}).then(res => {
if(res.code === 0){ if(res.code === 0){
getByWarehouseId().then(r =>{ getByWarehouseId().then(r =>{
...@@ -207,10 +282,11 @@ export default { ...@@ -207,10 +282,11 @@ export default {
}) })
} }
}) })
this.warehouseInShi = this.warehouseDetails.warehouseInShi
this.params.phone = this.warehouseDetails.phone || ''; this.params.phone = this.warehouseDetails.phone || '';
this.params.logisticsNo = this.warehouseDetails.logisticsNo; this.params.logisticsNo = this.warehouseDetails.logisticsNo;
this.params.id = this.warehouseDetails.id; this.params.id = this.warehouseDetails.id;
this.params.deliveryDate = this.warehouseDetails.deliveryDate this.params.deliveryDate = new Date(this.warehouseDetails.deliveryDate);
this.params.logisticsCompany = this.warehouseDetails.logisticsCompany ? parseInt(this.warehouseDetails.logisticsCompany) :undefined; this.params.logisticsCompany = this.warehouseDetails.logisticsCompany ? parseInt(this.warehouseDetails.logisticsCompany) :undefined;
orderWarehousePicturePage({rows:100,bizId:this.params.id,type:this.type == 1 ? 2 : 3 }).then(r => { orderWarehousePicturePage({rows:100,bizId:this.params.id,type:this.type == 1 ? 2 : 3 }).then(r => {
if(r.code === 0){ if(r.code === 0){
...@@ -221,20 +297,20 @@ export default { ...@@ -221,20 +297,20 @@ export default {
}, },
methods:{ methods:{
submit(){ submit(){
warehouseAdjustSendOut(this.params).then( warehouseAdjustSendOut(this.exWarehouse).then(
r => { r => {
if(r.code === 0){ if(r.code === 0){
this.$message.success('调拨出仓成功'); this.$message.success('调拨出仓成功');
this.$router.back(); this.$tab.closeOpenPage({path:'/order/order'})
} }
} }
) )
}, },
submit2(){ submit2(val){
warehouseAdjustArrived(this.params).then(r => { warehouseAdjustArrived(val ? this.toWarehouse : this.toWarehouseAbnormal).then(r => {
if(r.code === 0){ if(r.code === 0){
this.$message.success('调到仓成功'); this.$message.success('调到仓成功');
this.$router.back(); this.$tab.closeOpenPage({path:'/order/order'})
} }
}) })
}, },
...@@ -247,12 +323,31 @@ export default { ...@@ -247,12 +323,31 @@ export default {
num += Number(i.num) num += Number(i.num)
weight += Number(i.weight) weight += Number(i.weight)
Wvolume += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.volume : 0); Wvolume += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.volume : 0);
Wnum += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.num : 0) Wnum += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.cartonsNum : 0)
Wweight += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.weight : 0) Wweight += Number(i.warehouseInInfoVO ? i.warehouseInInfoVO.weight : 0)
}) })
let text = `下单统计:${num}${volume}${weight}Kg` let text = `下单统计:${num}${volume}${weight}Kg`
let text2 =` 入仓统计:${Wnum}${Wvolume}${Wweight}Kg` let text2 =` 入仓统计:${Wnum}${Wvolume}${Wweight}Kg`
return ['合计:',text,text2] return ['合计:',text,text2]
},
cancellationOfOrder(){
this.$prompt('请输入审核调仓原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
warehouseApprovalCancel(this.applyStatus.orderWarehouseApprovalBackVO.id,value) .then(r => {
if(r.data){
this.$message.success('取消调仓成功')
this.$tab.closeOpenPage({path:'/order/order'})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消成功'
});
});
} }
}, },
} }
......
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