rev:成品出入库作业任务
This commit is contained in:
@@ -130,4 +130,28 @@ public class IStivtlostorivnCpInController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delTask")
|
||||||
|
@Log("删除任务")
|
||||||
|
@ApiOperation("删除任务")
|
||||||
|
public ResponseEntity<Object> delTask(@RequestBody JSONObject whereJson){
|
||||||
|
iStIvtIostorinvCpService.delTask(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sendTask")
|
||||||
|
@Log("下发任务")
|
||||||
|
@ApiOperation("下发任务")
|
||||||
|
public ResponseEntity<Object> sendTask(@RequestBody JSONObject whereJson){
|
||||||
|
iStIvtIostorinvCpService.sendTask(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirmTask")
|
||||||
|
@Log("标识完成任务")
|
||||||
|
@ApiOperation("标识完成任务")
|
||||||
|
public ResponseEntity<Object> confirmTask(@RequestBody JSONObject whereJson){
|
||||||
|
iStIvtIostorinvCpService.confirmTask(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,5 +117,29 @@ public class IStivtlostorivnCpOutController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delTask")
|
||||||
|
@Log("删除任务")
|
||||||
|
@ApiOperation("删除任务")
|
||||||
|
public ResponseEntity<Object> delTask(@RequestBody JSONObject whereJson){
|
||||||
|
iStIvtIostorinvCpOutService.delTask(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sendTask")
|
||||||
|
@Log("下发任务")
|
||||||
|
@ApiOperation("下发任务")
|
||||||
|
public ResponseEntity<Object> sendTask(@RequestBody JSONObject whereJson){
|
||||||
|
iStIvtIostorinvCpOutService.sendTask(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirmTask")
|
||||||
|
@Log("标识完成任务")
|
||||||
|
@ApiOperation("标识完成任务")
|
||||||
|
public ResponseEntity<Object> confirmTask(@RequestBody JSONObject whereJson){
|
||||||
|
iStIvtIostorinvCpOutService.confirmTask(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,4 +151,31 @@ public interface IStIvtIostorinvCpOutService extends IService<StIvtIostorinvCp>
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
void taskOperate(JSONObject whereJson);
|
void taskOperate(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除任务
|
||||||
|
* @param whereJson
|
||||||
|
* {
|
||||||
|
* iostorinvdis_id : 分配明细标识
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void delTask(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发任务
|
||||||
|
* @param whereJson
|
||||||
|
* {
|
||||||
|
* task_id : 任务标识
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void sendTask(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标识完成任务
|
||||||
|
* @param whereJson
|
||||||
|
* {
|
||||||
|
* task_id : 任务标识
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void confirmTask(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,4 +163,30 @@ public interface IStIvtIostorinvCpService extends IService<StIvtIostorinvCp> {
|
|||||||
*/
|
*/
|
||||||
void taskOperate(JSONObject whereJson);
|
void taskOperate(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除任务
|
||||||
|
* @param whereJson
|
||||||
|
* {
|
||||||
|
* iostorinvdis_id : 分配明细标识
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void delTask(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发任务
|
||||||
|
* @param whereJson
|
||||||
|
* {
|
||||||
|
* task_id : 任务标识
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void sendTask(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标识完成任务
|
||||||
|
* @param whereJson
|
||||||
|
* {
|
||||||
|
* task_id : 任务标识
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void confirmTask(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -20,6 +22,8 @@ import org.nl.common.utils.IdUtil;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.nl.wms.masterdata_manage.MasterEnum;
|
import org.nl.wms.masterdata_manage.MasterEnum;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||||
@@ -584,6 +588,52 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void delTask(JSONObject whereJson) {
|
||||||
|
StIvtIostorinvdisCp disDao = iostorinvdisCpService.getById(whereJson.getString("iostorinvdis_id"));
|
||||||
|
|
||||||
|
// 1.删除任务
|
||||||
|
iSchBaseTaskService.update(
|
||||||
|
new UpdateWrapper<SchBaseTask>().lambda()
|
||||||
|
.set(SchBaseTask::getTask_status,TaskStatusEnum.CANCEL.getCode())
|
||||||
|
.eq(SchBaseTask::getTask_id, disDao.getTask_id())
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.更新分配
|
||||||
|
disDao.setTask_id("");
|
||||||
|
disDao.setPoint_code("");
|
||||||
|
disDao.setPoint_id("");
|
||||||
|
disDao.setPoint_name("");
|
||||||
|
disDao.setWork_status(IOSEnum.WORK_STATUS.code("未生成"));
|
||||||
|
iostorinvdisCpService.updateById(disDao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void sendTask(JSONObject whereJson) {
|
||||||
|
|
||||||
|
SchBaseTask taskDao = iSchBaseTaskService.getById(whereJson.getString("task_id"));
|
||||||
|
JSONArray paramArr = new JSONArray();
|
||||||
|
paramArr.add(JSON.parseObject(JSONUtil.toJsonStr(taskDao)));
|
||||||
|
|
||||||
|
// 1.下发任务
|
||||||
|
WmsToAcsService bean = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||||
|
bean.issueTaskToAcs2(paramArr);
|
||||||
|
|
||||||
|
// 2.更新任务状态
|
||||||
|
taskDao.setTask_status(TaskStatusEnum.ISSUE.getCode());
|
||||||
|
iSchBaseTaskService.updateById(taskDao);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void confirmTask(JSONObject whereJson) {
|
||||||
|
whereJson.put("status", AcsTaskEnum.STATUS_FINISH.getCode());
|
||||||
|
taskOperate(whereJson);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private StIvtIostorinvCp packageMstForm(StIvtIostorinvCp stIvtIostorinvCp,JSONObject whereJson,Boolean isUpdate) {
|
private StIvtIostorinvCp packageMstForm(StIvtIostorinvCp stIvtIostorinvCp,JSONObject whereJson,Boolean isUpdate) {
|
||||||
JSONArray rows = whereJson.getJSONArray("tableData");
|
JSONArray rows = whereJson.getJSONArray("tableData");
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -17,10 +19,13 @@ import org.nl.common.domain.query.PageQuery;
|
|||||||
import org.nl.common.enums.AcsTaskEnum;
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
import org.nl.common.publish.BussEventMulticaster;
|
import org.nl.common.publish.BussEventMulticaster;
|
||||||
import org.nl.common.publish.event.PointEvent;
|
import org.nl.common.publish.event.PointEvent;
|
||||||
|
import org.nl.common.utils.AcsUtil;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.nl.wms.masterdata_manage.MasterEnum;
|
import org.nl.wms.masterdata_manage.MasterEnum;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||||
@@ -707,6 +712,51 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void delTask(JSONObject whereJson) {
|
||||||
|
StIvtIostorinvdisCp disDao = iostorinvdisCpService.getById(whereJson.getString("iostorinvdis_id"));
|
||||||
|
|
||||||
|
// 1.删除任务
|
||||||
|
iSchBaseTaskService.update(
|
||||||
|
new UpdateWrapper<SchBaseTask>().lambda()
|
||||||
|
.set(SchBaseTask::getTask_status,TaskStatusEnum.CANCEL.getCode())
|
||||||
|
.eq(SchBaseTask::getTask_id, disDao.getTask_id())
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2.更新分配
|
||||||
|
disDao.setTask_id("");
|
||||||
|
disDao.setPoint_code("");
|
||||||
|
disDao.setPoint_id("");
|
||||||
|
disDao.setPoint_name("");
|
||||||
|
disDao.setWork_status(IOSEnum.WORK_STATUS.code("未生成"));
|
||||||
|
iostorinvdisCpService.updateById(disDao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void sendTask(JSONObject whereJson) {
|
||||||
|
SchBaseTask taskDao = iSchBaseTaskService.getById(whereJson.getString("task_id"));
|
||||||
|
JSONArray paramArr = new JSONArray();
|
||||||
|
paramArr.add(JSON.parseObject(JSONUtil.toJsonStr(taskDao)));
|
||||||
|
|
||||||
|
// 1.下发任务
|
||||||
|
WmsToAcsService bean = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||||
|
bean.issueTaskToAcs2(paramArr);
|
||||||
|
|
||||||
|
// 2.更新任务状态
|
||||||
|
taskDao.setTask_status(TaskStatusEnum.ISSUE.getCode());
|
||||||
|
iSchBaseTaskService.updateById(taskDao);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void confirmTask(JSONObject whereJson) {
|
||||||
|
whereJson.put("status", AcsTaskEnum.STATUS_FINISH.getCode());
|
||||||
|
taskOperate(whereJson);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private StIvtIostorinvCp packageMstForm(StIvtIostorinvCp stIvtIostorinvCp,JSONObject whereJson,Boolean isUpdate) {
|
private StIvtIostorinvCp packageMstForm(StIvtIostorinvCp stIvtIostorinvCp,JSONObject whereJson,Boolean isUpdate) {
|
||||||
JSONArray rows = whereJson.getJSONArray("tableData");
|
JSONArray rows = whereJson.getJSONArray("tableData");
|
||||||
|
|||||||
@@ -35,51 +35,34 @@
|
|||||||
@row-click="clcikRow"
|
@row-click="clcikRow"
|
||||||
>
|
>
|
||||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="bill_code" label="单据号" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center" />
|
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||||
<el-table-column
|
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||||
show-overflow-tooltip
|
|
||||||
prop="assign_qty"
|
|
||||||
:formatter="crud.formatNum3"
|
|
||||||
label="已分配数量"
|
|
||||||
align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
||||||
<el-form-item prop="checked">
|
<el-form-item prop="checked">
|
||||||
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>-->
|
||||||
<div class="crud-opts2">
|
<div class="crud-opts2">
|
||||||
<span class="role-span">入库单据任务项</span>
|
<span class="role-span">入库单据任务项</span>
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left" />
|
<slot name="left" />
|
||||||
<!-- <el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="updateTask()"
|
|
||||||
>
|
|
||||||
修改
|
|
||||||
</el-button>-->
|
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
slot="left"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
:disabled="dis_del"
|
||||||
@click="delTask()"
|
@click="delTask()"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@@ -90,7 +73,8 @@
|
|||||||
type="warning"
|
type="warning"
|
||||||
icon="el-icon-check"
|
icon="el-icon-check"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="reIssueTask()"
|
:disabled="dis_send"
|
||||||
|
@click="sendTask()"
|
||||||
>
|
>
|
||||||
下发
|
下发
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -100,20 +84,11 @@
|
|||||||
type="warning"
|
type="warning"
|
||||||
icon="el-icon-check"
|
icon="el-icon-check"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
:disabled="dis_confirm"
|
||||||
@click="confirmTask()"
|
@click="confirmTask()"
|
||||||
>
|
>
|
||||||
标识完成
|
标识完成
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="warning"
|
|
||||||
icon="el-icon-check"
|
|
||||||
size="mini"
|
|
||||||
@click="cancelTask()"
|
|
||||||
>
|
|
||||||
取消完成
|
|
||||||
</el-button>-->
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
@@ -130,33 +105,30 @@
|
|||||||
@row-click="clcikDisRow"
|
@row-click="clcikDisRow"
|
||||||
>
|
>
|
||||||
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
|
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
|
||||||
<el-table-column width="150" prop="material_code" label="物料编码" align="center" />
|
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column width="150" prop="material_name" label="物料名称" align="center" />
|
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
|
||||||
<el-table-column width="170" prop="pcsn" label="子卷号" align="center" />
|
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
|
||||||
<el-table-column width="120" prop="sap_pcsn" label="SAP批次" align="center" />
|
|
||||||
<el-table-column width="230" prop="box_no" label="木箱码" align="center" />
|
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="struct_code" label="分配货位" align="center" />
|
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="work_status" label="指令状态" :formatter="statusFormat" align="center" />
|
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="task_code" label="指令操作号" align="center" />
|
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点位编码" align="center" />
|
<el-table-column show-overflow-tooltip prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||||
<el-table-column show-overflow-tooltip prop="point_name" label="入库点位名称" align="center" />
|
<el-table-column show-overflow-tooltip prop="task_type" label="任务类型" align="center" width="150px" :formatter="formatType"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<StructUpdateDiv :dialog-show.sync="structShow" :sect-prop="sectProp" :bucket-form="bucketForm" @updateCommit="updateCommit" />
|
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TaskDialog',
|
name: 'TaskDialog',
|
||||||
components: { StructUpdateDiv },
|
components: {},
|
||||||
mixins: [crud()],
|
mixins: [crud()],
|
||||||
dicts: ['io_bill_status', 'task_status'],
|
dicts: ['SCH_TASK_TYPE_DTL', 'task_status'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -173,23 +145,16 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible2: false,
|
dialogVisible2: false,
|
||||||
tableDtl: [],
|
|
||||||
stor_id: '',
|
|
||||||
sect_id: '',
|
|
||||||
sectProp: null,
|
|
||||||
structShow: false,
|
|
||||||
sects: [],
|
|
||||||
dis_row: null,
|
dis_row: null,
|
||||||
|
dis_del: true,
|
||||||
|
dis_send: true,
|
||||||
|
dis_confirm: true,
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
bucketParam: null,
|
|
||||||
bucketForm: null,
|
|
||||||
bucketDtlShow: false,
|
|
||||||
form: {
|
form: {
|
||||||
tableMater: [],
|
tableMater: [],
|
||||||
dtl_row: null,
|
dtl_row: null,
|
||||||
checked: '1'
|
checked: '1'
|
||||||
},
|
},
|
||||||
storlist: [],
|
|
||||||
rules: {
|
rules: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,155 +174,82 @@ export default {
|
|||||||
this.form.dtl_row = null
|
this.form.dtl_row = null
|
||||||
this.$emit('AddChanged')
|
this.$emit('AddChanged')
|
||||||
},
|
},
|
||||||
|
clcikRow(row) {
|
||||||
|
this.form.dtl_row = row
|
||||||
|
this.queryTableDdis()
|
||||||
|
},
|
||||||
|
clcikDisRow(row) {
|
||||||
|
debugger
|
||||||
|
this.dis_row = row
|
||||||
|
if (this.dis_row.task_status < 5) {
|
||||||
|
this.dis_del = false
|
||||||
|
this.dis_send = false
|
||||||
|
} else {
|
||||||
|
this.dis_del = true
|
||||||
|
this.dis_send = true
|
||||||
|
}
|
||||||
|
if (this.dis_row.task_status < 7) {
|
||||||
|
this.dis_confirm = false
|
||||||
|
} else {
|
||||||
|
this.dis_confirm = true
|
||||||
|
}
|
||||||
|
},
|
||||||
delTask() {
|
delTask() {
|
||||||
if (!this.dis_row) {
|
|
||||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dis_row.work_status !== '04') {
|
|
||||||
this.crud.notify('只能对状态为生成的任务进行删除!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true
|
||||||
crudRawAssist.delTask(this.dis_row).then(res => {
|
crudProductIn.delTask({ 'iostorinvdis_id': this.dis_row.iostorinvdis_id }).then(res => {
|
||||||
|
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
this.queryTableDdis()
|
||||||
this.form.tableMater = res
|
this.initFlag()
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '2' }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
this.dis_row = null
|
|
||||||
this.crud.notify('删除任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
statusFormat(row, column) {
|
sendTask() {
|
||||||
return this.dict.label.task_status[row.work_status]
|
this.fullscreenLoading = true
|
||||||
|
crudProductIn.sendTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||||
|
this.crud.notify('下发成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
this.queryTableDdis()
|
||||||
|
this.initFlag()
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
confirmTask() {
|
confirmTask() {
|
||||||
if (!this.dis_row) {
|
|
||||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dis_row.work_status === '99' || this.dis_row.work_status === '00') {
|
|
||||||
this.crud.notify('只能已生成或下发进行中的任务完成!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true
|
||||||
crudRawAssist.confirmTask(this.dis_row).then(res => {
|
crudProductIn.confirmTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.form.tableMater = res2
|
|
||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
this.crud.notify('强制确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.queryTableDdis()
|
||||||
|
this.initFlag()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
cancelTask() {
|
|
||||||
if (!this.dis_row) {
|
|
||||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dis_row.work_status !== '99') {
|
|
||||||
this.crud.notify('只能对状态为完成的任务进行取消!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.fullscreenLoading = true
|
|
||||||
crudRawAssist.cancelTask(this.dis_row).then(res => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
|
||||||
this.form.tableMater = res2
|
|
||||||
this.crud.notify('取消确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
reIssueTask() {
|
|
||||||
if (!this.dis_row) {
|
|
||||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dis_row.work_status !== '04') {
|
|
||||||
this.crud.notify('只能对状态为生成的任务进行下发!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.fullscreenLoading = true
|
|
||||||
crudRawAssist.reIssueTask(this.dis_row).then(res => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
|
||||||
this.form.tableMater = res2
|
|
||||||
this.crud.notify('下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateTask() {
|
|
||||||
if (!this.dis_row) {
|
|
||||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
debugger
|
|
||||||
if (this.dis_row.work_status !== '01') {
|
|
||||||
this.crud.notify('只能对状态为生成的任务进行修改!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.structShow = true
|
|
||||||
this.bucketForm = this.dis_row
|
|
||||||
},
|
|
||||||
updateCommit() {
|
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
this.crud.notify('修改任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
checkedChange(val) {
|
|
||||||
this.form.dtl_row.checked = this.form.checked
|
|
||||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clcikRow(row, column, event) {
|
|
||||||
this.form.dtl_row = row
|
|
||||||
row.checked = this.form.checked
|
|
||||||
crudRawAssist.queryTask(row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clcikDisRow(row, column, event) {
|
|
||||||
this.dis_row = row
|
|
||||||
},
|
|
||||||
assignFormat(row, column) {
|
|
||||||
if (!row.assign_qty) {
|
|
||||||
return '0'
|
|
||||||
} else {
|
|
||||||
return row.assign_qty
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
row.index = rowIndex
|
row.index = rowIndex
|
||||||
},
|
},
|
||||||
bucketDtl(row) {
|
queryTableDdis() {
|
||||||
crudRawAssist.bucketDtl(row).then(res => {
|
if (this.form.dtl_row !== null) {
|
||||||
this.bucketParam = res
|
crudProductIn.getIosInvDis({ 'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id }).then(res => {
|
||||||
this.bucketDtlShow = true
|
this.form.tableMater = res
|
||||||
|
}).catch(() => {
|
||||||
|
this.form.tableMater = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
formatStatus(row) {
|
||||||
|
return this.dict.label.task_status[row.task_status]
|
||||||
|
},
|
||||||
|
formatType(row) {
|
||||||
|
return this.dict.label.SCH_TASK_TYPE_DTL[row.task_type]
|
||||||
|
},
|
||||||
|
initFlag() {
|
||||||
|
this.dis_del = true
|
||||||
|
this.dis_send = true
|
||||||
|
this.dis_confirm = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -141,17 +141,17 @@
|
|||||||
>
|
>
|
||||||
分配
|
分配
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
:disabled="dis_flag"
|
|
||||||
icon="el-icon-position"
|
icon="el-icon-position"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="divOpen"
|
:disabled="task_flag"
|
||||||
|
@click="taskOpen"
|
||||||
>
|
>
|
||||||
作业任务
|
作业任务
|
||||||
</el-button>-->
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -220,6 +220,7 @@
|
|||||||
<AddDialog @AddChanged="querytable" />
|
<AddDialog @AddChanged="querytable" />
|
||||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||||
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
|
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
|
||||||
|
<TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -237,10 +238,11 @@ import DivDialog from '@/views/wms/storage_manage/product/productIn/DivDialog'
|
|||||||
import ViewDialog from '@/views/wms/storage_manage/product/productIn/ViewDialog'
|
import ViewDialog from '@/views/wms/storage_manage/product/productIn/ViewDialog'
|
||||||
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import TaskDialog from '@/views/wms/storage_manage/product/productIn/TaskDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProductIn',
|
name: 'ProductIn',
|
||||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
|
components: { TaskDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '',
|
title: '',
|
||||||
@@ -258,15 +260,18 @@ export default {
|
|||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
permission: {},
|
permission: {},
|
||||||
dis_flag: true,
|
dis_flag: true,
|
||||||
|
task_flag: true,
|
||||||
confirm_flag: true,
|
confirm_flag: true,
|
||||||
disShow: false,
|
disShow: false,
|
||||||
viewShow: false,
|
viewShow: false,
|
||||||
mstrow: {},
|
mstrow: {},
|
||||||
divShow: false,
|
divShow: false,
|
||||||
openParam: [],
|
openParam: [],
|
||||||
|
taskOpenParam: [],
|
||||||
currentRow: null,
|
currentRow: null,
|
||||||
storlist: [],
|
storlist: [],
|
||||||
storId: null
|
storId: null,
|
||||||
|
taskShow: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -320,12 +325,18 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.confirm_flag = true
|
this.confirm_flag = true
|
||||||
}
|
}
|
||||||
|
if (currentRow.bill_status !== '99') {
|
||||||
|
this.task_flag = false
|
||||||
|
} else {
|
||||||
|
this.task_flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCurrentChange(currentRow) {
|
handleCurrentChange(currentRow) {
|
||||||
if (currentRow === null) {
|
if (currentRow === null) {
|
||||||
this.dis_flag = true
|
this.dis_flag = true
|
||||||
this.confirm_flag = true
|
this.confirm_flag = true
|
||||||
|
this.task_flag = true
|
||||||
this.currentRow = {}
|
this.currentRow = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -357,6 +368,12 @@ export default {
|
|||||||
this.divShow = true
|
this.divShow = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
taskOpen() {
|
||||||
|
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||||
|
this.taskOpenParam = res
|
||||||
|
})
|
||||||
|
this.taskShow = true
|
||||||
|
},
|
||||||
querytable() {
|
querytable() {
|
||||||
this.onSelectAll()
|
this.onSelectAll()
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
|||||||
@@ -104,6 +104,30 @@ export function cancelConfirmvehicle(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function delTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/productIn/delTask',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/productIn/sendTask',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function confirmTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/productIn/confirmTask',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
@@ -117,5 +141,8 @@ export default {
|
|||||||
unDivStruct,
|
unDivStruct,
|
||||||
setPoint,
|
setPoint,
|
||||||
confirm,
|
confirm,
|
||||||
cancelConfirmvehicle
|
cancelConfirmvehicle,
|
||||||
|
delTask,
|
||||||
|
sendTask,
|
||||||
|
confirmTask
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,281 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible2"
|
||||||
|
destroy-on-close
|
||||||
|
:show-close="false"
|
||||||
|
fullscreen
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
|
||||||
|
<span slot="title" class="dialog-footer">
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="el-dialog__title2">入库单任务操作</span>
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left" />
|
||||||
|
<el-button slot="left" type="info" @click="dialogVisible2 = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">入库单据明细项</span>
|
||||||
|
</div>
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="this.openParam"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
border
|
||||||
|
highlight-current-row
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
@row-click="clcikRow"
|
||||||
|
>
|
||||||
|
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||||
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
||||||
|
<el-form-item prop="checked">
|
||||||
|
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>-->
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">入库单据任务项</span>
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left" />
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
:disabled="dis_del"
|
||||||
|
@click="delTask()"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
:disabled="dis_send"
|
||||||
|
@click="sendTask()"
|
||||||
|
>
|
||||||
|
下发
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
:disabled="dis_confirm"
|
||||||
|
@click="confirmTask()"
|
||||||
|
>
|
||||||
|
标识完成
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="disTable"
|
||||||
|
:data="form.tableMater"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
@row-click="clcikDisRow"
|
||||||
|
>
|
||||||
|
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||||
|
<el-table-column show-overflow-tooltip prop="task_type" label="任务类型" align="center" width="150px" :formatter="formatType"/>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudProductOut from '@/views/wms/storage_manage/product/productOut/productout'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TaskDialog',
|
||||||
|
components: {},
|
||||||
|
mixins: [crud()],
|
||||||
|
dicts: ['SCH_TASK_TYPE_DTL', 'task_status'],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
bussConfig: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Array,
|
||||||
|
default: () => { return [] }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible2: false,
|
||||||
|
dis_row: null,
|
||||||
|
dis_del: true,
|
||||||
|
dis_send: true,
|
||||||
|
dis_confirm: true,
|
||||||
|
fullscreenLoading: false,
|
||||||
|
form: {
|
||||||
|
tableMater: [],
|
||||||
|
dtl_row: null,
|
||||||
|
checked: '1'
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible2 = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.form.tableMater = []
|
||||||
|
this.form.checked = '1'
|
||||||
|
this.form.dtl_row = null
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
},
|
||||||
|
clcikRow(row) {
|
||||||
|
this.form.dtl_row = row
|
||||||
|
this.queryTableDdis()
|
||||||
|
},
|
||||||
|
clcikDisRow(row) {
|
||||||
|
debugger
|
||||||
|
this.dis_row = row
|
||||||
|
if (this.dis_row.task_status < 5) {
|
||||||
|
this.dis_del = false
|
||||||
|
this.dis_send = false
|
||||||
|
} else {
|
||||||
|
this.dis_del = true
|
||||||
|
this.dis_send = true
|
||||||
|
}
|
||||||
|
if (this.dis_row.task_status < 7) {
|
||||||
|
this.dis_confirm = false
|
||||||
|
} else {
|
||||||
|
this.dis_confirm = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delTask() {
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
crudProductOut.delTask({ 'iostorinvdis_id': this.dis_row.iostorinvdis_id }).then(res => {
|
||||||
|
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
this.queryTableDdis()
|
||||||
|
this.initFlag()
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sendTask() {
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
crudProductOut.sendTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||||
|
this.crud.notify('下发成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
this.queryTableDdis()
|
||||||
|
this.initFlag()
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmTask() {
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
crudProductOut.confirmTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||||
|
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
this.queryTableDdis()
|
||||||
|
this.initFlag()
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex
|
||||||
|
},
|
||||||
|
queryTableDdis() {
|
||||||
|
if (this.form.dtl_row !== null) {
|
||||||
|
crudProductOut.getIosInvDis({ 'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id }).then(res => {
|
||||||
|
this.form.tableMater = res
|
||||||
|
}).catch(() => {
|
||||||
|
this.form.tableMater = []
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatStatus(row) {
|
||||||
|
return this.dict.label.task_status[row.task_status]
|
||||||
|
},
|
||||||
|
formatType(row) {
|
||||||
|
return this.dict.label.SCH_TASK_TYPE_DTL[row.task_type]
|
||||||
|
},
|
||||||
|
initFlag() {
|
||||||
|
this.dis_del = true
|
||||||
|
this.dis_send = true
|
||||||
|
this.dis_confirm = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .el-dialog__title2 {
|
||||||
|
line-height: 24px;
|
||||||
|
font-size:20px;
|
||||||
|
color:#303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .role-span {
|
||||||
|
padding: 10px 0px 10px 0px;
|
||||||
|
}
|
||||||
|
.crud-opts2 .crud-opts-form {
|
||||||
|
padding: 10px 0px 0px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -101,6 +101,17 @@
|
|||||||
>
|
>
|
||||||
分配
|
分配
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
:disabled="task_flag"
|
||||||
|
@click="taskOpen"
|
||||||
|
>
|
||||||
|
作业任务
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -170,6 +181,7 @@
|
|||||||
<AddDialog @AddChanged="querytable" />
|
<AddDialog @AddChanged="querytable" />
|
||||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||||
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :row-mst="mstrow" @DivChanged="querytable" />
|
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :row-mst="mstrow" @DivChanged="querytable" />
|
||||||
|
<TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -184,10 +196,11 @@ import AddDialog from '@/views/wms/storage_manage/product/productOut/AddDialog'
|
|||||||
import DivDialog from '@/views/wms/storage_manage/product/productOut/DivDialog'
|
import DivDialog from '@/views/wms/storage_manage/product/productOut/DivDialog'
|
||||||
import ViewDialog from '@//views/wms/storage_manage/product/productOut/ViewDialog'
|
import ViewDialog from '@//views/wms/storage_manage/product/productOut/ViewDialog'
|
||||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||||
|
import TaskDialog from '@/views/wms/storage_manage/product/productOut/TaskDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProductOut',
|
name: 'ProductOut',
|
||||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog },
|
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '用户', idField: 'iostorinv_id', url: 'api/productOut', crudMethod: { ...productOut },
|
return CRUD({ title: '用户', idField: 'iostorinv_id', url: 'api/productOut', crudMethod: { ...productOut },
|
||||||
optShow: {
|
optShow: {
|
||||||
@@ -209,10 +222,12 @@ export default {
|
|||||||
edit: ['admin', 'checkoutbill:edit'],
|
edit: ['admin', 'checkoutbill:edit'],
|
||||||
del: ['admin', 'checkoutbill:del']
|
del: ['admin', 'checkoutbill:del']
|
||||||
},
|
},
|
||||||
|
task_flag: true,
|
||||||
openMoneyDialog: false,
|
openMoneyDialog: false,
|
||||||
loadingConfirm: false,
|
loadingConfirm: false,
|
||||||
divShow: false,
|
divShow: false,
|
||||||
taskShow: false,
|
taskShow: false,
|
||||||
|
taskOpenParam: [],
|
||||||
dis_flag: true,
|
dis_flag: true,
|
||||||
work_flag: true,
|
work_flag: true,
|
||||||
confirm_flag: true,
|
confirm_flag: true,
|
||||||
@@ -281,6 +296,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.confirm_flag = true
|
this.confirm_flag = true
|
||||||
}
|
}
|
||||||
|
if (current.bill_status !== '99') {
|
||||||
|
this.task_flag = false
|
||||||
|
} else {
|
||||||
|
this.task_flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stateFormat(row, column) {
|
stateFormat(row, column) {
|
||||||
@@ -294,6 +314,7 @@ export default {
|
|||||||
this.dis_flag = true
|
this.dis_flag = true
|
||||||
this.confirm_flag = true
|
this.confirm_flag = true
|
||||||
this.work_flag = true
|
this.work_flag = true
|
||||||
|
this.task_flag = true
|
||||||
this.currentRow = {}
|
this.currentRow = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -308,6 +329,12 @@ export default {
|
|||||||
this.mstrow = this.currentRow
|
this.mstrow = this.currentRow
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
taskOpen() {
|
||||||
|
productOut.getIosInvDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||||
|
this.taskOpenParam = res
|
||||||
|
})
|
||||||
|
this.taskShow = true
|
||||||
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.loadingConfirm = true
|
this.loadingConfirm = true
|
||||||
productOut.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
productOut.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||||
|
|||||||
@@ -88,6 +88,30 @@ export function manualDiv(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function delTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/productOut/delTask',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/productOut/sendTask',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function confirmTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/productOut/confirmTask',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
@@ -99,5 +123,8 @@ export default {
|
|||||||
setPoint,
|
setPoint,
|
||||||
confirm,
|
confirm,
|
||||||
getStructIvt,
|
getStructIvt,
|
||||||
manualDiv
|
manualDiv,
|
||||||
|
delTask,
|
||||||
|
sendTask,
|
||||||
|
confirmTask
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user