Commit a1a853fb authored by 黄卓's avatar 黄卓

入仓修改

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