rev:新增表处库存点位页面
This commit is contained in:
222
lms/nladmin-ui/src/views/b_lms/pdm/ivt/stpointivt/index.vue
Normal file
222
lms/nladmin-ui/src/views/b_lms/pdm/ivt/stpointivt/index.vue
Normal file
@@ -0,0 +1,222 @@
|
||||
<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-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-switch
|
||||
v-model="query.is_used"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
active-color="#C0CCDA"
|
||||
inactive-color="#409EFF"
|
||||
@change="hand"
|
||||
/>
|
||||
</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="550px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||
<el-form-item label="点位编码" prop="point_code">
|
||||
<el-input v-model="form.point_code" style="width: 370px;"/>
|
||||
</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-select
|
||||
v-model="form.product_area"
|
||||
size="mini"
|
||||
placeholder="生产区域"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
|
||||
>
|
||||
<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="form.point_location"
|
||||
size="mini"
|
||||
placeholder="位置"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.point_location"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="上料位轴编码">
|
||||
<el-input v-model="form.up_scroll" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上料位母卷号">
|
||||
<el-input v-model="form.up_pcsn" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下料位轴编码">
|
||||
<el-input v-model="form.down_scroll" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下料位母卷号">
|
||||
<el-input v-model="form.down_pcsn" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编码">
|
||||
<el-input v-model="form.ext_code" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" />
|
||||
</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="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="up_scroll" width="150" label="表处上料位轴编码" />
|
||||
<el-table-column prop="up_pcsn" width="150" label="表处上料位母卷号" />
|
||||
<el-table-column prop="down_scroll" width="150" label="表处下料位轴编码" />
|
||||
<el-table-column prop="down_pcsn" width="150" label="表处下料位母卷号" />
|
||||
<el-table-column prop="ext_code" label="外部编码" />
|
||||
<el-table-column prop="remark" 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="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 crudStpointivt from './stpointivt'
|
||||
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 = { point_id: null, point_code: null, product_area: null, point_location: null, up_scroll: null, up_pcsn: null, down_scroll: null, down_pcsn: null, ext_code: null, remark: null, is_used: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
export default {
|
||||
name: 'SbPointIvt',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['sch_point_status', 'product_area', 'is_used', 'point_location'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '生箔点位库存',
|
||||
url: 'api/stpointivt',
|
||||
idField: 'point_id',
|
||||
sort: 'point_id,desc',
|
||||
crudMethod: { ...crudStpointivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
point_code: [
|
||||
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
point_status: [
|
||||
{ required: true, message: '点位状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
]
|
||||
}}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/stpointivt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/stpointivt/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/stpointivt',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
level: 3,
|
||||
currentId: 0, menuLoading: false, showButton: false,
|
||||
menus: [], menuIds: [], depts: [], deptDatas: [], // 多选时使用
|
||||
tableData: [{ 'product_area': 'A1' }, { 'product_area': 'A2' }, { 'product_area': 'A3' }, { 'product_area': 'A4' }, { 'product_area': 'LK' }],
|
||||
tableData: [{ 'product_area': 'A1' }, { 'product_area': 'A2' }, { 'product_area': 'A3' }, { 'product_area': 'A4' }, { 'product_area': 'LK' }, { 'product_area': 'B1' }, { 'product_area': 'B2' }, { 'product_area': 'B3' }, { 'product_area': 'B4' }],
|
||||
currentRow: null,
|
||||
permission: {
|
||||
add: ['admin', 'roles:add'],
|
||||
|
||||
Reference in New Issue
Block a user