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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -235,11 +235,16 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
.set("frozen_qty", 0) .set("frozen_qty", 0)
.eq("is_delete", false) .eq("is_delete", false)
.in("vehicle_code", Arrays.asList(split))); .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>() iStIvtIostorinvDtlService.update(new UpdateWrapper<StIvtIostorinvdtl>()
.set("vehicle_code", null) .set("vehicle_code", null)
.set("vehicle_id", null) .set("vehicle_id", null)
.eq("id", form.getString("id"))); .eq("id", form.getString("id")));
this.update(new UpdateWrapper<StIvtIostorinv>() this.update(new UpdateWrapper<StIvtIostorinv>()
.set("status", StatusEnum.FORM_STATUS.code("生成")) .set("status", StatusEnum.FORM_STATUS.code("生成"))
.eq("id", form.getString("inv_id"))); .eq("id", form.getString("inv_id")));

View File

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

View File

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

View File

@@ -7,21 +7,21 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver 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 # 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} username: ${DB_USER:root}
password: ${DB_PWD:123456} 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: true
# 超时时间(以秒数为单位) # 超时时间(以秒数为单位)
remove-abandoned-timeout: 10 remove-abandoned-timeout: 20
# 获取连接超时时间 # 获取连接超时时间
max-wait: 9000 max-wait: 9000
# 连接有效性检测时间 # 连接有效性检测时间

View File

@@ -1,29 +1,29 @@
server: server:
port: 8011 port: 8012
max-http-header-size: 65536
#配置数据源 #配置数据源
spring: spring:
datasource: datasource:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver 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: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: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: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} username: ${DB_USER:root}
# password: ${DB_PWD:123456}
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: true
# 超时时间(以秒数为单位) # 超时时间(以秒数为单位)
remove-abandoned-timeout: 180 remove-abandoned-timeout: 20
# 获取连接超时时间 # 获取连接超时时间
max-wait: 5000 max-wait: 9000
# 连接有效性检测时间 # 连接有效性检测时间
time-between-eviction-runs-millis: 60000 time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间 # 连接在池中最小生存的时间
@@ -112,7 +112,6 @@ jwt:
generator: generator:
enabled: true enabled: true
# IP 本地解析 # IP 本地解析
ip: ip:
local-parsing: true local-parsing: true
@@ -150,38 +149,9 @@ sa-token:
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
# token 前缀 # token 前缀
token-prefix: token-prefix:
cookie:
# 配置 Cookie 作用域:根据二级域名实现sso登入如lms.sso.com;acs.sso.com
domain:
is-read-cookie: false is-read-cookie: false
is-print: false is-print: false
schedulerFile: /Users/mima0000/Desktop/scheduler.xml
#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
lucene: lucene:
index: index:
path: E:\lms\lucene\index path: D:\lms\lucene\index

View File

