Browse Source

晶棒工单&&新增原料缓存区

master
psh 5 months ago
parent
commit
8857a78de1
  1. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/board/service/dao/mapper/BoardMapper.xml
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/mapper/PdmBdWorkorderDetailMapper.xml
  3. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java
  4. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java
  5. 42
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java
  6. 12
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java
  7. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/SSXBKJTask.java
  8. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java
  9. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml
  10. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/controller/service/dto/WorkorderQuery.java
  11. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/controller/service/impl/WorkorderServiceImpl.java
  12. 230
      lms/nladmin-ui/src/views/wms/pdm/workerordertwo/PointDetailDialog.vue
  13. 327
      lms/nladmin-ui/src/views/wms/pdm/workerordertwo/index.vue
  14. 27
      lms/nladmin-ui/src/views/wms/pdm/workerordertwo/workorder.js
  15. 47
      lms/nladmin-ui/src/views/wms/sch/point/index.vue

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/board/service/dao/mapper/BoardMapper.xml

@ -55,7 +55,7 @@
sch_base_point p
WHERE
m.PalletSN = p.vehicle_code2
AND p.region_code = 'YL'
AND (p.region_code='YL' or p.region_code='YLHC')
) a
GROUP BY
PalletSN;
@ -95,7 +95,7 @@
FROM
sch_base_point
WHERE
region_code IN ( 'YL', 'HW', 'HWK' )
region_code IN ( 'YL','YLHC', 'HW', 'HWK' )
) a,
(
SELECT

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/mapper/PdmBdWorkorderDetailMapper.xml

@ -5,6 +5,6 @@
select p.point_code,productName,PalletSN,qty from sch_base_point p left join
(select productName,PalletSN,sum(qty) as qty from sch_base_material GROUP BY productName,PalletSN ) m
on p.vehicle_code2=m.PalletSN
where p.region_code='YL' and p.ing_task_code is not null and m.productname=#{productname}
where (p.region_code='YL' or p.region_code='YLHC') and p.ing_task_code is not null and m.productname=#{productname}
</select>
</mapper>

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/controller/SchBaseTaskController.java

@ -88,4 +88,14 @@ public class SchBaseTaskController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/move")
@Log("管理端一键移库")
@ApiOperation("管理端一键移库")
@SaIgnore
//@PreAuthorize("@el.check('task:list')")
public ResponseEntity<Object> move() {
schBaseTaskService.move();
return new ResponseEntity<>(HttpStatus.OK);
}
}

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/ISchBaseTaskService.java

@ -99,4 +99,12 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
* @param param
*/
void operation(Map<String, Object> param);
/**
* 管理端一键移库
*
* @return
*/
void move();
}

42
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java

@ -14,6 +14,10 @@ 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.ext.service.AcsToWmsService;
import org.nl.wms.ext.service.dto.to.BaseResponse;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.task.service.ISchBaseTaskService;
import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.nl.wms.sch.task.service.dao.mapper.SchBaseTaskMapper;
@ -49,6 +53,12 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
@Autowired
private TaskFactory taskFactory;
@Autowired
private ISchBasePointService schBasePointService;
@Autowired
private AcsToWmsService acsToWmsService;
@Override
public IPage<SchBaseTask> queryAll(Map whereJson, PageQuery page) {
String task_code = ObjectUtil.isNotEmpty(whereJson.get("task_code")) ? whereJson.get("task_code").toString() : null;
@ -267,4 +277,36 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
}
}
/**
* 管理端一键移库
*
* @return
*/
@Override
public void move(){
log.info("管理端发起一键移库!");
List<SchBasePoint> schBasePointList=schBasePointService.list(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getIs_used,true)
.eq(SchBasePoint::getRegion_code, "YLHC")
.notLike(SchBasePoint::getVehicle_code2,"YBHC")
.and(slam -> slam.isNull(SchBasePoint::getIng_task_code)
.or()
.eq(SchBasePoint::getIng_task_code, "")
));
List<SchBasePoint> nextList=schBasePointService.list(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getRegion_code, "YL")
.and(slam -> slam.isNull(SchBasePoint::getIng_task_code)
.or()
.eq(SchBasePoint::getIng_task_code, "")));
for(SchBasePoint schBasePoint:schBasePointList){
JSONObject param =new JSONObject();
param.put("start_point",schBasePoint.getPoint_code());
param.put("next_point",nextList.get(0).getPoint_code());
param.put("request_medthod_code", "POINTTask");
param.put("request_medthod_name", "点对点任务");
param.put("device_code",param.getString("start_point"));
BaseResponse baseResponse=acsToWmsService.acsApply(param);
nextList.remove(0);
}
}
}

