rev:入库新增全部分配按钮、发送飞书BUG修改、废箔下卷变更为点位+废箔
This commit is contained in:
@@ -863,6 +863,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
map.put("error", whereJson.getString("error"));
|
map.put("error", whereJson.getString("error"));
|
||||||
map.put("error_msg", whereJson.getString("error_msg"));
|
map.put("error_msg", whereJson.getString("error_msg"));
|
||||||
map.put("error_update_time", DateUtil.now());
|
map.put("error_update_time", DateUtil.now());
|
||||||
|
if (whereJson.getString("error").equals("0")){
|
||||||
|
map.put("is_upload", "0");
|
||||||
|
map.put("upload_time", DateUtil.now());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wo.update(map, "device_code = '" + device_code + "'");
|
wo.update(map, "device_code = '" + device_code + "'");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,7 +239,13 @@ public class OutServiceImpl implements OutService {
|
|||||||
if (StrUtil.isEmpty(empty_vehicle.getString("vehicle_code"))){
|
if (StrUtil.isEmpty(empty_vehicle.getString("vehicle_code"))){
|
||||||
throw new BadRequestException("点位:"+empty_vehicle.getString("point_code")+"载具号为空!");
|
throw new BadRequestException("点位:"+empty_vehicle.getString("point_code")+"载具号为空!");
|
||||||
}
|
}
|
||||||
jo.put("vehicle_code", "waste foil");
|
jo.put("vehicle_code", point_code+"废箔");
|
||||||
|
if (jo.getString("vehicle_code").contains("废箔")){
|
||||||
|
System.out.println("YES-------");
|
||||||
|
}
|
||||||
|
if (!jo.getString("vehicle_code").contains("废箔")){
|
||||||
|
System.out.println("NO-------");
|
||||||
|
}
|
||||||
jo.put("product_area", cut_ivt.getString("product_area"));
|
jo.put("product_area", cut_ivt.getString("product_area"));
|
||||||
//分切>输送线 子卷出站
|
//分切>输送线 子卷出站
|
||||||
jo.put("task_type", "010404");
|
jo.put("task_type", "010404");
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class AutoSendFeiShu {
|
|||||||
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||||
//查询故障了还未发送的
|
//查询故障了还未发送的
|
||||||
JSONArray send_rows = wo.query("error > '0' AND is_upload = '0' AND upload_flag = '1'").getResultJSONArray(0);
|
JSONArray send_rows = wo.query("error > '0' AND IFNULL(is_upload,'0') = '0' AND upload_flag = '1'").getResultJSONArray(0);
|
||||||
this.sendInfo(send_rows);
|
this.sendInfo(send_rows);
|
||||||
|
|
||||||
//查询已经发送了但是还是故障中的
|
//查询已经发送了但是还是故障中的
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
//分切>输送线 子卷出站
|
//分切>输送线 子卷出站
|
||||||
if (jsonTask.getString("task_type").equals("010404")) {
|
if (jsonTask.getString("task_type").equals("010404")) {
|
||||||
if (!jsonTask.getString("vehicle_code").equals("waste foil")) {
|
if (!jsonTask.getString("vehicle_code").contains("废箔")) {
|
||||||
//更新出站气涨轴的分切计划状态
|
//更新出站气涨轴的分切计划状态
|
||||||
JSONArray plan_jo2 = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + jsonTask.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '06'").getResultJSONArray(0);
|
JSONArray plan_jo2 = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + jsonTask.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '06'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isEmpty(plan_jo2)) {
|
if (ObjectUtil.isEmpty(plan_jo2)) {
|
||||||
@@ -443,7 +443,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//分切>输送线 子卷出站
|
//分切>输送线 子卷出站
|
||||||
if (form.getString("task_type").equals("010404") && !json.getString("vehicle_code").equals("waste foil")) {
|
if (form.getString("task_type").equals("010404") && !json.getString("vehicle_code").contains("废箔")) {
|
||||||
//更新出站气涨轴的分切计划状态
|
//更新出站气涨轴的分切计划状态
|
||||||
JSONArray plan_jo2 = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + json.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '05'").getResultJSONArray(0);
|
JSONArray plan_jo2 = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + json.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '05'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isEmpty(plan_jo2)) {
|
if (ObjectUtil.isEmpty(plan_jo2)) {
|
||||||
|
|||||||
@@ -103,6 +103,15 @@ public class RawAssistIStorController {
|
|||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/allDivStruct")
|
||||||
|
@Log("全部分配货位")
|
||||||
|
@ApiOperation("全部分配货位")
|
||||||
|
//@PreAuthorize("@el.check('materialtype:list')")
|
||||||
|
public ResponseEntity<Object> allDivStruct(@RequestBody JSONObject whereJson) {
|
||||||
|
rawAssistIStorService.allDivStruct(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/unDivStruct")
|
@PostMapping("/unDivStruct")
|
||||||
@Log("取消分配货位")
|
@Log("取消分配货位")
|
||||||
@ApiOperation("取消分配货位")
|
@ApiOperation("取消分配货位")
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ public interface RawAssistIStorService {
|
|||||||
|
|
||||||
void divStruct(Map whereJson);
|
void divStruct(Map whereJson);
|
||||||
|
|
||||||
|
void allDivStruct(JSONObject form);
|
||||||
|
|
||||||
void unDivStruct(Map whereJson);
|
void unDivStruct(Map whereJson);
|
||||||
|
|
||||||
void divPoint(Map whereJson);
|
void divPoint(Map whereJson);
|
||||||
|
|||||||
@@ -38,10 +38,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PC端出入库新增
|
* PC端出入库新增
|
||||||
@@ -648,6 +645,42 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void allDivStruct(JSONObject form) {
|
||||||
|
String iostorinv_id = form.getString("iostorinv_id");
|
||||||
|
String sect_id = form.getString("sect_id");
|
||||||
|
|
||||||
|
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_id = '"+sect_id+"'").uniqueResult(0);
|
||||||
|
if (!sect_jo.getString("sect_type_attr").equals("09")){
|
||||||
|
throw new BadRequestException("只能对虚拟区的库区进行全部分配!");
|
||||||
|
}
|
||||||
|
//查询当前入库单状态为生成的入库单明细
|
||||||
|
JSONArray dis_rows =WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' AND work_status = '00'").getResultJSONArray(0);
|
||||||
|
HashSet<String> vehicle_set = new HashSet<>();
|
||||||
|
for (int j = 0; j < dis_rows.size(); j++) {
|
||||||
|
JSONObject dtl_row = dis_rows.getJSONObject(j);
|
||||||
|
vehicle_set.add(dtl_row.getString("box_no"));
|
||||||
|
}
|
||||||
|
for (String vehicle_code : vehicle_set) {
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "4");
|
||||||
|
map.put("iostorinv_id", iostorinv_id);
|
||||||
|
map.put("package_box_sn", vehicle_code);
|
||||||
|
JSONArray dtl_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
List<Map> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < dtl_rows.size(); i++) {
|
||||||
|
JSONObject jo = dtl_rows.getJSONObject(i);
|
||||||
|
list.add(JSON.parseObject(jo.toString(),Map.class));
|
||||||
|
}
|
||||||
|
Map<String,Object> dis_map = new HashMap<>();
|
||||||
|
dis_map.put("tableMater",list);
|
||||||
|
dis_map.put("sect_id",sect_id);
|
||||||
|
dis_map.put("checked",true);
|
||||||
|
this.divStruct(dis_map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void unDivStruct(Map jo) {
|
public void unDivStruct(Map jo) {
|
||||||
|
|||||||
@@ -14,7 +14,18 @@
|
|||||||
<span class="el-dialog__title2">入库分配</span>
|
<span class="el-dialog__title2">入库分配</span>
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left"/>
|
<slot name="left">
|
||||||
|
<el-button
|
||||||
|
:loading="allDivBtn"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="allDivStruct()"
|
||||||
|
>
|
||||||
|
全部分配
|
||||||
|
</el-button>
|
||||||
|
</slot>
|
||||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,49 +62,25 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center"/>
|
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center"/>
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center"/>
|
<el-table-column 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="pcsn" label="子卷号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center"/>
|
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center"/>
|
<el-table-column
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量"
|
show-overflow-tooltip
|
||||||
align="center"/>
|
prop="plan_qty"
|
||||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量"
|
:formatter="crud.formatNum3"
|
||||||
align="center"/>-->
|
label="重量"
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center"/>
|
align="center"
|
||||||
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" align="center"/>
|
/>
|
||||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单编号" align="center"/>
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单编号" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||||
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
|
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
|
||||||
<!--<el-form-item label="载具号" prop="storagevehicle_code">
|
|
||||||
<el-input v-model="form.storagevehicle_code" placeholder="载具号" style="width: 200px" @blur="vehicleCheck"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="桶号" prop="bucketunique">
|
|
||||||
<el-input
|
|
||||||
v-model="form.bucketunique"
|
|
||||||
placeholder="桶号"
|
|
||||||
disabled
|
|
||||||
class="input-with-select"
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<el-button slot="append" icon="el-icon-search" @click="dialogBucket"/>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="放入重量" prop="storage_qty">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.storage_qty"
|
|
||||||
style="width: 200px"
|
|
||||||
disabled
|
|
||||||
placeholder="放入重量"
|
|
||||||
controls-position="right"
|
|
||||||
:controls="false"
|
|
||||||
:min="0"
|
|
||||||
:precision="3"
|
|
||||||
/>
|
|
||||||
</el-form-item>-->
|
|
||||||
<el-form-item label="入库点" prop="point_code">
|
<el-form-item label="入库点" prop="point_code">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.point_code"
|
v-model="form.point_code"
|
||||||
@@ -132,29 +119,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left"/>
|
<slot name="left" />
|
||||||
<!--<el-button
|
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="warning"
|
|
||||||
icon="el-icon-check"
|
|
||||||
size="mini"
|
|
||||||
@click="insertvehicle()"
|
|
||||||
>
|
|
||||||
装入托盘
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="confirmvehicle()"
|
|
||||||
>
|
|
||||||
组盘确认
|
|
||||||
</el-button>-->
|
|
||||||
<el-button
|
|
||||||
slot="left"
|
|
||||||
:loading="divBtn"
|
:loading="divBtn"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -165,7 +131,6 @@
|
|||||||
分配货位
|
分配货位
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@@ -175,7 +140,6 @@
|
|||||||
取消分配
|
取消分配
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="left"
|
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@@ -196,15 +160,21 @@
|
|||||||
border
|
border
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center"/>
|
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center"/>
|
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center"/>
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center"/>
|
<el-table-column 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="pcsn" label="子卷号" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center"/>
|
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center"/>
|
<el-table-column
|
||||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center"/>
|
show-overflow-tooltip
|
||||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center"/>
|
prop="plan_qty"
|
||||||
|
:formatter="crud.formatNum3"
|
||||||
|
label="重量"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||||
<!--<el-table-column align="center" label="操作" width="190" fixed="right">
|
<!--<el-table-column align="center" label="操作" width="190" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popover v-model="scope.row.pop" placement="top" width="180" trigger="manual">
|
<el-popover v-model="scope.row.pop" placement="top" width="180" trigger="manual">
|
||||||
@@ -220,8 +190,13 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp"
|
<StructDiv
|
||||||
@tableChanged="tableChanged"/>
|
ref="child"
|
||||||
|
:stor-id="storId"
|
||||||
|
:dialog-show.sync="structShow"
|
||||||
|
:sect-prop="sectProp"
|
||||||
|
@tableChanged="tableChanged"
|
||||||
|
/>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -230,7 +205,7 @@
|
|||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, { crud } from '@crud/crud'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
import crudRawAssist, { allDivStruct } from '@/views/wms/st/inbill/rawassist'
|
||||||
import crudPoint from '@/views/wms/sch/point/point'
|
import crudPoint from '@/views/wms/sch/point/point'
|
||||||
import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
|
|
||||||
@@ -272,15 +247,14 @@ export default {
|
|||||||
structShow: false,
|
structShow: false,
|
||||||
bucketObj: null,
|
bucketObj: null,
|
||||||
divBtn: false,
|
divBtn: false,
|
||||||
|
allDivBtn: false,
|
||||||
bucketShow: false,
|
bucketShow: false,
|
||||||
sects: [],
|
sects: [],
|
||||||
sect_val: null,
|
sect_val: null,
|
||||||
form: {
|
form: {
|
||||||
dtl_row: null,
|
dtl_row: null,
|
||||||
bucketunique: '',
|
|
||||||
storage_qty: '',
|
storage_qty: '',
|
||||||
point_code: null,
|
point_code: null,
|
||||||
storagevehicle_code: '',
|
|
||||||
checked: true,
|
checked: true,
|
||||||
tableMater: []
|
tableMater: []
|
||||||
},
|
},
|
||||||
@@ -330,98 +304,9 @@ export default {
|
|||||||
this.form.tableMater = res
|
this.form.tableMater = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
vehicleCheck() {
|
|
||||||
if (!this.form.dtl_row) {
|
|
||||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
this.form.storagevehicle_code = ''
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudRawAssist.checkVehicle({
|
|
||||||
'storagevehicle_code': this.form.storagevehicle_code,
|
|
||||||
'dis_num': this.form.tableMater.length,
|
|
||||||
'iostorinv_id': this.form.dtl_row.iostorinv_id
|
|
||||||
}).then(res => {
|
|
||||||
|
|
||||||
}).catch(err => {
|
|
||||||
this.form.storagevehicle_code = ''
|
|
||||||
})
|
|
||||||
},
|
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
row.index = rowIndex
|
row.index = rowIndex
|
||||||
},
|
},
|
||||||
insertvehicle() {
|
|
||||||
if (!this.form.dtl_row) {
|
|
||||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.form.storagevehicle_code) {
|
|
||||||
this.crud.notify('请输入托盘号', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 判断是否选择了桶号
|
|
||||||
if (this.bucketObj) {
|
|
||||||
if (!(this.bucketObj.status === '01')) {
|
|
||||||
this.crud.notify('请校验桶状态!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj))
|
|
||||||
// 判断选择的桶是否已经被选过
|
|
||||||
const flag = this.form.tableMater.some(mater => mater.bucketunique === dis_dtl.bucketunique)
|
|
||||||
if (!flag) {
|
|
||||||
const flag = this.form.tableMater.some(mater => mater.storagevehicle_code !== this.form.storagevehicle_code)
|
|
||||||
if (flag) {
|
|
||||||
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
dis_dtl.storagevehicle_code = this.form.storagevehicle_code
|
|
||||||
dis_dtl.pop = false
|
|
||||||
this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl)
|
|
||||||
if (this.form.dtl_row.assign_qty) {
|
|
||||||
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) + parseFloat(this.form.storage_qty)
|
|
||||||
} else {
|
|
||||||
this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty)
|
|
||||||
}
|
|
||||||
if (parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) > 0) {
|
|
||||||
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty)
|
|
||||||
} else {
|
|
||||||
this.form.dtl_row.unassign_qty = 0
|
|
||||||
}
|
|
||||||
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
|
|
||||||
}
|
|
||||||
if (flag) {
|
|
||||||
this.crud.notify('该桶已被加入明细中', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.crud.notify('请选择桶号', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
},
|
|
||||||
confirmvehicle() {
|
|
||||||
if (this.form.tableMater.length <= 0) {
|
|
||||||
this.crud.notify('至少添加一条载具明细', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const carrier_no = this.form.tableMater[0].storagevehicle_code
|
|
||||||
const flag = this.form.tableMater.every(mater => mater.storagevehicle_code === carrier_no)
|
|
||||||
if (!flag) {
|
|
||||||
this.crud.notify('请选择唯一载具进行组盘!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const flag2 = this.form.tableMater.some(mater => mater.point_code !== this.form.point_code && mater.point_code)
|
|
||||||
if (flag2) {
|
|
||||||
this.crud.notify('请选择相同入库点!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudRawAssist.confirmvehicle(this.form).then(res => {
|
|
||||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
|
|
||||||
this.openParam = res
|
|
||||||
})
|
|
||||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
|
||||||
this.form.tableMater = res
|
|
||||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
deleteRow(index, rows) {
|
deleteRow(index, rows) {
|
||||||
// 如果桶状态不是生成调后台逻辑
|
// 如果桶状态不是生成调后台逻辑
|
||||||
if (rows[index].status !== '01') {
|
if (rows[index].status !== '01') {
|
||||||
@@ -476,12 +361,6 @@ export default {
|
|||||||
this.form.tableMater = []
|
this.form.tableMater = []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
bucketChange(row) {
|
|
||||||
debugger
|
|
||||||
this.bucketObj = row
|
|
||||||
this.form.bucketunique = row.bucketunique
|
|
||||||
this.form.storage_qty = row.storage_qty
|
|
||||||
},
|
|
||||||
divPoint() {
|
divPoint() {
|
||||||
if (!this.form.point_code) {
|
if (!this.form.point_code) {
|
||||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
@@ -502,6 +381,23 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
allDivStruct() {
|
||||||
|
if (!this.sect_id) {
|
||||||
|
this.crud.notify('请先选择虚拟库区区域!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.allDivBtn = true
|
||||||
|
const data = {}
|
||||||
|
data.sect_id = this.sect_id
|
||||||
|
data.iostorinv_id = this.openParam[0].iostorinv_id
|
||||||
|
crudRawAssist.allDivStruct(data).then(res => {
|
||||||
|
crudRawAssist.getIODtl({ 'bill_code': this.openParam[0].bill_code, 'open_flag': '1' }).then(res => {
|
||||||
|
this.openParam = res
|
||||||
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
this.allDivBtn = false
|
||||||
|
})
|
||||||
|
},
|
||||||
divStruct() {
|
divStruct() {
|
||||||
if (this.form.tableMater.length === 0) {
|
if (this.form.tableMater.length === 0) {
|
||||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
@@ -516,7 +412,6 @@ export default {
|
|||||||
this.divBtn = true
|
this.divBtn = true
|
||||||
this.form.sect_id = this.sect_id
|
this.form.sect_id = this.sect_id
|
||||||
this.form.stor_id = this.stor_id
|
this.form.stor_id = this.stor_id
|
||||||
this.form.is_pc = '1'
|
|
||||||
crudRawAssist.divStruct(this.form).then(res => {
|
crudRawAssist.divStruct(this.form).then(res => {
|
||||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||||
this.openParam = res
|
this.openParam = res
|
||||||
@@ -557,37 +452,6 @@ export default {
|
|||||||
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
|
||||||
dialogBucket() {
|
|
||||||
if (!this.form.dtl_row) {
|
|
||||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
/* const material_dtl_scode = this.form.dtl_row.material_dtl_scode
|
|
||||||
let type = ''
|
|
||||||
if (material_dtl_scode.slice(0, 4) === '0903') {
|
|
||||||
type = '01'
|
|
||||||
}
|
|
||||||
if (material_dtl_scode.slice(0, 4) === '0904') {
|
|
||||||
type = '02'
|
|
||||||
}
|
|
||||||
if (material_dtl_scode.slice(0, 6) === '090202') {
|
|
||||||
type = '04'
|
|
||||||
}
|
|
||||||
if (material_dtl_scode.slice(0, 6) === '090201') {
|
|
||||||
type = '03'
|
|
||||||
}*/
|
|
||||||
const bucket = {
|
|
||||||
'material_code': this.form.dtl_row.material_code,
|
|
||||||
'pcsn': this.form.dtl_row.pcsn,
|
|
||||||
'quality_scode': this.form.dtl_row.quality_scode,
|
|
||||||
'ivt_level': this.form.dtl_row.ivt_level,
|
|
||||||
'is_active': this.form.dtl_row.is_active,
|
|
||||||
// 'storagevehicle_type': type,
|
|
||||||
'bucket_status': '01'
|
|
||||||
}
|
|
||||||
this.bucketProp = bucket
|
|
||||||
this.bucketShow = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,6 @@ import DivDialog from '@/views/wms/st/inbill/DivDialog'
|
|||||||
import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
||||||
import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
|
import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
|
||||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -268,7 +267,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['io_bill_status', 'ST_CREATE_MODE','ST_INV_IN_TYPE'],
|
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_IN_TYPE'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||||
|
|||||||
@@ -24,14 +24,6 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getType(params) {
|
|
||||||
return request({
|
|
||||||
url: '/api/in/rawAssist/getType',
|
|
||||||
method: 'get',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getBillDtl(params) {
|
export function getBillDtl(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/in/rawAssist/getBillDtl',
|
url: '/api/in/rawAssist/getBillDtl',
|
||||||
@@ -72,14 +64,6 @@ export function checkVehicle(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function confirmvehicle(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/in/rawAssist/confirmvehicle',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function deleteDisDtl(data) {
|
export function deleteDisDtl(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/in/rawAssist/deleteDisDtl',
|
url: '/api/in/rawAssist/deleteDisDtl',
|
||||||
@@ -104,6 +88,14 @@ export function divStruct(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function allDivStruct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/in/rawAssist/allDivStruct',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function unDivStruct(data) {
|
export function unDivStruct(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/in/rawAssist/unDivStruct',
|
url: '/api/in/rawAssist/unDivStruct',
|
||||||
@@ -208,6 +200,6 @@ export function queryBoxMater(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getType, getBillDtl, insertDtl, getIODtl, commit, checkVehicle,
|
export default { add, edit, del, insertDtl, getIODtl, commit, checkVehicle,
|
||||||
confirmvehicle, deleteDisDtl, getDisDtl, divStruct, unDivStruct, divPoint, delDis, queryBoxMater,
|
deleteDisDtl, getDisDtl, divStruct, allDivStruct, unDivStruct, divPoint, delDis, queryBoxMater,
|
||||||
queryTask, bucketDtl, updateTask, delTask, reIssueTask, confirmTask, cancelTask, confirm, backConfirm }
|
queryTask, bucketDtl, updateTask, delTask, reIssueTask, confirmTask, cancelTask, confirm, backConfirm }
|
||||||
|
|||||||
Reference in New Issue
Block a user