基础分类、分切输送线
This commit is contained in:
@@ -121,4 +121,12 @@ public class ClassstandardController {
|
|||||||
return new ResponseEntity<>(ClassstandardService.getType(type_id,level), HttpStatus.OK);
|
return new ResponseEntity<>(ClassstandardService.getType(type_id,level), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getClassName")
|
||||||
|
@Log("获取分类名称下拉框")
|
||||||
|
@ApiOperation("获取分类名称下拉框")
|
||||||
|
public ResponseEntity<Object> getClassName() {
|
||||||
|
return new ResponseEntity<>(ClassstandardService.getClassName(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,4 +124,9 @@ public interface ClassstandardService {
|
|||||||
*/
|
*/
|
||||||
String getAllChildIdStr(String class_idStr);
|
String getAllChildIdStr(String class_idStr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分类名称下拉框
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONArray getClassName();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ public class ClassstandardDto implements Serializable {
|
|||||||
@JsonSerialize(using= ToStringSerializer.class)
|
@JsonSerialize(using= ToStringSerializer.class)
|
||||||
private Long class_id;
|
private Long class_id;
|
||||||
|
|
||||||
private String base_data_type;
|
|
||||||
|
|
||||||
private String path_code;
|
private String path_code;
|
||||||
|
|
||||||
private String class_code;
|
private String class_code;
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||||
String base_data_type = (String) whereJson.get("base_data_type");
|
String class_code = (String) whereJson.get("class_code");
|
||||||
String where = "";
|
String where = "";
|
||||||
if (!StrUtil.isEmpty(base_data_type)) {
|
if (!StrUtil.isEmpty(class_code)) {
|
||||||
where = "AND base_data_type = '" + base_data_type + "'";
|
where = "AND class_code = '" + class_code + "'";
|
||||||
}
|
}
|
||||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "(parent_class_id is null OR parent_class_id = '0') AND is_delete = '0'" + where + "", "update_time desc");
|
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "(parent_class_id is null OR parent_class_id = '0') AND is_delete = '0'" + where + "", "update_time desc");
|
||||||
final JSONObject json = rb.pageResult();
|
final JSONObject json = rb.pageResult();
|
||||||
@@ -100,7 +100,7 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
|||||||
public void create(ClassstandardDto dto) {
|
public void create(ClassstandardDto dto) {
|
||||||
String class_code = dto.getClass_code();
|
String class_code = dto.getClass_code();
|
||||||
ClassstandardDto classstandardDto = this.findByCode(class_code);
|
ClassstandardDto classstandardDto = this.findByCode(class_code);
|
||||||
if (classstandardDto != null && classstandardDto.getIs_delete().equals("0") && dto.getBase_data_type().equals(classstandardDto.getBase_data_type())) {
|
if (classstandardDto != null && classstandardDto.getIs_delete().equals("0") ) {
|
||||||
throw new BadRequestException("存在相同的基础类别编号");
|
throw new BadRequestException("存在相同的基础类别编号");
|
||||||
}
|
}
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
@@ -120,10 +120,6 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
|||||||
dto.setPath_code(dto.getClass_code());
|
dto.setPath_code(dto.getClass_code());
|
||||||
dto.setLong_class_code(dto.getClass_code());
|
dto.setLong_class_code(dto.getClass_code());
|
||||||
|
|
||||||
if (StrUtil.equals(dto.getBase_data_type(), "03")) {
|
|
||||||
dto.setIs_modify("0");
|
|
||||||
}
|
|
||||||
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
wo.insert(json);
|
wo.insert(json);
|
||||||
@@ -144,7 +140,7 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
|||||||
|
|
||||||
String class_code = dto.getClass_code();
|
String class_code = dto.getClass_code();
|
||||||
ClassstandardDto classstandardDto = this.findByCode(class_code);
|
ClassstandardDto classstandardDto = this.findByCode(class_code);
|
||||||
if (classstandardDto != null && !dto.getClass_id().equals(classstandardDto.getClass_id()) && classstandardDto.getIs_delete().equals("0") && dto.getBase_data_type().equals(classstandardDto.getBase_data_type())) {
|
if (classstandardDto != null && !dto.getClass_id().equals(classstandardDto.getClass_id()) && classstandardDto.getIs_delete().equals("0") ) {
|
||||||
throw new BadRequestException("存在相同的供应商编号");
|
throw new BadRequestException("存在相同的供应商编号");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,15 +236,10 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getSuperior(JSONObject jo, JSONArray ja) {
|
public JSONArray getSuperior(JSONObject jo, JSONArray ja) {
|
||||||
String base_data_type=jo.getString("base_data_type");
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||||
if (StrUtil.isEmpty(jo.getString("parent_class_id")) || jo.getString("parent_class_id").equals("0")) {
|
if (StrUtil.isEmpty(jo.getString("parent_class_id")) || jo.getString("parent_class_id").equals("0")) {
|
||||||
JSONArray null_pids = new JSONArray();
|
JSONArray null_pids = new JSONArray();
|
||||||
if (jo.getString("base_data_type").equals(base_data_type)) {
|
|
||||||
null_pids = wo.query("(parent_class_id = '0' OR parent_class_id is null) and is_delete = '0' and base_data_type = '"+base_data_type+"'").getResultJSONArray(0);
|
|
||||||
} else {
|
|
||||||
null_pids = wo.query("(parent_class_id = '0' OR parent_class_id is null) and is_delete = '0'").getResultJSONArray(0);
|
null_pids = wo.query("(parent_class_id = '0' OR parent_class_id is null) and is_delete = '0'").getResultJSONArray(0);
|
||||||
}
|
|
||||||
|
|
||||||
for (int m = 0; m < null_pids.size(); m++) {
|
for (int m = 0; m < null_pids.size(); m++) {
|
||||||
JSONObject null_pid = null_pids.getJSONObject(m);
|
JSONObject null_pid = null_pids.getJSONObject(m);
|
||||||
@@ -536,6 +527,21 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray getClassName() {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||||
|
// 获取的是父节点
|
||||||
|
JSONArray result = wo.query("(parent_class_id is null OR parent_class_id = '0') AND is_delete = '0'").getResultJSONArray(0);
|
||||||
|
JSONArray res = new JSONArray();
|
||||||
|
for (int i=0; i<result.size(); i++) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("label", result.getJSONObject(i).get("class_name"));
|
||||||
|
jsonObject.put("value", result.getJSONObject(i).get("class_code"));
|
||||||
|
res.add(jsonObject);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updateSubCnt(Long Id) {
|
public void updateSubCnt(Long Id) {
|
||||||
if (Id != null && Id != 0) {
|
if (Id != null && Id != 0) {
|
||||||
|
|||||||
Binary file not shown.
@@ -26,6 +26,15 @@ public class DeliveryPointIvtDto implements Serializable {
|
|||||||
/** 生产区域 */
|
/** 生产区域 */
|
||||||
private String product_area;
|
private String product_area;
|
||||||
|
|
||||||
|
/** 点位状态 **/
|
||||||
|
private String point_status;
|
||||||
|
|
||||||
|
/** 载具码 **/
|
||||||
|
private String vehicle_code;
|
||||||
|
|
||||||
|
/** 气涨轴 **/
|
||||||
|
private String qzzno;
|
||||||
|
|
||||||
/** 位置 */
|
/** 位置 */
|
||||||
private String point_location;
|
private String point_location;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.wql.core.bean.ResultBean;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.nl.wms.pdm.ivt.service.DeliveryPointIvtService;
|
import org.nl.wms.pdm.ivt.service.DeliveryPointIvtService;
|
||||||
@@ -36,9 +36,14 @@ public class DeliveryPointIvtServiceImpl implements DeliveryPointIvtService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String,Object> queryAll(Map whereJson, Pageable page){
|
public Map<String,Object> queryAll(Map whereJson, Pageable page){
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_deliverypointivt");
|
JSONObject map = new JSONObject();
|
||||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1", "update_time desc");
|
map.put("flag", "1");
|
||||||
final JSONObject json = rb.pageResult();
|
if (!ObjectUtil.isNull(whereJson.get("point_code")))
|
||||||
|
map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
||||||
|
map.put("product_area", whereJson.get("product_area"));
|
||||||
|
map.put("point_status", whereJson.get("point_status"));
|
||||||
|
map.put("is_used", whereJson.get("is_used"));
|
||||||
|
JSONObject json = WQL.getWO("ST_IVT_DELIVERYPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 分切输送线点位库存
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.point_code TYPEAS s_string
|
||||||
|
输入.point_status TYPEAS s_string
|
||||||
|
输入.product_area TYPEAS s_string
|
||||||
|
输入.is_used TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
PAGEQUERY
|
||||||
|
SELECT
|
||||||
|
deliver.*
|
||||||
|
FROM
|
||||||
|
st_ivt_deliverypointivt deliver
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
OPTION 输入.point_code <> ""
|
||||||
|
point_code LIKE 输入.point_code
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.point_status <> ""
|
||||||
|
point_status = 输入.point_status
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.is_used <> ""
|
||||||
|
is_used = 输入.is_used
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
@@ -210,6 +210,18 @@ function CRUD(options) {
|
|||||||
callVmHook(crud, CRUD.HOOK.afterToAdd, crud.form)
|
callVmHook(crud, CRUD.HOOK.afterToAdd, crud.form)
|
||||||
callVmHook(crud, CRUD.HOOK.afterToCU, crud.form)
|
callVmHook(crud, CRUD.HOOK.afterToCU, crud.form)
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 启动添加 可携带参数
|
||||||
|
*/
|
||||||
|
toAddAndData(data) {
|
||||||
|
crud.resetForm(JSON.parse(JSON.stringify(data)))
|
||||||
|
if (!(callVmHook(crud, CRUD.HOOK.beforeToAdd, crud.form) && callVmHook(crud, CRUD.HOOK.beforeToCU, crud.form))) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
crud.status.add = CRUD.STATUS.PREPARED
|
||||||
|
callVmHook(crud, CRUD.HOOK.afterToAdd, crud.form)
|
||||||
|
callVmHook(crud, CRUD.HOOK.afterToCU, crud.form)
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 启动编辑
|
* 启动编辑
|
||||||
* @param {*} data 数据项
|
* @param {*} data 数据项
|
||||||
|
|||||||
@@ -72,4 +72,11 @@ export function getClassTable(params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getClass, getClassSuperior, getClassType, getClassTable, getType, queryClassById }
|
export function getClassName() {
|
||||||
|
return request({
|
||||||
|
url: 'api/Classstandard/getClassName',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, getClass, getClassSuperior, getClassType, getClassTable, getType, queryClassById, getClassName }
|
||||||
|
|||||||
@@ -2,33 +2,49 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-row>
|
<div v-if="crud.props.searchToggle">
|
||||||
<el-col :span="8">
|
<!-- 搜索 -->
|
||||||
<el-row>
|
<el-form
|
||||||
<el-col :span="9">
|
:inline="true"
|
||||||
<span style="line-height:36px;text-align: center">基础分类:</span>
|
class="demo-form-inline"
|
||||||
</el-col>
|
label-position="right"
|
||||||
<el-col :span="15">
|
label-width="90px"
|
||||||
<el-select
|
label-suffix=":"
|
||||||
v-model="query.base_data_type"
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
>
|
||||||
|
<el-form-item label="分类名称">
|
||||||
|
<el-select
|
||||||
|
v-model="query.class_code"
|
||||||
|
placeholder="请选择分类名称"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 185px;"
|
||||||
|
@change="hand">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.base_data"
|
v-for="item in classNames"
|
||||||
:key="item.id"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value">
|
||||||
/>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
<rrOperation :crud="crud" />
|
||||||
</el-col>
|
</el-form>
|
||||||
<el-col :span="4">
|
</div>
|
||||||
<rrOperation />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-s-operation"
|
||||||
|
@click="ToExpandall"
|
||||||
|
>
|
||||||
|
全部展开
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@@ -44,21 +60,6 @@
|
|||||||
<el-form-item label="分类名称" prop="class_name">
|
<el-form-item label="分类名称" prop="class_name">
|
||||||
<el-input v-model="form.class_name" style="width: 370px;" />
|
<el-input v-model="form.class_name" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="基础分类" prop="base_data_type">
|
|
||||||
<el-select
|
|
||||||
v-model="form.base_data_type"
|
|
||||||
placeholder=""
|
|
||||||
@change="dataTypeChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.base_data"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<span style="color: #C0C0C0;margin-left: 10px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="简要描述" prop="class_desc">
|
<el-form-item label="简要描述" prop="class_desc">
|
||||||
<el-input v-model="form.class_desc" style="width: 370px;" />
|
<el-input v-model="form.class_desc" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -105,17 +106,20 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="150px"
|
width="250px"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
style="display: inline"
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
:disabled-edit="scope.row.is_modify === '0'"
|
:disabled-edit="scope.row.is_modify === '0'"
|
||||||
:disabled-dle="scope.row.is_modify === '0'"
|
:disabled-dle="scope.row.is_modify === '0'"
|
||||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||||
/>
|
/>
|
||||||
|
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus-outline" @click="crud.toAddAndData(addSibling(scope.row))">新增同级</el-button>
|
||||||
|
<el-button slot="right" size="mini" type="text" icon="el-icon-circle-plus" @click="crud.toAddAndData(addChildren(scope.row))">新增子级</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -135,7 +139,7 @@ import udOperation from '@crud/UD.operation'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
const defaultForm = {
|
let defaultForm = {
|
||||||
class_id: null,
|
class_id: null,
|
||||||
base_data_type: null,
|
base_data_type: null,
|
||||||
path_code: null,
|
path_code: null,
|
||||||
@@ -180,14 +184,12 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
classes: [],
|
classes: [],
|
||||||
|
classNames: [],
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
class_id: [
|
class_id: [
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
base_data_type: [
|
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
path_code: [
|
path_code: [
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
@@ -218,7 +220,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getClassNames() // 获取分类
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getClassNames() {
|
||||||
|
crudClassstandard.getClassName().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
|
||||||
|
this.classNames = res
|
||||||
|
})
|
||||||
|
},
|
||||||
getClassDatas(tree, treeNode, resolve) {
|
getClassDatas(tree, treeNode, resolve) {
|
||||||
const params = { pid: tree.id }
|
const params = { pid: tree.id }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -318,6 +328,72 @@ export default {
|
|||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
clearFrom() {
|
||||||
|
defaultForm = {
|
||||||
|
id: null,
|
||||||
|
class_id: null,
|
||||||
|
base_data_type: null,
|
||||||
|
path_code: null,
|
||||||
|
class_code: null,
|
||||||
|
long_class_code: null,
|
||||||
|
class_name: null,
|
||||||
|
class_desc: null,
|
||||||
|
parent_class_id: null,
|
||||||
|
is_leaf: null,
|
||||||
|
sub_count: null,
|
||||||
|
is_modify: null,
|
||||||
|
is_delete: null,
|
||||||
|
class_level: null,
|
||||||
|
ext_id: null,
|
||||||
|
ext_parent_id: null,
|
||||||
|
create_id: null,
|
||||||
|
create_name: null,
|
||||||
|
create_time: null,
|
||||||
|
update_optid: null,
|
||||||
|
update_optname: null,
|
||||||
|
update_time: null,
|
||||||
|
isTop: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addSibling(row) {
|
||||||
|
this.clearFrom() // 将默认的表单数据清除
|
||||||
|
defaultForm.id = row.id // 获取分类树的id - 懒加载依赖此id,不可为空
|
||||||
|
defaultForm.class_id = row.class_id
|
||||||
|
defaultForm.parent_class_id = row.parent_class_id // 同级为父类class_id
|
||||||
|
defaultForm.isTop = row.isTop
|
||||||
|
return defaultForm
|
||||||
|
},
|
||||||
|
addChildren(row) {
|
||||||
|
this.clearFrom()
|
||||||
|
defaultForm.id = row.id // 获取分类树的id
|
||||||
|
defaultForm.class_id = row.parent_class_id
|
||||||
|
defaultForm.parent_class_id = row.id // 子级为本身的class_id
|
||||||
|
defaultForm.isTop = row.isTop
|
||||||
|
return defaultForm
|
||||||
|
},
|
||||||
|
// 全部展开 参考:https://www.cnblogs.com/toughy/p/12667805.html
|
||||||
|
ToExpandall() {
|
||||||
|
const els = document.getElementsByClassName('el-table__expand-icon')
|
||||||
|
if (this.crud.data.length !== 0 && els.length !== 0) {
|
||||||
|
for (let j1 = 0; j1 < els.length; j1++) {
|
||||||
|
els[j1].classList.add('dafult')
|
||||||
|
}
|
||||||
|
if (this.$el.getElementsByClassName('el-table__expand-icon--expanded')) {
|
||||||
|
const open = this.$el.getElementsByClassName('el-table__expand-icon--expanded')
|
||||||
|
for (let j = 0; j < open.length; j++) {
|
||||||
|
open[j].classList.remove('dafult')
|
||||||
|
}
|
||||||
|
const dafult = this.$el.getElementsByClassName('dafult')
|
||||||
|
for (let a = 0; a < dafult.length; a++) {
|
||||||
|
debugger
|
||||||
|
dafult[a].click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,19 +92,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="基础分类" prop="class_id">
|
|
||||||
<treeselect
|
|
||||||
v-model="form.class_id"
|
|
||||||
:load-options="loadClass"
|
|
||||||
:options="classes"
|
|
||||||
style="width: 200px;"
|
|
||||||
placeholder="请选择"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" style="width: 600px;" type="textarea" />
|
<el-input v-model="form.remark" style="width: 600px;" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -228,7 +228,11 @@
|
|||||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/>
|
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/>
|
||||||
<el-table-column prop="qty_unit_name" label="计量单位" />
|
<el-table-column prop="qty_unit_name" label="计量单位" />
|
||||||
<el-table-column prop="instorage_time" label="入库时间" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="instorage_time" label="入库时间" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="product_area" label="生产区域" />
|
<el-table-column prop="product_area" label="生产区域" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.product_area[scope.row.product_area] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="point_location" label="位置" >
|
<el-table-column prop="point_location" label="位置" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.point_location[scope.row.point_location] }}
|
{{ dict.label.point_location[scope.row.point_location] }}
|
||||||
|
|||||||
@@ -2,25 +2,137 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="90px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="点位编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.point_code"
|
||||||
|
clearable
|
||||||
|
placeholder="输入点位编码"
|
||||||
|
style="width: 185px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="生产区域">
|
||||||
|
<el-select
|
||||||
|
v-model="query.product_area"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 185px;"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.product_area"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态">
|
||||||
|
<el-select
|
||||||
|
v-model="query.point_status"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 185px;"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.delivery_point_status"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-switch
|
||||||
|
@change="hand"
|
||||||
|
v-model="query.is_used"
|
||||||
|
active-value="0"
|
||||||
|
inactive-value="1"
|
||||||
|
active-color="#C0CCDA"
|
||||||
|
inactive-color="#409EFF"/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation :crud="crud" />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission" />
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
<el-form-item label="点位编码" prop="point_code">
|
<el-form-item label="点位编码" prop="point_code">
|
||||||
<el-input v-model="form.point_code" style="width: 370px;" />
|
<el-input v-model="form.point_code" style="width: 370px;" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产区域">
|
<el-form-item label="生产区域">
|
||||||
<el-input v-model="form.product_area" style="width: 370px;" />
|
<el-select
|
||||||
|
v-model="form.product_area"
|
||||||
|
size="mini"
|
||||||
|
placeholder="生产区域"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 370px;"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.product_area"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具码">
|
||||||
|
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="气涨轴">
|
||||||
|
<el-input v-model="form.qzzno" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态">
|
||||||
|
<el-select
|
||||||
|
v-model="form.point_status"
|
||||||
|
size="mini"
|
||||||
|
placeholder="点位状态"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 370px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.delivery_point_status"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="位置">
|
<el-form-item label="位置">
|
||||||
<el-input v-model="form.point_location" style="width: 370px;" />
|
<el-select
|
||||||
|
v-model="form.point_location"
|
||||||
|
size="mini"
|
||||||
|
placeholder="位置"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 370px;"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.point_location"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="顺序号" prop="sort_seq" >
|
<el-form-item label="顺序号" prop="sort_seq" >
|
||||||
<el-input v-model="form.sort_seq" style="width: 370px;" />
|
<el-input v-model="form.sort_seq" style="width: 370px;" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用" prop="is_used">
|
<el-form-item label="是否启用" prop="is_used">
|
||||||
<el-input v-model="form.is_used" style="width: 370px;" />
|
<el-switch v-model="form.is_used" active-value="1" inactive-value="0"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" style="width: 370px;" />
|
<el-input v-model="form.remark" style="width: 370px;" />
|
||||||
@@ -35,16 +147,36 @@
|
|||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="point_code" label="点位编码" />
|
<el-table-column prop="point_code" label="点位编码" />
|
||||||
<el-table-column prop="product_area" label="生产区域" />
|
<el-table-column prop="vehicle_code" label="载具码" />
|
||||||
<el-table-column prop="point_location" label="位置" />
|
<el-table-column prop="qzzno" label="气涨轴" />
|
||||||
<el-table-column prop="is_used" label="是否启用" />
|
<el-table-column prop="point_status" label="点位状态" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.delivery_point_status[scope.row.point_status] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="product_area" label="生产区域" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.product_area[scope.row.product_area] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="point_location" label="位置" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.point_location[scope.row.point_location] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="is_used" label="是否启用" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.is_used[scope.row.is_used] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="remark" label="备注" />
|
||||||
<el-table-column prop="update_time" label="修改时间" />
|
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
|
:is-visiable-del="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -63,13 +195,27 @@ import crudOperation from '@crud/CRUD.operation'
|
|||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
const defaultForm = { ivt_id: null, point_code: null, product_area: null, point_location: null, sort_seq: null, is_used: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
const defaultForm = { ivt_id: null, point_code: null, product_area: null, qzzno: null, vehicle_code: null, point_status: null, point_location: null, sort_seq: null, is_used: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'DeliveryPointIvt',
|
name: 'DeliveryPointIvt',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
dicts: ['delivery_point_status', 'product_area', 'is_used', 'point_location'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '分切输送线', url: 'api/deliverypointivt', idField: 'ivt_id', sort: 'ivt_id,desc', crudMethod: { ...crudDeliverypointivt }})
|
return CRUD({
|
||||||
|
title: '分切输送线',
|
||||||
|
url: 'api/deliverypointivt',
|
||||||
|
idField: 'ivt_id',
|
||||||
|
sort: 'ivt_id,desc',
|
||||||
|
crudMethod: { ...crudDeliverypointivt },
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: true,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -79,9 +225,6 @@ export default {
|
|||||||
point_code: [
|
point_code: [
|
||||||
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
sort_seq: [
|
|
||||||
{ required: true, message: '顺序号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
is_used: [
|
is_used: [
|
||||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
@@ -91,6 +234,9 @@ export default {
|
|||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user