This commit is contained in:
2022-08-24 10:33:30 +08:00
34 changed files with 289 additions and 71 deletions

View File

@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicebomService;
import org.nl.wms.basedata.em.service.dto.DevicebomDto;
import org.nl.wms.basedata.master.service.ClassstandardService;
@@ -106,14 +107,10 @@ public class DevicebomServiceImpl implements DevicebomService {
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
String device_bom_code = whereJson.getString("device_bom_code");
JSONObject jsonObject = bomMstTab.query("device_bom_code = '" + device_bom_code + "' and is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此编码已存在");
// 插入主表
JSONObject jsonMst = new JSONObject();
jsonMst.put("device_bom_id", IdUtil.getSnowflake(1,1).nextId());
jsonMst.put("device_bom_code",device_bom_code);
jsonMst.put("device_bom_code", CodeUtil.getNewCode("DEVICE_BOM_CODE"));
jsonMst.put("material_name",whereJson.getString("material_name"));
jsonMst.put("material_type_id",whereJson.get("material_type_id"));
jsonMst.put("detail_count",tableData.size());
@@ -152,7 +149,6 @@ public class DevicebomServiceImpl implements DevicebomService {
// 修改主表
JSONObject jsonMst = bomMstTab.query("device_bom_id ='" + device_bom_id + "'").uniqueResult(0);
jsonMst.put("device_bom_code",whereJson.getString("device_bom_code"));
jsonMst.put("material_name",whereJson.getString("material_name"));
jsonMst.put("material_type_id",whereJson.get("material_type_id"));
jsonMst.put("detail_count",tableData.size());
@@ -177,9 +173,6 @@ public class DevicebomServiceImpl implements DevicebomService {
bomDtlTab.insert(jsonDtl);
}
String device_bom_code = whereJson.getString("device_bom_code");
JSONArray jsonObject = bomMstTab.query("device_bom_code = '" + device_bom_code + "' and is_delete = '0'").getResultJSONArray(0);
if (jsonObject.size() > 1) throw new BadRequestException("此编码已存在");
}
@Override

View File

@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicefaultclassService;
import org.nl.wms.basedata.em.service.dto.DevicefaultclassDto;
import org.nl.wms.basedata.master.service.ClassstandardService;
@@ -101,13 +102,9 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
WQLObject wo = WQLObject.getWQLObject("em_bi_devicefaultclass");
String device_faultclass_code = whereJson.getString("device_faultclass_code");
JSONObject jsonObject = wo.query("device_faultclass_code = '" + device_faultclass_code + "' and is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此编码已存在");
JSONObject json = new JSONObject();
json.put("device_faultclass_id",IdUtil.getSnowflake(1,1).nextId());
json.put("device_faultclass_code", whereJson.getString("device_faultclass_code"));
json.put("device_faultclass_code", CodeUtil.getNewCode("DEVICE_FACLASS_CODE"));
json.put("device_faultclass_name", whereJson.getString("device_faultclass_name"));
json.put("material_type_id", whereJson.getString("material_type_id"));
json.put("solutions", whereJson.getString("solutions"));
@@ -126,7 +123,6 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
WQLObject wo = WQLObject.getWQLObject("em_bi_devicefaultclass");
JSONObject json = wo.query("device_faultclass_id = '" + whereJson.getString("device_faultclass_id") + "'").uniqueResult(0);
json.put("device_faultclass_code", whereJson.getString("device_faultclass_code"));
json.put("device_faultclass_name", whereJson.getString("device_faultclass_name"));
json.put("material_type_id", whereJson.getString("material_type_id"));
json.put("solutions", whereJson.getString("solutions"));
@@ -136,10 +132,6 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
json.put("update_time", DateUtil.now());
wo.update(json);
String device_faultclass_code = whereJson.getString("device_faultclass_code");
JSONArray jsonObject = wo.query("device_faultclass_code = '" + device_faultclass_code + "' and is_delete = '0'").getResultJSONArray(0);
if (jsonObject.size() > 1) throw new BadRequestException("此编码已存在");
}
@Override

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicemaintenanceitemsService;
import org.nl.wms.basedata.em.service.dto.DevicemaintenanceitemsDto;
import org.nl.wql.WQL;
@@ -94,7 +95,7 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
JSONObject json = new JSONObject();
json.put("maint_item_id", IdUtil.getSnowflake(1,1).nextId());
json.put("maint_item_code", whereJson.getString("maint_item_code"));
json.put("maint_item_code", CodeUtil.getNewCode("MAINT_ITEM_CODE"));
json.put("maint_item_name", whereJson.getString("maint_item_name"));
json.put("item_level", whereJson.getString("item_level"));
json.put("contents", whereJson.getString("contents"));
@@ -119,7 +120,6 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
WQLObject wo = WQLObject.getWQLObject("em_bi_devicemaintenanceitems");
JSONObject json = wo.query("maint_item_id = '" + whereJson.getString("maint_item_id") + "'").uniqueResult(0);
json.put("maint_item_code", whereJson.getString("maint_item_code"));
json.put("maint_item_name", whereJson.getString("maint_item_name"));
json.put("item_level", whereJson.getString("item_level"));
json.put("contents", whereJson.getString("contents"));

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicerepairitemsService;
import org.nl.wms.basedata.em.service.dto.DevicerepairitemsDto;
import org.nl.wql.WQL;
@@ -90,7 +91,7 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
JSONObject json = new JSONObject();
json.put("repair_item_id", IdUtil.getSnowflake(1,1).nextId());
json.put("repair_item_code", whereJson.getString("repair_item_code"));
json.put("repair_item_code", CodeUtil.getNewCode("REPAIR_ITEM_CODE"));
json.put("repair_item_name", whereJson.getString("repair_item_name"));
json.put("requirement", whereJson.getString("requirement"));
json.put("remark", whereJson.getString("remark"));
@@ -115,7 +116,6 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairitems");
JSONObject json = wo.query("repair_item_id = '" + whereJson.getString("repair_item_id") + "'").uniqueResult(0);
json.put("repair_item_code", whereJson.getString("repair_item_code"));
json.put("repair_item_name", whereJson.getString("repair_item_name"));
json.put("requirement", whereJson.getString("requirement"));
json.put("remark", whereJson.getString("remark"));

