Commit 35d96a0c authored by 我在何方's avatar 我在何方
parents c56c945d 12475393
......@@ -212,6 +212,15 @@ export function saveOrUpdateOrderLocation(data){
})
}
// 入仓修改储位
export function updateWarehouseInLocation(data){
return request({
url: '/order/location/update-warehouse-in-location',
method: 'put',
data
})
}
// 获取入仓修改审批单详情-审批使用
export function getWarehouseUpdateApprovalInfo(id) {
return request({
......
......@@ -67,7 +67,7 @@
<script>
import {getByWarehouseId} from "@/api/ecw/warehouseArea"
import {saveOrUpdateOrderLocation} from "@/api/ecw/order"
import { updateWarehouseInLocation } from "@/api/ecw/order"
export default {
name: "WarehouseAreaSelect",
......@@ -78,6 +78,9 @@ export default {
default: () => []
},
orderId: Number,
orderItemId: Number,
// 入仓记录id
warehouseInId: Number,
warehouseId: {
type: Number,
default: undefined
......@@ -179,10 +182,15 @@ export default {
if (this.isEditing) {
this.$nextTick(() => {
saveOrUpdateOrderLocation({
"orderId": this.orderId,
"orderLocationCreateReqVOList": this.inputValue
const data = this.inputValue.map(e => {
return {
...e,
orderItemId: this.orderItemId,
warehouseInId: this.warehouseInId
}
})
updateWarehouseInLocation(data)
})
}
},
......
......@@ -36,6 +36,14 @@
<el-table-column :label="$t('入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
<warehouse-area-select
v-model="row.orderLocationBackVOList"
readonly
:order-id="orderId"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
......@@ -43,7 +51,11 @@
import { getOrder, getOrderWarehouseIn } from '@/api/ecw/order'
import { DICT_TYPE } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
export default {
components: {
WarehouseAreaSelect
},
filters: {parseTime},
props:{
order: Object, // order 和 orderId 二选一
......
......@@ -200,6 +200,14 @@
</template>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('储位')">
<template slot-scope="{row}">
<warehouse-area-select
v-model="row.warehouseInInfoVO.orderLocationBackVOList"
readonly
:order-id="orderId"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('快递单号')">
<template slot-scope="{row}">
{{ row.expressNo }}
......@@ -369,11 +377,12 @@ import {listByIds} from '@/api/ecw/region'
import WarehouseDetail from './components/WarehouseDetail';
import {getProductBrank} from '@/api/ecw/productBrank'
import { parseTime } from '@/utils/ruoyi';
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
export default {
name: "detail",
components: {
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect
},
filters: {
customsTypeFilter(e, customsTypeList) {
......
......@@ -179,6 +179,8 @@
v-model="tableData[$index].orderLocationBackVOList"
:readonly="tableData[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="tableData[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
......@@ -357,6 +359,8 @@
v-model="tableData1[$index].orderLocationBackVOList"
:readonly="tableData1[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="tableData1[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
......@@ -566,6 +570,7 @@ export default {
}
}
},
methods: {
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
......@@ -738,14 +743,24 @@ export default {
(val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.pop()
},
handleAdd(val = 0) {
let cartonsNum = '';
if (val !== 1) {
let cartonsNum = ''
let orderLocationBackVOList = []
if (val !== 1) { // 货物入仓
let hasCartonsNum = 0
this.tableData.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
orderLocationBackVOList = this.tableData.length
? this.tableData[this.tableData.length - 1].orderLocationBackVOList
: []
} else { // 添加新品名
orderLocationBackVOList = this.tableData1.length
? this.tableData1[this.tableData1.length - 1].orderLocationBackVOList
: []
}
const form = val === 1 ? this.form1 : this.form
form.orderWarehouseInItemDoList.push({
"boxGauge1": this.isJiyun ? 0 : '',
......@@ -757,7 +772,8 @@ export default {
"unit": "1",
"volume": '',
"weight": '',
specificationType: '1'
specificationType: '1',
orderLocationBackVOList
})
}
},
......
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