Commit 488f0581 authored by Marcus's avatar Marcus

入仓主流程

parent edce21e5
......@@ -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){
return request({
......@@ -179,4 +188,4 @@ export function getMyOrderPage(query) {
method: 'get',
params: query
})
}
\ No newline at end of file
}
......@@ -29,73 +29,57 @@
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-table
:data="warehousing.orderWarehouseInBackItemDoList"
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"
:data="tableData"
style="width: 100%">
<el-table-column label="箱数">
<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>
</el-table-column>
<el-table-column label="包装类型">
<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>
</el-table-column>
<el-table-column label="长(cm)">
<!-- <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>-->
</el-table-column>
<el-table-column label="款(cm)">
<!-- <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>-->
</el-table-column>
<el-table-column label="高(cm)">
<!-- <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>-->
</el-table-column>
<el-table-column label="体积(m³)">
<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>
</el-table-column>
<el-table-column label="重量(Kg)">
<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>
</el-table-column>
<el-table-column label="数量">
<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>
</el-table-column>
<el-table-column label="快递单号">
<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>
</el-table-column>
</el-table>
......@@ -211,8 +195,13 @@ export default {
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo
}).then(() => {
this.handleClose()
}).then(r => {
if (r.data){
this.$message.success('入仓成功')
this.handleClose()
}else {
this.$message.success('入仓失败')
}
})
},
handleClose() {
......@@ -233,6 +222,12 @@ export default {
"weight": 0
})
}
},
computed: {
tableData() {
return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
}
}
}
</script>
......
......@@ -55,8 +55,8 @@
prop="address"
label="操作">
<template v-slot="{ row, column, $index }">
<el-button size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
<el-button size="mini" type="text" @click="handleWarehousing(row.prodId)">追加</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 v-else size="mini" type="text" @click="handleWarehousing($index)">追加</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button>
</template>
</el-table-column>
......@@ -151,19 +151,34 @@
<div style="text-align: center">
<el-button type="primary">转异</el-button>
<el-button type="primary" @click="handleSubmit()">完成入仓</el-button>
<el-button type="primary" @click="finishVisible = true">完成入仓</el-button>
</div>
</el-form>
<warehouse-area-dialog :visible.sync="areaVisible" v-model="locationName"></warehouse-area-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>
</template>
<script>
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 WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
......@@ -189,6 +204,7 @@ export default {
data() {
return {
areaVisible: false,
finishVisible: false,
locationName: '',
warehousingVisible: false,
form: {
......@@ -207,6 +223,20 @@ export default {
orderWarehouseInFinish({
"locationName": this.locationName,
"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) {
......@@ -219,16 +249,19 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(item.id)
this.$message({
type: 'success',
message: '删除成功!'
});
console.log(item)
rollbackApply({
"orderId": item.orderId,
"orderNo": item.orderNo,
"reason": ""
}).then(() => {
this.$message({
type: 'success',
message: '申请退仓成功!'
});
})
}).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