opt:修改优化库区管理功能
This commit is contained in:
@@ -38,46 +38,10 @@ public class Sectattr {
|
||||
* 仓库标识
|
||||
*/
|
||||
private String stor_id;
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
private String stor_type;
|
||||
/**
|
||||
* 容量
|
||||
*/
|
||||
private String capacity;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private String width;
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private String height;
|
||||
/**
|
||||
* 深度
|
||||
*/
|
||||
private String zdepth;
|
||||
/**
|
||||
* 起始X坐标
|
||||
*/
|
||||
private String xqty;
|
||||
/**
|
||||
* 起始Y坐标
|
||||
*/
|
||||
private String yqty;
|
||||
/**
|
||||
* 起始Z坐标
|
||||
*/
|
||||
private String zqty;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String sect_manager_name;
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
private String mobile_no;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -110,26 +74,6 @@ public class Sectattr {
|
||||
* 是否删除
|
||||
*/
|
||||
private boolean is_delete;
|
||||
/**
|
||||
* 背景色
|
||||
*/
|
||||
private String back_ground_color;
|
||||
/**
|
||||
* 前景色
|
||||
*/
|
||||
private String front_ground_color;
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
private String back_ground_pic;
|
||||
/**
|
||||
* 字体显示方向
|
||||
*/
|
||||
private String font_direction_scode;
|
||||
/**
|
||||
* 所在楼层
|
||||
*/
|
||||
private String floor_no;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,4 @@ public interface SectattrMapper extends BaseMapper<Sectattr> {
|
||||
* @return
|
||||
*/
|
||||
IPage<Sectattr> queryAll(@Param("jo")JSONObject jo, @Param("page") IPage<Sectattr> page);
|
||||
|
||||
int getTatol(@Param("jo")JSONObject jsonObject);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.basedata.master.sectattr.service.dao.mapper.SectattrMapper">
|
||||
|
||||
<select id="queryAll" resultType="org.nl.wms.basedata.master.sectattr.service.dao.Sectattr">
|
||||
<select id="queryAll" resultType="org.nl.wms.basedata.master.sectattr.service.dto.SectattrDto">
|
||||
select
|
||||
*
|
||||
sect.*,
|
||||
stor.stor_name
|
||||
from
|
||||
st_ivt_sectattr sect
|
||||
left join st_ivt_bsrealstorattr stor on sect.stor_id=stor.stor_id
|
||||
@@ -20,32 +21,9 @@
|
||||
and sect.sect_name like concat('%',#{jo.search},'%') or sect.sect_code like concat('%',#{jo.search},'%')
|
||||
</if>
|
||||
<if test="jo.stor_id != null and jo.stor_id != ' '">
|
||||
and stor.stor_id = #{jo.stor_id}
|
||||
and sect.stor_id = #{jo.stor_id}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sect.update_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getTatol" resultType="java.lang.Integer">
|
||||
select
|
||||
COUNT(*)
|
||||
from
|
||||
st_ivt_sectattr sect
|
||||
left join st_ivt_bsrealstorattr stor on sect.stor_id=stor.stor_id
|
||||
<where>
|
||||
sect.is_delete = '0'
|
||||
<if test="jo.in_stor_id != null">
|
||||
and sect.stor_id in
|
||||
<foreach item="code" collection="jo.in_stor_id" open="(" separator="," close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="jo.search != null and jo.search != ' '">
|
||||
and sect.search like concat('%',#{jo.search},'%')
|
||||
</if>
|
||||
<if test="jo.stor_id != null and jo.stor_id != ' '">
|
||||
and stor.stor_id = #{jo.stor_id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -52,56 +52,11 @@ public class SectattrDto implements Serializable {
|
||||
*/
|
||||
private String stor_name;
|
||||
|
||||
/**
|
||||
* 仓库类型
|
||||
*/
|
||||
private String stor_type;
|
||||
|
||||
/**
|
||||
* 容量
|
||||
*/
|
||||
private BigDecimal capacity;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 深度
|
||||
*/
|
||||
private BigDecimal zdepth;
|
||||
|
||||
/**
|
||||
* 起始X坐标
|
||||
*/
|
||||
private BigDecimal xqty;
|
||||
|
||||
/**
|
||||
* 起始Y坐标
|
||||
*/
|
||||
private BigDecimal yqty;
|
||||
|
||||
/**
|
||||
* 起始Z坐标
|
||||
*/
|
||||
private BigDecimal zqty;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String sect_manager_name;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
private String mobile_no;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -142,31 +97,6 @@ public class SectattrDto implements Serializable {
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 背景色
|
||||
*/
|
||||
private String back_ground_color;
|
||||
|
||||
/**
|
||||
* 前景色
|
||||
*/
|
||||
private String front_ground_color;
|
||||
|
||||
/**
|
||||
* 背景图片
|
||||
*/
|
||||
private String back_ground_pic;
|
||||
|
||||
/**
|
||||
* 字体显示方向
|
||||
*/
|
||||
private String font_direction_scode;
|
||||
|
||||
/**
|
||||
* 所在楼层
|
||||
*/
|
||||
private BigDecimal floor_no;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
|
||||
@@ -213,8 +213,6 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
if (!StrUtil.isEmpty(is_reversed)) {
|
||||
stor_map.put("is_reversed", is_reversed);
|
||||
}
|
||||
sectattrMapper.selectList(Wrappers.lambdaQuery(Sectattr.class)
|
||||
.eq(StrUtil.isNotEmpty(is_reversed), Sectattr::getZdepth, is_reversed));
|
||||
JSONArray stor_ja = WQL.getWO("QST_STOR_ATTR").addParamMap(stor_map).process().getResultJSONArray(0);
|
||||
for (int i = 0; i < stor_ja.size(); i++) {
|
||||
JSONObject stor_jo = stor_ja.getJSONObject(i);
|
||||
@@ -246,6 +244,7 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
|
||||
@Override
|
||||
public JSONObject getStorSect(JSONObject whereJson) {
|
||||
//TODO,需要优化,不能写死id,可以联合stor表根据is_virtualstore查询为1的仓库
|
||||
List<Sectattr> sectattrs = sectattrMapper.selectList(Wrappers.lambdaQuery(Sectattr.class)
|
||||
.eq(Sectattr::getStor_id, "1582991156504039424")
|
||||
.eq(Sectattr::getSect_type_attr, "09"));
|
||||
|
||||
@@ -20,5 +20,4 @@ public interface StorattrMapper extends BaseMapper<Storattr> {
|
||||
*/
|
||||
IPage<Storattr> queryAll(@Param("search")String search,@Param("page") IPage<Storattr> page);
|
||||
|
||||
int queryAllTotal(@Param("map")HashMap<String, String> map);
|
||||
}
|
||||
|
||||
@@ -13,16 +13,4 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryAllTotal" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM st_ivt_bsrealstorattr stor
|
||||
<where>
|
||||
stor.is_delete = '0'
|
||||
<if test="map.search != null">
|
||||
stor.stor_name like concat('%',#{map.search},'%') or stor.stor_code like concat('%',#{map.search},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -36,16 +36,6 @@ public class StorattrDto implements Serializable {
|
||||
*/
|
||||
private String simple_name;
|
||||
|
||||
/**
|
||||
* 容量
|
||||
*/
|
||||
private BigDecimal stor_capacity;
|
||||
|
||||
/**
|
||||
* 总面积(㎡)
|
||||
*/
|
||||
private BigDecimal total_area;
|
||||
|
||||
/**
|
||||
* 仓库性质
|
||||
*/
|
||||
@@ -57,6 +47,8 @@ public class StorattrDto implements Serializable {
|
||||
|
||||
private String is_materialstore;
|
||||
|
||||
private String is_attachment;
|
||||
|
||||
private String is_productstore;
|
||||
|
||||
private String is_reversed;
|
||||
@@ -65,31 +57,11 @@ public class StorattrDto implements Serializable {
|
||||
|
||||
private String is_mvin_auto_cfm;
|
||||
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String storea_ddress;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String principal;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String office_phone;
|
||||
|
||||
private String mobile_no;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private BigDecimal order_index;
|
||||
|
||||
private String whstate_scode;
|
||||
|
||||
@@ -98,8 +70,6 @@ public class StorattrDto implements Serializable {
|
||||
*/
|
||||
private String is_used;
|
||||
|
||||
private String base_class_id;
|
||||
|
||||
private String create_id;
|
||||
|
||||
private String create_name;
|
||||
@@ -124,7 +94,4 @@ public class StorattrDto implements Serializable {
|
||||
|
||||
private String depart_name;
|
||||
|
||||
private String company_name;
|
||||
|
||||
private String is_attachment;
|
||||
}
|
||||
|
||||
@@ -98,18 +98,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人">
|
||||
<el-input v-model="form.sect_manager_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="mobile_no">
|
||||
<el-input v-model="form.mobile_no" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
@@ -136,10 +124,9 @@
|
||||
<el-table-column prop="sect_code" sortable label="库区编码" />
|
||||
<el-table-column prop="sect_name" label="库区名称" width="150" />
|
||||
<el-table-column prop="simple_name" label="库区简称" width="150" />
|
||||
<el-table-column prop="sect_type_attr" label="库区类型" width="150" :formatter="formatter_sect_type" />
|
||||
<el-table-column prop="stor_name" label="仓库名称" width="150" />
|
||||
<el-table-column prop="capacity" label="容量" />
|
||||
<el-table-column prop="sect_manager_name" label="负责人" />
|
||||
<el-table-column prop="mobile_no" label="联系电话" width="100px" />
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -180,7 +167,6 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { isvalidPhone } from '@/utils/validate'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -190,29 +176,9 @@ const defaultForm = {
|
||||
simple_name: null,
|
||||
sect_type_attr: null,
|
||||
stor_id: null,
|
||||
stor_type: null,
|
||||
capacity: null,
|
||||
width: null,
|
||||
height: null,
|
||||
zdepth: null,
|
||||
xqty: null,
|
||||
yqty: null,
|
||||
zqty: null,
|
||||
sect_manager_name: null,
|
||||
mobile_no: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
back_ground_color: null,
|
||||
front_ground_color: null,
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
floor_no: null,
|
||||
is_used: true,
|
||||
ext_id: null
|
||||
}
|
||||
@@ -232,13 +198,6 @@ export default {
|
||||
})
|
||||
},
|
||||
data() {
|
||||
const validPhone = (rule, value, callback) => {
|
||||
if (value && !isvalidPhone(value)) {
|
||||
callback(new Error('请输入正确的11位手机号码'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const numberOne = (rule, value, callback) => {
|
||||
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
|
||||
const numRe = new RegExp(numReg)
|
||||
@@ -255,9 +214,9 @@ export default {
|
||||
return {
|
||||
stors: [],
|
||||
permission: {
|
||||
add: ['admin', 'user:add'],
|
||||
edit: ['admin', 'user:edit'],
|
||||
del: ['admin', 'user:del']
|
||||
add: ['admin', 'sectattr:add'],
|
||||
edit: ['admin', 'sectattr:edit'],
|
||||
del: ['admin', 'sectattr:del']
|
||||
},
|
||||
rules: {
|
||||
sect_code: [
|
||||
@@ -275,9 +234,6 @@ export default {
|
||||
capacity: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
mobile_no: [
|
||||
{ required: false, trigger: 'blur', validator: validPhone }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -296,6 +252,9 @@ export default {
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
formatter_sect_type(row) {
|
||||
return this.dict.label.st_sect_type[row.sect_type_attr]
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
let msg = '此操作将停用,是否继续!'
|
||||
if (val !== '1') {
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<el-table-column prop="stor_code" label="仓库编码" />
|
||||
<el-table-column prop="stor_name" label="仓库名称" width="150" />
|
||||
<el-table-column prop="simple_name" label="简称" width="130" />
|
||||
<el-table-column prop="stor_type_scode" label="仓库性质" />
|
||||
<el-table-column prop="stor_type_scode" label="仓库性质" :formatter="formatter_stor_type" />
|
||||
<el-table-column prop="ext_id" label="外部标识" width="130" />
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
@@ -252,6 +252,9 @@ export default {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formatter_stor_type(row) {
|
||||
return this.dict.label.st_stor_type[row.stor_type_scode]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user