add:取放货确认

This commit is contained in:
2025-09-01 18:07:56 +08:00
parent fdb44796c1
commit 21c7360381
8 changed files with 335 additions and 1 deletions

View File

@@ -75,4 +75,18 @@ public class SchBasePointController {
schBasePointService.changeLock(points);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("确认取货")
@PostMapping("/getConfirm")
public ResponseEntity<Object> getConfirm(@RequestBody JSONObject whereJson) {
schBasePointService.getConfirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("确认放货")
@PostMapping("/putConfirm")
public ResponseEntity<Object> putConfirm(@RequestBody JSONObject whereJson) {
schBasePointService.putConfirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -90,4 +90,16 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
* @param point_code 点位编码
*/
void unLockPoint(String point_code);
/**
* 确认取货
* @param whereJson 点位实体
*/
void getConfirm(JSONObject whereJson);
/**
* 确认放货
* @param whereJson 点位实体
*/
void putConfirm(JSONObject whereJson);
}

View File

@@ -54,6 +54,9 @@
<if test="whereJson.point_status != null">
AND p.point_status = #{whereJson.point_status}
</if>
<if test="whereJson.vehicle_code != null">
AND p.vehicle_code = #{whereJson.vehicle_code}
</if>
<if test="whereJson.is_used != null">
AND p.is_used = #{whereJson.is_used}
</if>

View File

@@ -15,6 +15,7 @@ public class SchBasePointQuery implements Serializable {
private String region_code;
private String point_type;
private String point_status;
private String vehicle_code;
private Boolean is_used;
private Boolean lock_type;
private Boolean parent_point;

View File

@@ -23,6 +23,7 @@ import org.nl.wms.sch_manage.service.dao.mapper.SchBaseRegionMapper;
import org.nl.wms.sch_manage.service.dto.SchBasePointQuery;
import org.nl.wms.sch_manage.service.util.PointUtils;
import org.nl.wms.warehouse_management.enums.IOSConstant;
import org.nl.wms.warehouse_management.enums.IOSEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -199,4 +200,25 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
);
}
@Override
@Transactional
public void getConfirm(JSONObject whereJson) {
SchBasePoint pointDao = this.getById(whereJson.getString("point_code"));
// 清空点位信息
pointDao.setVehicle_code("");
pointDao.setPoint_status(IOSEnum.POINT_STATUS.code("空位"));
pointDao.setIng_task_code("");
this.updateById(pointDao);
// TODO 通知ACS可以离开
}
@Override
@Transactional
public void putConfirm(JSONObject whereJson) {
SchBasePoint pointDao = this.getById(whereJson.getString("point_code"));
pointDao.setPoint_status(IOSEnum.POINT_STATUS.code("有箱有料"));
pointDao.setVehicle_code(whereJson.getString("vehicle_code"));
this.updateById(pointDao);
// TODO 通知ACS可以离开
}
}

View File

@@ -0,0 +1,117 @@
<template>
<el-dialog
title="填写载具"
append-to-body
:visible.sync="dialogVisible"
:before-close="handleClose"
width="600px"
destroy-on-close
@close="close"
>
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
<el-row>
<el-col :span="8">
<el-form-item label="载具编码:">
<el-input v-model="formMst.vehicle_code" size="mini" style="width: 200px" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row :gutter="24">
<el-col :span="16" style="border: 1px solid white">
<span />
</el-col>
<el-col :span="8">
<span>
<el-button icon="el-icon-check" size="mini" type="primary" @click="putConfirm">确认</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
</span>
</el-col>
</el-row>
<el-row :gutter="18">
<el-col :span="18" style="border: 10px solid white">
<span />
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
export default {
name: 'WeighDialog',
mixins: [crud()],
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: Object
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
this.formMst = this.openParam
}
}
},
data() {
return {
formMst: {
},
current: null,
dialogVisible: false
}
},
methods: {
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$refs['form2'].resetFields()
this.$emit('update:dialogShow', false)
},
putConfirm() {
// 校验称重信息不能为0或者空
if (this.formMst.vehicle_code === '') {
this.crud.notify('载具编码不能为空!', CRUD.NOTIFICATION_TYPE.ERROR)
return
}
crudSchBasePoint.putConfirm(this.formMst).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.close()
this.crud.toQuery()
})
}
}
}
</script>
<style>
.crud-opts2 {
padding: 0 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
padding: 4px 4px;
}
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -0,0 +1,149 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="90px"
label-suffix=":"
>
<el-form-item label="点位搜索">
<el-input
v-model="query.blurry"
clearable
size="mini"
placeholder="编码名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="载具编码">
<el-input
v-model="query.vehicle_code"
clearable
size="mini"
placeholder="编码名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation :crud="crud" />
</el-form>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="crud.selections.length !== 1"
@click="getConfirm"
>
确认取货
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-position"
size="mini"
:disabled="crud.selections.length !== 1"
@click="putConfirm"
>
确认放货
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
:max-height="590"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')"/>
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')"/>
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'载具数量')" />
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'载具数量')" />
<el-table-column prop="material_qty" label="物料重量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" />
</el-table>
<!--分页组件-->
<pagination />
</div>
<PutConfirmDialog :dialog-show.sync="openParamDialog" :open-param="openParam" />
</div>
</template>
<script>
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
import PutConfirmDialog from '@/views/wms/sch/pickandplace/PutConfirmDialog'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
const defaultForm = {
}
export default {
name: 'PickAndPlace',
components: { pagination, crudOperation, rrOperation, PutConfirmDialog },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
title: '取放货确认',
optShow: { reset: true },
url: 'api/schBasePoint',
idField: 'point_code',
props: {
// 每页数据条数
size: 20
},
sort: 'material_id,desc',
crudMethod: { ...crudSchBasePoint }
})
},
data() {
return {
openParam: null,
openParamDialog: false,
permission: {},
rules: {
}
}
},
created() {
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
getConfirm() {
const data = this.$refs.table.selection[0]
crudSchBasePoint.getConfirm(data).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
putConfirm() {
this.openParam = this.$refs.table.selection[0]
this.openParamDialog = true
}
}
}
</script>
<style scoped>
</style>

View File

@@ -48,4 +48,20 @@ export function changeLock(data) {
})
}
export default { add, edit, del, changeUsed, getPointList, changeLock }
export function getConfirm(data) {
return request({
url: 'api/schBasePoint/getConfirm',
method: 'post',
data: data
})
}
export function putConfirm(data) {
return request({
url: 'api/schBasePoint/putConfirm',
method: 'post',
data: data
})
}
export default { add, edit, del, changeUsed, getPointList, changeLock, getConfirm, putConfirm }