12
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java

@ -76,9 +76,9 @@ public class POINTTask extends AbstractTask {
task.setRemark("");
SchBasePoint schBasePoint= pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, task.getPoint_code1()));
SchBasePoint nextSchBasePoint= pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, task.getPoint_code2()));
if(task.getPoint_code2().startsWith("DKT")){
SchBasePoint nextSchBasePoint= pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, task.getPoint_code2()));
//如果是叠盘位,根据当前数量+1为目标地址
int qty=nextSchBasePoint.getVehicle_qty()+1;
task.setPoint_code2(task.getPoint_code2().substring(0,task.getPoint_code2().length()-1)+qty);
@ -88,8 +88,10 @@ public class POINTTask extends AbstractTask {
taskService.update(task);
//发起任务时先把点位占用,防止发起重复任务
// point.setIng_task_code(task.getTask_code());
// pointService.update(point);
schBasePoint.setIng_task_code(task.getTask_code());
pointService.update(schBasePoint);
nextSchBasePoint.setIng_task_code(task.getTask_code());
pointService.update(nextSchBasePoint);
//下发
this.renotifyAcs(task);
@ -207,7 +209,7 @@ public class POINTTask extends AbstractTask {
// 起点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) {
startPointObj.setIng_task_code("");
pointService.update(endPointObj);
pointService.update(startPointObj);
}
taskObj.setRemark("任务取消");
taskObj.setTask_status(TaskStatus.CANCELED.getCode());

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/SSXBKJTask.java

@ -158,6 +158,12 @@ public class SSXBKJTask extends AbstractTask {
taskObj.setRemark("任务完成");
}
if (status.equals(TaskStatus.CANCELED)) { // 取消
// 起点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) {
startPointObj.setIng_task_code("");
//任务取消把原先占用的位置释放
pointService.update(startPointObj);
}
// 终点解锁
if (ObjectUtil.isNotEmpty(endPointObj)) {
endPointObj.setIng_task_code("");

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java

@ -92,7 +92,7 @@ public class YCLRKTask extends AbstractTask {
String extGroupData = task.getExt_group_data();
JSONObject jsonObject = JSONObject.parseObject(extGroupData);
// String materialType = jsonObject.getString("material_type");
SchBasePoint point = findNextPoint();
SchBasePoint point = findNextPoint(jsonObject.getString("sub_tray"));
if (ObjectUtil.isEmpty(point)) {
task.setRemark("未找到所需点位!");
taskService.update(task);
@ -123,8 +123,11 @@ public class YCLRKTask extends AbstractTask {
*
* @return
*/
private SchBasePoint findNextPoint() {
private SchBasePoint findNextPoint(String sub_tray) {
String regionCode = "YL";
if(sub_tray.startsWith("YBHC")) {
regionCode = "YLHC";
}
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0");
for (SchBasePoint schBasePoint : schBasePointList) {
if (schBasePoint.getIs_used()

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/mapper/PointMapper.xml

@ -45,6 +45,6 @@
from sch_base_point p
LEFT JOIN sch_base_vehiclematerialgroup v
on p.vehicle_code2=v.vehicle_code
where p.region_code in('YL','HW','HWK');
where p.region_code in('YL','YLHC','HW','HWK');
</select>
</mapper>

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/controller/service/dto/WorkorderQuery.java

@ -1,5 +1,6 @@
package org.nl.wms.sch.workorder.controller.service.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ -18,4 +19,8 @@ public class WorkorderQuery implements Serializable {
private String supplierCode;
//绑定状态
private String status;
//生产工单
private String moname;
//出库单号
private String somtOrderNo;
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/controller/service/impl/WorkorderServiceImpl.java

@ -27,6 +27,8 @@ public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder
public IPage<Workorder> queryAll(WorkorderQuery whereJson, PageQuery page){
IPage<Workorder> pages = new Page<>(page.getPage() + 1, page.getSize());
LambdaQueryWrapper<Workorder> wrapper = new LambdaQueryWrapper<>();
wrapper.like(StringUtils.isNotBlank(whereJson.getMoname()), Workorder::getMoname,whereJson.getMoname());
wrapper.like(StringUtils.isNotBlank(whereJson.getSomtOrderNo()), Workorder::getSomtOrderNo,whereJson.getSomtOrderNo());
wrapper.like(StringUtils.isNotBlank(whereJson.getPalletSN()), Workorder::getPalletSN,whereJson.getPalletSN());
wrapper.like(StringUtils.isNotBlank(whereJson.getLotSN()), Workorder::getLotSN,whereJson.getLotSN());
wrapper.like(StringUtils.isNotBlank(whereJson.getProductName()), Workorder::getProductName,whereJson.getProductName());

230
lms/nladmin-ui/src/views/wms/pdm/workerordertwo/PointDetailDialog.vue

@ -0,0 +1,230 @@
<template>
<el-dialog
title="物料选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1000px"
@close="close"
@open="open"
>
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="物料编码">
<el-input
v-model="query.productname"
clearable
size="mini"
placeholder="物料编码"
disabled="false"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="工单号">
<el-input
v-model="query.workorder_code"
clearable
size="mini"
placeholder="工单号"
disabled="false"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
size="mini"
border
:cell-style="{'text-align':'center'}"
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="point_code" label="所在点位" width="120px" />
<el-table-column prop="productName" label="物料编码" />
<el-table-column prop="palletSN" label="子托盘号" min-width="120" show-overflow-tooltip />
<el-table-column prop="qty" label="数量" width="100" show-overflow-tooltip />
</el-table>
<!--分页组件-->
<pagination />
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span> -->
<el-button
type="primary"
@click="submitSelectedRows">
原材料出库
</el-button>
</el-dialog>
</template>
<script>
import CRUD, { header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { mount } from 'sortablejs'
export default {
name: 'WorkOrderDetailDialog',
components: { rrOperation, pagination },
dicts: ['is_used', 'vehicle_type'],
cruds() {
return CRUD({ title: '点位详情', url: 'api/pointDetail', optShow: {}})
},
mixins: [presenter(), header()],
props: {
dialogShow: {
type: Boolean,
default: false
},
isSingle: {
type: Boolean,
default: false
},
productname: {
type: String,
default: ''
},workorder_code: {
type: String,
default: ''
}
},
data() {
return {
dialogVisible: false,
tableRadio: null,
tableData: []
}
},
watch: {
dialogShow: {
handler(newValue) {
this.dialogVisible = newValue
}
},
productname(newVal) {
//
this.query.productname = newVal;
this.executeQuery();
},
workorder_code(newVal) {
//
this.query.workorder_code=newVal
this.workorder_code = newVal;
}
},
methods: {
clickChange(item) {
this.tableRadio = item
},
open() {
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
} else {
this.checkrow = row
}
},
onSelectAll() {
this.$refs.table.clearSelection()
},
close() {
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)
},
submit() {
//
if (this.isSingle && this.tableRadio) {
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.tableRadio)
return
}
this.rows = this.$refs.table.selection
if (this.rows.length <= 0) {
this.$message('请先勾选物料')
return
}
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.rows)
},executeQuery() {
this.crud.toQuery();
},submitSelectedRows() {
const selectedRows = this.$refs.table.selection;
if (selectedRows.length === 0) {
this.$message.error('请至少选择一行数据');
return;
}
// point_code
const pointCodes = selectedRows.map(row => row.point_code);
//
this.$prompt('请输入回温时间', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\d+/,
inputErrorMessage: '回温时间必须为数字'
}).then(({ value: time }) => {
this.$prompt('请输入回温模式(0-普通模式,1-快速模式)', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value: mode }) => {
//
this.$axios.post('/api/pointDetail/add', {
pointCodes,
time,
mode,
workorder_code: this.workorder_code // 使workorder_code
}).then(response => {
//
this.$message.success('提交成功!');
//
this.dialogVisible = false;
}).catch(error => {
//
this.$message.error('提交失败,请重试');
});
}).catch(() => {
//
this.$message({
type: 'info',
message: '已取消提交操作'
});
});
}).catch(() => {
//
this.$message({
type: 'info',
message: '已取消提交操作'
});
});
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 0px;
}
</style>

327
lms/nladmin-ui/src/views/wms/pdm/workerordertwo/index.vue

@ -0,0 +1,327 @@
<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.somtOrderNo"
clearable
placeholder="出库单号"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="生产工单">
<el-input
v-model="query.moname"
clearable
placeholder="生产工单"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="托号">
<el-input
v-model="query.palletSN"
clearable
placeholder="托号"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料编码">
<el-input
v-model="query.productName"
clearable
placeholder="物料编码"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</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="820px"
>
<el-form
ref="form"
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
:inline="true"
:model="form"
:rules="rules"
size="mini"
label-width="135px"
label-suffix=":"
>
<el-form-item label="出库单号" >
<el-input v-model="form.somtOrderNo" style="width: 240px;" @focus="getMaterial" />
</el-form-item>
<el-form-item label="生产工单">
<el-input v-model="form.moname" style="width: 240px;" />
</el-form-item>
<el-form-item label="托号">
<el-input v-model="form.palletSN" style="width: 240px;" />
</el-form-item>
<el-form-item label="晶棒号" >
<el-input v-model="form.lotSN" style="width: 240px;" @focus="getMaterial" />
</el-form-item>
<el-form-item label="物料编码">
<el-input v-model="form.productName" style="width: 240px;" />
</el-form-item>
<el-form-item label="物料描述">
<el-input v-model="form.productDescription" style="width: 240px;" />
</el-form-item>
<el-form-item label="客户编码">
<el-input v-model="form.supplierCode" style="width: 240px;" />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="form.supplierName" 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 prop="somtOrderNo" label="出库单号" :min-width="flexWidth('somtOrderNo',crud.data,'出库单号')" />
<el-table-column prop="moname" label="生产工单" :min-width="flexWidth('moname',crud.data,'生产工单')" />
<el-table-column prop="palletSN" label="托号" :min-width="flexWidth('palletSN',crud.data,'托号')" />
<el-table-column prop="lotSN" label="晶棒号" :min-width="flexWidth('lotSN',crud.data,'晶棒号')" />
<el-table-column prop="productName" label="物料编码" :min-width="flexWidth('productName',crud.data,'物料编码')" />
<el-table-column prop="productDescription" label="物料描述" :min-width="flexWidth('productDescription',crud.data,'物料描述')" />
<el-table-column prop="supplierCode" label="客户编码" :min-width="flexWidth('supplierCode',crud.data,'客户编码')" />
<el-table-column prop="supplierName" label="客户名称" :min-width="flexWidth('supplierName',crud.data,'客户名称')" />
<!-- <el-table-column prop="status" label="入库类型" :min-width="flexWidth('status',crud.data,'入库类型')">
<template slot-scope="scope">
{{ scope.row.status=="0"?'未出库':'已出库' }}
</template>
</el-table-column> -->
<el-table-column prop="createTime" label="创建日期" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-add"
:disabled="scope.row.status=='1'"
@click="doOperate(scope.row)"
>工单出库</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged" />
<PointDetailDialog :dialog-show.sync="pointDetailDialog" :workorder_code="workorder_code" :productname="productname" @tableChanged="tableChanged" />
</div>
</template>
<script>
import crudPdmBdWorkorder from './workorder'
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
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 crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue'
import PointDetailDialog from '@/views/wms/pdm/workerordertwo/PointDetailDialog.vue'
import item from '@/layout/components/Sidebar/Item.vue'
const defaultForm = {
workorder_id: null,
workorder_code: null,
plan_qty: null,
real_qty: null,
material_id: null,
vehicle_type: null,
planproducestart_date: null,
planproduceend_date: null,
realproducestart_date: null,
realproduceend_date: null,
material_spec: null,
material_code: null,
material_name: null,
standing_time: null,
point_code: null,
point_name: null,
region_code: null,
region_name: null,
workorder_status: null,
is_needmove: true,
workorder_type: null,
passback_status: null,
workshop_code: null,
ext_id: null,
is_delete: false,
is_urgent: false
}
export default {
name: 'workorder',
dicts: ['vehicle_type', 'pdm_workorder_status'],
components: { PointDetailDialog,MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
title: '晶棒工单管理',
url: 'api/workorder',
idField: 'workorder_id',
sort: 'workorder_id,desc',
crudMethod: { ...crudPdmBdWorkorder },
optShow: {
add: false,
edit: false,
del: false,
download: false,
reset: false
},
})
},
data() {
return {
permission: {},
rules: {
material_code: [
{ required: true, message: '物料不能为空', trigger: 'blur' }
],
plan_qty: [
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
],
planproducestart_date: [
{ required: true, message: '计划开始不能为空', trigger: 'change' }
],
planproduceend_date: [
{ required: true, message: '计划结束不能为空', trigger: 'change' }
],
point_code: [
{ required: true, message: '设备编码不能为空', trigger: 'change' }
],
region_code: [
{ required: true, message: '区域编码不能为空', trigger: 'change' }
]
/* workorder_type: [
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
]*/
},
queryTypeOptions: [
{ key: 'workorder_code', display_name: '工单编号' },
{ key: 'point_code', display_name: '设备编码' }
],
workShopList: [],
regionList: [],
pointList: [],
regionCodeParam: null,
materialDialog: false,
pointDetailDialog:false,
message: null
}
},
created() {
this.getWorkShopList()
this.getRegionList()
},
methods: {
item() {
return item
},
// false
[CRUD.HOOK.beforeRefresh]() {
return true
},
getWorkShopList() { //
crudMdBaseWorkShop.getWorkShopList().then(res => {
this.workShopList = res
})
},
getRegionList() { //
const param = {
is_has_workder: true
}
crudSchBaseRegion.getRegionList(param).then(res => {
this.regionList = res
})
},
getPointList() { //
if (this.regionCodeParam) {
const param = {
region_code: this.regionCodeParam
}
crudSchBasePoint.getPointList(param).then(res => {
this.pointList = res
this.regionCodeParam = null
})
}
},
getMaterial() {
this.materialDialog = true
},
tableChanged(row) {
this.form.material_name = row.material_name
this.form.material_id = row.material_id
this.form.material_spec = row.material_spec
this.form.material_code = row.material_code
},
setRegionName(data) {
//
this.form.point_code = null
this.form.point_name = null
this.regionCodeParam = data
var region = this.regionList.find(item => item.region_code === data)
this.form.region_name = region.region_name
this.getPointList()
},
setPointName(data) {
var point = this.pointList.find(item => item.point_code === data)
this.form.point_name = point.point_name
},
handOrderStatus(value) {
this.crud.query.more_order_status = null
if (value) {
this.crud.query.more_order_status = value.toString()
}
this.crud.toQuery()
},
doOperate(row) {
this.workorder_code=row.moname
this.productname=row.productName
this.pointDetailDialog = true
}
}
}
</script>
<style scoped>
</style>

27
lms/nladmin-ui/src/views/wms/pdm/workerordertwo/workorder.js

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

47
lms/nladmin-ui/src/views/wms/sch/point/index.vue

@ -175,7 +175,29 @@
>
禁用
</el-button>
<el-button
slot="right"
class="filter-item"
size="mini"
type="primary"
icon="el-icon-info"
@click="showConfirmationDialog"
>
缓存区一键移库
</el-button>
<!-- Confirmation Dialog -->
</crudOperation>
<el-dialog
title="确认"
:visible.sync="dialogVisible"
width="30%"
>
<span>您确定要移库吗</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmMove">确定</el-button>
</span>
</el-dialog>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
@ -466,7 +488,8 @@ export default {
pointStatusList: [],
pointStatusDialogList: [],
pointTypesDialogList: [],
pointDialog: false
pointDialog: false,
dialogVisible: false,
}
},
created() {
@ -537,7 +560,7 @@ export default {
})
},
showQtyButton(vehicle_qty,region_code) {
if (vehicle_qty === 1 && region_code === 'YL') {
if (vehicle_qty === 1 && (region_code === 'YL'|| region_code === 'YLHC')) {
return true
}
return false
@ -594,7 +617,25 @@ export default {
console.error("提交失败,废包材位有货", error);
this.$message.error("提交失败,废包材位有货");
});
}
},showConfirmationDialog() {
this.dialogVisible = true;
},
confirmMove() {
// Here, you can add your logic to call the backend API.
// For example, using axios to make a POST request:
this.$axios.post('/api/schBaseTask/move', { })
.then(response => {
// Handle success response
console.log(response.data);
})
.catch(error => {
// Handle error response
console.error(error);
})
.finally(() => {
this.dialogVisible = false; // Close the dialog
});
},
}
}
</script>

Loading…
Cancel
Save