Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -227,6 +227,7 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
WQLObject PDM_BI_WorkOrder = WQLObject.getWQLObject("PDM_BI_WorkOrder");
|
||||
WQLObject PDM_BI_Formula = WQLObject.getWQLObject("PDM_BI_Formula");
|
||||
WQLObject PDM_BI_WorkTask = WQLObject.getWQLObject("PDM_BI_WorkTask");
|
||||
WQLObject PDM_BI_WorkTaskJob = WQLObject.getWQLObject("PDM_BI_WorkTaskJob");
|
||||
WQLObject PDM_BI_ProduceProcessRoute = WQLObject.getWQLObject("pdm_bi_productprocessroute");
|
||||
@@ -256,6 +257,11 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
|
||||
if (jsonMst == null) {
|
||||
throw new BadRequestException(jo.getString("workorder_code") + "当前工令记录状态异常,操作失败!");
|
||||
}
|
||||
|
||||
JSONObject Formula = PDM_BI_Formula.query("workorder_id ='" + jo.getString("workorder_id") + "' and is_delete = '0' and is_audit='0' ").uniqueResult(0);
|
||||
if (Formula != null) {
|
||||
throw new BadRequestException(jo.getString("workorder_code") + "工令对应配方未审核,操作失败!");
|
||||
}
|
||||
String nowStatus = jsonMst.getString("status");
|
||||
JSONObject Route = PDM_BI_ProduceProcessRoute.query("is_delete='0' and productprocess_status='20' and material_id='" + jsonMst.getString("material_id") + "'").uniqueResult(0);
|
||||
if (Route == null) {
|
||||
|
||||
@@ -58,6 +58,14 @@ public class FormulaController {
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||
return new ResponseEntity<>(formulaService.queryAll(whereJson,page),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/audit")
|
||||
@Log("保存")
|
||||
@ApiOperation("保存")
|
||||
public ResponseEntity<Object> audit(@RequestBody JSONObject whereJson){
|
||||
formulaService.audit(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/cancel")
|
||||
@Log("保存")
|
||||
@ApiOperation("保存")
|
||||
|
||||
@@ -25,6 +25,11 @@ public interface FormulaService {
|
||||
* @param whereJson /
|
||||
*/
|
||||
void cancel(JSONObject whereJson);
|
||||
/**
|
||||
* 编辑
|
||||
* @param whereJson /
|
||||
*/
|
||||
void audit(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 提交
|
||||
|
||||
@@ -710,6 +710,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(C_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-C;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -743,6 +746,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//判断已含添加剂与需配添加剂大小
|
||||
yzj_map.forEach((key,tjj_map_now)->{
|
||||
//需配添加剂重量
|
||||
@@ -763,6 +767,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
@@ -793,6 +799,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(C_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -970,6 +979,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(W_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-W;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -1024,6 +1036,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
// X21p减 = [总碳-X22c]-产品碳平衡*(X11p+X12p+X21p+X22p) / X21碳含量
|
||||
@@ -1053,6 +1066,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
|
||||
@@ -1576,6 +1592,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(C_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-C;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -1630,6 +1649,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
//X21p减*=产品碳平衡*(X11p+X12p+X21p+X22p)-(X11p* X11碳含量+X12p* X12碳含量+(X21p)* X21碳含量)-X22p/(1- X21碳含量)
|
||||
@@ -1660,6 +1680,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
|
||||
@@ -1836,6 +1859,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
cw_list.add(W_weight);
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X22p-W;
|
||||
if(bom_ivt_qty<0){
|
||||
flag = false;
|
||||
}else{
|
||||
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
|
||||
if(bom_ivt_qty<=0){
|
||||
@@ -1890,6 +1916,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
//设X22p减=X22p,解方程
|
||||
// X21p减 = [总碳-X22c]-产品碳平衡*(X11p+X12p+X21p+X22p) / X21碳含量
|
||||
@@ -1919,6 +1946,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
//更新碳化钨配粉重量
|
||||
double bom_ivt_qty = X21p-X21_jian;
|
||||
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
|
||||
if(bom_ivt_qty<0){
|
||||
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
|
||||
}
|
||||
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
|
||||
if(bom_ivt_qty<=0){
|
||||
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
|
||||
|
||||
@@ -60,6 +60,7 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
String is_all = MapUtil.getStr(whereJson, "is_all");
|
||||
String biz_date = MapUtil.getStr(whereJson, "biz_date");
|
||||
String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
||||
String formula_code = MapUtil.getStr(whereJson, "formula_code");
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("device_id", MapUtil.getStr(whereJson, "device_id"));
|
||||
@@ -70,6 +71,7 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
}
|
||||
if (StrUtil.equals(is_all, "0")) map.put("status", "99");
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
|
||||
if (ObjectUtil.isNotEmpty(formula_code)) map.put("formula_code", "%"+formula_code+"%");
|
||||
JSONObject json = WQL.getWO("QPDM_BI_FORMULA01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "fMst.status,task.start_time,fMst.bucket_type ASC");
|
||||
return json;
|
||||
}
|
||||
@@ -383,9 +385,17 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
String formula_code = whereJson.getString("formula_code");
|
||||
String device_id = whereJson.getString("device_id");
|
||||
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_FormulaDtl");
|
||||
WQLObject mstTab = WQLObject.getWQLObject("PDM_BI_Formula");
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_FormulaDtl"); // 配方明细表
|
||||
WQLObject mstTab = WQLObject.getWQLObject("PDM_BI_Formula"); // 配方主表
|
||||
WQLObject workTab = WQLObject.getWQLObject("PDM_BI_WorkTask"); // 工序任务表
|
||||
|
||||
JSONObject jsonDtl = dtlTab.query("formuladtl_id = '" + formuladtl_id + "'").uniqueResult(0);
|
||||
// 查询配粉槽重量
|
||||
JSONObject jsonMst = mstTab.query("formula_id ='" + jsonDtl.getString("formula_id") + "'").uniqueResult(0);
|
||||
// 校验配方状态为30生产中 或者 配方状态为20提交并且工序任务状态为30开始生产
|
||||
String statusMst = jsonMst.getString("status");
|
||||
JSONObject jsonWork = workTab.query("workorder_id = '" + jsonMst.getString("workorder_id") + "' and workprocedure_code = 'GX001' and status = '30'").uniqueResult(0);
|
||||
if (StrUtil.equals(statusMst, "30") || (StrUtil.equals(statusMst, "20") && ObjectUtil.isNotEmpty(jsonWork))) {
|
||||
HashMap<String, String> param = new HashMap<>();
|
||||
param.put("flag", "8");
|
||||
param.put("formula_code", formula_code);
|
||||
@@ -398,9 +408,6 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
/*
|
||||
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
|
||||
*/
|
||||
JSONObject jsonDtl = dtlTab.query("formuladtl_id = '" + formuladtl_id + "'").uniqueResult(0);
|
||||
// 查询配粉槽重量
|
||||
JSONObject jsonMst = mstTab.query("formula_id ='" + jsonDtl.getString("formula_id") + "'").uniqueResult(0);
|
||||
String storagevehicle_id = jsonMst.getString("storagevehicle_id");
|
||||
if (ObjectUtil.isEmpty(storagevehicle_id)) throw new BadRequestException("此配方没有配粉槽");
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -504,6 +511,11 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
jsonDtl.put("start_name", nickName);
|
||||
jsonDtl.put("start_time", now);
|
||||
dtlTab.update(jsonDtl);
|
||||
} else {
|
||||
throw new BadRequestException("配方状态不为生产中或者工序任务不为生产中");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -900,14 +912,18 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_FormulaDtl");
|
||||
WQLObject mstTab = WQLObject.getWQLObject("PDM_BI_Formula");
|
||||
WQLObject workTab = WQLObject.getWQLObject("PDM_BI_WorkTask"); // 工序任务表
|
||||
|
||||
/*
|
||||
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
|
||||
*/
|
||||
JSONObject jsonDtl = dtlTab.query("formuladtl_id = '" + formuladtl_id + "'").uniqueResult(0);
|
||||
// 查询配粉槽重量
|
||||
JSONObject jsonMst = mstTab.query("formula_id ='" + jsonDtl.getString("formula_id") + "'").uniqueResult(0);
|
||||
|
||||
String statusMst = jsonMst.getString("status");
|
||||
JSONObject jsonWork = workTab.query("workorder_id = '" + jsonMst.getString("workorder_id") + "' and workprocedure_code = 'GX001' and status = '30'").uniqueResult(0);
|
||||
if (StrUtil.equals(statusMst, "30") || (StrUtil.equals(statusMst, "20") && ObjectUtil.isNotEmpty(jsonWork))) {
|
||||
/*
|
||||
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
|
||||
*/
|
||||
// 准备下发的参数
|
||||
JSONArray array = new JSONArray();
|
||||
// 配方编码
|
||||
@@ -982,5 +998,10 @@ public class FlourworkServiceImpl implements FlourworkService {
|
||||
String message = MapUtil.getStr(result, "message");
|
||||
throw new BadRequestException("下发电气失败:" + message);
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("配方状态不为生产中或者工序任务不为生产中");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,10 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
if (StrUtil.isNotEmpty(workorder_code)) {
|
||||
map.put("workorder_code", "%" + workorder_code + "%");
|
||||
}
|
||||
String formula_code = map.get("formula_code");
|
||||
if (StrUtil.isNotEmpty(formula_code)) {
|
||||
map.put("formula_code", "%" + formula_code + "%");
|
||||
}
|
||||
String pcsn = map.get("pcsn");
|
||||
if (StrUtil.isNotEmpty(pcsn)) {
|
||||
map.put("pcsn", "%" + pcsn + "%");
|
||||
@@ -145,6 +149,30 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void audit(JSONObject whereJson) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
WQLObject PDM_BI_Formula = WQLObject.getWQLObject("PDM_BI_Formula");
|
||||
JSONArray rows = whereJson.getJSONArray("rows");
|
||||
for(int i=0;i<rows.size();i++){
|
||||
JSONObject jo = rows.getJSONObject(i);
|
||||
String formula_id = jo.getString("formula_id");
|
||||
JSONObject jo_old = PDM_BI_Formula.query("is_delete='0' and formula_id ='"+formula_id+"' and status='20'").uniqueResult(0);
|
||||
if(jo_old ==null){
|
||||
throw new BadRequestException("当前配方 "+jo.getString("formula_code")+"非提交状态,不可审核!");
|
||||
}
|
||||
jo_old.put("is_audit","1");
|
||||
jo_old.put("audit_id",currentUserId);
|
||||
jo_old.put("audit_name",nickName);
|
||||
jo_old.put("audit_time",now);
|
||||
PDM_BI_Formula.update(jo_old);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void submit(JSONObject whereJson) {
|
||||
@@ -210,6 +238,10 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
}
|
||||
Formula.put("masterbucket_qty",masterbucket_qty+"");
|
||||
Formula.put("extadd_qty",extadd_qty+"");
|
||||
Formula.put("is_audit", "1");
|
||||
Formula.put("audit_id",currentUserId);
|
||||
Formula.put("audit_name",nickName);
|
||||
Formula.put("audit_time",now);
|
||||
Formula.put("add_id", currentUserId);
|
||||
Formula.put("add_name", nickName);
|
||||
Formula.put("add_time", now);
|
||||
|
||||
@@ -115,6 +115,10 @@
|
||||
task.device_id = 输入.device_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.formula_code <> ""
|
||||
fMst.formula_code like 输入.formula_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
fMst.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.formula_id TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.is_audit TYPEAS s_string
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
@@ -74,6 +75,9 @@
|
||||
ENDOPTION
|
||||
OPTION 输入.status <> ""
|
||||
Formula.status = 输入.status
|
||||
ENDOPTION
|
||||
OPTION 输入.is_audit <> ""
|
||||
Formula.is_audit = 输入.is_audit
|
||||
ENDOPTION
|
||||
OPTION 输入.formula_code <> ""
|
||||
Formula.formula_code like 输入.formula_code
|
||||
|
||||
@@ -80,7 +80,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
|
||||
<!--生产环境:打印控制台和输出到文件-->
|
||||
<springProfile name="prod">
|
||||
<root level="info">
|
||||
<root level="DEBUG">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</root>
|
||||
<logger name="jdbc.audit" level="ERROR" additivity="false">
|
||||
|
||||
@@ -7,6 +7,13 @@ export function cancel(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function audit(data) {
|
||||
return request({
|
||||
url: 'api/formula/audit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function submit(data) {
|
||||
return request({
|
||||
url: 'api/formula/submit',
|
||||
@@ -49,4 +56,4 @@ export function print(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { cancel, getform, submit, getView, pointCard, preview, print }
|
||||
export default { audit, cancel, getform, submit, getView, pointCard, preview, print }
|
||||
|
||||
337
mes/qd/src/views/wms/pf/flourwork/ShowWorkDialog.vue
Normal file
337
mes/qd/src/views/wms/pf/flourwork/ShowWorkDialog.vue
Normal file
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="配粉作业"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="closeView"
|
||||
:visible.sync="dialogVisible"
|
||||
@open="openView"
|
||||
>
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="指令卡">
|
||||
<label slot="label">指 令 卡:</label>
|
||||
<el-input v-model="form.workorder_id" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="产品编码">
|
||||
<el-input v-model="form.material_code" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input v-model="form.pcsn" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="配粉槽">
|
||||
<label slot="label">配 粉 槽:</label>
|
||||
<el-input v-model="form.storagevehicle_code" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="重量">
|
||||
<label slot="label">重 量:</label>
|
||||
<el-input v-model="form.masterbucket_qty" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="明细数">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="tableDtl.length" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="已配重量">
|
||||
<el-input v-model="form.put_qty" size="mini" disabled style="width: 210px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="称重重量">
|
||||
<el-input v-model="form.fact_qty" size="mini" disabled style="width: 210px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="配粉工位">
|
||||
<el-input v-model="form.device_code" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="配方状态">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 210px;"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in StatusList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">配粉明细</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
class="el-table"
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<!-- <el-table-column type="index" label="序号" width="55" align="center" />-->
|
||||
<el-table-column show-overflow-tooltip prop="seq_no" label="配粉序号" align="center" width="70px" />
|
||||
<el-table-column show-overflow-tooltip prop="status" label="状态" align="center" :formatter="statusName1" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="formula_qty" label="重量" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="put_qty" label="已投料重量" align="center" width="120px" :formatter="formaterPutQty"/>
|
||||
<el-table-column show-overflow-tooltip prop="not_put" label="未配重量" :formatter="formatterNum" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="fact_qty" label="实际称重" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="confirm_qty" label="确认重量" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="dtlconfirm_type" label="物料确认" align="center" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="quality_scode" label="品质类型" align="center" :formatter="formatQua" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="ivt_level" label="库存等级" align="center" :formatter="formatIvt" width="120px" />
|
||||
<el-table-column show-overflow-tooltip prop="is_active" label="是否可用" align="center" min-width="70" />
|
||||
<el-table-column show-overflow-tooltip prop="is_need_move" label="是否需移库" align="center" :formatter="statusName3" min-width="90" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">作业明细</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tabledis"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDisCurrentChange"
|
||||
>
|
||||
<!-- <el-table-column type="index" label="序号" width="55" align="center" />-->
|
||||
<el-table-column show-overflow-tooltip prop="jobseq_no" label="作业序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="status" label="状态" align="center" :formatter="statusName2" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="jobstoragevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="桶号" align="center" width="150px" />
|
||||
<el-table-column show-overflow-tooltip prop="storage_qty" label="桶重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="needout_qty" label="需出重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="out_type" label="出库方式" align="center" />
|
||||
<!-- <el-table-column show-overflow-tooltip prop="outfit_qty" label="出库称重" align="center" />-->
|
||||
<el-table-column show-overflow-tooltip prop="putfit_qty" label="投料称重" align="center" />
|
||||
<!-- <el-table-column show-overflow-tooltip prop="outconfirm_type" label="出库确认" align="center" />-->
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="putconfirm_type" label="投料确认" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="quality_scode" label="品质类型" align="center" :formatter="formatQua" />
|
||||
<el-table-column show-overflow-tooltip prop="ivt_level" label="库存等级" align="center" :formatter="formatIvt" />
|
||||
<el-table-column show-overflow-tooltip prop="is_active" label="是否可用" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="create_name" label="创建人" align="center" />
|
||||
<el-table-column min-width="140" show-overflow-tooltip prop="create_time" label="创建时间" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="out_name" label="出库人" align="center" />
|
||||
<el-table-column min-width="140" show-overflow-tooltip prop="out_time" label="出库时间" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="put_name" label="投料人" align="center" />
|
||||
<el-table-column min-width="140" show-overflow-tooltip prop="put_time" label="投料时间" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="closeView">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudFlourwork from '@/api/wms/pf/flourwork'
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { },
|
||||
dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL'],
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fla: false,
|
||||
form: {},
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
dtlJson: null,
|
||||
disJson: null,
|
||||
StatusList: [
|
||||
{ 'label': '生成', 'value': '10' },
|
||||
{ 'label': '提交', 'value': '20' },
|
||||
{ 'label': '生产中', 'value': '30' },
|
||||
{ 'label': '完成', 'value': '99' }
|
||||
],
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
debugger
|
||||
this.dialogVisible = newValue
|
||||
this.form = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
closeView() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.dtlJson = null
|
||||
this.disJson = null
|
||||
},
|
||||
openView() {
|
||||
crudFlourwork.getDtl({ 'formula_id': this.openParam.formula_id }).then(res => {
|
||||
debugger
|
||||
this.tableDtl = res
|
||||
this.tabledis = []
|
||||
})
|
||||
crudFlourwork.getMst({ 'formula_id': this.openParam.formula_id }).then(res => {
|
||||
this.form = res
|
||||
})
|
||||
},
|
||||
formatQua(row, column) {
|
||||
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
|
||||
},
|
||||
formatIvt(row, column) {
|
||||
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
this.dtlJson = current
|
||||
crudFlourwork.getDis({ 'formuladtl_id': current.formuladtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
})
|
||||
},
|
||||
refresh() {
|
||||
this.openView()
|
||||
this.crud.notify('刷新成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.tabledis = []
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.disJson = current
|
||||
},
|
||||
statusName1(row, column) {
|
||||
if (row.status === '10') {
|
||||
return '生成'
|
||||
} else if (row.status === '20') {
|
||||
return '生产中'
|
||||
} else if (row.status === '99') {
|
||||
return '完成'
|
||||
}
|
||||
},
|
||||
statusName2(row, column) {
|
||||
if (row.status === '10') {
|
||||
return '生成'
|
||||
} else if (row.status === '20') {
|
||||
return '出库确认'
|
||||
} else if (row.status === '99') {
|
||||
return '投料完成'
|
||||
}
|
||||
},
|
||||
statusName3(row, column) {
|
||||
if (row.is_need_move === '1') {
|
||||
return '是'
|
||||
} else if (row.is_need_move === '0') {
|
||||
return '否'
|
||||
}
|
||||
},
|
||||
formatterNum(row, column) {
|
||||
if (row.not_put !== '') {
|
||||
const num = parseFloat(row.not_put)
|
||||
if (num <= 0) {
|
||||
return '0.000000'
|
||||
} else {
|
||||
return row.not_put
|
||||
}
|
||||
} else {
|
||||
if (row.put_qty === '') {
|
||||
return row.formula_qty
|
||||
} else {
|
||||
return '0.000000'
|
||||
}
|
||||
}
|
||||
},
|
||||
formaterPutQty(row, column) {
|
||||
if (row.put_qty === '') {
|
||||
return '0.000000'
|
||||
} else {
|
||||
return row.put_qty
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 50px 10px 0px;
|
||||
}
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
.crud-opt3 .el-form-item__label{
|
||||
background-color: yellow;
|
||||
}
|
||||
.el-table{
|
||||
width:99.9% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -428,9 +428,9 @@ export default {
|
||||
if (this.form.storagevehicle_code === '') {
|
||||
return this.crud.notify('请绑定配粉槽', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
if (this.form.status !== '30') {
|
||||
return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// if (this.form.status !== '30') {
|
||||
// return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// }
|
||||
const arr = this.tableDtl
|
||||
let num = 0
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
@@ -475,9 +475,9 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.form.status !== '30') {
|
||||
return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// if (this.form.status !== '30') {
|
||||
// return this.crud.notify('配方状态不为生产中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// }
|
||||
if (this.dtlJson === null) {
|
||||
this.crud.notify('请选择物料', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
|
||||
@@ -34,6 +34,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="配方">
|
||||
<label slot="label">配 方:</label>
|
||||
<el-input
|
||||
v-model="query.formula_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入配方编码"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input
|
||||
@@ -98,7 +110,11 @@
|
||||
<el-table-column prop="workorder_code" label="工令编码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workorder_type" label="工令类型" width="80px" show-overflow-tooltip />
|
||||
<el-table-column prop="worktask_code" label="工序任务号" min-width="130px" show-overflow-tooltip />
|
||||
<el-table-column prop="formula_code" label="配方号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="formula_code" label="配方号" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="openShowWork(scope.$index, scope.row)">{{ scope.row.formula_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="产品编码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="product_series" label="系列" />
|
||||
<el-table-column prop="pcsn" label="批次" width="80px" show-overflow-tooltip />
|
||||
@@ -122,6 +138,7 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<WorkDialog :dialog-show.sync="openWorkDialog" :open-param="openParam" />
|
||||
<ShowWorkDialog :dialog-show.sync="openShowWorkDialog" :open-param="openParam" />
|
||||
<ExceptionDialog :dialog-show.sync="exceptionDialog" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -136,13 +153,13 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import WorkDialog from '@/views/wms/pf/flourwork/WorkDialog'
|
||||
import ExceptionDialog from '@/views/wms/pf/flourwork/ExceptionDialog'
|
||||
import crudMaterialparameters from "@/api/wms/basedata/master/materialparameters";
|
||||
|
||||
import crudMaterialparameters from '@/api/wms/basedata/master/materialparameters'
|
||||
import ShowWorkDialog from '@/views/wms/pf/flourwork/ShowWorkDialog'
|
||||
|
||||
export default {
|
||||
name: 'Flourwork',
|
||||
dicts: ['product_series'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, WorkDialog, ExceptionDialog },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, WorkDialog, ExceptionDialog, ShowWorkDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -168,6 +185,7 @@ export default {
|
||||
biz_date: new Date().format('yyyy-MM-dd'),
|
||||
openParam: null,
|
||||
openWorkDialog: false,
|
||||
openShowWorkDialog: false,
|
||||
exceptionDialog: false,
|
||||
serieseList: [],
|
||||
deviceList: [],
|
||||
@@ -221,6 +239,10 @@ export default {
|
||||
this.openWorkDialog = true
|
||||
})
|
||||
},
|
||||
openShowWork(index, row) {
|
||||
this.openParam = row
|
||||
this.openShowWorkDialog = true
|
||||
},
|
||||
exception() {
|
||||
this.exceptionDialog = true
|
||||
},
|
||||
|
||||
@@ -90,6 +90,22 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否审核" prop="is_audit">
|
||||
<el-select
|
||||
v-model="form.is_audit"
|
||||
style="width: 210px"
|
||||
placeholder="是否审核"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_again_put"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="配粉槽" prop="storagevehicle_code">
|
||||
<label slot="label">配 粉 槽:</label>
|
||||
<el-input v-model="form.storagevehicle_code" disabled style="width: 210px" />
|
||||
|
||||
@@ -40,6 +40,15 @@
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="配方编号">
|
||||
<el-input
|
||||
v-model="query.formula_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="配方编号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="配方状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
@@ -56,6 +65,24 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否审核">
|
||||
<el-select
|
||||
v-model="query.is_audit"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否审核"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_again_put"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
@@ -65,7 +92,6 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -82,6 +108,17 @@
|
||||
>
|
||||
作废
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="audit_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="audit"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -161,16 +198,19 @@
|
||||
<el-table-column prop="detail_count" min-width="100" label="明细数"/>
|
||||
<el-table-column prop="masterbucket_qty" min-width="100" label="重量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="status" :formatter="stateFormat" min-width="80" label="状态" />
|
||||
<el-table-column prop="create_time" min-width="150" label="开单时间"/>
|
||||
<el-table-column prop="create_name" min-width="150" label="开单人"/>
|
||||
<el-table-column prop="update_time" min-width="150" label="修改时间"/>
|
||||
<el-table-column prop="update_optname" min-width="150" label="修改人"/>
|
||||
<el-table-column prop="start_time" min-width="150" label="开始时间"/>
|
||||
<el-table-column prop="start_name" min-width="150" label="开始人"/>
|
||||
<el-table-column prop="end_time" min-width="150" label="结束时间"/>
|
||||
<el-table-column prop="end_name" min-width="150" label="结束人"/>
|
||||
<el-table-column prop="add_time" min-width="150" label="补料时间"/>
|
||||
<el-table-column prop="add_name" min-width="150" label="补料人"/>
|
||||
<el-table-column prop="is_audit" :formatter="stateFormat2" min-width="80" label="是否审核" />
|
||||
<el-table-column prop="audit_time" min-width="140" label="审核时间"/>
|
||||
<el-table-column prop="audit_name" min-width="80" label="审核人"/>
|
||||
<el-table-column prop="create_time" min-width="140" label="开单时间"/>
|
||||
<el-table-column prop="create_name" min-width="80" label="开单人"/>
|
||||
<el-table-column prop="update_time" min-width="140" label="修改时间"/>
|
||||
<el-table-column prop="update_optname" min-width="80" label="修改人"/>
|
||||
<el-table-column prop="start_time" min-width="140" label="开始时间"/>
|
||||
<el-table-column prop="start_name" min-width="80" label="开始人"/>
|
||||
<el-table-column prop="end_time" min-width="140" label="结束时间"/>
|
||||
<el-table-column prop="end_name" min-width="80" label="结束人"/>
|
||||
<el-table-column prop="add_time" min-width="140" label="补料时间"/>
|
||||
<el-table-column prop="add_name" min-width="80" label="补料人"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -244,7 +284,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['formula_status', 'workorder_type', 'product_series', 'bucket_type'],
|
||||
dicts: ['formula_status', 'workorder_type', 'product_series', 'bucket_type', 'is_again_put'],
|
||||
data() {
|
||||
return {
|
||||
dialogUpload: false,
|
||||
@@ -256,6 +296,7 @@ export default {
|
||||
},
|
||||
divShow: false,
|
||||
dissub_flag: true,
|
||||
audit_flag: true,
|
||||
change_flag: true,
|
||||
Export_flag: true,
|
||||
show_flag: true,
|
||||
@@ -301,6 +342,7 @@ export default {
|
||||
buttonChange(rows) {
|
||||
if (rows.length !== 0) {
|
||||
this.dissub_flag = false
|
||||
this.audit_flag = false
|
||||
this.change_flag = false
|
||||
this.Export_flag = false
|
||||
this.show_flag = false
|
||||
@@ -308,10 +350,13 @@ export default {
|
||||
if (rows[i].status !== '20') {
|
||||
this.dissub_flag = true
|
||||
}
|
||||
if (rows[i].status !== '20' || rows[i].is_audit !== '0') {
|
||||
this.audit_flag = true
|
||||
}
|
||||
if (rows[i].status === '99') {
|
||||
this.Export_flag = true
|
||||
}
|
||||
if (!'30,20'.includes(rows[i].status) || rows.length !== 1) {//后台校验首道工序
|
||||
if (!'30,20'.includes(rows[i].status) || rows.length !== 1) {
|
||||
this.change_flag = true
|
||||
}
|
||||
}
|
||||
@@ -322,6 +367,9 @@ export default {
|
||||
stateFormat(row) {
|
||||
return this.dict.label.formula_status[row.status]
|
||||
},
|
||||
stateFormat2(row) {
|
||||
return this.dict.label.is_again_put[row.is_audit]
|
||||
},
|
||||
bill_typeFormat(row) {
|
||||
return this.dict.label.workorder_type[row.workorder_type]
|
||||
},
|
||||
@@ -339,6 +387,7 @@ export default {
|
||||
this.checkrows = []
|
||||
this.mstrow = {}
|
||||
this.dissub_flag = true
|
||||
this.audit_flag = true
|
||||
this.change_flag = true
|
||||
this.Export_flag = true
|
||||
this.show_flag = true
|
||||
@@ -366,6 +415,17 @@ export default {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
audit(){
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0){
|
||||
this.crud.notify('请先选择需要审核的配方记录!')
|
||||
return false
|
||||
}
|
||||
formula.audit({'rows':this.checkrows}).then(res => {
|
||||
this.crud.notify('审核配方成功!')
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
this.handleCurrentChange()
|
||||
|
||||
Reference in New Issue
Block a user