View File

@@ -436,7 +436,7 @@ public class PhysicalMstServiceImpl implements PhysicalMstService {
JSONObject JsonValue = phyDtlTab.query("inspection_item_id = '" + inspection_item_id + "' and inspection_id = '" + inspection_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(JsonValue)) num = num + 1;
}
if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
// if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
/*
* 理化报告是否有效: 有效更新一级质检单以及一系列操作,

View File

@@ -16,10 +16,12 @@ import org.nl.exception.BadRequestException;
import org.nl.modules.security.service.dto.JwtUserDto;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
import org.nl.wms.basedata.master.service.MaterialbaseService;
import org.nl.wms.ql.Enum.QlBillStatusEnum;
import org.nl.wms.ql.service.InspectionsheetmstService;
import org.nl.wms.ql.service.PhysicalMstService;
import org.nl.wms.ql.service.WorkproceduremstService;
import org.nl.wms.ql.service.dto.WorkproceduremstDto;
import org.nl.wql.WQL;
@@ -338,8 +340,12 @@ public class WorkproceduremstServiceImpl implements WorkproceduremstService {
public void confirm(JSONObject whereJson) {
String workprocedure_uuid = whereJson.getString("workprocedure_uuid");
WQLObject mstTab = WQLObject.getWQLObject("QL_TEST_WorkProcedureMst"); // 工序质检单主表
WQLObject sheetMstTab = WQLObject.getWQLObject("QL_TEST_InspectionSheetMst"); // 质检单主表
WQLObject sheetDtlTab = WQLObject.getWQLObject("QL_TEST_InspectionSheetDtl"); // 质检单明细表
WQLObject phyMstTab = WQLObject.getWQLObject("QL_TEST_PhysicalMst"); // 理化报告主表
WQLObject workTaskTab = WQLObject.getWQLObject("PDM_BI_WorkTask"); // 工令工序任务表
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
@@ -358,9 +364,8 @@ public class WorkproceduremstServiceImpl implements WorkproceduremstService {
JSONObject JsonValue = WQLObject.getWQLObject("QL_TEST_WorkProcedureDtl").query("inspection_item_id = '" + inspection_item_id + "' and inspection_id = '" + whereJson.getString("inspection_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(JsonValue)) num = num + 1;
}
if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
// if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
WQLObject mstTab = WQLObject.getWQLObject("QL_TEST_WorkProcedureMst");
JSONObject jsonMst = mstTab.query("inspection_id = '" + whereJson.getString("inspection_id") + "'").uniqueResult(0);
jsonMst.put("bill_status",QlBillStatusEnum.FINISH.getCode());
jsonMst.put("confirm_optid",currentUserId);
@@ -385,6 +390,40 @@ public class WorkproceduremstServiceImpl implements WorkproceduremstService {
jsonSheetMst.put("confirm_optname", nickName);
jsonSheetMst.put("confirm_time", now);
sheetMstTab.update(jsonSheetMst);
/*
* 如果此工令工序任务下的所有工序质检单都为不合格:
* 判断条件:此工令工序任务必须为完成状态。
* 1.如果存在理化报告则确认理化报告为不合格,
* 2.确认一级质检单为不合格
*/
// 1. 查询是否存在此物料、此批次、此工序、并且已完成的工序任务
String material_id = jsonMst.getString("material_id");
String pcsn = jsonMst.getString("pcsn");
JSONObject jsonWorkTask = workTaskTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn + "' and workprocedure_id = '" + workprocedure_uuid + "' and status = '99'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonWorkTask)) {
// 2.不为空则查出此工序任务下的所有 工序质检单,判断所有的质检单是否都为不合格
JSONArray mstArr = mstTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn + "' and workprocedure_uuid = '" + workprocedure_uuid + "'").getResultJSONArray(0);
int flag = 0;
for (int i = 0; i < mstArr.size(); i++) {
JSONObject json = mstArr.getJSONObject(i);
if (StrUtil.equals(json.getString("result"), "02")) {
flag += 1;
}
}
if (flag == mstArr.size()) {
// 3.都不合格则判断此物料、批次是否存在理化报告;存在则确认理化报告
JSONObject jsonPhyMst = phyMstTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn + "' and is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonPhyMst)) {
// 4.不为空、确认理化报告
jsonPhyMst.put("result", "02");
jsonPhyMst.put("grade", jsonMst.getString("grade"));
jsonPhyMst.put("bill_status", QlBillStatusEnum.TEST_LABORATORY.getCode());
phyMstTab.update(jsonPhyMst);
SpringContextHolder.getBean(PhysicalMstService.class).confirm(jsonPhyMst);
}
}
}
}
@Override

