rev:界面功能优化

This commit is contained in:
zhangzq
2024-09-09 08:53:03 +08:00
parent 6a05279611
commit bee9748294
15 changed files with 280 additions and 233 deletions

View File

@@ -3,6 +3,7 @@ package org.nl;
import cn.dev33.satoken.annotation.SaIgnore;
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
import org.mybatis.spring.annotation.MapperScan;
import org.nl.common.websocket.heartSocket.clientSocket.HeartClientServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -15,6 +16,8 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.net.InetSocketAddress;
/**
* 开启审计功能 -> @EnableJpaAuditing
* https://www.cnblogs.com/niceyoo/p/10908647.html
@@ -30,7 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
@ServletComponentScan
@EnableTransactionManagement
@MapperScan("org.nl.**.mapper")
//@EnableDynamicTp
@EnableDynamicTp
public class AppRun implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(AppRun.class, args);
@@ -39,7 +42,7 @@ public class AppRun implements CommandLineRunner {
@Override
public void run(String... args) {
// HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.10.60", 20889));
HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.8.218", 20889));
System.out.println("--------项目启动完成--------");
}

View File

@@ -21,7 +21,7 @@ import java.util.stream.Stream;
* 手动过滤XYZ排信息
* {"y":[1,2,3,104,103,102]}
*/
//@Service("passRCL")
@Service("passRCL")
@Slf4j
public class PassRCLHandler extends Decisioner<StIvtStructattr, JSONObject> {
//现场1/4排深位

View File

@@ -1,6 +1,7 @@
package org.nl.wms.dispatch_manage.task.handler;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -31,6 +32,7 @@ public abstract class AbstractTask {
ISchBaseTaskService taskService = SpringContextHolder.getBean(ISchBaseTaskService.class);
taskService.update(new UpdateWrapper<SchBaseTask>()
.set("status",data.getString("status"))
.set("update_time", DateUtil.now())
.eq("task_code",data.getString("task_code")));
}

View File

@@ -180,6 +180,7 @@ public class OutStorageTask extends AbstractTask {
@Override
public void cancel(JSONObject data) {
this.updateTask(data);
//更新起点终点状态
}
private static String getZdPoint(int row,String source_code) {

View File

@@ -26,8 +26,8 @@
<if test="whereJson.end_time != null">
AND t.create_time <![CDATA[<=]]> #{whereJson.end_time}
</if>
<if test="whereJson.begin_time != null">
AND t.create_time <![CDATA[>=]]> #{whereJson.begin_time}
<if test="whereJson.start_time != null">
AND t.create_time <![CDATA[>=]]> #{whereJson.start_time}
</if>
<if test="collect != null and collect != ''">
AND t.status IN

View File

@@ -13,7 +13,7 @@ public class SchBaseTaskQuery implements Serializable {
private String task_code;
private String vehicle_code;
private String point_code;
private String begin_time;
private String start_time;
private String end_time;
private String more_status;
private String unFinished;

View File

@@ -130,6 +130,9 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
public void operation(JSONObject param) {
String task_code = param.getString("task_code");
SchBaseTask task = this.getOne(new QueryWrapper<SchBaseTask>().eq("task_code", task_code));
if (task==null){
return;
}
if (task.getStatus().equals(StatusEnum.FORM_STATUS.code("完成"))) {
throw new BadRequestException("当前任务已完成");
}
@@ -194,8 +197,11 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
String task_code = param.getString("task_code");
String struct_code = param.getString("struct_code");
StIvtStructattr stIvtStructattr = iStIvtStructattrService.getOne(new QueryWrapper<StIvtStructattr>().eq("struct_code", struct_code));
SchBaseTask task = this.getOne(new QueryWrapper<SchBaseTask>().eq("task_code", task_code));
SchBaseTask task = this.getOne(new QueryWrapper<SchBaseTask>()
.eq("task_code", task_code));
if (task == null){
return null;
}
switch (type) {
case "ck":
MdPbVehicleMater vehicleCode = iMdPbVehicleMaterService.getOne(new QueryWrapper<MdPbVehicleMater>()
@@ -210,6 +216,7 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
iStIvtStructattrService.update(new UpdateWrapper<StIvtStructattr>()
.set("update_time", DateUtil.now())
.set("vehicle_code", null)
.set("lock_type", StatusEnum.LOCK.code("无锁"))
.set("remark", struct_code + "空出异常")
.eq("struct_code", struct_code));
this.update(new UpdateWrapper<SchBaseTask>()
@@ -222,7 +229,6 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
return rm(stIvtStructattr, task);
case "rzd":
JSONObject struct = rzd(stIvtStructattr, task);
return struct;
case "czd":
moveTask(task_code, struct_code, stIvtStructattr);

View File

@@ -97,7 +97,6 @@ public class DeviceManageController {
}
MdPbVehicleMater vehicleMater = iMdPbVehicleMaterService.getOne(new QueryWrapper<MdPbVehicleMater>()
.eq("vehicle_code", vehicleCode)
.isNull("proc_inst_id")
.eq("is_delete", false));
if (vehicleMater == null){
throw new BadRequestException(String.format(vehicleCode+"载具组盘信息不存在"));

View File

@@ -235,11 +235,16 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
.set("frozen_qty", 0)
.eq("is_delete", false)
.in("vehicle_code", Arrays.asList(split)));
//更新点位锁定
iStIvtStructattrService
.update(new UpdateWrapper<StIvtStructattr>()
.set("lock_type",StatusEnum.LOCK.code("无锁"))
.in("vehicle_code", Arrays.asList(split))
);
iStIvtIostorinvDtlService.update(new UpdateWrapper<StIvtIostorinvdtl>()
.set("vehicle_code", null)
.set("vehicle_id", null)
.eq("id", form.getString("id")));
this.update(new UpdateWrapper<StIvtIostorinv>()
.set("status", StatusEnum.FORM_STATUS.code("生成"))
.eq("id", form.getString("inv_id")));

View File

@@ -112,6 +112,10 @@ public class PickingService {
throw new BadRequestException("创建失败:未配置任务类型");
}
String outbound = data.getForm_data().getString("outbound");
String is_move = data.getForm_data().getString("is_move");
if (StringUtils.isEmpty(is_move)){
data.getForm_data().put("is_move","true");
}
if (task_type.equals("23") && StringUtils.isEmpty(outbound)){
throw new BadRequestException("创建失败:拣选出库未选择出库口");
}

View File

@@ -57,7 +57,6 @@ public class TaskScheduleService {
public void taskPublish(){
boolean islock = lock.tryLock();
try {
log.info("111---执行定时任务:-----taskPublish-----");
if (islock){
//查询所有自动下发的任务
List<SchBaseTask> list = iSchBaseTaskService.list(new QueryWrapper<SchBaseTask>().eq("is_send", true)
@@ -65,7 +64,7 @@ public class TaskScheduleService {
if (!CollectionUtils.isEmpty(list)){
List<String> taskCodes = list.stream().map(SchBaseTask::getTask_code).collect(Collectors.toList());
log.info("222---执行定时任务:-----taskPublish-----"+ taskCodes);
log.info("---执行定时222任务:-----taskPublish-----"+ taskCodes);
TableDataInfo response = wmsToAcsService.interationToExt(list, "createTask");
if (!response.getCode().equals(String.valueOf(HttpStatus.HTTP_OK))){
JSONArray results = (JSONArray)JSON.toJSON(response.getData());
@@ -83,7 +82,7 @@ public class TaskScheduleService {
if (!CollectionUtils.isEmpty(taskCodes)){
iSchBaseTaskService.update(new UpdateWrapper<SchBaseTask>()
.set("status",StatusEnum.FORM_STATUS.code("下发"))
.in("task_codse",taskCodes));
.in("task_code",taskCodes));
}
}
}

View File

@@ -7,21 +7,21 @@ spring:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DB_HOST:192.168.1.218}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
url: jdbc:mysql://${DB_HOST:192.168.8.218}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
# url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
username: ${DB_USER:root}
password: ${DB_PWD:123456}
# 初始连接数
initial-size: 5
initial-size: 15
# 最小连接数
min-idle: 15
min-idle: 25
# 最大连接数
max-active: 30
max-active: 40
# 是否自动回收超时连接
remove-abandoned: true
# 超时时间(以秒数为单位)
remove-abandoned-timeout: 10
remove-abandoned-timeout: 20
# 获取连接超时时间
max-wait: 9000
# 连接有效性检测时间

View File

@@ -1,29 +1,29 @@
server:
port: 8011
port: 8012
max-http-header-size: 65536
#配置数据源
spring:
datasource:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
# url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
# url: jdbc:mysql://${DB_HOST:192.168.8.218}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
username: ${DB_USER:root}
# password: ${DB_PWD:123456}
password: ${DB_PWD:123456}
# 初始连接数
initial-size: 10
initial-size: 15
# 最小连接数
min-idle: 10
min-idle: 25
# 最大连接数
max-active: 100
max-active: 40
# 是否自动回收超时连接
remove-abandoned: true
# 超时时间(以秒数为单位)
remove-abandoned-timeout: 180
remove-abandoned-timeout: 20
# 获取连接超时时间
max-wait: 5000
max-wait: 9000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
@@ -112,7 +112,6 @@ jwt:
generator:
enabled: true
# IP 本地解析
ip:
local-parsing: true
@@ -150,38 +149,9 @@ sa-token:
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
# token 前缀
token-prefix:
cookie:
# 配置 Cookie 作用域:根据二级域名实现sso登入如lms.sso.com;acs.sso.com
domain:
is-read-cookie: false
is-print: false
#jetcache:
# defaultCacheType: LOCAL
# statIntervalMinutes: 15
# areaInCacheName: false
# hiddenPackages: com.yb
# local:
# default:
# type: caffeine
# limit: 100
# keyConvertor: fastjson
# expireAfterWriteInMillis: 60000
# remote:
# default:
# type: redis.lettuce
# keyConvertor: fastjson
# valueEncoder: kryo
# valueDecoder: kryo
# poolConfig:
# minIdle: 5
# maxIdle: 200
# maxTotal: 1000
# uri:
# - redis://127.0.0.1:6379
es:
index: mes_log
schedulerFile: C:\lms\scheduler.xml
schedulerFile: /Users/mima0000/Desktop/scheduler.xml
lucene:
index:
path: E:\lms\lucene\index
path: D:\lms\lucene\index

View File

@@ -21,33 +21,40 @@
</el-col>
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
:model="form" size="mini" label-width="100px" label-suffix=":">
<el-form
ref="form"
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
:inline="true"
:model="form"
size="mini"
label-width="100px"
label-suffix=":"
>
<el-form-item label="单据编号" prop="code">
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px"/>
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="单据类型" prop="form_type">
<el-input v-model="form.form_type" disabled clearable style="width: 210px"/>
<el-input v-model="form.form_type" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="业务单据类型" prop="source_form_type">
<el-input v-model="form.biz_code" disabled clearable style="width: 210px"/>
<el-input v-model="form.biz_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="业务单据id" prop="source_form_id">
<el-input v-model="form.biz_code" disabled clearable style="width: 210px"/>
<el-input v-model="form.biz_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="业务单据时间" prop="source_form_date">
<!-- <el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"-->
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
<el-input v-model="form.biz_date" disabled clearable style="width: 210px"/>
<el-input v-model="form.biz_date" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="批次" prop="pcsn">
<el-input v-model="form.pcsn" disabled clearable style="width: 210px"/>
<el-input v-model="form.pcsn" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="物料数量" prop="qty">
<el-input v-model="form.qty" disabled clearable style="width: 210px"/>
<el-input v-model="form.qty" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="载具编号" prop="vehicle_code">
<el-input v-model="form.vehicle_code" disabled clearable style="width: 210px"/>
<el-input v-model="form.vehicle_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="单据状态" prop="status">
<el-select
@@ -70,12 +77,12 @@
<el-form-item label="创建时间" prop="create_time">
<!-- <el-date-picker v-model="form.create_time" type="date" placeholder="选择日期" style="width: 210px"-->
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
<el-input v-model="form.create_time" disabled clearable style="width: 210px" />
</el-form-item>
<template v-for="(col,index) in cols">
<el-form-item label="col.lable" prop="bill_code">
<label slot="label">{{ col.lable }}:</label>
<el-input disabled v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px"/>
<el-input v-model="form.form_data[col.value]" disabled :value="col.value" clearable style="width: 210px" />
</el-form-item>
</template>
</el-form>
@@ -92,20 +99,26 @@
size="mini"
border
:highlight-current-row="true"
@current-change="handleDtlCurrentChange"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDtlCurrentChange"
>
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120"/>
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120"/>
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120"/>
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip/>
<el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip width="120"/>
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
<el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip width="120" />
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
<template slot-scope="scope">
<el-select disabled v-model="tableDtl[scope.$index].unit_id"
class="filter-item" placeholder="单位" size="small" style="width: 90px">
<el-select
v-model="tableDtl[scope.$index].unit_id"
disabled
class="filter-item"
placeholder="单位"
size="small"
style="width: 90px"
>
<el-option
v-for="item in unitDict"
:key="item.value"
@@ -115,29 +128,34 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="vehicle_code" label="拣选载具" show-overflow-tooltip width="120"/>
<el-table-column prop="vehicle_code" label="拣选载具" show-overflow-tooltip width="120" />
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
</template>
</el-table-column>
<el-table-column prop="source_form_id" label="业务单据id" show-overflow-tooltip width="120"/>
<el-table-column prop="source_form_type" label="业务单据类型" show-overflow-tooltip width="120"/>
<el-table-column prop="source_form_date" label="业务单据时间" show-overflow-tooltip width="130"/>
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
:label="item.lable">
<el-table-column prop="source_form_id" label="业务单据id" show-overflow-tooltip width="120" />
<el-table-column prop="source_form_type" label="业务单据类型" show-overflow-tooltip width="120" />
<el-table-column prop="source_form_date" label="业务单据时间" show-overflow-tooltip width="130" />
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
<el-table-column
v-for="(item, index) in dtlCols"
:key="item.value"
width="130"
show-overflow-tooltip
:label="item.lable"
>
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间"/>
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120"/>
<el-table-column prop="create_time" label="创建时间" />
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
</el-table>
</el-card>
<div class="crud-opts2">
<span class="role-span">作业明细</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="right"/>
<slot name="right" />
<el-button
slot="left"
class="filter-item"
@@ -162,18 +180,23 @@
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120"/>
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120"/>
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="90"/>
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="90" />
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip width="150">
<template slot-scope="scope">
<el-input-number v-model="tabledis[scope.$index].qty" clearable style="width: 120px"/>
<el-input-number v-model="tabledis[scope.$index].qty" clearable style="width: 120px" />
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
<template slot-scope="scope">
<el-select v-model="tabledis[scope.$index].unit_id"
class="filter-item" placeholder="单位" size="small" style="width: 90px">
<el-select
v-model="tabledis[scope.$index].unit_id"
class="filter-item"
placeholder="单位"
size="small"
style="width: 90px"
>
<el-option
v-for="item in unitDict"
:key="item.value"
@@ -183,22 +206,29 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="vehicle_code" label="周转载具" show-overflow-tooltip width="120" >
<el-table-column prop="vehicle_code" label="周转载具" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-input v-model="tabledis[scope.$index].vehicle_code" clearable />
</template>
</el-table-column>
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in disCols" :key="item.value"
:label="item.lable">
<el-table-column
v-for="(item, index) in disCols"
:key="item.value"
width="130"
show-overflow-tooltip
:label="item.lable"
>
<template slot-scope="scope">
<el-switch v-if="item.value == 'is_move'"
<el-switch
v-if="item.value == 'is_move'"
v-model="tabledis[scope.$index].form_data[item.value]"
active-color="#409EFF"
inactive-color="#F56C6C"
:active-value=true
:inactive-valu=false
active-value="true"
inactive-valu="false"
/>
<el-select v-if="item.value == 'task_type'"
<el-select
v-if="item.value == 'task_type'"
v-model="tabledis[scope.$index].form_data[item.value]"
clearable
size="mini"
@@ -214,7 +244,8 @@
:value="item.value"
/>
</el-select>
<el-select v-if="item.value == 'outbound'"
<el-select
v-if="item.value == 'outbound'"
v-model="tabledis[scope.$index].form_data[item.value]"
clearable
size="mini"
@@ -230,8 +261,12 @@
/>
</el-select>
<el-input v-if="item.value == 'end_struct_code'" v-model="tabledis[scope.$index].form_data[item.value]" />
<el-input v-if="item.value == 'pick_vehicle'" disabled v-model="tabledis[scope.$index].form_data[item.value]" />
<el-input v-if="item.value == 'pick_vehicle'" v-model="tabledis[scope.$index].form_data[item.value]" disabled />
<el-input v-if="item.value == 'point_code'" v-model="tabledis[scope.$index].form_data[item.value]" />
<!-- <el-input v-if="item.value == 'stor_code'" v-model="tabledis[scope.$index].form_data[item.value]" />-->
<span v-if="item.value == 'stor_code'">
{{ tableEnum.label.st_ivt_bsrealstorattr[tabledis[scope.$index].form_data[item.value]] }}
</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right">
@@ -249,18 +284,17 @@
<script>
import CRUD, { crud } from '@crud/crud'
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
import crudFormData, {inDecision} from "./formData";
import pick from "./pick";
import crudFormData, { inDecision } from './formData'
import pick from './pick'
import measureunit from '@/views/wms/base_manage/measure/measureunit'
export default {
name: 'TaskDialog',
components: { },
mixins: [crud()],
dicts: ['IO_BILL_STATUS', 'VEHICLE_OVER_TYPE', 'PCS_SAL_TYPE'],
statusEnums: [ 'IOBILL_TYPE_OUT','FORM_STATUS' ],
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code' ],
statusEnums: ['IOBILL_TYPE_OUT', 'FORM_STATUS'],
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code'],
props: {
dialogShow: {
type: Boolean,
@@ -289,14 +323,14 @@ export default {
tableDtl: [],
tabledis: [],
vehicledis: [],
vehicleform:{},
un_assign_qty:0,
vehicleform: {},
un_assign_qty: 0,
currentDtl: null,
PickTaskType:[
{"label":"拣选回库","value":"13"},{"label":"拣选出库","value":"23"}
PickTaskType: [
{ 'label': '拣选回库', 'value': '13' }, { 'label': '拣选出库', 'value': '23' }
],
outboundList:[
{"label":"一楼出库口","value":"1101"},{"label":"二楼出库口","value":"2114"}
outboundList: [
{ 'label': '一楼出库口', 'value': '1101' }, { 'label': '二楼出库口', 'value': '2114' }
],
form: {},
rules: {}
@@ -313,14 +347,14 @@ export default {
setForm(row) {
this.dialogVisible = true
this.form = row
let dtl_form_type = this.form.children[0].form_type;
const dtl_form_type = this.form.children[0].form_type
formstruc.getHeader(this.form.form_type).then(res => {
this.cols = res
})
formstruc.getHeader(dtl_form_type).then(res => {
this.dtlCols = res
})
formstruc.getHeader("Picking_Task").then(res => {
formstruc.getHeader('Picking_Task').then(res => {
this.disCols = res
res.forEach(a => {
this.$set(this.disFormData, a.value, '')
@@ -331,21 +365,21 @@ export default {
})
this.queryTableDtl(row.id)
},
addPickTask(){
let dis_assign_qty = 0;
this.tabledis.forEach(a=>{
dis_assign_qty = dis_assign_qty+a.qty
addPickTask() {
let dis_assign_qty = 0
this.tabledis.forEach(a => {
dis_assign_qty = dis_assign_qty + a.qty
})
if (!this.currentDtl) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
let dtl = {};
const dtl = {}
dtl.material_id = this.currentDtl.material_id
dtl.material_name = this.currentDtl.material_name
dtl.material_spec = this.currentDtl.material_spec
dtl.material_pcsn = this.currentDtl.material_pcsn
dtl.qty = this.currentDtl.assign_qty-dis_assign_qty
dtl.qty = this.currentDtl.assign_qty - dis_assign_qty
dtl.pcsn = this.currentDtl.pcsn
dtl.unit_id = this.currentDtl.unit_id
dtl.form_type = 'Picking_Task'
@@ -356,10 +390,12 @@ export default {
dtl.form_data = JSON.parse(JSON.stringify(this.disFormData))
dtl.form_data.pick_vehicle = this.currentDtl.vehicle_code
dtl.form_data.point_code = this.form.form_data.point_code
dtl.form_data.stor_code = this.form.form_data.stor_code
dtl.form_data.is_move = 'true'
this.tabledis.push(dtl)
},
subRow(index){
this.tabledis.splice(this.tabledis.indexOf(index),1)
subRow(index) {
this.tabledis.splice(this.tabledis.indexOf(index), 1)
},
handleDtlCurrentChange(current) {
if (current !== null) {
@@ -371,15 +407,15 @@ export default {
this.currentDtl = {}
}
},
changeTaskType(index,taskType) {
if (taskType == "13"){
let dis_assign_qty = 0;
this.tabledis.forEach(a=>{
dis_assign_qty = dis_assign_qty+a.qty
changeTaskType(index, taskType) {
if (taskType == '13') {
let dis_assign_qty = 0
this.tabledis.forEach(a => {
dis_assign_qty = dis_assign_qty + a.qty
})
this.tabledis[index].qty = this.currentDtl.qty-dis_assign_qty
this.tabledis[index].qty = this.currentDtl.qty - dis_assign_qty
}
if (taskType == "23"){
if (taskType == '23') {
this.tabledis[index].qty = this.currentDtl.assign_qty
}
},
@@ -405,14 +441,14 @@ export default {
})
}
},
closeDialog(){
closeDialog() {
this.$emit('AddChanged')
this.dialogVisible = false
this.tabledis = []
this.tableDtl = []
},
savePickMst(){
pick.updateStatus({"status":"13","id":this.form.id})
savePickMst() {
pick.updateStatus({ 'status': '13', 'id': this.form.id })
this.closeDialog()
},
close() {

View File

@@ -8,33 +8,40 @@
@close="close"
@open="open"
>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true"
:model="form" size="mini" label-width="100px" label-suffix=":">
<el-form
ref="form"
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
:inline="true"
:model="form"
size="mini"
label-width="100px"
label-suffix=":"
>
<el-form-item label="单据编号" prop="code">
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px"/>
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="单据类型" prop="form_type">
<el-input v-model="form.form_type" disabled clearable style="width: 210px"/>
<el-input v-model="form.form_type" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="业务单据类型" prop="source_form_type">
<el-input v-model="form.biz_code" disabled clearable style="width: 210px"/>
<el-input v-model="form.biz_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="业务单据id" prop="source_form_id">
<el-input v-model="form.biz_code" disabled clearable style="width: 210px"/>
<el-input v-model="form.biz_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="业务单据时间" prop="source_form_date">
<!-- <el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"-->
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
<el-input v-model="form.biz_date" disabled clearable style="width: 210px"/>
<el-input v-model="form.biz_date" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="批次" prop="pcsn">
<el-input v-model="form.pcsn" disabled clearable style="width: 210px"/>
<el-input v-model="form.pcsn" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="物料数量" prop="qty">
<el-input v-model="form.qty" disabled clearable style="width: 210px"/>
<el-input v-model="form.qty" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="载具编号" prop="vehicle_code">
<el-input v-model="form.vehicle_code" disabled clearable style="width: 210px"/>
<el-input v-model="form.vehicle_code" disabled clearable style="width: 210px" />
</el-form-item>
<el-form-item label="单据状态" prop="status">
<el-select
@@ -52,17 +59,17 @@
:value="item.value"
/>
</el-select>
<!-- <el-input v-model="form.status" disabled clearable style="width: 210px"/>-->
<!-- <el-input v-model="form.status" disabled clearable style="width: 210px"/>-->
</el-form-item>
<el-form-item label="创建时间" prop="create_time">
<!-- <el-date-picker v-model="form.create_time" type="date" placeholder="选择日期" style="width: 210px"-->
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
<el-input v-model="form.create_time" disabled clearable style="width: 210px" />
</el-form-item>
<template v-for="(col,index) in cols">
<el-form-item label="col.lable" prop="bill_code">
<label slot="label">{{ col.lable }}:</label>
<el-input disabled v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px"/>
<el-input v-model="form.form_data[col.value]" disabled :value="col.value" clearable style="width: 210px" />
</el-form-item>
</template>
</el-form>
@@ -82,14 +89,14 @@
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDtlCurrentChange"
>
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120"/>
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120"/>
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120"/>
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip/>
<el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip/>
<el-table-column prop="vehicle_code" label="拣选载具" show-overflow-tooltip width="120"/>
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120" />
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="120" />
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip />
<el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip />
<el-table-column prop="vehicle_code" label="拣选载具" show-overflow-tooltip width="120" />
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
<template slot-scope="scope">
<template v-for="item in formStatus">
@@ -97,16 +104,21 @@
</template>
</template>
</el-table-column>
<el-table-column prop="source_form_id" label="业务单据id" show-overflow-tooltip width="120"/>
<el-table-column prop="source_form_type" label="业务单据类型" show-overflow-tooltip width="120"/>
<el-table-column prop="source_form_date" label="业务单据时间" show-overflow-tooltip width="130"/>
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120"/>
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
:label="item.lable">
<el-table-column prop="source_form_id" label="业务单据id" show-overflow-tooltip width="120" />
<el-table-column prop="source_form_type" label="业务单据类型" show-overflow-tooltip width="120" />
<el-table-column prop="source_form_date" label="业务单据时间" show-overflow-tooltip width="130" />
<el-table-column prop="parent_id" label="父单据数据id" show-overflow-tooltip width="120" />
<el-table-column
v-for="(item, index) in dtlCols"
:key="item.value"
width="130"
show-overflow-tooltip
:label="item.lable"
>
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间"/>
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120"/>
<el-table-column prop="create_time" label="创建时间" />
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
</el-table>
</el-card>
<div class="crud-opts2">
@@ -124,42 +136,44 @@
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120"/>
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120"/>
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="90"/>
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip width="150"/>
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120" />
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip width="120" />
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip width="90" />
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip width="150" />
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
<template slot-scope="scope">
<el-select disabled v-model="tabledis[scope.$index].unit_id"
class="filter-item" placeholder="单位" size="small" style="width: 90px">
<el-option
v-for="item in unitDict"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
</template>
</el-table-column>
<el-table-column disabled prop="vehicle_code" label="周转载具" show-overflow-tooltip width="120" />
<el-table-column show-overflow-tooltip v-for="(item, index) in disCols" :key="item.value"
:label="item.lable">
<el-table-column
v-for="(item, index) in disCols"
:key="item.value"
show-overflow-tooltip
:label="item.lable"
>
<template slot-scope="scope">
<el-switch disabled v-if="item.value == 'is_artificial'"
<el-switch
v-if="item.value == 'is_move'"
v-model="tabledis[scope.$index].form_data[item.value]"
disabled
active-color="#409EFF"
inactive-color="#F56C6C"
:active-value=true
:inactive-valu=false
active-value="true"
inactive-valu="false"
/>
<el-select disabled v-if="item.value == 'task_type'"
<span v-if="item.value == 'stor_code'">
{{ tableEnum.label.st_ivt_bsrealstorattr[tabledis[scope.$index].form_data[item.value]] }}
</span>
<el-select
v-if="item.value == 'task_type'"
v-model="tabledis[scope.$index].form_data[item.value]"
disabled
clearable
size="mini"
placeholder="任务类型"
class="filter-item"
style="width: 120px"
@change="changeTaskType(scope.$index,tabledis[scope.$index].form_data[item.value])"
>
<el-option
v-for="item in PickTaskType"
@@ -168,8 +182,10 @@
:value="item.value"
/>
</el-select>
<el-select disabled v-if="item.value == 'outbound'"
<el-select
v-if="item.value == 'outbound'"
v-model="tabledis[scope.$index].form_data[item.value]"
disabled
clearable
size="mini"
placeholder="出库口"
@@ -183,25 +199,31 @@
:value="item.value"
/>
</el-select>
<el-input
v-if="item.value == 'point_code'"
v-model="tabledis[scope.$index].form_data[item.value]"
disabled
/>
</template>
</el-table-column>
</el-table>
</el-card>
</el-dialog>
</template>
</template>
<script>
import {crud} from '@crud/crud'
import crudFormData, {getSonFormData} from './formData'
import { crud } from '@crud/crud'
import crudFormData, { getSonFormData } from './formData'
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
export default {
name: 'ViewDialog',
components: {formstruc},
components: { formstruc },
mixins: [crud()],
dicts: ['ST_INV_CP_IN_TYPE', 'product_area', 'IO_BILL_STATUS', 'status', 'SCH_TASK_TYPE_DTL', 'PCS_SAL_TYPE'],
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code', 'bm_measure_unit#unit_name#unit_id'],
props: {
dialogShow: {
type: Boolean,
@@ -225,11 +247,11 @@ export default {
currentdtl: null,
currentDis: {},
form: {},
PickTaskType:[
{"label":"拣选回库","value":"13"},{"label":"拣选出库","value":"23"}
PickTaskType: [
{ 'label': '拣选回库', 'value': '13' }, { 'label': '拣选出库', 'value': '23' }
],
outboundList:[
{"label":"一楼出库口","value":"1101"},{"label":"二楼出库口","value":"2114"}
outboundList: [
{ 'label': '一楼出库口', 'value': '1101' }, { 'label': '二楼出库口', 'value': '2114' }
],
formStatus: [
{
@@ -266,17 +288,17 @@ export default {
setForm(row) {
this.dialogVisible = true
this.form = row
let dtl_form_type = this.form.children[0].form_type;
const dtl_form_type = this.form.children[0].form_type
formstruc.getHeader(this.form.form_type).then(res => {
this.cols = res
})
formstruc.getHeader(dtl_form_type).then(res => {
this.dtlCols = res
})
formstruc.getHeader("Picking_Task").then(res => {
formstruc.getHeader('Picking_Task').then(res => {
this.disCols = res
res.forEach(a => {
this.disFormData[a.value,'']
this.disFormData[a.value, '']
})
}),
this.queryTableDtl(row.id)