Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -32,6 +32,8 @@ public class LkToWmsServiceImpl implements LkToWmsService {
|
||||
|
||||
@Override
|
||||
public JSONObject stockApply(JSONObject json) {
|
||||
// 打印日志
|
||||
log.info("出库申请输入参数:"+json.toString());
|
||||
LKEmptyVehicleTask lkEmptyVehicleTask = new LKEmptyVehicleTask();
|
||||
|
||||
String pallet_code = json.getString("pallet_code");
|
||||
@@ -101,6 +103,8 @@ public class LkToWmsServiceImpl implements LkToWmsService {
|
||||
|
||||
@Override
|
||||
public JSONObject stockConfirm(JSONObject json) {
|
||||
// 打印日志
|
||||
log.info("库存确认结果反馈输入参数:"+json.toString());
|
||||
// 立库出库确认信息表
|
||||
WQLObject pdmTab = WQLObject.getWQLObject("PDM_LK_OutPalletMateril");
|
||||
// 载具信息表
|
||||
|
||||
@@ -46,6 +46,7 @@ public class WmsToLkServiceImpl implements WmsToLkService {
|
||||
.body(String.valueOf(json))
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
输入.workprocedure_code TYPEAS s_string
|
||||
输入.workprocedure_id TYPEAS s_string
|
||||
输入.is_active TYPEAS s_string
|
||||
输入.is_produceuse TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -52,9 +53,11 @@
|
||||
LEFT JOIN sys_dict_detail d ON e.device_attribute_scode = d.value AND name = 'DEVICE_ATTRIBUTE_SCODE'
|
||||
WHERE
|
||||
e.is_delete = '0'
|
||||
|
||||
OPTION 输入.workprocedure_code <> ""
|
||||
e.workprocedure_code = 输入.workprocedure_code
|
||||
ENDOPTION
|
||||
OPTION 输入.is_produceuse <> ""
|
||||
e.is_produceuse = 输入.is_produceuse
|
||||
ENDOPTION
|
||||
OPTION 输入.workprocedure_id <> ""
|
||||
e.workprocedure_id = 输入.workprocedure_id
|
||||
|
||||
@@ -49,7 +49,24 @@
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
bag.*,
|
||||
bag.bagrecord_id,
|
||||
bag.bag_id,
|
||||
bag.material_id,
|
||||
bag.pcsn,
|
||||
bag.qty_unit_name,
|
||||
bag.storage_qty,
|
||||
bag.seqno,
|
||||
bag.remark,
|
||||
bag.waste_type,
|
||||
bag.return_person,
|
||||
bag.print_times,
|
||||
bag.status,
|
||||
bag.input_time,
|
||||
bag.bucketunique,
|
||||
bag.makeup_optname,
|
||||
bag.makeup_time,
|
||||
bag.print_type,
|
||||
|
||||
mater1.material_code,
|
||||
mater1.material_name,
|
||||
mater1.ext_id,
|
||||
|
||||
@@ -51,17 +51,32 @@
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
br.*,
|
||||
br.bucket_record_id,
|
||||
br.bucketunique,
|
||||
br.storagevehicle_type,
|
||||
br.pcsn,
|
||||
br.ivt_level,
|
||||
br.is_active,
|
||||
br.quality_scode,
|
||||
br.qty_unit_name,
|
||||
br.storage_qty,
|
||||
br.record_order,
|
||||
br.bag_qty,
|
||||
br.remark,
|
||||
br.status,
|
||||
br.create_name,
|
||||
br.create_time,
|
||||
br.storagevehicle_code,
|
||||
br.print_type,
|
||||
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
mater.ext_id,
|
||||
unit.unit_name,
|
||||
point.point_code
|
||||
FROM
|
||||
MD_PB_BucketRecord br
|
||||
LEFT JOIN md_me_materialbase mater ON br.material_id = mater.material_id
|
||||
LEFT JOIN md_pb_measureunit unit ON br.qty_unit_id = unit.measure_unit_id
|
||||
LEFT JOIN sys_user user ON user.user_id = br.create_id
|
||||
LEFT JOIN sch_base_point point ON br.storagevehicle_code = point.vehicle_code and br.storagevehicle_code <> ''
|
||||
WHERE
|
||||
1=1
|
||||
@@ -70,8 +85,7 @@
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_id <> ""
|
||||
(user.username like 输入.create_id or
|
||||
user.nick_name like 输入.create_id)
|
||||
br.create_name like 输入.create_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.point_code <> ""
|
||||
|
||||
@@ -226,15 +226,12 @@ public class ProductplanSumServiceImpl implements ProductplanSumService {
|
||||
dto.setRemark(remark);
|
||||
dto.setTask_code(CodeUtil.getNewCode("PCS_TASK_CODE"));
|
||||
//判断表里有没有此条记录
|
||||
JSONObject jsonObject = planProcTab.query("plan_org_code = '" + plan_org_code + "' and plan_month = '" + plan_month + "' and material_code ='" + material_code + "' and plan_finish_date = '"+plan_finish_date+"'").uniqueResult(0);
|
||||
JSONObject jsonObject = planProcTab.query("plan_org_code = '" + plan_org_code + "' and material_code ='" + material_code + "' and plan_finish_date = '"+plan_finish_date+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonObject)) {
|
||||
//如果是空的就插入两张表
|
||||
//如果是空的就插入处理表
|
||||
planProcTab.insert(JSONObject.parseObject(JSON.toJSONString(dto)));
|
||||
} else {
|
||||
if (!StrUtil.equals(jsonObject.getString("is_proc"), IsProcEnum.GENERATE.getCode())) {
|
||||
//非生成状态 返回错误信息
|
||||
throw new BadRequestException("此月度计划已存在并不可在修改");
|
||||
} else {
|
||||
if (StrUtil.equals(jsonObject.getString("is_proc"), IsProcEnum.GENERATE.getCode())) {
|
||||
//如果是生成状态则将当前记录删除,在重新插入
|
||||
planProcTab.delete(jsonObject);
|
||||
planProcTab.insert(JSONObject.parseObject(JSON.toJSONString(dto)));
|
||||
|
||||
@@ -242,15 +242,12 @@ public class ProductplanprocServiceImpl implements ProductplanprocService {
|
||||
dto.setRemark(remark);
|
||||
dto.setTask_code(CodeUtil.getNewCode("PCS_TASK_CODE"));
|
||||
//判断表里有没有此条记录
|
||||
JSONObject jsonObject = planProcTab.query("plan_org_code = '" + plan_org_code + "' and plan_month = '" + plan_month + "' and material_code ='" + material_code + "' and plan_finish_date = '"+plan_finish_date+"'").uniqueResult(0);
|
||||
JSONObject jsonObject = planProcTab.query("plan_org_code = '" + plan_org_code + "' and material_code ='" + material_code + "' and plan_finish_date = '"+plan_finish_date+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonObject)) {
|
||||
//如果是空的就插入两张表
|
||||
planProcTab.insert(JSONObject.parseObject(JSON.toJSONString(dto)));
|
||||
} else {
|
||||
if (!StrUtil.equals(jsonObject.getString("is_proc"), IsProcEnum.GENERATE.getCode())) {
|
||||
//非生成状态 返回错误信息
|
||||
throw new BadRequestException("此月度计划已存在并不可在修改");
|
||||
} else {
|
||||
if (StrUtil.equals(jsonObject.getString("is_proc"), IsProcEnum.GENERATE.getCode())) {
|
||||
//如果是生成状态则将当前记录删除,在重新插入
|
||||
planProcTab.delete(jsonObject);
|
||||
planProcTab.insert(JSONObject.parseObject(JSON.toJSONString(dto)));
|
||||
|
||||
@@ -281,7 +281,7 @@ public class ProducetaskprocServiceImpl implements ProducetaskprocService {
|
||||
if (ObjectUtil.isEmpty(jsonObject)) {
|
||||
planProcTab.insert(JSONObject.parseObject(JSON.toJSONString(dto)));
|
||||
} else {
|
||||
if (!StrUtil.equals(jsonObject.getString("is_proc"), "2")) {
|
||||
if (StrUtil.equals(jsonObject.getString("is_proc"), "2")) {
|
||||
continue;
|
||||
} else {
|
||||
//如果是生成状态则将当前记录删除,在重新插入
|
||||
|
||||
@@ -118,7 +118,6 @@
|
||||
LEFT JOIN md_pb_classstandard classstandard2 ON classstandard2.class_id = ext.product_series
|
||||
LEFT JOIN PCS_IF_ProductPlanProc ProductPlanProc ON ProductPlanProc.plan_id = pp.plan_id
|
||||
WHERE
|
||||
|
||||
1=1
|
||||
OPTION 输入.status <> ""
|
||||
pp.status = 输入.status
|
||||
|
||||
@@ -400,6 +400,10 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
//是否软废
|
||||
if(MaterOptTypeEnum.RD_AND_PG.getClass_idStr().contains(md_jo.getString("material_type_id"))){
|
||||
JSONObject pro_jo = md_me_producmaterialext.query("material_id='"+jo.getString("material_id")+"'").uniqueResult(0);
|
||||
if(pro_jo ==null){
|
||||
throw new BadRequestException("物料"+jo.getString("material_code")+" "+jo.getString("material_name")+"未设置成品物料扩展信息!");
|
||||
|
||||
}
|
||||
double net_rate = pro_jo.getDouble("net_rate");
|
||||
RF_total = RF_total+jo.getDouble("formula_qty")*pro_jo.getDouble("net_rate")/100.0;
|
||||
}
|
||||
@@ -504,6 +508,9 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
//是否软废
|
||||
if(MaterOptTypeEnum.RD_AND_PG.getClass_idStr().contains(md_jo.getString("material_type_id"))){
|
||||
JSONObject pro_jo = md_me_producmaterialext.query("material_id='"+jo.getString("material_id")+"'").uniqueResult(0);
|
||||
if(pro_jo ==null){
|
||||
throw new BadRequestException("物料"+jo.getString("material_code")+" "+jo.getString("material_name")+"未设置成品物料扩展信息!");
|
||||
}
|
||||
double net_rate = pro_jo.getDouble("net_rate");
|
||||
RF_total = RF_total+jo.getDouble("formula_qty")*pro_jo.getDouble("net_rate")/100.0;
|
||||
}
|
||||
@@ -686,6 +693,9 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
//是否软废
|
||||
if(MaterOptTypeEnum.RD_AND_PG.getClass_idStr().contains(md_jo.getString("material_type_id"))){
|
||||
JSONObject pro_jo = md_me_producmaterialext.query("material_id='"+jo.getString("material_id")+"'").uniqueResult(0);
|
||||
if(pro_jo ==null){
|
||||
throw new BadRequestException("物料"+jo.getString("material_code")+" "+jo.getString("material_name")+"未设置成品物料扩展信息!");
|
||||
}
|
||||
double net_rate = pro_jo.getDouble("net_rate");
|
||||
RF_total = RF_total+jo.getDouble("formula_qty")*pro_jo.getDouble("net_rate")/100.0;
|
||||
}
|
||||
@@ -791,6 +801,9 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
//是否软废
|
||||
if(MaterOptTypeEnum.RD_AND_PG.getClass_idStr().contains(md_jo.getString("material_type_id"))){
|
||||
JSONObject pro_jo = md_me_producmaterialext.query("material_id='"+jo.getString("material_id")+"'").uniqueResult(0);
|
||||
if(pro_jo ==null){
|
||||
throw new BadRequestException("物料"+jo.getString("material_code")+" "+jo.getString("material_name")+"未设置成品物料扩展信息!");
|
||||
}
|
||||
double net_rate = pro_jo.getDouble("net_rate");
|
||||
RF_total = RF_total+jo.getDouble("formula_qty")*pro_jo.getDouble("net_rate")/100.0;
|
||||
}
|
||||
|
||||
28
mes/hd/nladmin-system/src/main/resources/log/LKToMes.xml
Normal file
28
mes/hd/nladmin-system/src/main/resources/log/LKToMes.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE2" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/MesToErp/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>20GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.nl.ext.lk.service.impl.LkToWmsServiceImpl" level="info" additivity="false">
|
||||
<appender-ref ref="FILE2"/>
|
||||
</logger>
|
||||
|
||||
<!-- 打印sql -->
|
||||
</included>
|
||||
@@ -18,6 +18,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<!--引入默认的一些设置-->
|
||||
<include resource="log/XrToMes.xml"/>
|
||||
<include resource="log/MesToErp.xml"/>
|
||||
<include resource="log/LKToMes.xml"/>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
v-model="query.create_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入创建人或工号"
|
||||
placeholder="请输入创建人"
|
||||
style="width: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
|
||||
@@ -342,6 +342,8 @@ export default {
|
||||
this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.fla = false
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
})
|
||||
},
|
||||
// 监听上传失败
|
||||
|
||||
@@ -197,6 +197,8 @@ export default {
|
||||
this.tableData = res
|
||||
this.crud.notify('汇总完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fla = false
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,6 +382,8 @@ export default {
|
||||
this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.fla = false
|
||||
}).catch(() => {
|
||||
this.fla = false
|
||||
})
|
||||
},
|
||||
// 监听上传失败
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation >
|
||||
<crudOperation>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -196,7 +196,7 @@
|
||||
@selection-change="mySelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="workorder_date" min-width="85" label="日期" :formatter="workorder_dateFormat"/>
|
||||
<el-table-column prop="workorder_date" min-width="85" label="日期" :formatter="workorder_dateFormat" />
|
||||
<el-table-column prop="workorder_code" width="130" label="工令号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.workorder_code }}</el-link>
|
||||
@@ -204,22 +204,22 @@
|
||||
</el-table-column>
|
||||
<el-table-column min-width="80" prop="workprocedure_name" label="工序" />
|
||||
<el-table-column min-width="130" prop="worktask_code" label="工序任务号" />
|
||||
<el-table-column :formatter="stateFormat" min-width="70" prop="status" label="状态" />
|
||||
<el-table-column prop="device_name" min-width="100" label="设备"/>
|
||||
<el-table-column prop="material_code" min-width="130" label="物料编码"/>
|
||||
<el-table-column :formatter="stateFormat" min-width="70" prop="status" label="状态" />
|
||||
<el-table-column prop="device_name" min-width="100" label="设备" />
|
||||
<el-table-column prop="material_code" min-width="130" label="物料编码" />
|
||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series_id" label="系列" />
|
||||
<el-table-column prop="pcsn" min-width="80" label="批次"/>
|
||||
<el-table-column prop="workorder_qty" min-width="80" label="重量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="product_qty" min-width="100" label="实际生产重量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="ok_qty" min-width="80" label="合格重量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="qty_unit_name" min-width="80" label="单位"/>
|
||||
<el-table-column prop="planstart_time" min-width="140" label="计划开始时间"/>
|
||||
<el-table-column prop="planend_time" min-width="140" label="计划结束时间"/>
|
||||
<el-table-column prop="start_time" min-width="140" label="实际开始时间"/>
|
||||
<el-table-column prop="end_time" min-width="140" label="实际结束时间"/>
|
||||
<el-table-column prop="start_name" min-width="80" label="开始人"/>
|
||||
<el-table-column prop="end_name" min-width="80" label="结束人"/>
|
||||
<el-table-column min-width="100" prop="remark" label="备注" />
|
||||
<el-table-column prop="pcsn" min-width="80" label="批次" />
|
||||
<el-table-column prop="workorder_qty" min-width="80" label="重量" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="product_qty" min-width="100" label="实际生产重量" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="ok_qty" min-width="80" label="合格重量" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="qty_unit_name" min-width="80" label="单位" />
|
||||
<el-table-column prop="planstart_time" min-width="140" label="计划开始时间" />
|
||||
<el-table-column prop="planend_time" min-width="140" label="计划结束时间" />
|
||||
<el-table-column prop="start_time" min-width="140" label="实际开始时间" />
|
||||
<el-table-column prop="end_time" min-width="140" label="实际结束时间" />
|
||||
<el-table-column prop="start_name" min-width="80" label="开始人" />
|
||||
<el-table-column prop="end_name" min-width="80" label="结束人" />
|
||||
<el-table-column min-width="100" prop="remark" label="备注" />
|
||||
<el-table-column prop="finish_type" label="完成方式" min-width="80" :formatter="finish_typeFormat" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -241,12 +241,12 @@ import pagination from '@crud/Pagination'
|
||||
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/produce/workorder/ViewDialog'
|
||||
import print2Dialog from '@/views/wms/pdm/produce/worktask/print2Dialog'
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import crudseriesProcessRoute from "@/api/wms/pdm/seriesProcessRoute";
|
||||
import Date from "@/utils/datetime";
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'worktask',
|
||||
name: 'Worktask',
|
||||
components: { print2Dialog, ViewDialog, DeviceDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '工令工序任务', idField: 'worktask_id', url: 'api/worktask',
|
||||
@@ -273,13 +273,13 @@ export default {
|
||||
print1_flag: true,
|
||||
print2_flag: true,
|
||||
mstrow: {},
|
||||
workProcedureList:[],
|
||||
workProcedureList: [],
|
||||
dtlShow: false,
|
||||
viewShow: false,
|
||||
printShow: false,
|
||||
currentRow: null,
|
||||
checkrows: [],
|
||||
XLList:[]
|
||||
XLList: []
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
@@ -295,7 +295,7 @@ export default {
|
||||
crudseriesProcessRoute.getXLlist2().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
this.crud.query.createTime= [new Date().daysAgo(2), new Date()]
|
||||
this.crud.query.createTime = [new Date().daysAgo(2), new Date()]
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
@@ -319,13 +319,13 @@ export default {
|
||||
this.print1_flag = false
|
||||
this.print2_flag = false
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].status !== '10' || rows.length !== 1) {
|
||||
if (rows[i].status !== '10' || rows.length !== 1) {
|
||||
this.device_flag = true
|
||||
}
|
||||
if (rows[i].status !== '10' || rows[i].device_id==='') {
|
||||
if (rows[i].status !== '10' || rows[i].device_id === '') {
|
||||
this.check_flag = true
|
||||
}
|
||||
if (rows[i].status !== '20' || rows[i].device_id==='') {
|
||||
if (rows[i].status !== '20' || rows[i].device_id === '') {
|
||||
this.begin_flag = true
|
||||
}
|
||||
if (rows[i].status !== '30') {
|
||||
@@ -334,14 +334,14 @@ export default {
|
||||
if (rows[i].status === '99') {
|
||||
this.error_flag = true
|
||||
}
|
||||
if (rows[i].order_status < '40' || rows.length !== 1) {
|
||||
if (rows[i].order_status < '40' || rows.length !== 1) {
|
||||
this.print1_flag = true
|
||||
}
|
||||
if (rows.length !== 1 || "GX003,GX004,GX009,GX010,GX011".indexOf(rows[i].workprocedure_code)===-1) {
|
||||
if (rows.length !== 1 || 'GX003,GX004,GX009,GX010,GX011'.indexOf(rows[i].workprocedure_code) === -1) {
|
||||
this.print2_flag = true
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
this.handleCurrentChange()
|
||||
}
|
||||
},
|
||||
@@ -375,14 +375,14 @@ export default {
|
||||
this.print1_flag = true
|
||||
this.print2_flag = true
|
||||
},
|
||||
deviceset(){
|
||||
deviceset() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length !== 1 ){
|
||||
if (this.checkrows.length !== 1) {
|
||||
this.crud.notify('只能勾选一条记录!')
|
||||
return false
|
||||
}
|
||||
this.mstrow = this.checkrows.pop()
|
||||
this.$refs.child.getMsg(this.mstrow.workprocedure_id)
|
||||
this.$refs.child.getMsg(this.mstrow.workprocedure_id, '1')
|
||||
this.dtlShow = true
|
||||
},
|
||||
tableChanged(row) {
|
||||
@@ -397,57 +397,56 @@ export default {
|
||||
},
|
||||
openWork() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
worktask.openWork({ rows: this.checkrows}).then(res => {
|
||||
worktask.openWork({ rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
worktask.submit({ 'status': '20', rows: this.checkrows}).then(res => {
|
||||
worktask.submit({ 'status': '20', rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
confirmWork() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
worktask.confirmWork({ rows: this.checkrows}).then(res => {
|
||||
worktask.confirmWork({ rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
confirmError() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
this.$confirm('是否继续操作?')
|
||||
.then(_ => {
|
||||
worktask.confirmError({ rows: this.checkrows}).then(res => {
|
||||
worktask.confirmError({ rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.querytable()
|
||||
})
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
|
||||
},
|
||||
print1(){
|
||||
print1() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length !== 1 ){
|
||||
if (this.checkrows.length !== 1) {
|
||||
this.crud.notify('只能勾选一条记录!')
|
||||
return false
|
||||
}
|
||||
@@ -457,9 +456,9 @@ export default {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
print2(){
|
||||
print2() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length !== 1 ){
|
||||
if (this.checkrows.length !== 1) {
|
||||
this.crud.notify('只能勾选一条记录!')
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ export default {
|
||||
}
|
||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||
if (!this.tableDtl[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
this.crud.notify('尚有未完成编辑的物料,明细序号为' + (i + 1) + '请检查!')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ export default {
|
||||
}
|
||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||
if (!this.tableDtl[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
this.crud.notify('尚有未完成编辑的主桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -1012,7 +1012,7 @@ export default {
|
||||
}
|
||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||
if (!this.tableDtl[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
this.crud.notify('尚有未完成编辑的主桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -1077,7 +1077,7 @@ export default {
|
||||
}
|
||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||
if (!this.tableDtl[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
this.crud.notify('尚有未完成编辑的主桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ export default {
|
||||
}
|
||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||
if (!this.tableDtl[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的副桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
this.crud.notify('尚有未完成编辑的主桶物料,明细序号为' + (i + 1) + '请检查!')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,22 +19,22 @@
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/> </el-col>
|
||||
<el-col :span="6" >
|
||||
<el-select
|
||||
v-model="query.workprocedure_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
v-show="disablePro"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workProcedureList"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-col :span="6">
|
||||
<el-select
|
||||
v-show="disablePro"
|
||||
v-model="query.workprocedure_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workProcedureList"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<rrOperation />
|
||||
@@ -79,7 +79,7 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudDeviceinfo from '@/api/wms/basedata/em/deviceinfo'
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
|
||||
export default {
|
||||
name: 'DeviceDialog',
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
url: 'api/deviceinfo',
|
||||
idField: 'device_id',
|
||||
sort: '',
|
||||
query: { device_code: '', workprocedure_id: '' }
|
||||
query: { device_code: '', workprocedure_id: '', is_produceuse: '' }
|
||||
})
|
||||
},
|
||||
dicts: ['IS_OR_NOT'],
|
||||
@@ -132,9 +132,10 @@ export default {
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
getMsg(msg, msg2) {
|
||||
this.disablePro = false
|
||||
this.crud.query.workprocedure_id = msg
|
||||
this.crud.query.is_produceuse = msg2
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formatProduceuserName(row, column) {
|
||||
|
||||
Reference in New Issue
Block a user