@@ -21,8 +21,15 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" <el-form
:model="form" size="mini" label-width="100px" label-suffix=":"> 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-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>
@@ -75,7 +82,7 @@
<template v-for="(col,index) in cols"> <template v-for="(col,index) in cols">
<el-form-item label="col.lable" prop="bill_code"> <el-form-item label="col.lable" prop="bill_code">
<label slot="label">{{ col.lable }}:</label> <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> </el-form-item>
</template> </template>
</el-form> </el-form>
@@ -92,8 +99,8 @@
size="mini" size="mini"
border border
:highlight-current-row="true" :highlight-current-row="true"
@current-change="handleDtlCurrentChange"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}" :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="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_id" label="物料id" show-overflow-tooltip width="120" />
@@ -104,8 +111,14 @@
<el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip width="120" /> <el-table-column prop="assign_qty" label="拣选数量" show-overflow-tooltip width="120" />
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120"> <el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select disabled v-model="tableDtl[scope.$index].unit_id" <el-select
class="filter-item" placeholder="单位" size="small" style="width: 90px"> v-model="tableDtl[scope.$index].unit_id"
disabled
class="filter-item"
placeholder="单位"
size="small"
style="width: 90px"
>
<el-option <el-option
v-for="item in unitDict" v-for="item in unitDict"
:key="item.value" :key="item.value"
@@ -125,8 +138,13 @@
<el-table-column prop="source_form_type" label="业务单据类型" 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="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 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" <el-table-column
:label="item.lable"> 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> <template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" /> <el-table-column prop="create_time" label="创建时间" />
@@ -172,8 +190,13 @@
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120"> <el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="tabledis[scope.$index].unit_id" <el-select
class="filter-item" placeholder="单位" size="small" style="width: 90px"> v-model="tabledis[scope.$index].unit_id"
class="filter-item"
placeholder="单位"
size="small"
style="width: 90px"
>
<el-option <el-option
v-for="item in unitDict" v-for="item in unitDict"
:key="item.value" :key="item.value"
@@ -188,17 +211,24 @@
<el-input v-model="tabledis[scope.$index].vehicle_code" clearable /> <el-input v-model="tabledis[scope.$index].vehicle_code" clearable />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in disCols" :key="item.value" <el-table-column
:label="item.lable"> v-for="(item, index) in disCols"
:key="item.value"
width="130"
show-overflow-tooltip
:label="item.lable"
>
<template slot-scope="scope"> <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]" v-model="tabledis[scope.$index].form_data[item.value]"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#F56C6C" inactive-color="#F56C6C"
:active-value=true active-value="true"
:inactive-valu=false 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]" v-model="tabledis[scope.$index].form_data[item.value]"
clearable clearable
size="mini" size="mini"
@@ -214,7 +244,8 @@
:value="item.value" :value="item.value"
/> />
</el-select> </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]" v-model="tabledis[scope.$index].form_data[item.value]"
clearable clearable
size="mini" size="mini"
@@ -230,8 +261,12 @@
/> />
</el-select> </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 == '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 == '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> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" fixed="right"> <el-table-column align="center" label="操作" fixed="right">
@@ -249,11 +284,10 @@
<script> <script>
import CRUD, { crud } from '@crud/crud' import CRUD, { crud } from '@crud/crud'
import formstruc from '@/views/wms/config_manage/formStruc/formstruc' import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
import crudFormData, {inDecision} from "./formData"; import crudFormData, { inDecision } from './formData'
import pick from "./pick"; import pick from './pick'
import measureunit from '@/views/wms/base_manage/measure/measureunit' import measureunit from '@/views/wms/base_manage/measure/measureunit'
export default { export default {
name: 'TaskDialog', name: 'TaskDialog',
components: { }, components: { },
@@ -293,10 +327,10 @@ export default {
un_assign_qty: 0, un_assign_qty: 0,
currentDtl: null, currentDtl: null,
PickTaskType: [ PickTaskType: [
{"label":"拣选回库","value":"13"},{"label":"拣选出库","value":"23"} { 'label': '拣选回库', 'value': '13' }, { 'label': '拣选出库', 'value': '23' }
], ],
outboundList: [ outboundList: [
{"label":"一楼出库口","value":"1101"},{"label":"二楼出库口","value":"2114"} { 'label': '一楼出库口', 'value': '1101' }, { 'label': '二楼出库口', 'value': '2114' }
], ],
form: {}, form: {},
rules: {} rules: {}
@@ -313,14 +347,14 @@ export default {
setForm(row) { setForm(row) {
this.dialogVisible = true this.dialogVisible = true
this.form = row 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 => { formstruc.getHeader(this.form.form_type).then(res => {
this.cols = res this.cols = res
}) })
formstruc.getHeader(dtl_form_type).then(res => { formstruc.getHeader(dtl_form_type).then(res => {
this.dtlCols = res this.dtlCols = res
}) })
formstruc.getHeader("Picking_Task").then(res => { formstruc.getHeader('Picking_Task').then(res => {
this.disCols = res this.disCols = res
res.forEach(a => { res.forEach(a => {
this.$set(this.disFormData, a.value, '') this.$set(this.disFormData, a.value, '')
@@ -332,7 +366,7 @@ export default {
this.queryTableDtl(row.id) this.queryTableDtl(row.id)
}, },
addPickTask() { addPickTask() {
let dis_assign_qty = 0; let dis_assign_qty = 0
this.tabledis.forEach(a => { this.tabledis.forEach(a => {
dis_assign_qty = dis_assign_qty + a.qty dis_assign_qty = dis_assign_qty + a.qty
}) })
@@ -340,7 +374,7 @@ export default {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO) this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return return
} }
let dtl = {}; const dtl = {}
dtl.material_id = this.currentDtl.material_id dtl.material_id = this.currentDtl.material_id
dtl.material_name = this.currentDtl.material_name dtl.material_name = this.currentDtl.material_name
dtl.material_spec = this.currentDtl.material_spec dtl.material_spec = this.currentDtl.material_spec
@@ -356,6 +390,8 @@ export default {
dtl.form_data = JSON.parse(JSON.stringify(this.disFormData)) dtl.form_data = JSON.parse(JSON.stringify(this.disFormData))
dtl.form_data.pick_vehicle = this.currentDtl.vehicle_code dtl.form_data.pick_vehicle = this.currentDtl.vehicle_code
dtl.form_data.point_code = this.form.form_data.point_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) this.tabledis.push(dtl)
}, },
subRow(index) { subRow(index) {
@@ -372,14 +408,14 @@ export default {
} }
}, },
changeTaskType(index, taskType) { changeTaskType(index, taskType) {
if (taskType == "13"){ if (taskType == '13') {
let dis_assign_qty = 0; let dis_assign_qty = 0
this.tabledis.forEach(a => { this.tabledis.forEach(a => {
dis_assign_qty = dis_assign_qty + a.qty 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 this.tabledis[index].qty = this.currentDtl.assign_qty
} }
}, },
@@ -412,7 +448,7 @@ export default {
this.tableDtl = [] this.tableDtl = []
}, },
savePickMst() { savePickMst() {
pick.updateStatus({"status":"13","id":this.form.id}) pick.updateStatus({ 'status': '13', 'id': this.form.id })
this.closeDialog() this.closeDialog()
}, },
close() { close() {

View File

@@ -8,8 +8,15 @@
@close="close" @close="close"
@open="open" @open="open"
> >
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" <el-form
:model="form" size="mini" label-width="100px" label-suffix=":"> 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-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>
@@ -62,7 +69,7 @@
<template v-for="(col,index) in cols"> <template v-for="(col,index) in cols">
<el-form-item label="col.lable" prop="bill_code"> <el-form-item label="col.lable" prop="bill_code">
<label slot="label">{{ col.lable }}:</label> <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> </el-form-item>
</template> </template>
</el-form> </el-form>
@@ -101,8 +108,13 @@
<el-table-column prop="source_form_type" label="业务单据类型" 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="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 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" <el-table-column
:label="item.lable"> 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> <template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" /> <el-table-column prop="create_time" label="创建时间" />
@@ -130,36 +142,38 @@
<el-table-column prop="qty" label="物料数量" show-overflow-tooltip width="150" /> <el-table-column prop="qty" label="物料数量" show-overflow-tooltip width="150" />
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120"> <el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select disabled v-model="tabledis[scope.$index].unit_id" {{ tableEnum.label.bm_measure_unit[scope.row.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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column disabled prop="vehicle_code" label="周转载具" show-overflow-tooltip width="120" /> <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" <el-table-column
:label="item.lable"> v-for="(item, index) in disCols"
:key="item.value"
show-overflow-tooltip
:label="item.lable"
>
<template slot-scope="scope"> <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]" v-model="tabledis[scope.$index].form_data[item.value]"
disabled
active-color="#409EFF" active-color="#409EFF"
inactive-color="#F56C6C" inactive-color="#F56C6C"
:active-value=true active-value="true"
:inactive-valu=false 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]" v-model="tabledis[scope.$index].form_data[item.value]"
disabled
clearable clearable
size="mini" size="mini"
placeholder="任务类型" placeholder="任务类型"
class="filter-item" class="filter-item"
style="width: 120px" style="width: 120px"
@change="changeTaskType(scope.$index,tabledis[scope.$index].form_data[item.value])"
> >
<el-option <el-option
v-for="item in PickTaskType" v-for="item in PickTaskType"
@@ -168,8 +182,10 @@
:value="item.value" :value="item.value"
/> />
</el-select> </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]" v-model="tabledis[scope.$index].form_data[item.value]"
disabled
clearable clearable
size="mini" size="mini"
placeholder="出库口" placeholder="出库口"
@@ -183,6 +199,11 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
<el-input
v-if="item.value == 'point_code'"
v-model="tabledis[scope.$index].form_data[item.value]"
disabled
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -202,6 +223,7 @@ export default {
components: { formstruc }, components: { formstruc },
mixins: [crud()], mixins: [crud()],
dicts: ['ST_INV_CP_IN_TYPE', 'product_area', 'IO_BILL_STATUS', 'status', 'SCH_TASK_TYPE_DTL', 'PCS_SAL_TYPE'], 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: { props: {
dialogShow: { dialogShow: {
type: Boolean, type: Boolean,
@@ -226,10 +248,10 @@ export default {
currentDis: {}, currentDis: {},
form: {}, form: {},
PickTaskType: [ PickTaskType: [
{"label":"拣选回库","value":"13"},{"label":"拣选出库","value":"23"} { 'label': '拣选回库', 'value': '13' }, { 'label': '拣选出库', 'value': '23' }
], ],
outboundList: [ outboundList: [
{"label":"一楼出库口","value":"1101"},{"label":"二楼出库口","value":"2114"} { 'label': '一楼出库口', 'value': '1101' }, { 'label': '二楼出库口', 'value': '2114' }
], ],
formStatus: [ formStatus: [
{ {
@@ -266,14 +288,14 @@ export default {
setForm(row) { setForm(row) {
this.dialogVisible = true this.dialogVisible = true
this.form = row 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 => { formstruc.getHeader(this.form.form_type).then(res => {
this.cols = res this.cols = res
}) })
formstruc.getHeader(dtl_form_type).then(res => { formstruc.getHeader(dtl_form_type).then(res => {
this.dtlCols = res this.dtlCols = res
}) })
formstruc.getHeader("Picking_Task").then(res => { formstruc.getHeader('Picking_Task').then(res => {
this.disCols = res this.disCols = res
res.forEach(a => { res.forEach(a => {
this.disFormData[a.value, ''] this.disFormData[a.value, '']