View File

@@ -11,6 +11,8 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
/**
@@ -38,4 +40,10 @@ public class RawUatWcQueryController {
public ResponseEntity<Object> getHeader(@PathVariable String material_type_id) {
return new ResponseEntity<>(rawUatWcQueryService.getHeader(material_type_id), HttpStatus.OK);
}
@ApiOperation("导出数据")
@GetMapping(value = "/download")
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
rawUatWcQueryService.download(whereJson, response);
}
}

View File

@@ -3,6 +3,8 @@ package org.nl.wms.statistics.service;
import com.alibaba.fastjson.JSONArray;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
/**
@@ -24,4 +26,6 @@ public interface RawUatWcQueryService {
* 获取表头
*/
JSONArray getHeader( String material_type_id);
void download(Map whereJson, HttpServletResponse response) throws IOException;
}

View File

@@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.FileUtil;
import org.nl.wms.basedata.master.service.ClassstandardService;
import org.nl.wms.statistics.service.PhysicalQueryService;
import org.nl.wms.statistics.service.RawUatWcQueryService;
@@ -17,8 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
@Service
@RequiredArgsConstructor
@@ -167,4 +169,110 @@ public class RawUatWcQueryServiceImpl implements RawUatWcQueryService {
jonsResuftArr.add(jsonResuft9);
return jonsResuftArr;
}
@Override
public void download(Map whereJson, HttpServletResponse response) throws IOException {
String material_code = MapUtil.getStr(whereJson, "material_code");
String pcsn = MapUtil.getStr(whereJson, "pcsn");
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("begin_time", MapUtil.getStr(whereJson,"begin_time"));
map.put("end_time", MapUtil.getStr(whereJson,"end_time"));
map.put("receive_code", MapUtil.getStr(whereJson,"receive_code"));
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
map.put("bill_status", MapUtil.getStr(whereJson,"bill_status"));
if (!ObjectUtil.isEmpty(material_code)) {
//处理转义字符
if (material_code.contains("\\"))material_code=material_code.replace("\\","\\\\\\");
map.put("material_code", "%" + material_code + "%");
}
if (!StrUtil.isEmpty(material_type_id)) {
map.put("material_type_id", material_type_id);
String classIds = classstandardService.getChildIdStr(material_type_id);
map.put("classIds", classIds);
}
JSONArray content = WQL.getWO("RaUatWc_query_01").addParamMap(map).process().getResultJSONArray(0);
JSONArray array = new JSONArray();
for (int i = 0; i < content.size(); i++) {
JSONObject jsonObject = content.getJSONObject(i);
String pcsn1 = jsonObject.getString("pcsn");
String material_id = jsonObject.getString("material_id");
String result = jsonObject.getString("result");
JSONObject jsonResuft = new JSONObject();
jsonResuft.put("1", jsonObject.getString("material_code"));
jsonResuft.put("2", jsonObject.getString("material_name"));
jsonResuft.put("3", jsonObject.getString("pcsn"));
jsonResuft.put("4",NumberUtil.decimalFormat("#.000", jsonObject.getDoubleValue("receive_qty")));
// 厂家
JSONObject jsonSuup = WQL.getWO("RaUatWc_query_01").addParam("flag", "6").addParam("pcsn", pcsn1).addParam("material_id", material_id).process().uniqueResult(0);
jsonResuft.put("5", jsonSuup.getString("supp_name"));
jsonResuft.put("remark", jsonObject.getString("remark"));
jsonResuft.put("biz_date", jsonObject.getString("biz_date"));
if (StrUtil.equals(result, "01")) {
jsonResuft.put("result", "合格");
} else if (StrUtil.equals(result, "02")) {
jsonResuft.put("result", "不合格");
} else if (StrUtil.equals(result, "03")) {
jsonResuft.put("result", "紧急放行");
}
// 根据物料批次查找厂家质保书对应的项点
JSONArray jsonFaArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "3").addParam("pcsn", pcsn1).addParam("material_id", material_id).process().getResultJSONArray(0);
for (int j = 0; j < jsonFaArr.size(); j++) {
JSONObject jsonItem = jsonFaArr.getJSONObject(j);
String inspection_item_id = jsonItem.getString("inspection_item_id");
double value = jsonItem.getDoubleValue("value");
if (value > 0 && value < 1){
jsonResuft.put(inspection_item_id,"0"+NumberUtil.decimalFormat("#.00", value));
} else if (value == 0){
jsonResuft.put(inspection_item_id,"0.00");
} else {
jsonResuft.put(inspection_item_id,NumberUtil.decimalFormat("#.00", value));
}
}
// 根据物料批次查找理化单对应的项点
JSONArray jsonPhyArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "4").addParam("pcsn", pcsn1).addParam("material_id", material_id).process().getResultJSONArray(0);
for (int k = 0; k < jsonPhyArr.size(); k++) {
JSONObject jsonItem = jsonPhyArr.getJSONObject(k);
String inspection_item_id = jsonItem.getString("inspection_item_id");
double value = jsonItem.getDoubleValue("value");
if (value > 0 && value < 1) {
jsonResuft.put(inspection_item_id,"0"+NumberUtil.decimalFormat("#.00", value));
} else if (value == 0){
jsonResuft.put(inspection_item_id,"0.00");
} else {
jsonResuft.put(inspection_item_id,NumberUtil.decimalFormat("#.00", value));
}
}
array.add(jsonResuft);
}
List<Map<String, Object>> list = new ArrayList<>();
for (int i = 0; i < array.size(); i++) {
JSONObject json = array.getJSONObject(i);
Map<String, Object> map_dtl = new LinkedHashMap<>();
map_dtl.put("物料编码",json.getString("1"));
map_dtl.put("物料名称",json.getString("2"));
map_dtl.put("批号",json.getString("3"));
map_dtl.put("重量",json.getString("4"));
map_dtl.put("厂家",json.getString("5"));
JSONArray jsonArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "5").process().getResultJSONArray(0);
for (int j = 0; j < jsonArr.size(); j++) {
JSONObject jsonObject = jsonArr.getJSONObject(j);
map_dtl.put(jsonObject.getString("inspection_item_name"),"");
String inspection_item_id = jsonObject.getString("inspection_item_id");
if (ObjectUtil.isNotEmpty(json.getString(inspection_item_id))) {
map_dtl.put(jsonObject.getString("inspection_item_name"),json.getString(inspection_item_id));
}
}
map_dtl.put("工艺实验处理意见",json.getString("remark"));
map_dtl.put("工艺报告日期",json.getString("biz_date"));
map_dtl.put("总结论",json.getString("result"));
list.add(map_dtl);
}
FileUtil.downloadExcel(list, response);
}
}

