fix: 工单、混碾任务单
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package org.nl.wms.pdm.workorder.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pdm.workorder.service.IPdmBdMixtaskService;
|
||||
import org.nl.wms.pdm.workorder.service.dao.PdmBdMixtask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
/**
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/pdmBdMixtask")
|
||||
public class PdmBdMixtaskController {
|
||||
|
||||
@Autowired
|
||||
private IPdmBdMixtaskService pdmBdMixtaskService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询混碾大任务")
|
||||
//@SaCheckPermission("@el.check('pdmBdMixtask:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBdMixtaskService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增混碾大任务")
|
||||
//@SaCheckPermission("@el.check('pdmBdMixtask:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdMixtask entity){
|
||||
pdmBdMixtaskService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改混碾大任务")
|
||||
//@SaCheckPermission("@el.check('pdmBdMixtask:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdMixtask entity){
|
||||
pdmBdMixtaskService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除混碾大任务")
|
||||
//@SaCheckPermission("@el.check('pdmBdMixtask:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
pdmBdMixtaskService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.pdm.workorder.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.pdm.workorder.service.dao.PdmBdMixtask;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
public interface IPdmBdMixtaskService extends IService<PdmBdMixtask> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<PdmBdMixtask>
|
||||
*/
|
||||
IPage<PdmBdMixtask> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(PdmBdMixtask entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(PdmBdMixtask entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.nl.wms.pdm.workorder.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("pdm_bd_mixtask")
|
||||
public class PdmBdMixtask implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "task_id", type = IdType.NONE)
|
||||
/** 大任务id */
|
||||
private String task_id;
|
||||
|
||||
/** 物料id */
|
||||
private String material_id;
|
||||
|
||||
/** 泥料号(配方号) */
|
||||
private String raw_material_code;
|
||||
|
||||
/** 混碾数量/重量 */
|
||||
private BigDecimal qty;
|
||||
|
||||
/** 料盅类型 */
|
||||
private String vehicle_type;
|
||||
|
||||
/** 状态(1:创建2:进行中3:已完成) */
|
||||
private String mix_status;
|
||||
|
||||
/** 开工人 */
|
||||
private String operator;
|
||||
|
||||
/** 创建时间 */
|
||||
private String create_time;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_name;
|
||||
|
||||
/** 修改时间 */
|
||||
private String update_time;
|
||||
|
||||
/** 是否删除 */
|
||||
private Boolean id_delete;
|
||||
private String material_name;
|
||||
private String material_code;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.wms.pdm.workorder.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.pdm.workorder.service.dao.PdmBdMixtask;
|
||||
|
||||
/**
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
public interface PdmBdMixtaskMapper extends BaseMapper<PdmBdMixtask> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.pdm.workorder.service.dao.mapper.PdmBdMixtaskMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.nl.wms.pdm.workorder.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
@Data
|
||||
public class PdmBdMixtaskDto implements Serializable {
|
||||
|
||||
/** 大任务id */
|
||||
private String task_id;
|
||||
|
||||
/** 物料id */
|
||||
private String material_id;
|
||||
|
||||
/** 泥料号(配方号) */
|
||||
private String raw_material_code;
|
||||
|
||||
/** 混碾数量/重量 */
|
||||
private BigDecimal qty;
|
||||
|
||||
/** 料盅类型 */
|
||||
private String vehicle_type;
|
||||
|
||||
/** 状态(1:创建2:进行中3:已完成) */
|
||||
private String mix_status;
|
||||
|
||||
/** 开工人 */
|
||||
private String operator;
|
||||
|
||||
/** 创建时间 */
|
||||
private String create_time;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_name;
|
||||
|
||||
/** 修改时间 */
|
||||
private String update_time;
|
||||
|
||||
/** 是否删除 */
|
||||
private Boolean id_delete;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.wms.pdm.workorder.service.dto;
|
||||
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.wms.pdm.workorder.service.dao.PdmBdMixtask;
|
||||
|
||||
/**
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
public class PdmBdMixtaskQuery extends BaseQuery<PdmBdMixtask> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package org.nl.wms.pdm.workorder.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.pdm.workorder.service.IPdmBdMixtaskService;
|
||||
import org.nl.wms.pdm.workorder.service.dao.PdmBdMixtask;
|
||||
import org.nl.wms.pdm.workorder.service.dao.mapper.PdmBdMixtaskMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author liyongde
|
||||
* @date 2025-12-15
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PdmBdMixtaskServiceImpl extends ServiceImpl<PdmBdMixtaskMapper, PdmBdMixtask> implements IPdmBdMixtaskService {
|
||||
|
||||
@Autowired
|
||||
private PdmBdMixtaskMapper pdmBdMixtaskMapper;
|
||||
|
||||
@Override
|
||||
public IPage<PdmBdMixtask> queryAll(Map form, PageQuery page){
|
||||
String moreStatus = ObjectUtil.isNotEmpty(form.get("more_status")) ? form.get("more_status").toString() : null;
|
||||
String beginTime = ObjectUtil.isNotEmpty(form.get("begin_time")) ? form.get("begin_time").toString() : null;
|
||||
String endTime = ObjectUtil.isNotEmpty(form.get("end_time")) ? form.get("end_time").toString() : null;
|
||||
LambdaQueryWrapper<PdmBdMixtask> lam = new LambdaQueryWrapper<>();
|
||||
IPage<PdmBdMixtask> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
List<String> collect = new ArrayList<>();
|
||||
if (moreStatus != null) {
|
||||
collect = Arrays.stream(moreStatus.split(",")).collect(Collectors.toList());
|
||||
}
|
||||
lam.in(moreStatus != null, PdmBdMixtask::getMix_status, collect)
|
||||
.and(beginTime != null, l2 -> l2.ge(PdmBdMixtask::getCreate_time, beginTime)
|
||||
.le(PdmBdMixtask::getCreate_time, endTime));
|
||||
pdmBdMixtaskMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(PdmBdMixtask entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setTask_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setCreate_name(nickName);
|
||||
entity.setCreate_time(now);
|
||||
entity.setUpdate_time(now);
|
||||
pdmBdMixtaskMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(PdmBdMixtask entity) {
|
||||
PdmBdMixtask dto = pdmBdMixtaskMapper.selectById(entity.getTask_id());
|
||||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_time(now);
|
||||
|
||||
pdmBdMixtaskMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
pdmBdMixtaskMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,12 +42,8 @@ public class AutoCreateTask {
|
||||
subTypes.forEach(clz -> {
|
||||
// 调用AbstractAcsTask类的每个子类的schedule()方法
|
||||
try {
|
||||
Object obj = SpringContextHolder.getBean(clz);
|
||||
Method m = obj.getClass().getMethod("schedule");
|
||||
m.invoke(obj);
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
log.info("定时器执行失败:{}", e.getTargetException().getMessage());
|
||||
AbstractTask obj = SpringContextHolder.getBean(clz);
|
||||
obj.schedule();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info("定时器执行失败:{}", e.getMessage());
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
<el-table-column label="菜单标题" prop="title" :min-width="100" />
|
||||
<el-table-column label="所属系统" prop="system_type" :min-width="flexWidth('system_type',crud.data,'所属系统')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.system_type[scope.row.system_type] }} : {{scope.row.system_type}}
|
||||
{{ dict.label.system_type[scope.row.system_type] }} : {{ scope.row.system_type }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="icon" label="图标" align="center" :min-width="flexWidth('icon',crud.data,'图标')">
|
||||
@@ -241,7 +241,7 @@ export default {
|
||||
name: 'Menu',
|
||||
components: { Treeselect, IconSelect, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({ title: '菜单', idField: 'menu_id', crudMethod: { ...crudMenu }})
|
||||
return CRUD({ title: '菜单', idField: 'menu_id', url: 'api/sysMenu', crudMethod: { ...crudMenu }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['system_type'],
|
||||
|
||||
198
lms/nladmin-ui/src/views/wms/pdm/bigtask/index.vue
Normal file
198
lms/nladmin-ui/src/views/wms/pdm/bigtask/index.vue
Normal file
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
multiple
|
||||
placeholder="任务状态"
|
||||
class="filter-item"
|
||||
clearable
|
||||
@change="handOrderStatus"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.mix_task_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="820px">
|
||||
<el-form ref="form" :model="form" :rules="rules" :inline="true" size="mini" label-width="130px">
|
||||
<el-form-item v-show="false" label="物料id">
|
||||
<el-input v-model="form.material_id" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="form.material_name" style="width: 240px;" @focus="getMaterial(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="泥料号(配方号)">
|
||||
<el-input v-model="form.raw_material_code" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="混碾数量/重量">
|
||||
<el-input v-model="form.qty" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="料盅类型">
|
||||
<el-select
|
||||
v-model="form.vehicle_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.LZ_VEHICLE_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" 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="material_id" label="物料" :min-width="flexWidth('material_id',crud.data,'物料id')" />
|
||||
<el-table-column prop="raw_material_code" label="泥料号(配方号)" :min-width="flexWidth('raw_material_code',crud.data,'泥料号(配方号)')" />
|
||||
<el-table-column prop="qty" label="混碾数量/重量" :min-width="flexWidth('qty',crud.data,'混碾数量/重量')" />
|
||||
<el-table-column prop="vehicle_type" label="料盅类型" :min-width="flexWidth('vehicle_type',crud.data,'料盅类型')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.LZ_VEHICLE_TYPE[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mix_status" label="状态" :min-width="flexWidth('mix_status',crud.data,'状态')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.mix_task_status[scope.row.mix_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operator" label="开工人" :min-width="flexWidth('operator',crud.data,'开工人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" :flag="flag" @tableChanged="tableChanged" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBdMixtask from './pdmBdMixtask'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue'
|
||||
|
||||
const defaultForm = {
|
||||
task_id: null,
|
||||
material_id: null,
|
||||
raw_material_code: null,
|
||||
qty: null,
|
||||
vehicle_type: null,
|
||||
mix_status: null,
|
||||
operator: null,
|
||||
create_time: null,
|
||||
create_name: null,
|
||||
update_time: null,
|
||||
id_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'Mixtask',
|
||||
dicts: ['LZ_VEHICLE_TYPE', 'mix_task_status'],
|
||||
components: { MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '混碾大任务',
|
||||
url: 'api/pdmBdMixtask',
|
||||
idField: 'task_id',
|
||||
sort: 'task_id,desc',
|
||||
crudMethod: { ...crudPdmBdMixtask }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
materialDialog: false,
|
||||
flag: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getMaterial(flag) {
|
||||
this.materialDialog = true
|
||||
this.flag = flag
|
||||
},
|
||||
handOrderStatus(value) {
|
||||
this.crud.query.more_status = null
|
||||
if (value) {
|
||||
this.crud.query.more_status = value.toString()
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
tableChanged(row, flag) {
|
||||
if (flag === 1) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.raw_material_code = row.raw_material_code
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
27
lms/nladmin-ui/src/views/wms/pdm/bigtask/pdmBdMixtask.js
Normal file
27
lms/nladmin-ui/src/views/wms/pdm/bigtask/pdmBdMixtask.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdMixtask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pdmBdMixtask/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdMixtask',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
@@ -134,7 +134,7 @@
|
||||
<el-form-item label="物料规格">
|
||||
<el-input v-model="form.material_spec" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数量" prop="plan_qty">
|
||||
<el-form-item v-if="form.region_code !== 'HL'" label="计划数量" prop="plan_qty">
|
||||
<el-input-number
|
||||
v-model.number="form.plan_qty"
|
||||
:disabled="form.region_code === 'FJ'"
|
||||
@@ -142,6 +142,13 @@
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-else label="计划重量">
|
||||
<el-input-number
|
||||
v-model.number="form.plan_weight"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="半成品编码" prop="material_name">
|
||||
<el-input v-model="form.half_material_code" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
@@ -228,27 +235,27 @@
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.region_code === 'FJ'" label="订单号">
|
||||
<el-input
|
||||
v-model="form.order_no"
|
||||
:disabled="form.material_code===null"
|
||||
style="width: 240px;"
|
||||
@focus="getProductionOrder(form.material_id)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.region_code === 'FJ'" label="客户编码">
|
||||
<el-select v-model="form.custer_no" clearable filterable placeholder="请选择" style="width: 240px;">
|
||||
<el-option
|
||||
v-for="item in custerList"
|
||||
:key="item.custer_NO"
|
||||
:label="item.custer_NAME"
|
||||
:value="item.custer_NO"
|
||||
>
|
||||
<span style="float: left">{{ item.custer_NO }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.custer_NAME }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="form.region_code === 'FJ'" label="订单号">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.order_no"-->
|
||||
<!-- :disabled="form.material_code===null"-->
|
||||
<!-- style="width: 240px;"-->
|
||||
<!-- @focus="getProductionOrder(form.material_id)"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item v-if="form.region_code === 'FJ'" label="客户编码">-->
|
||||
<!-- <el-select v-model="form.custer_no" clearable filterable placeholder="请选择" style="width: 240px;">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in custerList"-->
|
||||
<!-- :key="item.custer_NO"-->
|
||||
<!-- :label="item.custer_NAME"-->
|
||||
<!-- :value="item.custer_NO"-->
|
||||
<!-- >-->
|
||||
<!-- <span style="float: left">{{ item.custer_NO }}</span>-->
|
||||
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.custer_NAME }}</span>-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="静置时间(分钟)" prop="standing_time">
|
||||
<el-input-number
|
||||
v-model.number="form.standing_time"
|
||||
@@ -349,6 +356,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
|
||||
<el-table-column prop="real_qty" label="实际数量" :min-width="flexWidth('real_qty',crud.data,'实际数量')" />
|
||||
<el-table-column prop="plan_weight" label="计划重量" :min-width="flexWidth('plan_weight',crud.data,'计划数量')">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
content="分拣工单的重量是砖块数"
|
||||
placement="right"
|
||||
>
|
||||
<div>{{ scope.row.plan_weight }}</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="real_weight" label="实际重量" :min-width="flexWidth('real_weight',crud.data,'实际数量')" />
|
||||
<!-- <el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />-->
|
||||
<el-table-column
|
||||
prop="region_name"
|
||||
@@ -467,7 +487,7 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" :flag="flag" @tableChanged="tableChanged" />
|
||||
<ProductionOrder :dialog-show.sync="orderDialog" :material-code="materialCode" @recordMesOrder="recordMesOrder" />
|
||||
<!-- <ProductionOrder :dialog-show.sync="orderDialog" :material-code="materialCode" @recordMesOrder="recordMesOrder" />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -483,7 +503,7 @@ import pagination from '@crud/Pagination'
|
||||
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue'
|
||||
import item from '@/layout/components/Sidebar/Item.vue'
|
||||
import ProductionOrder from '@/views/wms/pdm/workerorder/ProductionOrder.vue'
|
||||
// import ProductionOrder from '@/views/wms/pdm/workerorder/ProductionOrder.vue'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -528,7 +548,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'PdmBdWorkorder',
|
||||
dicts: ['vehicle_type', 'pdm_workorder_status'],
|
||||
components: { ProductionOrder, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -591,7 +611,7 @@ export default {
|
||||
created() {
|
||||
this.getWorkShopList()
|
||||
this.getRegionList()
|
||||
this.getCuster()
|
||||
// this.getCuster()
|
||||
},
|
||||
methods: {
|
||||
item() {
|
||||
|
||||
Reference in New Issue
Block a user