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