View File

@@ -34,8 +34,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="BOM编码" prop="device_bom_code">
<el-input v-model="form.device_bom_code" style="width: 250px;" :disabled="crud.status.view > 0" />
<el-form-item label="BOM编码">
<el-input v-model="form.device_bom_code" style="width: 250px;" disabled placeholder="系统生成" />
</el-form-item>
</el-col>
@@ -182,9 +182,6 @@ export default {
material_type_id: [
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
],
device_bom_code: [
{ required: true, message: '设备BOM编码不能为空', trigger: 'blur' }
],
material_name: [
{ required: true, message: '设备BOM名称不能为空', trigger: 'blur' }
]

View File

@@ -41,10 +41,9 @@
<el-row>
<el-col span="12">
<el-form-item label="故障编码:" prop="device_faultclass_code">
<el-input v-model="form.device_faultclass_code" style="width: 280px;" />
<el-input v-model="form.device_faultclass_name" style="width: 280px;" disabled placeholder="系统生成" />
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="故障名称:" prop="device_faultclass_name">
<el-input v-model="form.device_faultclass_name" style="width: 280px;" />
@@ -72,6 +71,7 @@
<el-input v-model="form.solutions" style="width: 650px;" rows="2" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row>
@@ -154,9 +154,6 @@ export default {
permission: {
},
rules: {
device_faultclass_code: [
{ required: true, message: '故障编码不能为空', trigger: 'blur' }
],
device_faultclass_name: [
{ required: true, message: '故障名称不能为空', trigger: 'blur' }
],

View File

@@ -58,8 +58,8 @@
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
<el-row>
<el-col span="12">
<el-form-item label="保养项目编码:" prop="maint_item_code">
<el-input v-model="form.maint_item_code" style="width: 230px;" />
<el-form-item label="保养项目编码:">
<el-input v-model="form.maint_item_code" style="width: 230px;" disabled placeholder="系统生成" />
</el-form-item>
</el-col>
<el-col span="12">
@@ -83,7 +83,7 @@
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="备注:">
<el-form-item label="保养实施人:">
<el-input v-model="form.remark" style="width: 230px;" />
</el-form-item>
</el-col>
@@ -128,7 +128,7 @@
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
<el-table-column prop="acceptancecriteria" label="验收标准" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" />
<el-table-column prop="remark" label="保养实施人" />
<el-table-column prop="create_name" label="创建人姓名" />
<el-table-column prop="create_time" label="创建时间" width="150px"/>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
@@ -184,9 +184,6 @@ export default {
permission: {
},
rules: {
maint_item_code: [
{ required: true, message: '保养项目编码不能为空', trigger: 'blur' }
],
maint_item_name: [
{ required: true, message: '保养项目名称不能为空', trigger: 'blur' }
],

View File

@@ -39,8 +39,8 @@
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
<el-row>
<el-col span="12">
<el-form-item label="维修项目编码:" prop="repair_item_code">
<el-input v-model="form.repair_item_code" style="width: 200px;" />
<el-form-item label="维修项目编码:">
<el-input v-model="form.repair_item_code" style="width: 200px;" disabled placeholder="系统生成" />
</el-form-item>
</el-col>
<el-col span="12">
@@ -129,9 +129,6 @@ export default {
permission: {
},
rules: {
repair_item_code: [
{ required: true, message: '设备维修项目编码不能为空', trigger: 'blur' }
],
repair_item_name: [
{ required: true, message: '设备维修项目名称不能为空', trigger: 'blur' }
],

View File

@@ -126,8 +126,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="外部编码" prop="extend_code">
<label slot="label">外部编码:</label>
<el-form-item label="内部自编号" prop="extend_code">
<label slot="label">内部自编号:</label>
<el-input v-model="form.extend_code" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="资产编码" prop="assets_code">

View File

@@ -111,8 +111,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="外部编码" prop="extend_code">
<label slot="label">外部编码:</label>
<el-form-item label="内部自编号" prop="extend_code">
<label slot="label">内部自编号:</label>
<el-input v-model="form.extend_code" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="资产编码" prop="assets_code">

View File

@@ -199,7 +199,6 @@
<udOperation
:data="scope.row"
:permission="permission"
:disabled-edit="canUd(scope.row)"
:disabled-dle="canUd(scope.row)"
/>
</template>
@@ -211,7 +210,7 @@
</template>
</el-table-column>
<el-table-column prop="device_name" min-width="130" label="设备名称"/>
<el-table-column prop="extend_code" min-width="130" label="外部编码"/>
<el-table-column prop="extend_code" min-width="130" label="内部自编号"/>
<el-table-column prop="device_model" min-width="130" label="设备型号"/>
<el-table-column prop="device_spec" min-width="130" label="设备规格"/>
<el-table-column prop="material_type_name" min-width="80" label="设备类别" />

View File

@@ -99,7 +99,7 @@
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@input="onInput()"
@change="crud.toQuery"
@change="mytoQuery"
/>
</el-form-item>
<rrOperation />
@@ -279,6 +279,7 @@ export default {
printShow: false,
currentRow: null,
checkrows: [],
query_flag: true,
XLList: []
}
},
@@ -296,12 +297,26 @@ export default {
this.XLList = res
})
this.crud.query.createTime = [new Date().daysAgo(2), new Date()]
this.crud.toQuery()
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
if(this.query_flag){
this.crud.query.begin_time = (new Date().daysAgo(2)).toISOString()
this.crud.query.end_time = (new Date()).toISOString()
this.query_flag = false
}
this.handleCurrentChange()
},
mytoQuery(array1){
if(array1 === null){
this.crud.query.begin_time = ''
this.crud.query.end_time = ''
}else{
this.crud.query.begin_time = array1[0]
this.crud.query.end_time = array1[1]
}
this.crud.toQuery()
},
toView(index, row) {
this.mstrow = row
this.viewShow = true

View File

@@ -156,8 +156,8 @@ export default {
LODOP.ADD_PRINT_TEXT('43mm', '65mm', '80mm', '27mm', '桶号:' + item.bucketunique + '')
LODOP.ADD_PRINT_TEXT('59mm', '6mm', '140mm', '27mm', '编码:' + item.material_code + '')
LODOP.ADD_PRINT_TEXT('85mm', '6mm', '140mm', '27mm', '牌号:' + item.old_mark + '')
LODOP.ADD_PRINT_TEXT('72mm', '6mm', '140mm', '27mm', '名称:' + item.material_name + '')
LODOP.ADD_PRINT_TEXT('72mm', '6mm', '140mm', '27mm', '牌号:' + item.old_mark + '')
LODOP.ADD_PRINT_TEXT('85mm', '6mm', '140mm', '27mm', '名称:' + item.material_name + '')
LODOP.ADD_PRINT_TEXT('85mm', '110mm', '60mm', '27mm', '序号:' + item.order_no + '')
// LODOP.PREVIEW()// 预览
LODOP.PRINT()// 打印

View File

@@ -475,12 +475,14 @@ export default {
const data = this.form1.tableData
var flag = 0
for (var row of data) {
if (!row.value) {
flag = flag + 1
if (row.up_limit !== '') {
if (!row.value) {
flag = flag + 1
}
}
}
// 如果检测值一项没填则提示是否继续
if (flag === data.length) {
// 如果检测值一项没填则提示是否继续 (在上限下限有值的情况下)
if (flag > 0) {
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

View File

@@ -481,12 +481,14 @@ export default {
const data = this.form1.tableData
var flag = 0
for (var row of data) {
if (!row.value) {
flag = flag + 1
if (row.up_limit !== '') {
if (!row.value) {
flag = flag + 1
}
}
}
// 如果检测值一项没填则提示是否继续
if (flag === data.length) {
// 如果检测值一项没填则提示是否继续 (在上限下限有值的情况下)
if (flag > 0) {
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

View File

@@ -270,6 +270,39 @@ export default {
count() {
},
sure() {
const msg = '是否继续!'
const rows = this.form.tableData
var flag = 0
for (var row of rows) {
if (row.up_limit !== '') {
if (!row.value) {
flag = flag + 1
}
}
}
const data = this.form
if (flag > 0) {
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudWorkproceduremst.sure(data).then(res => {
this.$emit('update:dialogShow', false)
this.crud.toQuery()
this.crud.notify('录入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
} else {
crudWorkproceduremst.sure(data).then(res => {
this.$emit('update:dialogShow', false)
this.crud.toQuery()
this.crud.notify('录入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}
},
sure2() {
const rows = this.form.tableData
var flag = 0
for (var row of rows) {

View File

@@ -65,7 +65,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产负责人" prop="product_person_name">
<el-form-item label="生产配合人" prop="product_person_name">
<el-input v-model="form.product_person_name" style="width: 200px;"/>
</el-form-item>
</el-col>

View File

@@ -53,6 +53,7 @@
v-loading="crud.loading"
:data="crud.data"
size="mini"
height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>

View File

@@ -188,6 +188,7 @@
v-loading="crud.loading"
size="mini"
:data="crud.data"
height="420"
style="width: 100%;"
:highlight-current-row="true"
@selection-change="crud.selectionChangeHandler"

View File

@@ -151,6 +151,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"

View File

@@ -57,6 +57,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"

View File

@@ -101,6 +101,7 @@
ref="table"
v-loading="crud.loading"
size="mini"
height="420"
:data="crud.data"
style="width: 100%;"
:highlight-current-row="true"

View File

@@ -119,6 +119,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"

View File

@@ -68,6 +68,7 @@
<!--表格渲染-->
<el-table
ref="table"
height="420"
v-loading="crud.loading"
:data="crud.data"
size="mini"

View File

@@ -52,6 +52,7 @@
v-loading="crud.loading"
:data="crud.data"
size="mini"
height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>

View File

@@ -63,6 +63,7 @@
v-loading="crud.loading"
:data="crud.data"
size="mini"
height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>

View File

@@ -74,13 +74,25 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
@@ -104,6 +116,8 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
export default {
name: 'RawUatCbQuery',
@@ -159,6 +173,17 @@ export default {
},
hand(value) {
this.crud.toQuery()
},
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
download('/api/rawUatWcQuery/download', this.crud.query).then(result => {
downloadFile(result, '原材料碳化钨', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
}
}
}

View File

@@ -81,7 +81,7 @@
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission"/>
<!--表格渲染-->
<el-table ref="table" show-summary :summary-method="getSum" v-loading="crud.loading" :data="crud.data" size="mini"
<el-table ref="table" show-summary :summary-method="getSum" height="420" v-loading="crud.loading" :data="crud.data" size="mini"
style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column prop="class_name" label="物料分类"/>
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip/>

View File

@@ -52,6 +52,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"