first commit
This commit is contained in:
136
lms/nladmin-ui/src/views/wms/pdm/device/index.vue
Normal file
136
lms/nladmin-ui/src/views/wms/pdm/device/index.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">模糊搜索</label>
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入设备编码或名称"
|
||||
style="width: 220px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
</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="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="设备编码">
|
||||
<el-input v-model="form.device_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="form.device_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号">
|
||||
<el-input v-model="form.device_model" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编码">
|
||||
<el-input v-model="form.extend_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备产能">
|
||||
<el-input v-model="form.productivity" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch
|
||||
v-model="form.is_used"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
/>
|
||||
</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="device_code" label="设备编码" :min-width="flexWidth('device_code',crud.data,'设备编码')" />
|
||||
<el-table-column prop="device_name" label="设备名称" :min-width="flexWidth('device_name',crud.data,'设备名称')" />
|
||||
<el-table-column prop="device_model" label="设备型号" :min-width="flexWidth('device_model',crud.data,'设备型号')" />
|
||||
<el-table-column prop="extend_code" label="外部编码" :min-width="flexWidth('extend_code',crud.data,'外部编码')" />
|
||||
<el-table-column prop="productivity" label="设备产能" :min-width="flexWidth('productivity',crud.data,'设备产能')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_used ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBiDevice from './pdmBiDevice'
|
||||
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 = {
|
||||
device_id: null,
|
||||
device_code: null,
|
||||
device_name: null,
|
||||
device_model: null,
|
||||
extend_code: null,
|
||||
productivity: null,
|
||||
remark: null,
|
||||
is_used: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBiDevice',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备管理',
|
||||
url: 'api/pdmBiDevice',
|
||||
idField: 'device_id',
|
||||
sort: 'device_id,desc',
|
||||
crudMethod: { ...crudPdmBiDevice }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
27
lms/nladmin-ui/src/views/wms/pdm/device/pdmBiDevice.js
Normal file
27
lms/nladmin-ui/src/views/wms/pdm/device/pdmBiDevice.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pdmBiDevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pdmBiDevice/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pdmBiDevice',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
228
lms/nladmin-ui/src/views/wms/pdm/group/AddDialog.vue
Normal file
228
lms/nladmin-ui/src/views/wms/pdm/group/AddDialog.vue
Normal file
@@ -0,0 +1,228 @@
|
||||
<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"
|
||||
width="1600px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 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" 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-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="组盘标识" prop="group_id">
|
||||
<el-input v-model="form.group_id" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<el-input v-model="form.storagevehicle_code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
</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" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertdtl()"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="container_code" label="子卷号">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.container_code" style="width: 150px;" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.container_code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip width="190px" prop="material_code" label="物料编码" >
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
<span v-show="scope.row.edit">{{ scope.row.box_code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :min-width="flexWidth('material_name',crud.data,'物料名称')" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="物料数量">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.qty" style="width: 150px;" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.qty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :min-width="flexWidth('unit_name',crud.data,'计量单位')" prop="unit_name" label="计量单位" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="备注">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.remark" style="width: 150px;" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<MaterDialog :dialog-show.sync="materShow" @materialChoose="tableChanged2" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import MaterDialog from '@/views/wms/basedata/material/MaterialDialog'
|
||||
import crudGroup from '@/views/wms/pdm/group/group'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
storagevehicle_code: null,
|
||||
material_name: null,
|
||||
material_code: null,
|
||||
unit_name: null,
|
||||
measure_unit_id: null,
|
||||
pcsn: null,
|
||||
qty: null,
|
||||
remark: null,
|
||||
status: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
ext_code: null,
|
||||
tableData: []
|
||||
}
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
statusEnums: ['FORM_STATUS'],
|
||||
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
dtlShow: false,
|
||||
nowrow: {},
|
||||
nowindex: '',
|
||||
unitDict: [],
|
||||
materType: '03', // 关键成品
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// open() {
|
||||
// this.form.tableData = []
|
||||
// },
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
crudGroup.getDtl({ 'group_id': this.form.group_id }).then(res => {
|
||||
this.form.tableData[0] = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
row.edit = false
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
debugger
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
},
|
||||
async queryMater(index, row) {
|
||||
this.materShow = true
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
async insertdtl() {
|
||||
this.form.tableData.push({ container_code: '', material_code: '', material_name: '', qty: '', measure_unit_id: '', unit_name: '', remark: '', edit: false })
|
||||
},
|
||||
tableChanged2(row) {
|
||||
// 新增一行物料时,给行进行赋值、
|
||||
this.nowrow.material_code = row.material_code
|
||||
this.nowrow.material_name = row.material_name
|
||||
this.nowrow.measure_unit_id = row.measure_unit_id
|
||||
this.nowrow.unit_name = row.unit_name
|
||||
this.nowrow.edit = false
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
185
lms/nladmin-ui/src/views/wms/pdm/group/ViewDialog.vue
Normal file
185
lms/nladmin-ui/src/views/wms/pdm/group/ViewDialog.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="组盘详情"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="载具编码" prop="storagevehicle_code">
|
||||
<label slot="label">载具编码:</label>
|
||||
<el-input v-model="form.storagevehicle_code" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<label slot="label">物料编码:</label>
|
||||
<el-input v-model="form.material_code" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="物料名称">
|
||||
<label slot="label">物料名称:</label>
|
||||
<el-input v-model="form.material_name" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总数量" prop="qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</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="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span2">组盘明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="container_code" label="卷号" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="物料数量" align="center" />
|
||||
<el-table-column prop="measure_unit_id" label="计量单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
import crudGroup from '@/views/wms/pdm/group/group'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'INANDOUT_BILL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.queryTableDtl()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.currentDis = {}
|
||||
this.currentdtl = null
|
||||
this.tableDtl = []
|
||||
this.tabledis = []
|
||||
this.$emit('TaskChanged')
|
||||
},
|
||||
bill_statusFormat(row) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
},
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
task_statusFormat(row) {
|
||||
return this.dict.label.task_status[row.task_status]
|
||||
},
|
||||
work_statusFormat(row) {
|
||||
return this.dict.label.work_status[row.work_status]
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.queryTableDdis()
|
||||
} else {
|
||||
this.tabledis = []
|
||||
this.currentdtl = {}
|
||||
}
|
||||
},
|
||||
invtypeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code === row.source_bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl() {
|
||||
crudGroup.getDtl({ 'group_id': this.form.group_id }).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span2 {
|
||||
padding: 0px 0px 20px 0px;
|
||||
}
|
||||
.crud-opts2 {
|
||||
padding: 10px 0px 0px 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
35
lms/nladmin-ui/src/views/wms/pdm/group/group.js
Normal file
35
lms/nladmin-ui/src/views/wms/pdm/group/group.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/group',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/group/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/group',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDtl(params) {
|
||||
return request({
|
||||
url: '/api/group/getDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getDtl }
|
||||
212
lms/nladmin-ui/src/views/wms/pdm/group/index.vue
Normal file
212
lms/nladmin-ui/src/views/wms/pdm/group/index.vue
Normal file
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
物料查询:
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="物料编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
批次查询:
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
载具编码:
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="载具编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
组盘状态:
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
size="mini"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.GROUP_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--新增表格-->
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="storagevehicle_code" label="载具编码" :min-width="flexWidth('storagevehicle_code',crud.data,'载具编码')">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.storagevehicle_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formattStatus" :min-width="flexWidth('status',crud.data,'状态')" />
|
||||
<el-table-column prop="qty" label="组盘数量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="create_name" label="组盘人" :min-width="flexWidth('create_name',crud.data,'组盘人')" />
|
||||
<el-table-column prop="create_time" label="组盘时间" :min-width="flexWidth('create_time',crud.data,'组盘时间')" />
|
||||
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column
|
||||
v-permission="['admin','Supplierbase:edit','Supplierbase:del']"
|
||||
label="操作"
|
||||
width="150px"
|
||||
lign="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:is-visiable-edit="false"
|
||||
:disabled-dle="scope.row.status === '02'"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<!--放引用的组件-->
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" @materialChoose="materialChoose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudGroup from '@/views/wms/pdm/group/group'
|
||||
import AddDialog from '@/views/wms/pdm/group/AddDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/group/ViewDialog'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import MaterialDialog from '@/views/wms/basedata/material/MaterialDialog'
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
storagevehicle_code: null,
|
||||
material_id: null,
|
||||
material_name: null,
|
||||
material_code: null,
|
||||
material_spec: null,
|
||||
pcsn: null,
|
||||
qty_unit_id: null,
|
||||
qty_unit_name: null,
|
||||
qty: null,
|
||||
remark: null,
|
||||
status: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
ext_code: null,
|
||||
tableData: [],
|
||||
ext_type: null
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Group',
|
||||
components: { ViewDialog, pagination, MaterialDialog, crudOperation, rrOperation, udOperation, AddDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
||||
// 数据字典
|
||||
dicts: ['is_used', 'GROUP_STATUS'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '组盘记录',
|
||||
url: 'api/group',
|
||||
optShow: {
|
||||
add: true,
|
||||
reset: true
|
||||
},
|
||||
idField: 'group_id',
|
||||
sort: 'group_id,desc',
|
||||
crudMethod: { ...crudGroup }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
materialDialog: false,
|
||||
classes: [],
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.GROUP_STATUS[row.status]
|
||||
},
|
||||
querytable() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getMaterial() {
|
||||
this.materialDialog = true
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
unitChange(row) {
|
||||
const split = row.split('@')
|
||||
this.form.qty_unit_id = split[0]
|
||||
this.form.qty_unit_name = split[1]
|
||||
},
|
||||
materialChoose(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_spec = row.material_spec
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
177
lms/nladmin-ui/src/views/wms/pdm/structivt/index.vue
Normal file
177
lms/nladmin-ui/src/views/wms/pdm/structivt/index.vue
Normal file
@@ -0,0 +1,177 @@
|
||||
<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-select
|
||||
clearable
|
||||
v-model="query.region_code"
|
||||
style="width: 120px"
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableEnum.sch_base_region"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位搜索">
|
||||
<el-input
|
||||
v-model="query.point_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="点位编码或名称"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料搜索">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="物料编码、名称或规格"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘号">
|
||||
<el-input
|
||||
v-model="query.storagevehicle_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="托盘号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('struct_code',crud.data,'点位编码')" />
|
||||
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('struct_name',crud.data,'区域编码')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_code',crud.data,'物料规格')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="pcsn" label="批次号" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
|
||||
<el-table-column prop="qty" label="总数" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column label="可用数" :min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.qty - scope.row.frozen_qty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="frozen_qty" label="冻结数" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="unit_name" label="计量单位" :min-width="flexWidth('qty_unit_name',crud.data,'计量单位')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="inbound_time" label="入库时间" :min-width="flexWidth('insert_time',crud.data,'入库时间')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStructivt from '@/views/wms/pdm/structivt/structivt'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'Structivt',
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
tableEnums: ['sch_base_region#region_name#region_code'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '库存管理', url: 'api/regionStruct', idField: 'stockrecord_id', sort: 'stockrecord_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
showDtlLoading: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
crudMethod: { ...crudStructivt }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
permission: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
this.showDtlLoading = true
|
||||
download('/api/structivt/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '成品库存', 'xlsx')
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
65
lms/nladmin-ui/src/views/wms/pdm/structivt/structivt.js
Normal file
65
lms/nladmin-ui/src/views/wms/pdm/structivt/structivt.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/structivt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/structivt/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/structivt',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getStruct() {
|
||||
return request({
|
||||
url: 'api/structivt/getStruct',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getStructById(data) {
|
||||
return request({
|
||||
url: 'api/structivt/getStructById',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getUnits() {
|
||||
return request({
|
||||
url: 'api/structivt/getUnits',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: 'api/structivt/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: 'api/structivt/importExcel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStruct, getStructById, getUnits, save, excelImport }
|
||||
206
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
Normal file
206
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
Normal file
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">工单编号</label>
|
||||
<el-input v-model="query.workorder_code" clearable placeholder="工单编号" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation :crud="crud" />
|
||||
</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="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="工单编号">
|
||||
<el-input v-model="form.workorder_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期">
|
||||
<el-input v-model="form.produce_date" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数量">
|
||||
<el-input v-model="form.plan_qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际数量">
|
||||
<el-input v-model="form.real_qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料标识">
|
||||
<el-input v-model="form.material_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="载具类型">
|
||||
<el-input v-model="form.vehicle_type" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开始时间">
|
||||
<el-input v-model="form.planproducestart_date" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划结束时间">
|
||||
<el-input v-model="form.planproduceend_date" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际开始时间">
|
||||
<el-input v-model="form.realproducestart_date" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际结束时间">
|
||||
<el-input v-model="form.realproduceend_date" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域编码">
|
||||
<el-input v-model="form.region_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域名称">
|
||||
<el-input v-model="form.region_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否需要AGV搬运">
|
||||
<el-input v-model="form.is_needmove" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工单类型">
|
||||
<el-input v-model="form.workorder_type" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车间编码">
|
||||
<el-input v-model="form.workshop_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="form.device_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属工序">
|
||||
<el-input v-model="form.workorder_procedure" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工单状态">
|
||||
<el-input v-model="form.order_status" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开工人">
|
||||
<el-input v-model="form.operator" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产批次号">
|
||||
<el-input v-model="form.batch_no" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组">
|
||||
<el-input v-model="form.team" style="width: 370px;" />
|
||||
</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="workorder_code" label="工单编号" :min-width="flexWidth('workorder_code',crud.data,'工单编号')" />
|
||||
<el-table-column prop="produce_date" label="生产日期" :min-width="flexWidth('produce_date',crud.data,'生产日期')" />
|
||||
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
|
||||
<el-table-column prop="real_qty" label="实际数量" :min-width="flexWidth('real_qty',crud.data,'实际数量')" />
|
||||
<el-table-column prop="material_id" label="物料标识" :min-width="flexWidth('material_id',crud.data,'物料标识')" />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')" />
|
||||
<el-table-column prop="planproducestart_date" label="计划开始时间" :min-width="flexWidth('planproducestart_date',crud.data,'计划开始时间')" />
|
||||
<el-table-column prop="planproduceend_date" label="计划结束时间" :min-width="flexWidth('planproduceend_date',crud.data,'计划结束时间')" />
|
||||
<el-table-column prop="realproducestart_date" label="实际开始时间" :min-width="flexWidth('realproducestart_date',crud.data,'实际开始时间')" />
|
||||
<el-table-column prop="realproduceend_date" label="实际结束时间" :min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')" />
|
||||
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
|
||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||
<el-table-column prop="is_needmove" label="是否需要AGV搬运" :min-width="flexWidth('is_needmove',crud.data,'是否需要AGV搬运')" />
|
||||
<el-table-column prop="workorder_type" label="工单类型" :min-width="flexWidth('workorder_type',crud.data,'工单类型')" />
|
||||
<el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column prop="device_code" label="设备名称" :min-width="flexWidth('device_code',crud.data,'设备名称')" />
|
||||
<el-table-column prop="workorder_procedure" label="所属工序" :min-width="flexWidth('workorder_procedure',crud.data,'所属工序')" />
|
||||
<el-table-column prop="order_status" label="工单状态" :min-width="flexWidth('order_status',crud.data,'工单状态')" />
|
||||
<el-table-column prop="operator" label="开工人" :min-width="flexWidth('operator',crud.data,'开工人')" />
|
||||
<el-table-column prop="batch_no" label="生产批次号" :min-width="flexWidth('batch_no',crud.data,'生产批次号')" />
|
||||
<el-table-column prop="team" label="班组" :min-width="flexWidth('team',crud.data,'班组')" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBdWorkorder from './pdmBdWorkorder'
|
||||
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 = {
|
||||
workorder_id: null,
|
||||
workorder_code: null,
|
||||
produce_date: null,
|
||||
plan_qty: null,
|
||||
real_qty: null,
|
||||
material_id: null,
|
||||
vehicle_type: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
realproduceend_date: null,
|
||||
region_code: null,
|
||||
region_name: null,
|
||||
is_needmove: null,
|
||||
workorder_type: null,
|
||||
passback_status: null,
|
||||
workshop_code: null,
|
||||
ext_id: null,
|
||||
is_delete: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_id: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
device_id: null,
|
||||
device_code: null,
|
||||
workorder_procedure: null,
|
||||
order_status: null,
|
||||
ext_data: null,
|
||||
operator: null,
|
||||
batch_no: null,
|
||||
team: null
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBdWorkorder',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工单管理',
|
||||
url: 'api/pdmBdWorkorder',
|
||||
idField: 'workorder_id',
|
||||
sort: 'workorder_id,desc',
|
||||
crudMethod: { ...crudPdmBdWorkorder }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{ key: 'workorder_code', display_name: '工单编号' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
Reference in New Issue
Block a user