生箔下料界面、手持登录
This commit is contained in:
@@ -95,7 +95,7 @@ public class AuthorizationController {
|
||||
// 获取权限列表 - 登录查找权限
|
||||
List<String> permissionList = roleService.getPermissionList(userDto);
|
||||
|
||||
// 保存用户信息到session - 登录输入,登出删除
|
||||
// 登录输入,登出删除
|
||||
CurrentUser user = new CurrentUser();
|
||||
user.setId(userDto.getId());
|
||||
user.setUsername(userDto.getUsername());
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package org.nl.modules.security.rest;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.dev33.satoken.stp.SaLoginModel;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.RedisUtils;
|
||||
import org.nl.modules.common.utils.dto.CurrentUser;
|
||||
import org.nl.modules.security.service.dto.AuthUserDto;
|
||||
import org.nl.modules.system.service.RoleService;
|
||||
import org.nl.modules.system.service.UserService;
|
||||
import org.nl.modules.system.service.dto.UserDto;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: lyd
|
||||
* @description: 手持登录鉴权
|
||||
* @Date: 2022/10/10
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/mobile/auth")
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "手持:系统授权接口")
|
||||
public class MobileAuthorizationController {
|
||||
private final RedisUtils redisUtils;
|
||||
private final UserService userService;
|
||||
private final RoleService roleService;
|
||||
|
||||
@ApiOperation("登录授权")
|
||||
@PostMapping(value = "/login")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> login(@Validated @RequestBody AuthUserDto authUser, HttpServletRequest request) throws Exception {
|
||||
// 密码解密 - 前端的加密规则: encrypt(根据实际更改)
|
||||
String password = authUser.getPassword();
|
||||
// String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, authUser.getPassword());
|
||||
// 校验数据库
|
||||
// 根据用户名查询,在比对密码
|
||||
UserDto userDto = userService.findByName(authUser.getUsername()); // 拿不到已经抛出异常
|
||||
if (!userDto.getPassword().equals(SaSecureUtil.md5BySalt(password, "salt"))) { // 这里需要密码加密
|
||||
throw new BadRequestException("账号或密码错误");
|
||||
}
|
||||
// 获取权限列表 - 登录查找权限
|
||||
List<String> permissionList = roleService.getPermissionList(userDto);
|
||||
|
||||
// 登录输入,登出删除
|
||||
CurrentUser user = new CurrentUser();
|
||||
user.setId(userDto.getId());
|
||||
user.setUsername(userDto.getUsername());
|
||||
user.setNickName(userDto.getNickName());
|
||||
user.setUser(userDto);
|
||||
user.setPermissions(permissionList);
|
||||
|
||||
// SaLoginModel 配置登录相关参数
|
||||
StpUtil.login(userDto.getId(), new SaLoginModel()
|
||||
.setDevice("PE") // 此次登录的客户端设备类型, 用于[同端互斥登录]时指定此次登录的设备类型
|
||||
.setExtra("loginInfo", user) // Token挂载的扩展参数 (此方法只有在集成jwt插件时才会生效)
|
||||
);
|
||||
|
||||
// 返回 token 与 用户信息
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("roles", permissionList);
|
||||
jsonObject.put("user", userDto);
|
||||
Map<String, Object> authInfo = new HashMap<String, Object>(2) {{
|
||||
put("token", StpUtil.getTokenValue());
|
||||
put("user", jsonObject);
|
||||
}};
|
||||
|
||||
redisUtils.set("pe-satoken", StpUtil.getTokenValue(), StpUtil.getTokenTimeout());
|
||||
|
||||
return ResponseEntity.ok(authInfo);
|
||||
}
|
||||
}
|
||||
@@ -64,4 +64,12 @@ public class CoolPointIvtController {
|
||||
coolpointivtService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/coolRegionIOQueryAll")
|
||||
@Log("冷却区出入表")
|
||||
@ApiOperation("冷却区出入表")
|
||||
//@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
||||
public ResponseEntity<Object> coolRegionIOQueryAll(@RequestParam Map whereJson, Pageable page){
|
||||
return new ResponseEntity<>(coolpointivtService.coolRegionIOQueryAll(whereJson,page),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,4 +61,12 @@ public interface CoolPointIvtService {
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 冷却区出入分页查询
|
||||
* @param whereJson
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> coolRegionIOQueryAll(Map whereJson, Pageable page);
|
||||
}
|
||||
|
||||
@@ -140,4 +140,24 @@ public class CoolPointIvtServiceImpl implements CoolPointIvtService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 冷却区出入分页查询
|
||||
*
|
||||
* @param whereJson
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> coolRegionIOQueryAll(Map whereJson, Pageable page) {
|
||||
HashMap map = new HashMap();
|
||||
map.put("flag", "2");
|
||||
if (whereJson.get("start_point_code")!=null)
|
||||
map.put("start_point_code", "%" + whereJson.get("start_point_code") + "%");
|
||||
map.put("bill_status", whereJson.get("bill_status"));
|
||||
map.put("begin_time", whereJson.get("begin_time"));
|
||||
map.put("end_time", whereJson.get("end_time"));
|
||||
JSONObject json = WQL.getWO("ST_IVT_COOLPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
输入.is_used TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.start_point_code TYPEAS s_string
|
||||
输入.bill_status TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -84,3 +86,26 @@
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
IF 输入.flag = "2"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
coolregionio.*
|
||||
FROM
|
||||
st_ivt_coolregionio coolregionio
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.start_point_code <> ""
|
||||
start_point_code LIKE 输入.start_point_code
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_status <> ""
|
||||
bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
create_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
create_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
242
nladmin-ui/src/views/wms/pdm/ivt/coolpointivt/coolregionio.vue
Normal file
242
nladmin-ui/src/views/wms/pdm/ivt/coolpointivt/coolregionio.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--工具栏-->
|
||||
<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="起点点位编码" label-width="120px">
|
||||
<el-input
|
||||
v-model="query.start_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.bill_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.st_bill_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<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="520px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="点位编码" prop="point_code">
|
||||
<el-input v-model="form.point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="满轴位编码" prop="full_point_code">
|
||||
<el-input v-model="form.full_point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="母卷号">
|
||||
<el-input v-model="form.container_name" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-input v-model="form.product_area" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch v-model="form.is_used" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="满轴位状态" prop="full_point_status">
|
||||
<el-select
|
||||
v-model="form.full_point_status"
|
||||
size="mini"
|
||||
placeholder="满轴位状态"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_full_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="空轴位状态" prop="empty_point_status">
|
||||
<el-select
|
||||
v-model="form.empty_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_empty_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存状态" prop="cool_ivt_status">
|
||||
<el-select
|
||||
v-model="form.cool_ivt_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_cool_ivt_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<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 prop="bill_code" label="单据编号" />
|
||||
<el-table-column prop="io_type" label="出入类型" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.io_type[scope.row.io_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||
<el-table-column prop="qty" label="数量" />
|
||||
<el-table-column prop="bill_status" label="单据状态" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.st_bill_status[scope.row.bill_status] }}
|
||||
</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="pcsn" label="批次" />
|
||||
<el-table-column prop="start_point_code" label="起始点位编码"/>
|
||||
<el-table-column prop="end_point_code" label="终点点位编码" />
|
||||
<el-table-column prop="create_mode" label="生成方式" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
<el-table-column prop="confirm_time" label="确认时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:is-visiable-del="false"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStIvtCoolpointivt from './coolpointivt'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { iostorinv_id: null, bill_code: null, io_type: null, material_id: null, pcsn: null, vehicle_code: null, qty: null, qty_unit_id: null, bill_status: null, start_point_code: null, end_point_code: null, cust_id: null, create_mode: null, task_id: null, remark: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, confirm_optid: null, confirm_optname: null, confirm_time: null, is_delete: null }
|
||||
export default {
|
||||
name: 'CoolRegionIO',
|
||||
dicts: ['sch_cool_ivt_status', 'ST_CREATE_MODE', 'point_location', 'product_area', 'st_bill_status', 'io_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '冷却区出入',
|
||||
url: 'api/stIvtCoolpointivt/coolRegionIOQueryAll',
|
||||
idField: 'iostorinv_id',
|
||||
sort: 'iostorinv_id,desc',
|
||||
crudMethod: { ...crudStIvtCoolpointivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
full_point_status: [
|
||||
{ required: true, message: '满轴位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
empty_point_status: [
|
||||
{ required: true, message: '空轴位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
cool_ivt_status: [
|
||||
{ required: true, message: '库存状态不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{ key: 'point_code', display_name: '点位编码' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,317 +1,24 @@
|
||||
<template>
|
||||
<div class="app-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-input
|
||||
v-model="query.container_name"
|
||||
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.full_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_full_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="空轴位状态">
|
||||
<el-select
|
||||
v-model="query.empty_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_empty_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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.cool_ivt_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_cool_ivt_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>
|
||||
<el-form-item label="入库时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<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="520px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="点位编码" prop="point_code">
|
||||
<el-input v-model="form.point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="满轴位编码" prop="full_point_code">
|
||||
<el-input v-model="form.full_point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="母卷号">
|
||||
<el-input v-model="form.container_name" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-input v-model="form.product_area" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch v-model="form.is_used" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="满轴位状态" prop="full_point_status">
|
||||
<el-select
|
||||
v-model="form.full_point_status"
|
||||
size="mini"
|
||||
placeholder="满轴位状态"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_full_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="空轴位状态" prop="empty_point_status">
|
||||
<el-select
|
||||
v-model="form.empty_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_empty_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存状态" prop="cool_ivt_status">
|
||||
<el-select
|
||||
v-model="form.cool_ivt_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_cool_ivt_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<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 prop="point_code" label="点位编码" />
|
||||
<el-table-column prop="cool_ivt_status" label="库存状态" min-width="100" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_cool_ivt_status[scope.row.cool_ivt_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="full_point_code" label="满轴位" />
|
||||
<el-table-column prop="full_point_status" label="满轴位状态" min-width="100" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_full_point_status[scope.row.full_point_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="container_name" label="母卷号" />
|
||||
<el-table-column prop="full_vehicle_code" label="母卷轴编号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="empty_point_code" label="空轴位" />
|
||||
<el-table-column prop="empty_point_status" label="空轴位状态" min-width="100" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_empty_point_status[scope.row.empty_point_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="empty_vehicle_code" label="空轴编号" />
|
||||
<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="pcsn" label="批次" />
|
||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/>
|
||||
<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="product_area" label="生产区域" />
|
||||
<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="remark" 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">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:is-visiable-del="false"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date"></i> 库存查询</span>
|
||||
<Inventory/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="生箔下料">
|
||||
<CoolRegionIO/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="出烘箱">出烘箱</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStIvtCoolpointivt from './coolpointivt'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { ivt_id: null, point_code: null, full_point_code: null, container_name: null, workorder_id: null, full_vehicle_code: null, empty_point_code: null, empty_vehicle_code: null, region_id: null, pcsn: null, ivt_qty: null, qty_unit_id: null, instorage_time: 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, full_point_status: null, cool_ivt_status: null, empty_point_status: null }
|
||||
import Inventory from '@/views/wms/pdm/ivt/coolpointivt/inventory'
|
||||
import CoolRegionIO from '@/views/wms/pdm/ivt/coolpointivt/coolregionio'
|
||||
export default {
|
||||
name: 'StIvtCoolpointivt',
|
||||
dicts: ['sch_full_point_status', 'sch_empty_point_status', 'sch_cool_ivt_status', 'is_used', 'point_location', 'product_area'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '冷却区库存',
|
||||
url: 'api/stIvtCoolpointivt',
|
||||
idField: 'ivt_id',
|
||||
sort: 'ivt_id,desc',
|
||||
crudMethod: { ...crudStIvtCoolpointivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
full_point_status: [
|
||||
{ required: true, message: '满轴位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
empty_point_status: [
|
||||
{ required: true, message: '空轴位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
cool_ivt_status: [
|
||||
{ required: true, message: '库存状态不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{ key: 'point_code', display_name: '点位编码' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
components: { CoolRegionIO, Inventory }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
320
nladmin-ui/src/views/wms/pdm/ivt/coolpointivt/inventory.vue
Normal file
320
nladmin-ui/src/views/wms/pdm/ivt/coolpointivt/inventory.vue
Normal file
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--工具栏-->
|
||||
<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-input
|
||||
v-model="query.container_name"
|
||||
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.full_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_full_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="空轴位状态">
|
||||
<el-select
|
||||
v-model="query.empty_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_empty_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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.cool_ivt_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_cool_ivt_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>
|
||||
<el-form-item label="入库时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<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="520px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="点位编码" prop="point_code">
|
||||
<el-input v-model="form.point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="满轴位编码" prop="full_point_code">
|
||||
<el-input v-model="form.full_point_code" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="母卷号">
|
||||
<el-input v-model="form.container_name" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-input v-model="form.product_area" style="width: 370px;" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch v-model="form.is_used" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="满轴位状态" prop="full_point_status">
|
||||
<el-select
|
||||
v-model="form.full_point_status"
|
||||
size="mini"
|
||||
placeholder="满轴位状态"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_full_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="空轴位状态" prop="empty_point_status">
|
||||
<el-select
|
||||
v-model="form.empty_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_empty_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存状态" prop="cool_ivt_status">
|
||||
<el-select
|
||||
v-model="form.cool_ivt_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_cool_ivt_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<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 prop="point_code" label="点位编码" />
|
||||
<el-table-column prop="cool_ivt_status" label="库存状态" min-width="100" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_cool_ivt_status[scope.row.cool_ivt_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="full_point_code" label="满轴位" />
|
||||
<el-table-column prop="full_point_status" label="满轴位状态" min-width="100" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_full_point_status[scope.row.full_point_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="container_name" label="母卷号" />
|
||||
<el-table-column prop="full_vehicle_code" label="母卷轴编号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="empty_point_code" label="空轴位" />
|
||||
<el-table-column prop="empty_point_status" label="空轴位状态" min-width="100" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_empty_point_status[scope.row.empty_point_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="empty_vehicle_code" label="空轴编号" />
|
||||
<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="pcsn" label="批次" />
|
||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/>
|
||||
<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="product_area" label="生产区域" />
|
||||
<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="remark" 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">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:is-visiable-del="false"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStIvtCoolpointivt from './coolpointivt'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { ivt_id: null, point_code: null, full_point_code: null, container_name: null, workorder_id: null, full_vehicle_code: null, empty_point_code: null, empty_vehicle_code: null, region_id: null, pcsn: null, ivt_qty: null, qty_unit_id: null, instorage_time: 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, full_point_status: null, cool_ivt_status: null, empty_point_status: null }
|
||||
export default {
|
||||
name: 'Inventory',
|
||||
dicts: ['sch_full_point_status', 'sch_empty_point_status', 'sch_cool_ivt_status', 'is_used', 'point_location', 'product_area'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '冷却区库存',
|
||||
url: 'api/stIvtCoolpointivt',
|
||||
idField: 'ivt_id',
|
||||
sort: 'ivt_id,desc',
|
||||
crudMethod: { ...crudStIvtCoolpointivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
full_point_status: [
|
||||
{ required: true, message: '满轴位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
empty_point_status: [
|
||||
{ required: true, message: '空轴位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
cool_ivt_status: [
|
||||
{ required: true, message: '库存状态不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{ key: 'point_code', display_name: '点位编码' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user