Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -17,6 +17,7 @@ import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
@@ -30,6 +31,7 @@ import org.nl.acs.route.service.dto.RouteLineDto;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -89,10 +91,18 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
Integer heartbeat_tag;
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date require_apply_labeling_time = new Date();
|
||||
private Date require_apply_strangulation_time = new Date();
|
||||
private Date require_empty_in_time = new Date();
|
||||
private Date require_empty_out_time = new Date();
|
||||
|
||||
private int instruction_require_time_out;
|
||||
//行架机械手申请任务成功标识
|
||||
boolean requireSucess = false;
|
||||
boolean requireApplyLabelingSuccess = false;
|
||||
boolean requireApplyLaStrangulationSuccess = false;
|
||||
boolean requireEmptyInSuccess = false;
|
||||
boolean requireEmptyOutSuccess = false;
|
||||
private int instruction_finished_time_out;
|
||||
|
||||
int branchProtocol = 0;
|
||||
@@ -124,7 +134,29 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
task = this.itemProtocol.getTask();
|
||||
if (mode != last_mode) {
|
||||
if (mode == 2) {
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireSucess:" + requireSucess);
|
||||
requireSucess = false;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireSucess:" + requireSucess);
|
||||
}
|
||||
if (mode == 4) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireApplyLabelingSuccess:" + requireApplyLabelingSuccess);
|
||||
requireApplyLabelingSuccess = false;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireApplyLabelingSuccess:" + requireApplyLabelingSuccess);
|
||||
}
|
||||
if (mode == 5) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireApplyLaStrangulationSuccess:" + requireApplyLaStrangulationSuccess);
|
||||
requireApplyLaStrangulationSuccess = false;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireApplyLaStrangulationSuccess:" + requireApplyLaStrangulationSuccess);
|
||||
}
|
||||
if (mode == 6) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireEmptyInSuccess:" + requireEmptyInSuccess);
|
||||
requireEmptyInSuccess = false;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireEmptyInSuccess:" + requireEmptyInSuccess);
|
||||
}
|
||||
if (mode == 7) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireEmptyOutSuccess:" + requireEmptyOutSuccess);
|
||||
requireEmptyOutSuccess = false;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireEmptyOutSuccess:" + requireEmptyOutSuccess);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
@@ -233,6 +265,31 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (move > 0 && !requireSucess) {
|
||||
instruction_require();
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
//申请贴标
|
||||
if (move > 0 && !requireApplyLabelingSuccess) {
|
||||
applyLabeling();
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
//申请困扎
|
||||
if (move > 0 && !requireApplyLaStrangulationSuccess) {
|
||||
applyLaStrangulation();
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
//空托盘满垛入库申请
|
||||
if (move > 0 && !requireEmptyInSuccess) {
|
||||
emptyIn();
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
//空托盘满垛出库申请
|
||||
if (move > 0 && !requireEmptyOutSuccess) {
|
||||
emptyOut();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -274,7 +331,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
|
||||
protected void thingToNothing() throws Exception {
|
||||
this.setRequireSucess(false);
|
||||
requireSucess = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -286,7 +343,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
|
||||
itemMap.put(to_param, value);
|
||||
itemMap.put(to_param, Integer.parseInt(value));
|
||||
// itemMap.put(to_param, Integer.parseInt(value));
|
||||
ReadUtil.write(itemMap, server);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
|
||||
@@ -356,9 +413,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
String requestSucess = data.getString("requireSucess");
|
||||
if (StrUtil.equals(requestSucess, "0")) {
|
||||
this.setRequireSucess(false);
|
||||
this.requireSucess = false;
|
||||
} else {
|
||||
this.setRequireSucess(true);
|
||||
this.requireSucess = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,4 +532,66 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void applyLabeling() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.require_apply_labeling_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.require_apply_labeling_time = date;
|
||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||
new ApplyLabelingAndBindingRequest();
|
||||
JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0);
|
||||
String start_point_code = null;
|
||||
if (!ObjectUtil.isEmpty(device_json)) {
|
||||
start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code");
|
||||
}
|
||||
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
||||
applyLabelingAndBindingRequest.setType("1");
|
||||
acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||
requireApplyLabelingSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void applyLaStrangulation() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.require_apply_strangulation_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.require_apply_strangulation_time = date;
|
||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||
new ApplyLabelingAndBindingRequest();
|
||||
JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0);
|
||||
String start_point_code = null;
|
||||
if (!ObjectUtil.isEmpty(device_json)) {
|
||||
start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code");
|
||||
}
|
||||
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
||||
applyLabelingAndBindingRequest.setType("2");
|
||||
acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||
requireApplyLaStrangulationSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void emptyIn() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.require_empty_in_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.require_empty_in_time = date;
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void emptyOut() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.require_empty_out_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.require_empty_out_time = date;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() throws Exception {
|
||||
public synchronized void execute() throws Exception {
|
||||
String message = null;
|
||||
try {
|
||||
device_code = this.getDeviceCode();
|
||||
@@ -158,7 +158,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
if (mode != last_mode) {
|
||||
if (mode == 2) {
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为:" + requireSucess);
|
||||
requireSucess = false;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为:" + requireSucess);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
@@ -840,7 +842,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.sendSignalType(instructionDto, type);
|
||||
|
||||
//请求任务成功
|
||||
this.setRequireSucess(true);
|
||||
requireSucess = true;
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -949,7 +951,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.sendSignalType(instdto, type);
|
||||
|
||||
//请求任务成功
|
||||
this.setRequireSucess(true);
|
||||
requireSucess = true;
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<!--Spring boot 核心-->
|
||||
<!--Spring boot 核心 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
|
||||
@@ -75,6 +75,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (StrUtil.isNotEmpty(map.get("io_type"))) {
|
||||
map.put("io_type", map.get("io_type"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("is_upload"))) {
|
||||
map.put("is_upload", map.get("is_upload"));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
|
||||
map.put("pcsn", "%" + map.get("pcsn") + "%");
|
||||
}
|
||||
@@ -768,6 +771,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("sale_order_name", dtl.getString("source_bill_code"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -846,6 +850,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("pcsn", dtl.getString("pcsn"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -985,6 +990,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("sale_order_name", dtl.getString("source_bill_code"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonOneIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonOneIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -1063,6 +1069,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonMap.put("material_id", dtl.getString("material_id"));
|
||||
jsonMap.put("pcsn", dtl.getString("pcsn"));
|
||||
jsonMap.put("sect_id", whereJson.getString("sect_id"));
|
||||
jsonMap.put("stor_id", whereJson.getString("stor_id"));
|
||||
|
||||
JSONObject jsonIvt = WQL.getWO("ST_OUTIVT01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("库存不足");
|
||||
@@ -1371,6 +1378,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
jo_dtl.put("bill_status", "30");
|
||||
}
|
||||
|
||||
if (jo_dtl.getDoubleValue("unassign_qty") == 0) {
|
||||
jo_dtl.put("bill_status", "40");
|
||||
}
|
||||
|
||||
wo_dtl.update(jo_dtl);
|
||||
//更新主表状态
|
||||
this.updateMststatus(iostorinv_id);
|
||||
@@ -1871,7 +1883,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
assign_qty = NumberUtil.add(assign_qty,canuse_qty);
|
||||
|
||||
if (unassign_qty >= canuse_qty) {
|
||||
unassign_qty = unassign_qty - canuse_qty;
|
||||
// unassign_qty = unassign_qty - canuse_qty;
|
||||
unassign_qty = NumberUtil.sub(unassign_qty,canuse_qty);
|
||||
ivt.put("change_qty", canuse_qty + "");
|
||||
} else {
|
||||
ivt.put("change_qty", canuse_qty + "");
|
||||
@@ -1913,11 +1926,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
break;
|
||||
}
|
||||
}
|
||||
HashMap<String, String> map_dtl = new HashMap<String, String>();
|
||||
// HashMap<String, String> map_dtl = new HashMap<String, String>();
|
||||
JSONObject map_dtl = new JSONObject();
|
||||
//更新明细
|
||||
map_dtl.put("unassign_qty", unassign_qty + "");
|
||||
map_dtl.put("assign_qty", assign_qty + "");
|
||||
if (unassign_qty == 0) {
|
||||
if (map_dtl.getDoubleValue("unassign_qty") <= 0) {
|
||||
map_dtl.put("bill_status", "40");
|
||||
} else {
|
||||
map_dtl.put("bill_status", "30");
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
输入.sap_pcsn TYPEAS s_string
|
||||
输入.cust_code TYPEAS s_string
|
||||
输入.package_box_sn TYPEAS s_string
|
||||
输入.is_upload TYPEAS s_string
|
||||
输入.in_stor_id TYPEAS f_string
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -108,6 +109,10 @@
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.is_upload <> ""
|
||||
ios.is_upload = 输入.is_upload
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.io_type <> ""
|
||||
ios.io_type = 输入.io_type
|
||||
ENDOPTION
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.iostorinv_id TYPEAS s_string
|
||||
输入.iostorinvdtl_id TYPEAS s_string
|
||||
输入.stor_id TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -84,6 +85,10 @@
|
||||
ivt.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
attr.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
order by ivt.instorage_time ASC
|
||||
|
||||
ENDSELECT
|
||||
|
||||
@@ -220,18 +220,21 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="is_upload" label="是否回传" :formatter="formatIsUpload" />
|
||||
<el-table-column show-overflow-tooltip prop="upload_mes" label="回传MES" :formatter="formatUploadMes" />
|
||||
<el-table-column show-overflow-tooltip prop="upload_sap" label="回传SAP" :formatter="formatUploadSap" />
|
||||
<!-- <el-table-column type="index" label="序号" width="50" align="center" />-->
|
||||
<el-table-column show-overflow-tooltip prop="is_upload" label="是否回传" :formatter="formatIsUpload" width="80" />
|
||||
<el-table-column show-overflow-tooltip prop="upload_mes" label="回传MES" :formatter="formatUploadMes" width="80" />
|
||||
<el-table-column show-overflow-tooltip prop="upload_sap" label="回传SAP" :formatter="formatUploadSap" width="80" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stor_name" label="仓库" width="100" />
|
||||
<el-table-column min-width="130" show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip width="135" prop="biz_date" label="业务日期" />
|
||||
<el-table-column min-width="100" show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="vbeln" label="交货单" />
|
||||
<el-table-column prop="total_qty" label="总重量" width="100" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="100" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
:formatter="create_modeFormat"
|
||||
@@ -240,8 +243,6 @@
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
|
||||
<el-table-column prop="total_qty" label="总重量" width="100" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="100" />
|
||||
<el-table-column prop="input_optname" label="制单人" width="100" />
|
||||
<el-table-column show-overflow-tooltip prop="input_time" label="制单时间" width="150" />
|
||||
<el-table-column prop="update_optname" label="修改人" width="100" />
|
||||
|
||||
@@ -304,7 +304,7 @@ export default {
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.mstrow = newValue
|
||||
this.mstrow.stor_id = ''
|
||||
// this.mstrow.stor_id = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -447,20 +447,20 @@ export default {
|
||||
}
|
||||
},
|
||||
allDiv() {
|
||||
if (!this.mstrow.sect_id) {
|
||||
this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// if (!this.mstrow.sect_id) {
|
||||
// this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// return
|
||||
// }
|
||||
checkoutbill.allDiv(this.mstrow).then(res => {
|
||||
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.queryTableDtl()
|
||||
})
|
||||
},
|
||||
oneDiv() {
|
||||
if (!this.mstrow.sect_id) {
|
||||
this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// if (!this.mstrow.sect_id) {
|
||||
// this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
// return
|
||||
// }
|
||||
if (this.currentRow.iostorinvdtl_id !== null) {
|
||||
this.mstrow.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
|
||||
checkoutbill.allDivOne(this.mstrow).then(res => {
|
||||
@@ -496,7 +496,6 @@ export default {
|
||||
// 根据此仓位的 ‘相同块、相同排、相同层’ 判断上一个任务是否生成
|
||||
const tab = this.tabledis
|
||||
for (let i = 0; i < tab.length; i++) {
|
||||
debugger
|
||||
const item = tab[i]
|
||||
if (this.currentDis.block_num === item.block_num && this.currentDis.row_num === item.row_num && this.currentDis.layer_num === item.layer_num) {
|
||||
const out_order_seq = parseInt(this.currentDis.out_order_seq) - 1
|
||||
@@ -529,7 +528,6 @@ export default {
|
||||
})
|
||||
},
|
||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||
debugger
|
||||
const assign_qty = parseFloat(row.assign_qty)
|
||||
const plan_qty = parseFloat(row.plan_qty)
|
||||
|
||||
|
||||
@@ -231,11 +231,20 @@ export default {
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
|
||||
} else {
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
|
||||
if (this.queryrow.unassign_qty > this.goal_unassign_qty){
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
|
||||
// 如果待分配重量等于0则 明细重量 - 已分配重量
|
||||
if (parseInt(this.queryrow.unassign_qty) === 0) {
|
||||
this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty)
|
||||
} else {
|
||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
|
||||
}
|
||||
if (this.queryrow.unassign_qty > this.goal_unassign_qty) {
|
||||
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))
|
||||
}
|
||||
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
|
||||
// 如果已分配汇总量 > 明细重量 则待分配重量为0
|
||||
if (this.queryrow.assign_qty > this.goal_unassign_qty) {
|
||||
this.queryrow.unassign_qty = parseFloat('0')
|
||||
}
|
||||
}
|
||||
this.tableDtl.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
|
||||
@@ -128,6 +128,23 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否回传">
|
||||
<el-select
|
||||
v-model="query.is_upload"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否回传"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_upload"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
@@ -228,16 +245,17 @@
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" width="100" />
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="80" prop="bill_status" label="单据状态" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" width="80" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip width="135" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty" width="100" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip label="明细数" align="center" prop="detail_count" width="60" />
|
||||
<el-table-column show-overflow-tooltip label="总重量" align="center" prop="total_qty" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="客户" align="center" prop="cust_simple_name" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="客户编码" align="center" prop="cust_code" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="交货单号" align="center" prop="vbeln" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="是否回传" align="center" prop="is_upload" width="80" :formatter="formatIsUpload"/>
|
||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_optname" />
|
||||
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" />
|
||||
@@ -290,7 +308,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE'],
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -424,6 +442,13 @@ export default {
|
||||
this.openParamMoney = row
|
||||
this.openMoneyDialog = true
|
||||
},
|
||||
formatIsUpload(row) {
|
||||
if (row.is_upload === '0') {
|
||||
return '否'
|
||||
} else if (row.is_upload === '1') {
|
||||
return '是'
|
||||
}
|
||||
},
|
||||
printExcel(jo) {
|
||||
if (jo.shd_dtl_num === '') {
|
||||
return this.crud.notify('客户为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
Reference in New Issue
Block a user