Commit a1a853fb authored by 黄卓's avatar 黄卓

入仓修改

parent f534d19a
......@@ -163,6 +163,15 @@ export function orderWarehouseIn(data){
})
}
// 入仓
export function orderWarehouseInUpdateApply(data){
return request({
url: '/order/order-warehouse-in/update-apply',
method: 'put',
data
})
}
// 入仓完成
export function orderWarehouseInFinish(data){
return request({
......
......@@ -123,9 +123,10 @@
<script>
import dictSelector from "@/components/DictSelector"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import {orderWarehouseIn} from "@/api/ecw/order"
import { orderWarehouseIn, orderWarehouseInUpdateApply } from '@/api/ecw/order'
import {getProductBrankPage} from "@/api/ecw/productBrank"
import WorkFlow from "@/components/WorkFlow"
import elSelect from '@/components/render/slots/el-select'
export default {
name: 'editDialog',
......@@ -140,6 +141,7 @@ export default {
type: Boolean,
default: false
},
// 入仓修改
edit: {
type: Boolean,
default: false
......@@ -232,27 +234,48 @@ export default {
}
},
handleSubmit() {
const orderWarehouseInItemDoList = this.form.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
}
})
return orderWarehouseIn({
...this.form,
brandType: this.form.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList
}).then(r => {
if (r.data){
this.$message.success('入仓成功')
this.handleClose()
}else {
this.$message.success('入仓失败')
}
})
const orderWarehouseInItemDoList = [
...this.warehousing.orderWarehouseInBackItemDoList,
...this.form.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
}
})
]
if (this.edit)
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.form.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
"orderWarehouseInUpdateItemDoList": orderWarehouseInItemDoList,
copyUserId: this.selectedUsers
}).then(r => {
if (r.data){
this.$message.success('入仓修改发起成功')
this.handleClose()
}else {
this.$message.success('入仓修改发起失败')
}
})
else
return orderWarehouseIn({
...this.form,
brandType: this.form.brand ? 1 : 0,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList
}).then(r => {
if (r.data){
this.$message.success('入仓成功')
this.handleClose()
}else {
this.$message.success('入仓失败')
}
})
},
handleClose() {
this.form.orderWarehouseInItemDoList = []
......
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