add: 分切CRUD

This commit is contained in:
2024-02-29 11:26:21 +08:00
parent 7ab17cb0a8
commit 1224ab4d74
16 changed files with 726 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
package org.nl.b_lms.bst.ivt.cutpointivt.controller;
import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dto.BstIvtCutpointivtQuery;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.modules.logging.annotation.Log;
@@ -29,7 +30,7 @@ public class BstIvtCutpointivtController {
@GetMapping
@Log("查询分切区缓存点位库存")
//@SaCheckPermission("@el.check('bstIvtCutpointivt:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
public ResponseEntity<Object> query(BstIvtCutpointivtQuery whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(bstIvtCutpointivtService.queryAll(whereJson,page)),HttpStatus.OK);
}

View File

@@ -1,6 +1,7 @@
package org.nl.b_lms.bst.ivt.cutpointivt.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dto.BstIvtCutpointivtQuery;
import org.nl.common.domain.query.PageQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
@@ -22,7 +23,7 @@ public interface IBstIvtCutpointivtService extends IService<BstIvtCutpointivt> {
* @param pageable 分页参数
* @return IPage<BstIvtCutpointivt>
*/
IPage<BstIvtCutpointivt> queryAll(Map whereJson, PageQuery pageable);
IPage<BstIvtCutpointivt> queryAll(BstIvtCutpointivtQuery whereJson, PageQuery pageable);
/**
* 创建

View File

@@ -1,12 +1,20 @@
package org.nl.b_lms.bst.ivt.cutpointivt.service.dto;
import lombok.Data;
import org.nl.common.domain.query.BaseQuery;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
import java.io.Serializable;
/**
* @author lyd
* @date 2024-02-26
**/
public class BstIvtCutpointivtQuery extends BaseQuery<BstIvtCutpointivt> {
@Data
public class BstIvtCutpointivtQuery implements Serializable {
private String point_type;
private String point_code;
private String product_area;
private String is_used;
private String point_location;
}

View File

@@ -2,6 +2,7 @@ package org.nl.b_lms.bst.ivt.cutpointivt.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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.bst.ivt.cutpointivt.service.IBstIvtCutpointivtService;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.mapper.BstIvtCutpointivtMapper;
import org.nl.b_lms.bst.ivt.cutpointivt.service.dto.BstIvtCutpointivtQuery;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
@@ -35,8 +37,13 @@ public class BstIvtCutpointivtServiceImpl extends ServiceImpl<BstIvtCutpointivtM
private BstIvtCutpointivtMapper bstIvtCutpointivtMapper;
@Override
public IPage<BstIvtCutpointivt> queryAll(Map whereJson, PageQuery page){
public IPage<BstIvtCutpointivt> queryAll(BstIvtCutpointivtQuery whereJson, PageQuery page){
LambdaQueryWrapper<BstIvtCutpointivt> lam = new LambdaQueryWrapper<>();
lam.eq(ObjectUtil.isNotEmpty(whereJson.getPoint_code()), BstIvtCutpointivt::getPoint_code, whereJson.getPoint_code())
.eq(ObjectUtil.isNotEmpty(whereJson.getPoint_type()), BstIvtCutpointivt::getPoint_type, whereJson.getPoint_type())
.eq(ObjectUtil.isNotEmpty(whereJson.getProduct_area()), BstIvtCutpointivt::getProduct_area, whereJson.getProduct_area())
.eq(ObjectUtil.isNotEmpty(whereJson.getIs_used()), BstIvtCutpointivt::getIs_used, whereJson.getIs_used())
.eq(ObjectUtil.isNotEmpty(whereJson.getPoint_location()), BstIvtCutpointivt::getPoint_location, whereJson.getPoint_location());
IPage<BstIvtCutpointivt> pages = new Page<>(page.getPage() + 1, page.getSize());
bstIvtCutpointivtMapper.selectPage(pages, lam);
return pages;

View File

@@ -1,6 +1,7 @@
package org.nl.b_lms.bst.ivt.shafttubeivt.controller;
import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dto.BstIvtShafttubeivtQuery;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.modules.logging.annotation.Log;
@@ -29,7 +30,7 @@ public class BstIvtShafttubeivtController {
@GetMapping
@Log("查询穿拔轴区点位库存管理")
//@SaCheckPermission("@el.check('bstIvtShafttubeivt:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
public ResponseEntity<Object> query(BstIvtShafttubeivtQuery whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(bstIvtShafttubeivtService.queryAll(whereJson,page)),HttpStatus.OK);
}

View File

@@ -1,6 +1,7 @@
package org.nl.b_lms.bst.ivt.shafttubeivt.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dto.BstIvtShafttubeivtQuery;
import org.nl.common.domain.query.PageQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
@@ -22,7 +23,7 @@ public interface IBstIvtShafttubeivtService extends IService<BstIvtShafttubeivt>
* @param pageable 分页参数
* @return IPage<BstIvtShafttubeivt>
*/
IPage<BstIvtShafttubeivt> queryAll(Map whereJson, PageQuery pageable);
IPage<BstIvtShafttubeivt> queryAll(BstIvtShafttubeivtQuery whereJson, PageQuery pageable);
/**
* 创建

View File

@@ -1,12 +1,20 @@
package org.nl.b_lms.bst.ivt.shafttubeivt.service.dto;
import lombok.Data;
import org.nl.common.domain.query.BaseQuery;
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
import java.io.Serializable;
/**
* @author lyd
* @date 2024-02-26
**/
public class BstIvtShafttubeivtQuery extends BaseQuery<BstIvtShafttubeivt> {
@Data
public class BstIvtShafttubeivtQuery implements Serializable {
private String point_code;
private String point_type;
private String point_location;
private String is_used;
}

View File

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dto.BstIvtShafttubeivtQuery;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.SecurityUtils;
@@ -36,8 +37,12 @@ public class BstIvtShafttubeivtServiceImpl extends ServiceImpl<BstIvtShafttubeiv
private BstIvtShafttubeivtMapper bstIvtShafttubeivtMapper;
@Override
public IPage<BstIvtShafttubeivt> queryAll(Map whereJson, PageQuery page){
public IPage<BstIvtShafttubeivt> queryAll(BstIvtShafttubeivtQuery whereJson, PageQuery page){
LambdaQueryWrapper<BstIvtShafttubeivt> lam = new LambdaQueryWrapper<>();
lam.eq(ObjectUtil.isNotEmpty(whereJson.getPoint_code()), BstIvtShafttubeivt::getPoint_code, whereJson.getPoint_code())
.eq(ObjectUtil.isNotEmpty(whereJson.getPoint_type()), BstIvtShafttubeivt::getPoint_type, whereJson.getPoint_type())
.eq(ObjectUtil.isNotEmpty(whereJson.getPoint_location()), BstIvtShafttubeivt::getPoint_location, whereJson.getPoint_location())
.eq(ObjectUtil.isNotEmpty(whereJson.getIs_used()), BstIvtShafttubeivt::getIs_used, whereJson.getIs_used());
IPage<BstIvtShafttubeivt> pages = new Page<>(page.getPage() + 1, page.getSize());
bstIvtShafttubeivtMapper.selectPage(pages, lam);
return pages;

View File

@@ -15,6 +15,7 @@ import org.nl.b_lms.sch.task.dao.SchBaseTask;
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
import org.nl.b_lms.sch.tasks.slitter.TrussCallAirShaftTask;
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto;
import org.nl.common.utils.SecurityUtils;
import org.nl.common.utils.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -52,18 +53,20 @@ public class AutoCallAirShaftTask {
// todo: 未考虑区域
List<SlitterPlanDistinctDto> plans = slittingproductionplanService.getAllCutPlan();
if (plans.size() == 0) {
// todo: 如果不需要套轴,就只做拔轴
// 如果不需要套轴,就只做拔轴
makePullShaft(empty);
return;
}
// 获取一个分切计划的Dto。一根轴可能有两个分切计划
SlitterPlanDistinctDto planDto = plans.get(0);
// 查看套轴对接位是否满了
List<BstIvtCutpointivt> emptyShaftPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1", "1", "0");
// 如果满了就只做拔轴
if (emptyShaftPoint.size() == 0) {
// todo: 如果不需要套轴,就只做拔轴
// 如果不需要套轴,就只做拔轴
makePullShaft(empty);
return;
}
// 获取一个分切计划的Dto。一根轴可能有两个分切计划
SlitterPlanDistinctDto planDto = plans.get(0);
// 获取分切计划dto中对应的需要套轴的分切计划 最多两个计划
List<PdmBiSlittingproductionplan> needPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
.eq(PdmBiSlittingproductionplan::getResource_name, planDto.getResource_name())
@@ -78,7 +81,8 @@ public class AutoCallAirShaftTask {
if (qzzPoint.size() == 0) {
// todo 调用ACS滚条气涨轴下来
// todo: 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
saveCutPlanMessage(empty, needPlans, qzzSize);
return;
}
// 查找一条没任务的点位 todo: 优先获取只有一根轴的点位
@@ -87,7 +91,8 @@ public class AutoCallAirShaftTask {
// 如果不存在,则发起信号滚气涨轴
// todo 调用ACS滚条气涨轴下来
// todo: 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
saveCutPlanMessage(empty, needPlans, qzzSize);
return;
}
// 创建任务
@@ -122,6 +127,57 @@ public class AutoCallAirShaftTask {
});
}
private static void saveCutPlanMessage(BstIvtShafttubeivt empty, List<PdmBiSlittingproductionplan> needPlans, String qzzSize) {
empty.setHave_qzz("1");
empty.setQzz_size(qzzSize);
empty.setUpdate_optid(SecurityUtils.getCurrentUserId());
empty.setUpdate_optname(SecurityUtils.getCurrentUsername());
empty.setUpdate_time(DateUtil.now());
for (PdmBiSlittingproductionplan plan : needPlans) {
if ("1".equals(plan.getLeft_or_right())) {
// 左卷
if ("1".equals(plan.getPaper_tube_or_FRP())) {
empty.setTube_code1(plan.getPaper_tube_material());
empty.setTube_name1(plan.getPaper_tube_model());
} else {
empty.setTube_code1(plan.getFRP_material());
empty.setTube_name1(plan.getFRP_model());
}
empty.setContainer_name1(plan.getContainer_name());
} else {
// 右卷
if ("1".equals(plan.getPaper_tube_or_FRP())) {
empty.setTube_code1(plan.getPaper_tube_material());
empty.setTube_name1(plan.getPaper_tube_model());
} else {
empty.setTube_code1(plan.getFRP_material());
empty.setTube_name1(plan.getFRP_model());
}
empty.setContainer_name2(plan.getContainer_name());
}
}
}
private void makePullShaft(BstIvtShafttubeivt empty) {
List<BstIvtCutpointivt> notTaskPoints = bcutpointivtService.getAreaNotTaskPointByStatus("1", "3", "0");
if (notTaskPoints.size() == 0) {
return;
}
BstIvtCutpointivt cutpointivt = notTaskPoints.get(0);
JSONObject param = new JSONObject();
param.put("point_code1", ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1())
? cutpointivt.getTruss_point_code1() : cutpointivt.getTruss_point_code2());
param.put("point_code2", empty.getPoint_code());
param.put("vehicle_code", ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1())
? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2());
param.put("qzz_no", ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1())
? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2());
param.put("task_type", "6");
param.put("product_area", "Test");
param.put("is_bushing", "0");
trussCallAirShaftTask.createTask(param);
}
public boolean checkHaveTask(BstIvtCutpointivt p) {
List<SchBaseTask> list = taskService.list(new LambdaQueryWrapper<SchBaseTask>()
.eq(SchBaseTask::getTask_code, "07").and(la -> la.eq(SchBaseTask::getPoint_code1, p.getPoint_code()).or()

View File

@@ -26,7 +26,7 @@
<img :src="Avatar" class="user-avatar">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover">
<div class="avatar-wrapper">
<span class="user-nickname">{{ user.personName }}</span>
<span class="user-nickname">{{ user.person_name }}</span>
</div>
<el-dropdown-menu slot="dropdown">
<span style="display:block;" @click="show = true">

View File

@@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/bstIvtCutpointivt',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/bstIvtCutpointivt/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/bstIvtCutpointivt',
method: 'put',
data
})
}
export default { add, edit, del }

View File

@@ -0,0 +1,293 @@
<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="90px"
label-suffix=":"
>
<el-form-item label="点位编码">
<el-input
v-model="query.point_code"
clearable
placeholder="输入点位编码"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="点位类型">
<el-select
v-model="query.point_type"
clearable
filterable
size="mini"
class="filter-item"
@change="hand"
>
<el-option
v-for="item in dict.BCUT_POINT_TYPE"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="生产区域">
<el-select
v-model="query.product_area"
clearable
filterable
size="mini"
class="filter-item"
@change="hand"
>
<el-option
v-for="item in dict.product_area"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="区域位置">
<el-select
v-model="query.point_location"
clearable
filterable
size="mini"
class="filter-item"
@change="hand"
>
<el-option
v-for="item in dict.point_location"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用">
<el-switch
v-model="query.is_used"
active-value="0"
inactive-value="1"
active-color="#C0CCDA"
inactive-color="#409EFF"
@change="hand"
/>
</el-form-item>
<rrOperation />
</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="790px">
<el-form ref="form" :model="form" :inline="true" :rules="rules" size="mini" label-width="120px">
<el-form-item label="AGV点位编码">
<el-input v-model="form.point_code" disabled style="width: 240px;" />
</el-form-item>
<el-form-item label="AGV点位名称">
<el-input v-model="form.point_name" disabled style="width: 240px;" />
</el-form-item>
<el-form-item label="桁架点位编码1 ">
<el-input v-model="form.truss_point_code1" disabled style="width: 240px;" />
</el-form-item>
<el-form-item label="桁架点位编码2">
<el-input v-model="form.truss_point_code2" disabled style="width: 240px;" />
</el-form-item>
<el-form-item label="气胀轴编码1">
<el-input v-model="form.qzz_no1" style="width: 240px;" />
</el-form-item>
<el-form-item label="气胀轴编码2">
<el-input v-model="form.qzz_no2" style="width: 240px;" />
</el-form-item>
<el-form-item label="点位类型">
<el-select
v-model="form.point_type"
clearable
filterable
size="mini"
style="width: 240px;"
>
<el-option
v-for="item in dict.BCUT_POINT_TYPE"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="生产区域">
<el-select
v-model="form.product_area"
clearable
filterable
size="mini"
style="width: 240px;"
>
<el-option
v-for="item in dict.product_area"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="位置">
<el-select
v-model="form.point_location"
clearable
filterable
size="mini"
style="width: 240px;"
>
<el-option
v-for="item in dict.point_location"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="is_used">
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" style="width: 240px;" />
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" style="width: 240px;" />
</el-form-item>
<el-form-item label="规划">
<el-input v-model="form.plan" style="width: 240px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @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="point_code" label="AGV点位编码" :min-width="flexWidth('point_code',crud.data,'AGV点位编码')"/>
<el-table-column prop="point_name" label="AGV点位名称" :min-width="flexWidth('point_name',crud.data,'AGV点位名称')"/>
<el-table-column prop="truss_point_code1" label="桁架点位编码1 " :min-width="flexWidth('truss_point_code1',crud.data,'桁架点位编码1 ')"/>
<el-table-column prop="truss_point_code2" label="桁架点位编码2" :min-width="flexWidth('truss_point_code2',crud.data,'桁架点位编码2')"/>
<el-table-column prop="qzz_no1" label="气胀轴编码1" :min-width="flexWidth('qzz_no1',crud.data,'气胀轴编码1')"/>
<el-table-column prop="qzz_no2" label="气胀轴编码2" :min-width="flexWidth('qzz_no2',crud.data,'气胀轴编码2')"/>
<el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型型')">
<template slot-scope="scope">
{{ dict.label.BCUT_POINT_TYPE[scope.row.point_type] }}
</template>
</el-table-column>
<el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_type',crud.data,'点位类型型')">
<template slot-scope="scope">
{{ dict.label.CUT_POINT_STATUS[scope.row.point_status] }}
</template>
</el-table-column>
<el-table-column prop="product_area" label="生产区域" :min-width="flexWidth('product_area',crud.data,'生产区域')"/>
<el-table-column prop="point_location" label="位置" :min-width="flexWidth('point_location',crud.data,'位置')">
<template slot-scope="scope">
{{ dict.label.point_location[scope.row.point_location] }}
</template>
</el-table-column>
<el-table-column prop="sort_seq" label="顺序号" :min-width="flexWidth('sort_seq',crud.data,'顺序号')"/>
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')">
<template slot-scope="scope">
{{ dict.label.IS_OR_NOT[scope.row.is_used] }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')"/>
<el-table-column prop="create_name" label="创建人姓名" :min-width="flexWidth('create_name',crud.data,'创建人姓名')"/>
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')"/>
<el-table-column prop="update_optname" label="修改人姓名" :min-width="flexWidth('update_optname',crud.data,'修改人姓名')"/>
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')"/>
<el-table-column prop="plan" label="规划" :min-width="flexWidth('plan',crud.data,'规划')"/>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:is-visiable-del="false"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudBstIvtCutpointivt from './bstIvtCutpointivt'
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'
const defaultForm = {
ivt_id: null,
point_code: null,
point_name: null,
truss_point_code1: null,
truss_point_code2: null,
qzz_no1: null,
qzz_no2: null,
point_type: null,
point_status: null,
product_area: null,
point_location: null,
sort_seq: null,
is_used: null,
remark: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
plan: null
}
export default {
name: 'BstIvtCutpointivt',
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
dicts: ['IS_OR_NOT', 'product_area', 'BCUT_POINT_TYPE', 'CUT_POINT_STATUS', 'point_location'],
cruds() {
return CRUD({
title: '分切区缓存点位库存',
url: 'api/bstIvtCutpointivt',
idField: 'ivt_id',
sort: 'ivt_id,desc',
crudMethod: { ...crudBstIvtCutpointivt },
optShow: {
add: false,
edit: true,
del: false,
download: false,
reset: true
}
})
},
data() {
return {
permission: {
},
rules: {
}
}
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
hand(value) {
this.crud.toQuery()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/bstIvtShafttubeivt',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/bstIvtShafttubeivt/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/bstIvtShafttubeivt',
method: 'put',
data
})
}
export default { add, edit, del }

View File

@@ -0,0 +1,275 @@
<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="90px"
label-suffix=":"
>
<el-form-item label="点位编码">
<el-input
v-model="query.point_code"
clearable
placeholder="输入点位编码"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="点位类型">
<el-select
v-model="query.point_type"
clearable
filterable
size="mini"
class="filter-item"
@change="hand"
>
<el-option
v-for="item in dict.SHAFT_POINT_TYPE"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="区域位置">
<el-select
v-model="query.point_location"
clearable
filterable
size="mini"
class="filter-item"
@change="hand"
>
<el-option
v-for="item in dict.point_location"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用">
<el-switch
v-model="query.is_used"
active-value="0"
inactive-value="1"
active-color="#C0CCDA"
inactive-color="#409EFF"
@change="hand"
/>
</el-form-item>
<rrOperation />
</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="790px">
<el-form ref="form" :model="form" :inline="true" :rules="rules" size="mini" label-width="120px">
<el-form-item label="点位编码">
<el-input v-model="form.point_code" disabled style="width: 240px;" />
</el-form-item>
<el-form-item label="点位名称">
<el-input v-model="form.point_name" disabled style="width: 240px;" />
</el-form-item>
<el-form-item label="气涨轴尺寸">
<el-input v-model="form.qzz_size" style="width: 240px;" />
</el-form-item>
<el-form-item label="气涨轴代数">
<el-input v-model="form.qzz_generation" style="width: 240px;" />
</el-form-item>
<el-form-item label="纸管1编码">
<el-input v-model="form.tube_code1" style="width: 240px;" />
</el-form-item>
<el-form-item label="纸管1描述">
<el-input v-model="form.tube_name1" style="width: 240px;" />
</el-form-item>
<el-form-item label="纸管2编码">
<el-input v-model="form.tube_code2" style="width: 240px;" />
</el-form-item>
<el-form-item label="纸管2描述">
<el-input v-model="form.tube_name2" style="width: 240px;" />
</el-form-item>
<el-form-item label="子卷号1">
<el-input v-model="form.container_name1" style="width: 240px;" />
</el-form-item>
<el-form-item label="子卷号2">
<el-input v-model="form.container_name2" style="width: 240px;" />
</el-form-item>
<el-form-item label="点位类型">
<el-select
v-model="form.point_type"
clearable
filterable
size="mini"
style="width: 240px;"
>
<el-option
v-for="item in dict.SHAFT_POINT_TYPE"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="位置">
<el-select
v-model="form.point_location"
clearable
filterable
size="mini"
style="width: 240px;"
>
<el-option
v-for="item in dict.point_location"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否有轴">
<el-switch v-model="form.have_qzz" active-value="1" inactive-value="0" style="width: 240px;" />
</el-form-item>
<el-form-item label="是否启用">
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" style="width: 240px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @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="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="qzz_size" label="气涨轴尺寸" :min-width="flexWidth('qzz_size',crud.data,'气涨轴尺寸')"/>
<el-table-column prop="qzz_generation" label="气涨轴代数" :min-width="flexWidth('qzz_generation',crud.data,'气涨轴代数')"/>
<el-table-column prop="tube_code1" label="纸管1编码" :min-width="flexWidth('tube_code1',crud.data,'纸管1编码')"/>
<el-table-column prop="tube_name1" label="纸管1描述" :min-width="flexWidth('tube_name1',crud.data,'纸管1描述')"/>
<el-table-column prop="tube_code2" label="纸管2编码" :min-width="flexWidth('tube_code2',crud.data,'纸管2编码')"/>
<el-table-column prop="tube_name2" label="纸管2描述" :min-width="flexWidth('tube_name2',crud.data,'纸管2描述')"/>
<el-table-column prop="container_name1" label="子卷号1" :min-width="flexWidth('container_name1',crud.data,'子卷号1')"/>
<el-table-column prop="container_name2" label="子卷号2" :min-width="flexWidth('container_name2',crud.data,'子卷号2')"/>
<el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'气涨轴设备位')">
<template slot-scope="scope">
{{ dict.label.SHAFT_POINT_TYPE[scope.row.point_type] }}
</template>
</el-table-column>
<el-table-column prop="point_location" label="位置" :min-width="flexWidth('point_location',crud.data,'位置')">
<template slot-scope="scope">
{{ dict.label.point_location[scope.row.point_location] }}
</template>
</el-table-column>
<el-table-column prop="have_qzz" label="是否有轴" :min-width="flexWidth('have_qzz',crud.data,'是否有轴')">
<template slot-scope="scope">
{{ scope.row.have_qzz === '1' ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')">
<template slot-scope="scope">
{{ scope.row.is_used === '1' ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column prop="sort_seq" label="顺序号" :min-width="flexWidth('sort_seq',crud.data,'顺序号')"/>
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')"/>
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')"/>
<el-table-column prop="update_optname" label="修改人" :min-width="flexWidth('update_optname',crud.data,'修改人')"/>
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')"/>
<el-table-column prop="plan" label="规划" :min-width="flexWidth('plan',crud.data,'规划')"/>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:is-visiable-del="false"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudBstIvtShafttubeivt from './bstIvtShafttubeivt'
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'
const defaultForm = {
ivt_id: null,
point_code: null,
point_name: null,
qzz_size: null,
qzz_generation: null,
tube_code1: null,
tube_name1: null,
tube_code2: null,
tube_name2: null,
container_name1: null,
container_name2: null,
point_type: null,
point_location: null,
have_qzz: null,
is_used: null,
sort_seq: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
plan: null
}
export default {
name: 'BstIvtShafttubeivt',
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
dicts: ['SHAFT_POINT_TYPE', 'point_location'],
cruds() {
return CRUD({
title: '穿拔轴区点位库存管理',
url: 'api/bstIvtShafttubeivt',
idField: 'ivt_id',
sort: 'ivt_id,desc',
crudMethod: { ...crudBstIvtShafttubeivt },
optShow: {
add: false,
edit: true,
del: false,
download: false,
reset: true
}
})
},
data() {
return {
permission: {
},
rules: {
}
}
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
hand(value) {
this.crud.toQuery()
}
}
}
</script>
<style scoped>
</style>