rev:报表优化、新增区域人员权限
This commit is contained in:
@@ -67,7 +67,27 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="回传区域">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
clearable
|
||||
multiple
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="业务说明">
|
||||
@@ -118,11 +138,12 @@ const defaultForm = {
|
||||
interface_name: null,
|
||||
remark: null,
|
||||
is_back: null,
|
||||
business_comment: null
|
||||
business_comment: null,
|
||||
product_area: null
|
||||
}
|
||||
export default {
|
||||
name: 'Interfaceback',
|
||||
dicts: ['INTERFACEBACK_TYPE', 'is_upload'],
|
||||
dicts: ['INTERFACEBACK_TYPE', 'is_upload', 'product_area'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
323
lms/nladmin-ui/src/views/wms/basedata/product/userArea/index.vue
Normal file
323
lms/nladmin-ui/src/views/wms/basedata/product/userArea/index.vue
Normal file
@@ -0,0 +1,323 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="输入名称或者描述搜索"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation/>
|
||||
</div>
|
||||
<crudOperation :permission="permission"/>
|
||||
</div>
|
||||
<!-- 表单渲染 -->
|
||||
<el-row :gutter="15">
|
||||
<!--角色管理-->
|
||||
<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="17" style="margin-bottom: 10px">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">角色列表</span>
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
:data="crud.data"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="username" label="用户名"/>
|
||||
<el-table-column show-overflow-tooltip prop="person_name" label="姓名"/>
|
||||
<el-table-column prop="name" label="部门"/>
|
||||
<!--<el-table-column show-overflow-tooltip prop="dept" label="部门">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.dept.name }}</div>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- 菜单授权 -->
|
||||
<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="7">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tooltip class="item" effect="dark" content="选择指定角色分配菜单" placement="top">
|
||||
<span class="role-span">区域选择</span>
|
||||
</el-tooltip>
|
||||
<el-button
|
||||
v-permission="['admin','roles:edit']"
|
||||
:disabled="!showButton"
|
||||
:loading="menuLoading"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
style="float: right; padding: 6px 9px"
|
||||
type="primary"
|
||||
@click="saveMenu"
|
||||
>保存
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_area" label="区域" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudUserArea from '@/views/wms/basedata/product/userArea/userArea'
|
||||
import { getDepts, getDeptSuperior } from '@/views/system/dept/dept'
|
||||
import { getChild, getMenusTree } from '@/views/system/menu/menu'
|
||||
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'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
|
||||
const defaultForm = { id: null, name: null, depts: [], description: null, dataScope: '全部', level: 3 }
|
||||
export default {
|
||||
name: 'UserStor',
|
||||
components: { Treeselect, pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '角色',
|
||||
url: 'api/userStor',
|
||||
crudMethod: { ...crudUserArea },
|
||||
optShow: { add: false, reset: false, edit: false, del: false }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
data() {
|
||||
return {
|
||||
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' }],
|
||||
currentRow: null,
|
||||
permission: {
|
||||
add: ['admin', 'roles:add'],
|
||||
edit: ['admin', 'roles:edit'],
|
||||
del: ['admin', 'roles:del']
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
],
|
||||
permission: [
|
||||
{ required: true, message: '请输入权限', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMenuDatas(node, resolve) {
|
||||
setTimeout(() => {
|
||||
getMenusTree(node.data.id ? node.data.id : 0).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
[CRUD.HOOK.afterRefresh]() {
|
||||
this.$refs.menu.setCheckedKeys([])
|
||||
},
|
||||
// 新增前初始化部门信息
|
||||
[CRUD.HOOK.beforeToAdd]() {
|
||||
this.deptDatas = []
|
||||
},
|
||||
// 编辑前初始化自定义数据权限的部门信息
|
||||
[CRUD.HOOK.beforeToEdit](crud, form) {
|
||||
this.deptDatas = []
|
||||
if (form.dataScope === '自定义') {
|
||||
this.getSupDepts(form.depts)
|
||||
}
|
||||
const _this = this
|
||||
form.depts.forEach(function(dept) {
|
||||
_this.deptDatas.push(dept.id)
|
||||
})
|
||||
},
|
||||
// 提交前做的操作
|
||||
[CRUD.HOOK.afterValidateCU](crud) {
|
||||
if (crud.form.dataScope === '自定义' && this.deptDatas.length === 0) {
|
||||
this.$message({
|
||||
message: '自定义数据权限不能为空',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
} else if (crud.form.dataScope === '自定义') {
|
||||
const depts = []
|
||||
this.deptDatas.forEach(function(data) {
|
||||
const dept = { id: data }
|
||||
depts.push(dept)
|
||||
})
|
||||
crud.form.depts = depts
|
||||
} else {
|
||||
crud.form.depts = []
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 触发单选
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
this.showButton = true
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.currentRow = val
|
||||
crudUserArea.queryUserArea(val).then(res => {
|
||||
res.forEach(row => {
|
||||
this.tableData.forEach(selected => {
|
||||
if (selected.product_area === row.product_area) {
|
||||
this.$refs.multipleTable.toggleRowSelection(selected, true)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
menuChange(menu) {
|
||||
// 获取该节点的所有子节点,id 包含自身
|
||||
getChild(menu.id).then(childIds => {
|
||||
// 判断是否在 menuIds 中,如果存在则删除,否则添加
|
||||
if (this.menuIds.indexOf(menu.id) !== -1) {
|
||||
for (let i = 0; i < childIds.length; i++) {
|
||||
const index = this.menuIds.indexOf(childIds[i])
|
||||
if (index !== -1) {
|
||||
this.menuIds.splice(index, 1)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < childIds.length; i++) {
|
||||
const index = this.menuIds.indexOf(childIds[i])
|
||||
if (index === -1) {
|
||||
this.menuIds.push(childIds[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$refs.menu.setCheckedKeys(this.menuIds)
|
||||
})
|
||||
},
|
||||
// 保存菜单
|
||||
saveMenu() {
|
||||
const row = {}
|
||||
row.jo = this.currentRow
|
||||
row.rows = this.$refs.multipleTable.selection
|
||||
crudUserArea.save(row).then(res => {
|
||||
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
// 改变数据
|
||||
update() {
|
||||
// 无刷新更新 表格数据
|
||||
crudRoles.get(this.currentId).then(res => {
|
||||
for (let i = 0; i < this.crud.data.length; i++) {
|
||||
if (res.id === this.crud.data[i].id) {
|
||||
this.crud.data[i] = res
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取部门数据
|
||||
getDepts() {
|
||||
getDepts({ enabled: true }).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
getSupDepts(depts) {
|
||||
const ids = []
|
||||
depts.forEach(dept => {
|
||||
ids.push(dept.id)
|
||||
})
|
||||
getDeptSuperior(ids).then(res => {
|
||||
const date = res.content
|
||||
this.buildDepts(date)
|
||||
this.depts = date
|
||||
})
|
||||
},
|
||||
buildDepts(depts) {
|
||||
depts.forEach(data => {
|
||||
if (data.children) {
|
||||
this.buildDepts(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
data.children = null
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 200)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 如果数据权限为自定义则获取部门数据
|
||||
changeScope() {
|
||||
if (this.form.dataScope === '自定义') {
|
||||
this.getDepts()
|
||||
}
|
||||
},
|
||||
checkboxT(row) {
|
||||
return row.level >= this.level
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.role-span {
|
||||
font-weight: bold;
|
||||
color: #303133;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
::v-deep .vue-treeselect__multi-value {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::v-deep .vue-treeselect__multi-value-item {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function queryStor(data) {
|
||||
return request({
|
||||
url: '/api/userArea/queryStor',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryUserArea(data) {
|
||||
return request({
|
||||
url: '/api/userArea/queryUserArea',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/api/userArea/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getuserArea(data) {
|
||||
return request({
|
||||
url: '/api/userArea/getuserArea',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSect(data) {
|
||||
return request({
|
||||
url: '/api/userArea/getSect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { queryUserArea, queryStor, save, getuserArea, getSect }
|
||||
@@ -99,6 +99,41 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
multiple
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@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.is_virtual"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -160,7 +195,7 @@ import { downloadFile } from '@/utils'
|
||||
const defaultForm = { stockrecord_id: null, cascader: null, struct_id: null, struct_code: null, struct_name: null, workprocedure_id: null, material_id: null, material_code: null, quality_scode: null, pcsn: null, canuse_qty: null, frozen_qty: null, ivt_qty: null, warehousing_qty: null, qty_unit_id: null, instorage_time: null, sale_id: null }
|
||||
export default {
|
||||
name: 'Structivt',
|
||||
dicts: ['ST_QUALITY_SCODE'],
|
||||
dicts: ['ST_QUALITY_SCODE', 'product_area', 'IS_OR_NOT'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -203,6 +238,8 @@ export default {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
console.log(value)
|
||||
debugger
|
||||
this.crud.toQuery()
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0 || crud.status.view > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="crud.cu === 2"
|
||||
:disabled="crud.status.view > 0"
|
||||
type="primary"
|
||||
@click="crud.submitCU"
|
||||
>保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form
|
||||
ref="form"
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||
class="demo-form-inline"
|
||||
size="mini"
|
||||
label-width="auto"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="工艺路线号" prop="processroute_code">
|
||||
<el-input
|
||||
v-model="form.processroute_code"
|
||||
:disabled="crud.status.view > 0"
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺路线名称" prop="processroute_name">
|
||||
<el-input
|
||||
v-model="form.processroute_name"
|
||||
:disabled="crud.status.view > 0"
|
||||
size="mini"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="role-span">工艺路线明细</span>
|
||||
<span v-if="crud.status.cu > 0 || crud.status.view > 0" class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="crud.status.view > 0"
|
||||
@click="insertLine"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
:disabled="crud.status.view > 0"
|
||||
@click="delLine"
|
||||
>
|
||||
删除一行
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
height="400"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column v-model="form.tableData.workprocedure_no" type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="workprocedure_name" label="工序名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="form.tableData[scope.$index].workprocedure_id" style="width: 200px" size="mini" clearable class="edit-input" :disabled="crud.status.view > 0" placeholder="请选择" @change="getName(scope.row)">
|
||||
<el-option
|
||||
v-for="item in workList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workprocedure_code" label="工序号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].workprocedure_code" style="width: 200px" size="mini" class="edit-input" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="process_explain" label="加工说明" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].process_explain" style="width: 200px" size="mini" class="edit-input" :disabled="crud.status.view > 0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_check" label="是否需要质检" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="form.tableData[scope.$index].is_check" style="width: 200px" size="mini" class="edit-input" :disabled="crud.status.view > 0" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in isChckList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudProcessroute from '@/views/wms/pdm/base/routing/processroute'
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
|
||||
const defaultForm = {
|
||||
processroute_id: null,
|
||||
processroute_code: null,
|
||||
processroute_name: null,
|
||||
processroute_status: null,
|
||||
remark: null,
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
mixins: [form(defaultForm), crud()],
|
||||
dicts: ['ST_INV_TYPE_RC'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
workList: [],
|
||||
isChckList: [
|
||||
{ value: '0', label: '否' },
|
||||
{ value: '1', label: '是' }
|
||||
],
|
||||
rules: {
|
||||
processroute_code: [
|
||||
{ required: true, message: '工艺路线编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
processroute_name: [
|
||||
{ required: true, message: '工艺路线名称不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudProcessroute.getWorkList().then(res => {
|
||||
this.workList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
crudProcessroute.getDtl({ 'processroute_id': this.form.processroute_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
const data = this.form.tableData
|
||||
if (data.length === 0) {
|
||||
this.crud.notify('请至少新增一条工艺路线', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const item = data[i]
|
||||
if (!item.workprocedure_id) {
|
||||
this.crud.notify('工序号或者工序名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
crudProcessroute.getDtl({ 'processroute_id': this.form.processroute_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
insertLine() {
|
||||
this.form.tableData.push({ workprocedure_no: '', is_check: '1' })
|
||||
},
|
||||
delLine() {
|
||||
this.form.tableData.splice(-1)
|
||||
},
|
||||
getName(val) {
|
||||
debugger
|
||||
const arr = this.workList
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].value === val.workprocedure_id) {
|
||||
val.workprocedure_code = arr[i].code
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,187 +0,0 @@
|
||||
<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="11 0px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="工艺路线">
|
||||
<el-input
|
||||
v-model="query.processroute_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="工路线编码或名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺路线状态">
|
||||
<el-select
|
||||
v-model="query.processroute_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in procStatusList"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="submit"
|
||||
>
|
||||
提交
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="CancelSubmit"
|
||||
>
|
||||
取消提交
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<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 v-if="false" prop="processroute_id" label="工艺路线标识" />
|
||||
<el-table-column prop="processroute_status" label="状态" :formatter="formatStatus" />
|
||||
<el-table-column prop="processroute_code" label="工艺路线编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.processroute_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="processroute_name" label="工艺路线名称" show-overflow-tooltip min-width="130" />
|
||||
<el-table-column prop="detail_count" label="工序数" />
|
||||
<el-table-column prop="remark" label="备注" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
||||
<el-table-column prop="audit_optname" label="审核人" />
|
||||
<el-table-column prop="audit_time" label="审核时间" width="150px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudProcessroute from '@/views/wms/pdm/base/routing/processroute'
|
||||
import CRUD, { presenter, header, form, crud } 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'
|
||||
import AddDialog from '@/views/wms/pdm/base/routing/AddDialog'
|
||||
export default {
|
||||
name: 'Processroute',
|
||||
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工艺路线',
|
||||
url: 'api/processroute',
|
||||
idField: 'processroute_id',
|
||||
sort: 'processroute_id,desc',
|
||||
crudMethod: { ...crudProcessroute },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
procStatusList: [
|
||||
{ 'label': '生成', 'code': '10' },
|
||||
{ 'label': '提交', 'code': '20' }
|
||||
],
|
||||
permission: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formatStatus(row, column) {
|
||||
if (row.processroute_status === '10') {
|
||||
return '生成'
|
||||
} else if (row.processroute_status === '20') {
|
||||
return '提交'
|
||||
}
|
||||
},
|
||||
canUd(row) {
|
||||
return row.processroute_status !== '10'
|
||||
},
|
||||
submit() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData.length === 0) {
|
||||
return this.crud.notify('请至少选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudProcessroute.submit(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
CancelSubmit() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData.length === 0) {
|
||||
return this.crud.notify('请至少选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudProcessroute.CancelSubmit(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,58 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/processroute',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/processroute/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/processroute',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getWorkList() {
|
||||
return request({
|
||||
url: 'api/processroute/getWorkList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getDtl(params) {
|
||||
return request({
|
||||
url: 'api/processroute/getDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function submit(data) {
|
||||
return request({
|
||||
url: 'api/processroute/submit',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CancelSubmit(data) {
|
||||
return request({
|
||||
url: 'api/processroute/CancelSubmit',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getWorkList, getDtl, submit, CancelSubmit }
|
||||
@@ -1,189 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
size="mini"
|
||||
placeholder="输入工序编码或名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation />
|
||||
<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="600px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||
<el-form-item v-if="false" label="工序标识" prop="workprocedure_id">
|
||||
<el-input v-model="form.workprocedure_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序编码" prop="workprocedure_code">
|
||||
<el-input v-model="form.workprocedure_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称" prop="workprocedure_name">
|
||||
<el-input v-model="form.workprocedure_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否关键工序" prop="is_keyworkprocedure">
|
||||
<el-switch
|
||||
v-model="form.is_keyworkprocedure"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否完工汇报" prop="is_finishback">
|
||||
<el-switch
|
||||
v-model="form.is_finishback"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-switch
|
||||
v-model="form.is_used"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
||||
</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 v-if="false" prop="workprocedure_id" label="工序标识" />
|
||||
<el-table-column prop="workprocedure_code" sortable label="工序编码" />
|
||||
<el-table-column prop="workprocedure_name" label="工序名称" />
|
||||
<el-table-column prop="is_keyworkprocedure" label="是否关键工序" :formatter="format_isOrNot" />
|
||||
<el-table-column prop="is_finishback" label="是否完工汇报" :formatter="format_isOrNot" />
|
||||
<el-table-column prop="is_used" label="是否启用" :formatter="format_isOrNot" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||
<el-table-column v-permission="[]" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudWorkProcedure from '@/views/wms/pdm/base/workProcedure/workProcedure'
|
||||
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 = {
|
||||
workprocedure_id: null,
|
||||
workprocedure_code: null,
|
||||
workprocedure_name: null,
|
||||
is_keyworkprocedure: '0',
|
||||
is_finishback: '0',
|
||||
is_used: '1',
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
is_delete: null,
|
||||
ext_id: null,
|
||||
org_id: null,
|
||||
org_code: null,
|
||||
org_name: null
|
||||
}
|
||||
export default {
|
||||
name: 'WorkProcedure',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工序',
|
||||
url: 'api/workProcedure',
|
||||
idField: 'workprocedure_id',
|
||||
sort: 'workprocedure_id,desc',
|
||||
crudMethod: { ...crudWorkProcedure },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
del: true,
|
||||
download: false,
|
||||
reset: false
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
workProcedure_id: [
|
||||
{ required: true, message: '工序标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
workprocedure_code: [
|
||||
{ required: true, message: '工序编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
workprocedure_name: [
|
||||
{ required: true, message: '工序名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_keyworkprocedure: [
|
||||
{ required: true, message: '是否关键工序不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_finishback: [
|
||||
{ required: true, message: '是否完工汇报不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
format_isOrNot(row, column, value) {
|
||||
return value === '1' ? '是' : '否'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,33 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/workProcedure',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/workProcedure/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/workProcedure',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function downSelect() {
|
||||
return request({
|
||||
url: 'api/workProcedure/downSelect'
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, downSelect }
|
||||
@@ -458,7 +458,7 @@
|
||||
<el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName"/>
|
||||
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
|
||||
<el-table-column prop="is_call" label="是否呼叫" width="100px" :formatter="formatChildCallName"/>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="100px"/>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="150px"/>
|
||||
<el-table-column prop="start_time" label="开始时间" width="150px"/>
|
||||
<el-table-column prop="end_time" label="结束时间" width="150px"/>
|
||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-width="100px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属仓库">
|
||||
@@ -68,6 +68,81 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厚度">
|
||||
<el-input
|
||||
v-model="query.thickness_request"
|
||||
size="mini"
|
||||
clearable
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
multiple
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
>
|
||||
<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.is_virtual"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班次">
|
||||
<el-select
|
||||
v-model="query.classes"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classes"
|
||||
:key="item.id"
|
||||
:label="item.code"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否汇总">
|
||||
<el-select
|
||||
v-model="query.is_all"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -102,8 +177,8 @@
|
||||
<el-table-column show-overflow-tooltip prop="box_no" label="木箱号" :min-width="flexWidth('box_no',crud.data,'木箱号')" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" :min-width="flexWidth('pcsn',crud.data,'子卷号')" />
|
||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'sap批次')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="pcsn" label="子卷号" :min-width="flexWidth('pcsn',crud.data,'子卷号')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'sap批次')" />
|
||||
<el-table-column show-overflow-tooltip prop="net_weight" label="净重" :formatter="crud.formatNum2" :min-width="flexWidth('net_weight',crud.data,'净重')" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" :min-width="flexWidth('qty_unit_name',crud.data,'单位')" />
|
||||
<el-table-column show-overflow-tooltip prop="customer_name" label="客户编码" :min-width="flexWidth('customer_name',crud.data,'客户编码')" />
|
||||
@@ -112,9 +187,9 @@
|
||||
<el-table-column show-overflow-tooltip prop="input_time" label="入库日期" :min-width="flexWidth('input_time',crud.data,'入库日期')" />
|
||||
<el-table-column show-overflow-tooltip prop="date_of_production" label="生产日期" :min-width="flexWidth('date_of_production',crud.data,'生产日期')" />
|
||||
<el-table-column show-overflow-tooltip prop="input_optname" label="入库人" :min-width="flexWidth('input_optname',crud.data,'入库人')" />
|
||||
<el-table-column show-overflow-tooltip prop="width" label="产品规格" :min-width="flexWidth('width',crud.data,'产品规格')" />
|
||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')" />
|
||||
<el-table-column show-overflow-tooltip prop="mass_per_unit_area" label="单位面积" :formatter="crud.formatNum2" :min-width="flexWidth('mass_per_unit_area',crud.data,'单位面积')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="width" label="产品规格" :min-width="flexWidth('width',crud.data,'产品规格')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="mass_per_unit_area" label="单位面积" :formatter="crud.formatNum2" :min-width="flexWidth('mass_per_unit_area',crud.data,'单位面积')" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -144,16 +219,18 @@ export default {
|
||||
optShow: { add: false, reset: true },
|
||||
idField: 'iostorinv_id',
|
||||
url: '/api/in/InQuery',
|
||||
query: { 'is_all': '0' },
|
||||
crudMethod: { ...crudInbillquery }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_INV_IN_TYPE'],
|
||||
dicts: ['io_bill_status', 'ST_INV_IN_TYPE', 'product_area', 'IS_OR_NOT'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
storlist: [],
|
||||
classes: [{ 'id': '1', 'code': '白班' }, { 'id': '2', 'code': '晚班' }],
|
||||
showDtlLoading: false
|
||||
}
|
||||
},
|
||||
@@ -175,11 +252,7 @@ export default {
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
const data = {
|
||||
'stor_id': this.crud.query.stor_id,
|
||||
'bill_type': this.crud.query.bill_type,
|
||||
'with': this.crud.query.with
|
||||
}
|
||||
const data = this.crud.query
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
data.begin_time = this.crud.query.createTime[0]
|
||||
data.end_time = this.crud.query.createTime[1]
|
||||
|
||||
Reference in New Issue
Block a user