add:出库功能2

This commit is contained in:
zhangzq
2024-05-27 16:07:18 +08:00
parent 3ee94f5fcb
commit 75de284687
7 changed files with 137 additions and 60 deletions

View File

@@ -0,0 +1,23 @@
package org.nl.wms.stor_manage.io.service.out.iostor;
import com.alibaba.fastjson.JSONObject;
import org.nl.wms.stor_manage.io.service.in.iostor.dao.StIvtIostorinvIn;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.wms.stor_manage.io.service.out.iostor.dao.StIvtIostorinvOut;
/**
* <p>
* 出入库单主表 服务类
* </p>
*
* @author generator
* @since 2024-03-28
*/
public interface IStIvtIostorinvOutService extends IService<StIvtIostorinvOut> {
void save(JSONObject form);
String dispense(JSONObject form);
String canceldispense(JSONObject form);
}

View File

@@ -1,16 +0,0 @@
package org.nl.wms.stor_manage.io.service.out.iostor;
import org.nl.wms.stor_manage.io.service.in.iostor.dao.StIvtIostorinvIn;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 出入库单主表 服务类
* </p>
*
* @author generator
* @since 2024-03-28
*/
public interface IStIvtIostorinvoutService extends IService<StIvtIostorinvIn> {
}

View File

@@ -33,17 +33,13 @@ public class StIvtIostorinvOut implements Serializable {
/**
* 出入类型
*/
private Boolean io_type;
private Boolean bill_type;
/**
* 业务日期
*/
private String biz_date;
/**
* 生产区域编码
*/
private String product_code;
private String product_area;
/**
* 单据状态
@@ -55,30 +51,26 @@ public class StIvtIostorinvOut implements Serializable {
*/
private String remark;
/**
* 是否删除
*/
private Boolean is_delete;
/**
* 源单号
*/
private String source_code;
private String source_form_id;
/**
* 源单类型
*/
private String source_type;
private String source_form_type;
/**
* 关联订单
* 源单日期
*/
private String order;
private String source_form_date;
/**
* 制单人
*/
private String create_id;
private String create_name;
/**
* 制单时间
@@ -88,7 +80,7 @@ public class StIvtIostorinvOut implements Serializable {
/**
* 修改人
*/
private String update_id;
private String update_name;
/**
* 修改时间

View File

@@ -300,13 +300,8 @@ export default {
data.source_form_id = ''
data.unit_id = row.unit_id
data.form_data = {}
let row_form_data = row.form_data;
this.dtlCols.forEach(a=>{
let item = ''
if (a.value in row_form_data) {
item = row_form_data[a.value];
}
this.$set(data.form_data,a.value,item)
this.$set(data.form_data,a.value,'')
})
this.tableData.splice(-1, 0, data)
})

View File

@@ -73,6 +73,7 @@
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="!divflag"
@click="divVehicle()"
>
自动分配物料
@@ -83,7 +84,8 @@
type="primary"
icon="el-icon-plus"
size="mini"
@click="divVehicle()"
:disabled="divflag"
@click="divCancel()"
>
取消分配
</el-button>
@@ -106,14 +108,11 @@
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="计划数量" />
<el-table-column show-overflow-tooltip prop="qty" label="载具分配数量" />
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库" />
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位" />
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" width="160" align="center">
<template scope="scope">
<el-input v-model="tableData[scope.$index].vehicle_code" class="input-with-select" />
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位" width="160"/>
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" width="160"/>
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" />
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单id" />
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" >
@@ -122,7 +121,37 @@
<el-table-column show-overflow-tooltip prop="remark" label="备注" />
</el-table>
</el-card>
<div class="crud-opts2">
<span class="role-span">作业明细</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
<el-table
ref="table2"
:data="tabledis"
style="width: 100%;"
max-height="300"
size="mini"
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="stor_code" label="仓库" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="struct_code" label="载具所在仓位" align="center" />
<el-table-column prop="point_code1" label="任务起始位置" align="center" width="120"/>
<el-table-column prop="point_code2" label="任务目的位置" align="center" width="120"/>
<el-table-column prop="task_code" label="任务号" align="center" />
<el-table-column prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
<el-table-column prop="source_form_type" label="源单类型" align="center" width="150"/>
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" align="center" width="150"/>
</el-table>
</el-card>
</el-dialog>
</template>
@@ -137,7 +166,7 @@ export default {
components: { },
mixins: [crud()],
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
statusEnums: [ 'IOBILL_TYPE_OUT' ],
statusEnums: [ 'IOBILL_TYPE_OUT','FORM_STATUS' ],
props: {
dialogShow: {
type: Boolean,
@@ -157,10 +186,12 @@ export default {
data() {
return {
dialogVisible: false,
divflag: false,
cols: [],
dtlCols: [],
tableData: [],
currentDtl: {},
tabledis: [],
currentDtl: null,
form: {
id: '',
code: '',
@@ -199,27 +230,55 @@ export default {
setForm(row) {
this.dialogVisible = true
this.form = row
this.currentDtl = null
crudProductout.getIosInvDtl(row.id).then(res => {
this.tableData = res
})
},
handleCurrentDtl(row){
this.currentDtl = row
if (this.currentDtl.struct_code != null){
this.divflag = false;
}else {
this.divflag = true;
}
this.divdis(row)
},
divVehicle() {
if (this.currentDtl === null) {
if (!this.currentDtl) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductout.
crudProductout.outDecision(this.currentDtl).then(res => {
crudProductout.getIosInvDtl(this.form.id).then(res => {
this.tableData = res
})
})
this.divdis(row)
},
divCancel() {
if (!this.currentDtl) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductout.cancelDecision(this.currentDtl).then(res => {
crudProductout.getIosInvDtl(this.form.id).then(res => {
this.tableData = res
})
})
this.divdis(row)
},
divdis(row){
crudProductout.divDis(row).then(res => {
this.tabledis = res.content
})
},
toDelete(data) {
data.pop = true
},
formatStatus(row) {
return this.statusEnum.label.FORM_STATUS[row.task_status]
},
close() {
this.form.tableMater = []
this.form.dtl_row = null

View File

@@ -97,7 +97,7 @@
:disabled="task_flag"
@click="taskOpen"
>
作业任务
作业下发
</el-button>
<el-button
slot="right"
@@ -311,17 +311,17 @@ export default {
buttonChange(currentRow) {
if (currentRow !== null) {
this.currentRow = currentRow
if (currentRow.status === '10') {
if (currentRow.status === '10'|| currentRow.status === '13') {
this.dis_flag = false
} else {
this.dis_flag = true
}
if (currentRow.bill_status === '30' || currentRow.bill_status === '20') {
if (currentRow.bill_status !== '99') {
this.confirm_flag = false
} else {
this.confirm_flag = true
}
if (currentRow.status !== '99') {
if (currentRow.status === '13') {
this.task_flag = false
} else {
this.task_flag = true

View File

@@ -37,11 +37,35 @@ export function vehicleCheck() {
method: 'post'
})
}
export function outDecision(data) {
return request({
url: '/api/stIvtIostorinvOut/outDecision',
method: 'post',
data
})
}
export function cancelDecision(data) {
return request({
url: '/api/stIvtIostorinvOut/cancelDecision',
method: 'post',
data
})
}
export function divDis(data) {
return request({
url: '/api/stIvtIostorinvOut/divDis',
method: 'post',
data
})
}
export default {
add,
edit,
del,
getIosInvDtl,
vehicleCheck
vehicleCheck,
outDecision,
cancelDecision,
divDis,
}