Commit 488f0581 authored by Marcus's avatar Marcus

入仓主流程

parent edce21e5
...@@ -156,6 +156,15 @@ export function orderWarehouseInFinish(data){ ...@@ -156,6 +156,15 @@ export function orderWarehouseInFinish(data){
}) })
} }
// 退仓
export function rollbackApply(data){
return request({
url: '/order/order-warehouse-in/rollback-apply',
method: 'put',
data
})
}
//取消订单 //取消订单
export function cancelOrder(orderId){ export function cancelOrder(orderId){
return request({ return request({
...@@ -179,4 +188,4 @@ export function getMyOrderPage(query) { ...@@ -179,4 +188,4 @@ export function getMyOrderPage(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
\ No newline at end of file
...@@ -29,73 +29,57 @@ ...@@ -29,73 +29,57 @@
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button> <el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div> </div>
<el-table <el-table
:data="warehousing.orderWarehouseInBackItemDoList" :data="tableData"
style="width: 100%">
<el-table-column label="箱数" prop="cartonsNum">
</el-table-column>
<el-table-column label="包装类型" prop="boxGauge">
</el-table-column>
<el-table-column label="长(cm)" prop="">
</el-table-column>
<el-table-column label="款(cm)" prop="">
</el-table-column>
<el-table-column label="高(cm)" prop="">
</el-table-column>
<el-table-column label="体积(m³)" prop="">
</el-table-column>
<el-table-column label="重量(Kg)" prop="">
</el-table-column>
<el-table-column label="数量" prop="quantityAll">
</el-table-column>
<el-table-column label="快递单号" prop="expressNo">
</el-table-column>
</el-table>
<el-table
:data="form.orderWarehouseInItemDoList"
style="width: 100%"> style="width: 100%">
<el-table-column label="箱数"> <el-table-column label="箱数">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input> <span v-if="tableData[$index].id">{{ tableData[$index].cartonsNum }}</span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="包装类型"> <el-table-column label="包装类型">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].boxGauge" placeholder=""></el-input> <span v-if="tableData[$index].id">{{ tableData[$index].boxGauge }}</span>
<el-input v-else v-model="tableData[$index].boxGauge" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="长(cm)"> <el-table-column label="长(cm)">
<!-- <template v-slot="{r,c,$index}">--> <!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>--> <!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>--> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column label="款(cm)"> <el-table-column label="款(cm)">
<!-- <template v-slot="{r,c,$index}">--> <!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>--> <!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>--> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column label="高(cm)"> <el-table-column label="高(cm)">
<!-- <template v-slot="{r,c,$index}">--> <!-- <template v-slot="{r,c,$index}">-->
<!-- <el-input v-model="form.orderWarehouseInItemDoList[$index].cartonsNum" placeholder=""></el-input>--> <!-- <el-input v-model="tableData[$index].cartonsNum" placeholder=""></el-input>-->
<!-- </template>--> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column label="体积(m³)"> <el-table-column label="体积(m³)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].volume" placeholder=""></el-input> <span v-if="tableData[$index].id">{{ tableData[$index].volume }}</span>
<el-input v-else v-model="tableData[$index].volume" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].weight" placeholder=""></el-input> <span v-if="tableData[$index].id">{{ tableData[$index].weight }}</span>
<el-input v-else v-model="tableData[$index].weight" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量"> <el-table-column label="数量">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].quantityAll" placeholder=""></el-input> <span v-if="tableData[$index].id">{{ tableData[$index].quantityAll }}</span>
<el-input v-else v-model="tableData[$index].quantityAll" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="快递单号"> <el-table-column label="快递单号">
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-input v-model="form.orderWarehouseInItemDoList[$index].expressNo" placeholder=""></el-input> <span v-if="tableData[$index].id">{{ tableData[$index].expressNo }}</span>
<el-input v-else v-model="tableData[$index].expressNo" placeholder=""></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -211,8 +195,13 @@ export default { ...@@ -211,8 +195,13 @@ export default {
orderId: this.warehousing.orderId, orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId, orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo orderNo: this.warehousing.orderNo
}).then(() => { }).then(r => {
this.handleClose() if (r.data){
this.$message.success('入仓成功')
this.handleClose()
}else {
this.$message.success('入仓失败')
}
}) })
}, },
handleClose() { handleClose() {
...@@ -233,6 +222,12 @@ export default { ...@@ -233,6 +222,12 @@ export default {
"weight": 0 "weight": 0
}) })
} }
},
computed: {
tableData() {
return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
}
} }
} }
</script> </script>
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
prop="address" prop="address"
label="操作"> label="操作">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button> <el-button v-if="orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0" size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
<el-button size="mini" type="text" @click="handleWarehousing(row.prodId)">追加</el-button> <el-button v-else size="mini" type="text" @click="handleWarehousing($index)">追加</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button> <el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -151,19 +151,34 @@ ...@@ -151,19 +151,34 @@
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary">转异</el-button> <el-button type="primary">转异</el-button>
<el-button type="primary" @click="handleSubmit()">完成入仓</el-button> <el-button type="primary" @click="finishVisible = true">完成入仓</el-button>
</div> </div>
</el-form> </el-form>
<warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-dialog> <warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-dialog>
<edit-dialog :visible.sync="warehousingVisible" :warehousing="warehousing"></edit-dialog> <edit-dialog :visible.sync="warehousingVisible" :warehousing="warehousing"></edit-dialog>
<!-- 完成入仓 -->
<el-dialog
title="确认入仓"
:visible.sync="finishVisible"
width="300px">
<div style="text-align: center">在完成入仓前,您还可以</div>
<div style="text-align: center;padding: 15px 0">
<el-button type="info" @click="areaVisible = true, finishVisible = false">选择储位</el-button>
<el-button type="info">打印标签</el-button>
</div>
<div style="text-align: center">
<el-button type="primary" @click="handleSubmit()">确 定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getCurrencyList} from "@/api/ecw/currency" import {getCurrencyList} from "@/api/ecw/currency"
import {getOrder, getOrderWarehouseIn, orderWarehouseInFinish} from "@/api/ecw/order" import {getOrder, getOrderWarehouseIn, orderWarehouseInFinish, rollbackApply} from "@/api/ecw/order"
import orderBaseInfo from "@/components/OrderBaseInfo" import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog' import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog' import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
...@@ -189,6 +204,7 @@ export default { ...@@ -189,6 +204,7 @@ export default {
data() { data() {
return { return {
areaVisible: false, areaVisible: false,
finishVisible: false,
locationName: '', locationName: '',
warehousingVisible: false, warehousingVisible: false,
form: { form: {
...@@ -207,6 +223,20 @@ export default { ...@@ -207,6 +223,20 @@ export default {
orderWarehouseInFinish({ orderWarehouseInFinish({
"locationName": this.locationName, "locationName": this.locationName,
"orderId": this.order.orderId "orderId": this.order.orderId
}).then(r => {
if (r.data) {
this.$confirm(
'该订单已成功入仓,是否打印?',
'货物已入仓',
{
confirmButtonClass: '',
cancelButtonText: ''
}
).then().catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success('入仓成功')
})
}
}) })
}, },
handleWarehousing(index) { handleWarehousing(index) {
...@@ -219,16 +249,19 @@ export default { ...@@ -219,16 +249,19 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
console.log(item.id) console.log(item)
this.$message({ rollbackApply({
type: 'success', "orderId": item.orderId,
message: '删除成功!' "orderNo": item.orderNo,
}); "reason": ""
}).then(() => {
this.$message({
type: 'success',
message: '申请退仓成功!'
});
})
}).catch(() => { }).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