Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -11,6 +11,15 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保养项目">
|
||||
<el-input
|
||||
v-model="query.maint_item_code"
|
||||
@@ -89,6 +98,20 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="设备类别:" prop="material_type_id">
|
||||
<treeselect
|
||||
v-model="form.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 230px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="保养内容:" prop="contents">
|
||||
@@ -124,6 +147,7 @@
|
||||
<el-table-column v-if="false" prop="maint_item_id" label="设备保养项目标识" />
|
||||
<el-table-column prop="maint_item_code" label="保养项目编码" />
|
||||
<el-table-column prop="maint_item_name" label="保养项目名称" />
|
||||
<el-table-column prop="class_name" label="设备类别" />
|
||||
<el-table-column prop="item_level" label="保养等级" :formatter="formatLevel"/>
|
||||
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
|
||||
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
|
||||
@@ -153,11 +177,15 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
const defaultForm = { maint_item_id: null, maint_item_code: null, maint_item_name: null, item_level: null, contents: null, requirement: null, acceptancecriteria: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||
const defaultForm = { material_type_id: null, maint_item_id: null, maint_item_code: null, maint_item_name: null, item_level: null, contents: null, requirement: null, acceptancecriteria: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||
export default {
|
||||
name: 'Devicemaintenanceitems',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -176,6 +204,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
itemLevelList: [
|
||||
{ 'label': '日常', 'value': '01' },
|
||||
{ 'label': '一级', 'value': '02' },
|
||||
@@ -198,9 +229,23 @@ export default {
|
||||
],
|
||||
acceptancecriteria: [
|
||||
{ required: true, message: '验收标准不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_type_id: [
|
||||
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
||||
]
|
||||
}}
|
||||
},
|
||||
created() {
|
||||
const param = {
|
||||
'materOpt_code': this.materOpt_code
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = this.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
@@ -217,6 +262,34 @@ export default {
|
||||
} else if (row.item_level === '03') {
|
||||
return '二级'
|
||||
}
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修项目">
|
||||
<el-input
|
||||
v-model="query.repair_item_code"
|
||||
@@ -50,6 +59,20 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="设备类别:" prop="material_type_id">
|
||||
<treeselect
|
||||
v-model="form.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="维修要求:" prop="requirement">
|
||||
@@ -77,6 +100,7 @@
|
||||
<el-table-column v-if="false" prop="repair_item_id" label="设备维修项目标识" />
|
||||
<el-table-column prop="repair_item_code" label="维修项目编码" />
|
||||
<el-table-column prop="repair_item_name" label="维修项目名称" />
|
||||
<el-table-column prop="class_name" label="设备类别" />
|
||||
<el-table-column prop="requirement" label="维修要求" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人姓名" />
|
||||
@@ -103,11 +127,15 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
const defaultForm = { repair_item_id: null, repair_item_code: null, repair_item_name: null, requirement: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||
const defaultForm = { material_type_id: null, repair_item_id: null, repair_item_code: null, repair_item_name: null, requirement: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||
export default {
|
||||
name: 'Devicerepairitems',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -126,6 +154,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
@@ -134,13 +165,55 @@ export default {
|
||||
],
|
||||
requirement: [
|
||||
{ required: true, message: '维修要求不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_type_id: [
|
||||
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
||||
]
|
||||
}}
|
||||
},
|
||||
created() {
|
||||
const param = {
|
||||
'materOpt_code': this.materOpt_code
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = this.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,11 @@
|
||||
<el-table-column min-width="120" prop="change_reason" label="变更内容" align="center" />
|
||||
<el-table-column min-width="80" prop="change_name" label="操作人" align="center" />
|
||||
<el-table-column min-width="80" prop="invtype" label="源单类型" align="center" :formatter="inv_typeFormat"/>
|
||||
<el-table-column min-width="120" prop="invcode" label="源单号" align="center" />
|
||||
<el-table-column min-width="120" prop="invcode" label="源单号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.invcode }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120" prop="change_content" label="备注" align="center" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
@@ -128,6 +132,8 @@
|
||||
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<ViewDialog1 :dialog-show.sync="viewShow1" :rowmst="mstrow" />
|
||||
<ViewDialog2 :dialog-show.sync="viewShow2" :rowmst="mstrow" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -136,13 +142,17 @@
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import localStorage from '@/api/tools/localStorage'
|
||||
import equipmentfile from '@/api/wms/basedata/em/equipmentfile'
|
||||
import ViewDialog1 from '@/views/wms/basedata/em/equipmentfile/ViewDialog1'
|
||||
import ViewDialog2 from '@/views/wms/basedata/em/equipmentfile/ViewDialog2'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudDevicerepairmst from '@/api/wms/sb/devicerepairmst'
|
||||
import crudDevicemaintenancemst from '@/api/wms/sb/devicemaintenancemst'
|
||||
|
||||
export default {
|
||||
name: 'ChangeDialog',
|
||||
components: { },
|
||||
components: { ViewDialog1, ViewDialog2 },
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
@@ -163,6 +173,9 @@ export default {
|
||||
tableDtl: [],
|
||||
tableDtl2: [],
|
||||
tableDtl3: [],
|
||||
mstrow: {},
|
||||
viewShow1: false,
|
||||
viewShow2: false,
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
@@ -222,7 +235,6 @@ export default {
|
||||
})
|
||||
},
|
||||
submitUpload() {
|
||||
debugger
|
||||
const flag = this.$refs.upload.submit()
|
||||
},
|
||||
beforeUpload(file) {
|
||||
@@ -245,6 +257,29 @@ export default {
|
||||
submitUpload2() {
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
toView(row) {
|
||||
debugger
|
||||
if (row.invcode.includes('WXD')) {
|
||||
const data = {
|
||||
'id': row.invcode
|
||||
}
|
||||
crudDevicerepairmst.findByCode(data).then(res => {
|
||||
this.mstrow = res
|
||||
this.mstrow.device_code = this.form.device_code
|
||||
this.viewShow1 = true
|
||||
})
|
||||
}else{
|
||||
const data = {
|
||||
'id': row.invcode
|
||||
}
|
||||
crudDevicemaintenancemst.findByCode(data).then(res => {
|
||||
this.mstrow = res
|
||||
this.mstrow.device_code = this.form.device_code
|
||||
this.viewShow2 = true
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
deleteRow(index, row) {
|
||||
localStorage.del([row.storage_id])
|
||||
equipmentfile.queryivt3(this.form).then(res => {
|
||||
|
||||
187
mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog1.vue
Normal file
187
mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog1.vue
Normal file
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="维修单详情"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:visible.sync="dialogVisible"
|
||||
@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="120px" label-suffix=":">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据号" prop="repair_code">
|
||||
<el-input v-model="form.repair_code" style="width: 200px;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划维修日期" prop="plan_start_date">
|
||||
<el-date-picker v-model="form.plan_start_date" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="维修类型" prop="maintenancecycle">
|
||||
<el-select
|
||||
v-model="form.maintenancecycle"
|
||||
disabled
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EM_DEVICE_WX_INVTYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备" prop="devicerecord_id">
|
||||
<el-input v-model="form.device_code" :disabled="true" style="width: 200px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="故障等级" prop="fault_level">
|
||||
<el-select
|
||||
v-model="form.fault_level"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
disabled
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EM_FAULT_LEVEL"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="故障描述" prop="fault_desc">
|
||||
<el-input v-model="form.fault_desc" style="width: 580px;" rows="2" type="textarea" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" style="width: 580px;" rows="2" type="textarea" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">项目明细</span>
|
||||
</div>
|
||||
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
max-height="500"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="repair_item_code" label="维修项目编号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="repair_item_name" label="维修项目名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="requirement" label="要求" align="center" />
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import crudDevicerepairmst from '@/api/wms/sb/devicerepairmst'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog1',
|
||||
components: { },
|
||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_FAULT_LEVEL'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
form: {},
|
||||
tableData: [],
|
||||
deviceDialog: false,
|
||||
itemDialog: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
const data = {
|
||||
'repair_id': this.form.repair_id
|
||||
}
|
||||
crudDevicerepairmst.getDtl(data).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</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-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
173
mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog2.vue
Normal file
173
mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog2.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="保养单详情"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:visible.sync="dialogVisible"
|
||||
@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="120px" label-suffix=":">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据号" prop="maint_code">
|
||||
<el-input v-model="form.maint_code" style="width: 200px;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务日期" prop="plan_start_date">
|
||||
<el-date-picker v-model="form.plan_start_date" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保养类型" prop="maintenancecycle">
|
||||
<el-select
|
||||
v-model="form.maintenancecycle"
|
||||
disabled
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EM_DEVICE_BY_INVTYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备" prop="devicerecord_id">
|
||||
<el-input v-model="form.device_code" :disabled="true" style="width: 200px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" style="width: 580px;" rows="2" type="textarea" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">项目明细</span>
|
||||
</div>
|
||||
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
max-height="500"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="maint_item_code" label="保养项目编号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="maint_item_name" label="保养项目名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="item_level" label="保养等级" align="center" :formatter="formatLevel" />
|
||||
<el-table-column show-overflow-tooltip prop="contents" label="保养内容" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="requirement" label="要求" align="center" />
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import crudDevicemaintenancemst from '@/api/wms/sb/devicemaintenancemst'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog1',
|
||||
components: { },
|
||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_BY_INVTYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
form: {},
|
||||
tableData: [],
|
||||
deviceDialog: false,
|
||||
itemDialog: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
const data = {
|
||||
'maint_id': this.form.maint_id
|
||||
}
|
||||
crudDevicemaintenancemst.getDtl(data).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
formatLevel(row, cloum) {
|
||||
if (row.item_level === '01') {
|
||||
return '日常'
|
||||
} else if (row.item_level === '02') {
|
||||
return '一级'
|
||||
} else if (row.item_level === '03') {
|
||||
return '二级'
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</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-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
168
mes/qd/src/views/wms/pdm/base/wcchange/AddDialog.vue
Normal file
168
mes/qd/src/views/wms/pdm/base/wcchange/AddDialog.vue
Normal file
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="碳化钨修正编辑"
|
||||
width="800px"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
@close="close"
|
||||
>
|
||||
<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="115px" label-suffix=":">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<label slot="label">物料编码:</label>
|
||||
<el-input v-model="form.material_code" style="width: 210px" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<label slot="label">物料名称:</label>
|
||||
<el-input v-model="form.material_name" style="width: 210px" disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码" prop="supp_code">
|
||||
<label slot="label">供应商编码:</label>
|
||||
<el-input v-model="form.supp_code" style="width: 210px" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryDtl" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="supp_name">
|
||||
<label slot="label">供应商名称:</label>
|
||||
<el-input v-model="form.supp_name" style="width: 210px" disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="修正值" prop="workorder_qty">
|
||||
<label slot="label">修正值:</label>
|
||||
<el-input-number
|
||||
v-model="form.change_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="-99"
|
||||
:max="99"
|
||||
:disabled="crud.status.view > 0"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<SuppDialog :dialog-show.sync="dtlShow" @tableChanged="tableChanged" />
|
||||
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @tableChanged2="tableChanged2" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button slot="left" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
<el-button slot="left" type="primary" :loading="crud.cu === 2" @click="crud.submitCU">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import SuppDialog from '@/views/wms/pub/SuppDialog'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import workorder from '@/api/wms/pdm/workorder'
|
||||
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
|
||||
const defaultForm = {
|
||||
material_id:'',
|
||||
material_code:'',
|
||||
material_name:'',
|
||||
supp_name:'',
|
||||
supp_code:'',
|
||||
supp_id:'',
|
||||
change_qty: '0',
|
||||
workorder_type: '01'
|
||||
}
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { SuppDialog, MaterDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dtlShow: false,
|
||||
materType: '10',
|
||||
materShow: false,
|
||||
rules: {
|
||||
supp_code: [
|
||||
{ required: true, message: '供应商不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
change_qty: [
|
||||
{ required: true, message: '修正值不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudseriesProcessRoute.getXLlist2().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
workorder.getDepts().then(res => {
|
||||
this.Depts = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
async queryMater(index, row) {
|
||||
if (this.form.workorder_type === '') {
|
||||
this.crud.notify('请选择工令类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.materShow = true
|
||||
},
|
||||
async queryDtl(index, row) {
|
||||
if (this.form.workorder_type === '') {
|
||||
this.crud.notify('请选择工令类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.dtlShow = true
|
||||
},
|
||||
createPcsn(){
|
||||
if (this.form.material_code === '') {
|
||||
this.crud.notify('请选择产品!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.org_id === '') {
|
||||
this.crud.notify('请选择所属组织!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
workorder.createPcsn({ 'material_id': this.form.material_id, 'org_id': this.form.org_id, 'is_experiment': this.form.is_experiment }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.form.pcsn = res.pcsn
|
||||
})
|
||||
},
|
||||
tableChanged2(row) {
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.supp_code = row.supp_code
|
||||
this.form.supp_id = row.supp_id
|
||||
this.form.supp_name = row.supp_name
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
169
mes/qd/src/views/wms/pdm/base/wcchange/index.vue
Normal file
169
mes/qd/src/views/wms/pdm/base/wcchange/index.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<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="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="供应商">
|
||||
<el-input
|
||||
v-model="query.supp_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="供应商名称或编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="物料编码或物料编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
:highlight-current-row="true"
|
||||
@selection-change="mySelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
v-permission="['admin','workorder:del','workorder:edit']"
|
||||
min-width="130"
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" min-width="130" label="物料编码"/>
|
||||
<el-table-column prop="material_name" min-width="130" label="物料名称"/>
|
||||
<el-table-column prop="supp_code" min-width="130" label="供应商编码"/>
|
||||
<el-table-column prop="supp_name" min-width="200" label="供应商名称"/>
|
||||
<el-table-column prop="change_qty" min-width="80" label="修正值(%)" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="create_name" min-width="80" label="创建人"/>
|
||||
<el-table-column prop="create_time" min-width="140" label="创建时间"/>
|
||||
<el-table-column prop="update_optname" min-width="80" label="修改人"/>
|
||||
<el-table-column prop="update_time" min-width="140" label="修改时间"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import wcchange from '@/api/wms/pdm/wcchange'
|
||||
import CRUD, { crud, 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 AddDialog from '@/views/wms/pdm/base/wcchange/AddDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/produce/workorder/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'wcchange',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '碳化钨总碳修正维护', idField: 'change_id', url: 'api/wcchange', crudMethod: { ...wcchange },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
download: false
|
||||
}})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {
|
||||
add: ['admin', 'workorder:add'],
|
||||
edit: ['admin', 'workorder:edit'],
|
||||
del: ['admin', 'workorder:del']
|
||||
},
|
||||
divShow: false,
|
||||
sub_flag: true,
|
||||
dissub_flag: true,
|
||||
change_flag: true,
|
||||
open_flag: true,
|
||||
confirm_flag: true,
|
||||
mstrow: {},
|
||||
XLList: [],
|
||||
Depts: [],
|
||||
workProcedureList: [],
|
||||
viewShow: false,
|
||||
changeShow: false,
|
||||
currentRow: null,
|
||||
query_flag: true,
|
||||
checkrows: []
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.handleCurrentChange()
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
mySelectionChange(rows) {
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.checkrows = []
|
||||
this.mstrow = {}
|
||||
this.sub_flag = true
|
||||
this.dissub_flag = true
|
||||
this.open_flag = true
|
||||
this.change_flag = true
|
||||
this.confirm_flag = true
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
this.handleCurrentChange()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -3,6 +3,7 @@
|
||||
append-to-body
|
||||
title="日计划重排"
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@@ -11,7 +12,22 @@
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
状态:<el-select
|
||||
v-model="queryrow.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="状态"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.planstatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
@@ -82,7 +98,8 @@ export default {
|
||||
tableDtl: [],
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
queryrow: { device_id: '' },
|
||||
fullscreenLoading: false,
|
||||
queryrow: { device_id: '', status: '01' },
|
||||
sortable: null,
|
||||
rows: []
|
||||
}
|
||||
@@ -112,13 +129,18 @@ export default {
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.queryrow.device_id = msg
|
||||
this.queryrow.status = '01'
|
||||
},
|
||||
queryStruct() {
|
||||
this.fullscreenLoading = true
|
||||
dailyplan.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.$nextTick(() => {
|
||||
/*this.$nextTick(() => {
|
||||
this.setSort()
|
||||
})
|
||||
})*/
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
setSort() {
|
||||
@@ -154,18 +176,31 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('StructIvtClosed', this.rows)
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.queryrow.status = value
|
||||
this.fullscreenLoading = true
|
||||
dailyplan.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
/*this.$nextTick(() => {
|
||||
this.setSort()
|
||||
})*/
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.dragTable.data
|
||||
if (this.rows.length === 0) {
|
||||
this.crud.notify('无可提交的记录!')
|
||||
/* if (this.rows.length === 0) {
|
||||
this.crud.notify('无可操作的记录!')
|
||||
return false
|
||||
}
|
||||
dailyplan.submit2({ query: this.queryrow, rows: this.rows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('StructIvtClosed', this.rows)
|
||||
})
|
||||
})*/
|
||||
this.crud.notify('操作成功!')
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('StructIvtClosed', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<el-table-column prop="workorder_type" label="计划类型" :formatter="workorder_typeFormat" min-width="120" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120"/>
|
||||
<el-table-column prop="old_mark" label="牌号" />
|
||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="mater_product_series" label="产品系列" />
|
||||
<el-table-column :formatter="seriesFormat2" min-width="80" prop="mater_product_series" label="产品系列" />
|
||||
<el-table-column prop="product_weight" label="生产重量(kg)" :formatter="crud.formatNum3" min-width="120" />
|
||||
<el-table-column prop="product_num" label="批数" width="80" />
|
||||
<el-table-column prop="planend_date" label="计划结束日期" width="100" />
|
||||
@@ -218,7 +218,7 @@ export default {
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
del: true,
|
||||
download: false,
|
||||
reset: false
|
||||
}})
|
||||
@@ -303,6 +303,13 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
seriesFormat2(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.mater_product_series) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
save() {
|
||||
if (this.crud.query.device_id === '' || this.crud.query.device_id === undefined) {
|
||||
this.crud.notify('请先选择关键设备!')
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="mySelectionChange">
|
||||
<el-table-column
|
||||
v-permission="['admin','producetask:del']"
|
||||
v-permission="['admin','workorder:del','workorder:edit']"
|
||||
min-width="60"
|
||||
label="操作"
|
||||
align="center"
|
||||
@@ -224,7 +224,7 @@ export default {
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
del: true,
|
||||
download: false,
|
||||
reset: false
|
||||
}})
|
||||
@@ -241,7 +241,9 @@ export default {
|
||||
fullscreenLoading: false,
|
||||
checkrows: [],
|
||||
permission: {
|
||||
del: ['admin', 'producetask:del']
|
||||
add: ['admin', 'workorder:add'],
|
||||
edit: ['admin', 'workorder:edit'],
|
||||
del: ['admin', 'workorder:del']
|
||||
},
|
||||
form: { name: '' },
|
||||
rules: {
|
||||
@@ -275,6 +277,7 @@ export default {
|
||||
},
|
||||
mySelectionChange(rows) {
|
||||
this.buttonChange(rows)
|
||||
this.crud.selectionChangeHandler(rows)
|
||||
},
|
||||
buttonChange(rows) {
|
||||
if (rows.length !== 0) {
|
||||
|
||||
@@ -302,7 +302,7 @@ export default {
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
del: true,
|
||||
reset: true,
|
||||
download: false
|
||||
}})
|
||||
@@ -360,8 +360,8 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
this.crud.query.begin_time = (new Date()).toISOString()
|
||||
this.crud.query.end_time = (new Date().daysLater(2)).toISOString()
|
||||
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date().daysLater(2)).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
this.handleCurrentChange()
|
||||
@@ -372,6 +372,7 @@ export default {
|
||||
},
|
||||
mySelectionChange(rows) {
|
||||
this.buttonChange(rows)
|
||||
this.crud.selectionChangeHandler(rows)
|
||||
},
|
||||
workorder_typeFormat2(row) {
|
||||
return this.dict.label.workorder_type2[row.workorder_type]
|
||||
|
||||
@@ -301,8 +301,8 @@ export default {
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
this.crud.query.begin_time = (new Date().daysAgo(2)).toISOString()
|
||||
this.crud.query.end_time = (new Date()).toISOString()
|
||||
this.crud.query.begin_time = (new Date().daysAgo(2)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
this.handleCurrentChange()
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
<el-table-column prop="is_need_move" label="是否移库" align="center" width="70px" :formatter="is_need_moveFormat" />
|
||||
<el-table-column prop="is_add" label="是否补料" align="center" width="70px" :formatter="is_addFormat" />
|
||||
<el-table-column prop="is_tan" label="碳%" align="center" width="80px" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_09030102" label="钴%" align="center" width="80px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
@@ -821,7 +822,7 @@ export default {
|
||||
}
|
||||
if (!this.flagnow) {
|
||||
const row = { edit: false, status:'10', is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '' }
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -833,6 +834,7 @@ export default {
|
||||
row.ivt_level = item.ivt_level
|
||||
row.is_active = item.is_active
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
@@ -852,7 +854,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
const row = { edit: false, status:'10', is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '' }
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -863,6 +865,7 @@ export default {
|
||||
row.material_code = item.material_code
|
||||
row.ivt_level = item.ivt_level
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="100px" :formatter="is_need_manageFormat" />
|
||||
<el-table-column prop="is_need_move" label="是否需移库" align="center" width="100px" :formatter="is_need_moveFormat" />
|
||||
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="100px" :formatter="is_need_manageFormat" />
|
||||
<el-table-column prop="is_need_move" label="是否需移库" align="center" width="100px" :formatter="is_need_moveFormat" />
|
||||
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
@@ -963,7 +964,7 @@ export default {
|
||||
const row = { edit: false,is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
|
||||
material_name: '', pcsn: '', quality_scode: '', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '',
|
||||
is_CXJ001: '', is_CXJ003: '',need_sum_qty:'0', is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
qty_unit_id: '', qty_unit_name: '' }
|
||||
qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -978,6 +979,7 @@ export default {
|
||||
row.qty_unit_id = item.qty_unit_id
|
||||
row.qty_unit_name = item.qty_unit_name
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
@@ -995,7 +997,7 @@ export default {
|
||||
const row = { edit: false, is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
|
||||
material_name: '', pcsn: '', quality_scode: '', need_sum_qty:'0',ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '',
|
||||
is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
qty_unit_id: '', qty_unit_name: '' }
|
||||
qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -1010,6 +1012,7 @@ export default {
|
||||
row.qty_unit_id = item.qty_unit_id
|
||||
row.qty_unit_name = item.qty_unit_name
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
|
||||
140
mes/qd/src/views/wms/pub/SuppDialog.vue
Normal file
140
mes/qd/src/views/wms/pub/SuppDialog.vue
Normal file
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="供应商选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
size="mini"
|
||||
placeholder="输入供应商编码或名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<rrOperation />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="supp_code" label="供应商编码" />
|
||||
<el-table-column prop="supp_name" label="供应商名称 " />
|
||||
<el-table-column prop="corp_address" label="公司地址" />
|
||||
<el-table-column prop="corp_tele_no" label="公司电话" />
|
||||
<el-table-column prop="jurid_name" label="法人代表" />
|
||||
<el-table-column prop="update_optname" label="修改者" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'DeviceDialog',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '供应商',
|
||||
optShow: {},
|
||||
url: 'api/supplierbase',
|
||||
idField: 'supp_id',
|
||||
sort: '',
|
||||
query: { device_code: '', workprocedure_id: '', is_produceuse: '' }
|
||||
})
|
||||
},
|
||||
dicts: ['IS_OR_NOT'],
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
workProcedureList: [],
|
||||
produceuseList: [],
|
||||
dialogVisible: false,
|
||||
checkrow: {},
|
||||
disablePro: true,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg, msg2) {
|
||||
this.disablePro = false
|
||||
this.crud.query.workprocedure_id = msg
|
||||
this.crud.query.is_produceuse = msg2
|
||||
this.crud.toQuery()
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery()
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选供应商')
|
||||
return
|
||||
}
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.checkrow)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
optShow: {},
|
||||
url: 'api/physicalMst/erpPhyQuery',
|
||||
idField: 'inspection_id',
|
||||
sort: '',
|
||||
sort: 'biz_date DESC',
|
||||
crudMethod: { ...crudPhysicalMst }
|
||||
})
|
||||
},
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
type="success"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="phySyncShow = true"
|
||||
@click="phySync"
|
||||
>
|
||||
理化同步
|
||||
</el-button>
|
||||
@@ -252,7 +252,7 @@
|
||||
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @tableChanged2="tableChanged2" />
|
||||
<Dialog1 :visiable1.sync="visiable1" :inspection-id="inspection_id" />
|
||||
<RelevancyDialog :dialog-show.sync="RelevancyShow" @RelevancyChanged="RelevancyChanged" />
|
||||
<PhySyncDialog :dialog-show.sync="phySyncShow" />
|
||||
<!-- <PhySyncDialog :dialog-show.sync="phySyncShow" />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -432,6 +432,19 @@ export default {
|
||||
this.crud.notify('设置成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
phySync() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData.length === 0) {
|
||||
return this.crud.notify('请至少选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudPhysicalMst.hpySync(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,37 +248,8 @@ export default {
|
||||
}
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
// 将每行的检验有效期时间格式化
|
||||
const vDate = row.beginuse_date
|
||||
const vDateStr = vDate.replace(/-/g, '')
|
||||
// 获取当前时间并格式化
|
||||
var myDate = new Date()
|
||||
// 以下操作是为了补时间缺的0
|
||||
const month = myDate.getMonth() + 1
|
||||
const date = myDate.getDate()
|
||||
const stryear = myDate.getFullYear().toString()
|
||||
const strmonth = (myDate.getMonth() + 1).toString()
|
||||
const strdate = myDate.getDate().toString()
|
||||
var c
|
||||
var x
|
||||
var b
|
||||
b = stryear
|
||||
if (month < 10) {
|
||||
c = ('0' + strmonth)
|
||||
} else {
|
||||
c = strmonth
|
||||
}
|
||||
if (date < 10) {
|
||||
x = ('0' + strdate)
|
||||
} else {
|
||||
x = strdate
|
||||
}
|
||||
const vnowDate = b + c + x
|
||||
// 将字符串转换成int类型进行相减
|
||||
const a = parseInt(vDateStr) - parseInt(vnowDate)
|
||||
// 进行比较符合条件表格就变化颜色
|
||||
const stylejson = {}
|
||||
if (a < 15) {
|
||||
if (row.is_red !== undefined) {
|
||||
stylejson.background = '#e0838f'
|
||||
stylejson.color = 'green'
|
||||
return stylejson
|
||||
|
||||
@@ -217,37 +217,8 @@ export default {
|
||||
return true
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
// 将每行的检验有效期时间格式化
|
||||
const vDate = row.next_docimasy_date
|
||||
const vDateStr = vDate.replace(/-/g, '')
|
||||
// 获取当前时间并格式化
|
||||
var myDate = new Date()
|
||||
// 以下操作是为了补时间缺的0
|
||||
const month = myDate.getMonth() + 1
|
||||
const date = myDate.getDate()
|
||||
const stryear = myDate.getFullYear().toString()
|
||||
const strmonth = (myDate.getMonth() + 1).toString()
|
||||
const strdate = myDate.getDate().toString()
|
||||
var c
|
||||
var x
|
||||
var b
|
||||
b = stryear
|
||||
if (month < 10) {
|
||||
c = ('0' + strmonth)
|
||||
} else {
|
||||
c = strmonth
|
||||
}
|
||||
if (date < 10) {
|
||||
x = ('0' + strdate)
|
||||
} else {
|
||||
x = strdate
|
||||
}
|
||||
const vnowDate = b + c + x
|
||||
// 将字符串转换成int类型进行相减
|
||||
const a = parseInt(vDateStr) - parseInt(vnowDate)
|
||||
// 进行比较符合条件表格就变化颜色
|
||||
const stylejson = {}
|
||||
if (a < 15) {
|
||||
if (row.is_red !== undefined) {
|
||||
stylejson.background = '#e0838f'
|
||||
stylejson.color = 'green'
|
||||
return stylejson
|
||||
|
||||
@@ -216,37 +216,8 @@ export default {
|
||||
return true
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
// 将每行的检验有效期时间格式化
|
||||
const vDate = row.valid_term
|
||||
const vDateStr = vDate.replace(/-/g, '')
|
||||
// 获取当前时间并格式化
|
||||
var myDate = new Date()
|
||||
// 以下操作是为了补时间缺的0
|
||||
const month = myDate.getMonth() + 1
|
||||
const date = myDate.getDate()
|
||||
const stryear = myDate.getFullYear().toString()
|
||||
const strmonth = (myDate.getMonth() + 1).toString()
|
||||
const strdate = myDate.getDate().toString()
|
||||
var c
|
||||
var x
|
||||
var b
|
||||
b = stryear
|
||||
if (month < 10) {
|
||||
c = ('0' + strmonth)
|
||||
} else {
|
||||
c = strmonth
|
||||
}
|
||||
if (date < 10) {
|
||||
x = ('0' + strdate)
|
||||
} else {
|
||||
x = strdate
|
||||
}
|
||||
const vnowDate = b + c + x
|
||||
// 将字符串转换成int类型进行相减
|
||||
const a = parseInt(vDateStr) - parseInt(vnowDate)
|
||||
// 进行比较符合条件表格就变化颜色
|
||||
const stylejson = {}
|
||||
if (a < 15) {
|
||||
if (row.is_red !== undefined) {
|
||||
stylejson.background = '#e0838f'
|
||||
stylejson.color = 'green'
|
||||
return stylejson
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备" prop="devicerecord_id">
|
||||
<el-input v-model="form.device_code" :disabled="true" style="width: 200px;">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="putDevice" />
|
||||
<el-button slot="append" icon="el-icon-plus" :disabled="crud.status.view > 0" @click="putDevice" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -65,6 +65,7 @@
|
||||
v-model="form.fault_level"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
:disabled="crud.status.view > 0"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
@@ -102,6 +103,7 @@
|
||||
type="primary"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="crud.status.view > 0"
|
||||
@click="putItem"
|
||||
>
|
||||
添加项目
|
||||
@@ -126,13 +128,13 @@
|
||||
<el-table-column show-overflow-tooltip prop="requirement" label="要求" align="center" />
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select"/>
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" :disabled="crud.status.view > 0" class="input-with-select"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" />
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" :disabled="crud.status.view > 0" @click.native.prevent="delRow(scope.$index, form.tableData)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -219,6 +221,14 @@ export default {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
const data = {
|
||||
'repair_id': this.form.repair_id
|
||||
}
|
||||
crudDevicerepairmst.getDtl(data).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
|
||||
@@ -94,9 +94,16 @@
|
||||
<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="repair_id" label="设备维修单标识" />
|
||||
<el-table-column prop="repair_code" label="维修单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="repair_code" label="维修单号" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.repair_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="dept_name" label="归属部门" show-overflow-tooltip />
|
||||
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName"/>
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName"/>
|
||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName"/>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
:disabled="start_flag"
|
||||
@click="startRepair"
|
||||
>
|
||||
开始维修
|
||||
@@ -95,7 +95,7 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
:disabled="execu_flag"
|
||||
@click="executeRepair"
|
||||
>
|
||||
维修执行
|
||||
@@ -106,7 +106,7 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
:disabled="end_flag"
|
||||
@click="endRepair"
|
||||
>
|
||||
结束维修
|
||||
@@ -117,7 +117,7 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
:disabled="open_flag"
|
||||
@click="openReceive"
|
||||
>
|
||||
维修领用
|
||||
@@ -128,7 +128,7 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
:disabled="confirm_flag"
|
||||
@click="confirmRepair"
|
||||
>
|
||||
维修确认
|
||||
@@ -139,7 +139,7 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
:disabled="result_flag"
|
||||
@click="resuftRepair"
|
||||
>
|
||||
结果录入
|
||||
@@ -152,6 +152,9 @@
|
||||
<el-table-column prop="repair_code" label="维修单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="dept_name" label="所属部门" show-overflow-tooltip />
|
||||
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName"/>
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName"/>
|
||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName"/>
|
||||
@@ -160,7 +163,7 @@
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="input_optname" label="制单人" />
|
||||
<el-table-column prop="input_time" label="制单时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="update_optname" label="维修人" />
|
||||
<el-table-column prop="update_optname" label="维修人" show-overflow-tooltip />
|
||||
<el-table-column prop="real_start_date" label="开始时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="real_end_date" label="结束时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
@@ -203,7 +206,7 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '维修单填报',
|
||||
url: 'api/devicerepairmst',
|
||||
url: 'api/devicerepairmst/query3',
|
||||
idField: 'repair_id',
|
||||
sort: 'repair_id,desc',
|
||||
crudMethod: { ...crudDevicerepairmst },
|
||||
@@ -218,6 +221,12 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
start_flag: true,
|
||||
execu_flag: true,
|
||||
end_flag: true,
|
||||
open_flag: true,
|
||||
confirm_flag: true,
|
||||
result_flag: true,
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修项目">
|
||||
<el-input
|
||||
v-model="query.repair_item_code"
|
||||
@@ -53,6 +62,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="repair_item_code" label="维修项目编码" />
|
||||
<el-table-column prop="repair_item_name" label="维修项目名称" />
|
||||
<el-table-column prop="class_name" label="设备类别" />
|
||||
<el-table-column prop="requirement" label="要求" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人姓名" />
|
||||
@@ -73,10 +83,14 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudDevicerepairitems from '@/api/wms/basedata/em/devicerepairitems'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
export default {
|
||||
name: 'Item',
|
||||
components: { rrOperation, pagination },
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '维修项目',
|
||||
@@ -96,6 +110,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
checkrow: null,
|
||||
@@ -109,6 +126,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const param = {
|
||||
'materOpt_code': this.materOpt_code
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = this.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
@@ -148,6 +176,34 @@ export default {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged1', this.rows)
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
<el-table-column prop="class_name" label="设备类型" />
|
||||
<el-table-column prop="device_code" label="设备编号" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="maintenancecycle" label="维修周期" :formatter="formatMainName" />
|
||||
<el-table-column prop="plan_start_date" label="计划开始日期" width="120px" />
|
||||
<el-table-column prop="real_start_date" label="实际开始日期" width="120px" />
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_faultclass_name" label="故障分类" />
|
||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formaLevelName" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName"/>
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName"/>
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName"/>
|
||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName"/>
|
||||
@@ -131,7 +132,7 @@
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="input_optname" label="制单人" />
|
||||
<el-table-column prop="input_time" label="制单时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="update_optname" label="维修人" />
|
||||
<el-table-column prop="update_optname" label="维修人" show-overflow-tooltip />
|
||||
<el-table-column prop="real_start_date" label="开始时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="real_end_date" label="结束时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
<el-table-column prop="repair_code" label="维修单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName"/>
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName"/>
|
||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName"/>
|
||||
@@ -157,7 +158,7 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '委外维修',
|
||||
url: 'api/devicerepairmst',
|
||||
url: 'api/devicerepairmst/query4',
|
||||
idField: 'repair_id',
|
||||
sort: 'repair_id,desc',
|
||||
crudMethod: { ...crudDevicerepairmst },
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备" prop="devicerecord_id">
|
||||
<el-input v-model="form.device_code" :disabled="true" style="width: 200px;">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="putDevice" />
|
||||
<el-button slot="append" icon="el-icon-plus" @click="putDevice" :disabled="crud.status.view > 0" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -79,6 +79,7 @@
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="putItem"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
添加项目
|
||||
</el-button>
|
||||
@@ -104,13 +105,13 @@
|
||||
<el-table-column show-overflow-tooltip prop="requirement" label="要求" align="center" />
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select"/>
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" :disabled="crud.status.view > 0" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" />
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" :disabled="crud.status.view > 0" @click.native.prevent="delRow(scope.$index, form.tableData)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -191,6 +192,14 @@ export default {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
const data = {
|
||||
'maint_id': this.form.maint_id
|
||||
}
|
||||
crudDevicemaintenancemst.getDtl(data).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
|
||||
@@ -105,9 +105,16 @@
|
||||
<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="maint_id" label="保养单标识" />
|
||||
<el-table-column prop="maint_code" label="保养单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="maint_code" label="保养单号" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.maint_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="dept_name" label="归属部门" show-overflow-tooltip />
|
||||
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" show-overflow-tooltip :formatter="formatInvsName" />
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatMainName" />
|
||||
<el-table-column prop="plan_start_date" label="计划保养日期" width="150px" />
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
<el-table-column prop="maint_code" label="保养单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" show-overflow-tooltip :formatter="formatInvsName" />
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatMainName" />
|
||||
<el-table-column prop="plan_start_date" label="计划保养日期" width="150px" />
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
<el-table-column prop="maint_code" label="保养单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="dept_name" label="所属部门" show-overflow-tooltip />
|
||||
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="invstatus" label="单据状态" show-overflow-tooltip :formatter="formatInvsName" />
|
||||
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatMainName" />
|
||||
<el-table-column prop="plan_start_date" label="计划保养日期" width="150px" />
|
||||
@@ -172,7 +175,7 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '保养单填报',
|
||||
url: 'api/devicemaintenancemst',
|
||||
url: 'api/devicemaintenancemst/query3',
|
||||
idField: 'maint_id',
|
||||
sort: 'maint_id,desc',
|
||||
crudMethod: { ...crudDevicemaintenancemst },
|
||||
|
||||
@@ -23,6 +23,24 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门">
|
||||
<treeselect
|
||||
v-model="query.dept_id"
|
||||
:load-options="loadDepts"
|
||||
:options="depts"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用班组">
|
||||
<treeselect
|
||||
v-model="query.use_id"
|
||||
:load-options="loadDepts"
|
||||
:options="depts"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
@@ -48,10 +66,13 @@
|
||||
|
||||
<el-table-column prop="device_code" label="设备编码" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="class_name" label="设备类型" show-overflow-tooltip />
|
||||
<el-table-column prop="dept_name" label="归属部门" show-overflow-tooltip />
|
||||
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="device_spec" label="规格" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="device_model" label="型号" />
|
||||
<el-table-column prop="supplier_name" label="供应商" />
|
||||
<el-table-column prop="device_model" label="型号" show-overflow-tooltip />
|
||||
<el-table-column prop="supplier_name" label="供应商" show-overflow-tooltip />
|
||||
<el-table-column prop="device_type" label="设备属性" :formatter="formatTypeName"/>
|
||||
<el-table-column prop="workprocedure_name" label="工序" />
|
||||
<el-table-column prop="is_produceuse" label="生产用途" show-overflow-tooltip />
|
||||
@@ -72,10 +93,13 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudDevicemaintenanceplanmst from '@/api/wms/sb/devicemaintenanceplanmst'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { getDepts } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: 'Device',
|
||||
components: { rrOperation, pagination },
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备',
|
||||
@@ -98,6 +122,8 @@ export default {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
checkrow: null,
|
||||
class_idStr: null,
|
||||
depts: [],
|
||||
rows: [],
|
||||
XLList: []
|
||||
}
|
||||
@@ -109,6 +135,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDepts()
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
@@ -154,6 +183,32 @@ export default {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged2', this.rows)
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
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)
|
||||
})
|
||||
}
|
||||
},
|
||||
getDepts() {
|
||||
getDepts({ enabled: true }).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保养项目">
|
||||
<el-input
|
||||
v-model="query.maint_item_code"
|
||||
@@ -70,14 +79,15 @@
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="maint_item_code" label="保养项目编码" />
|
||||
<el-table-column prop="maint_item_name" label="保养项目名称" />
|
||||
<el-table-column prop="maint_item_code" label="保养项目编码" width="100px" />
|
||||
<el-table-column prop="maint_item_name" label="保养项目名称" width="100px" />
|
||||
<el-table-column prop="class_name" label="设备类别" />
|
||||
<el-table-column prop="item_level" label="保养等级" :formatter="formatLevel"/>
|
||||
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
|
||||
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
|
||||
<el-table-column prop="acceptancecriteria" label="验收标准" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人姓名" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -95,10 +105,14 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudDevicemaintenanceitems from '@/api/wms/basedata/em/devicemaintenanceitems'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
export default {
|
||||
name: 'Item',
|
||||
components: { rrOperation, pagination },
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '保养项目',
|
||||
@@ -118,6 +132,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
checkrow: null,
|
||||
@@ -137,6 +154,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const param = {
|
||||
'materOpt_code': this.materOpt_code
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = this.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
@@ -185,6 +213,34 @@ export default {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged1', this.rows)
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,17 +106,18 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="maint_plan_code" label="保养计划单号" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="maint_plan_name" label="保养计划名称" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="class_name" label="设备类型" />
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column prop="device_name" label="设备名称" />
|
||||
<el-table-column prop="class_name" label="设备类型" width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="maintenancecycle" label="保养周期" :formatter="formatMainName"/>
|
||||
<el-table-column prop="plan_start_date" label="计划开始日期" width="150px" />
|
||||
<el-table-column prop="real_start_date" label="实际开始日期" width="150px" />
|
||||
<el-table-column prop="real_end_date" label="实际结束日期" width="150px" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人姓名" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
||||
<el-table-column prop="confirm_optname" label="审核人姓名" />
|
||||
<el-table-column prop="confirm_optname" label="审核人" />
|
||||
<el-table-column prop="confirm_time" label="审核时间" width="150px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
|
||||
188
mes/qd/src/views/wms/statistics/productday/index.vue
Normal file
188
mes/qd/src/views/wms/statistics/productday/index.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<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-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入物料编码"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键设备">
|
||||
<label slot="label">关键设备:</label>
|
||||
<el-select
|
||||
v-model="query.device_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="关键设备"
|
||||
class="filter-item"
|
||||
style="width: 200px"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in Devices"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation>
|
||||
</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="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="workorder_date" min-width="85" label="工令日期" :formatter="workorder_dateFormat"/>
|
||||
<el-table-column prop="device_name" label="关键设备" width="100" />
|
||||
<el-table-column prop="old_mark" label="牌号" />
|
||||
<el-table-column prop="sum_qty" label="重量(kg)" :formatter="crud.formatNum3" min-width="120" />
|
||||
<el-table-column prop="product_num" label="批数" width="80" />
|
||||
<el-table-column prop="pw_time" label="喷雾日期" width="140" />
|
||||
<el-table-column prop="in_time" label="最后入库日期" width="100" />
|
||||
<el-table-column prop="in_qty" label="入库重量(吨)" :formatter="crud.formatNum3" min-width="120" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import producetask from '@/api/wms/pdm/producetask'
|
||||
import dailyplan from '@/api/wms/pdm/dailyplan'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'productday',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '粉料日计划表',
|
||||
url: 'api/dailyplan/queryday',
|
||||
idField: 'planstart_time',
|
||||
sort: '',
|
||||
query: { device_id: '' },
|
||||
crudMethod: { ...dailyplan },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
Devices: [],
|
||||
form: {},
|
||||
query_flag: true,
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created() {
|
||||
producetask.getDevices().then(res => {
|
||||
this.Devices = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date(), new Date().daysLater(0)]
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date().daysLater(0)).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
stateFormat(row) {
|
||||
return this.dict.label.planstatus[row.status]
|
||||
},
|
||||
workorder_typeFormat(row) {
|
||||
return this.dict.label.workorder_type2[row.workorder_type]
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
seriesFormat(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.product_series) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
seriesFormat2(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.mater_product_series) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
workorder_dateFormat(row) {
|
||||
return row.planstart_time.substring(0, 10)
|
||||
},
|
||||
mytoQuery(array1){
|
||||
if(array1 === null){
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
}else{
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
167
mes/qd/src/views/wms/statistics/productmouth/index.vue
Normal file
167
mes/qd/src/views/wms/statistics/productmouth/index.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<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-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入物料编码"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation>
|
||||
</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="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="material_code" label="产品编码" width="180" />
|
||||
<el-table-column prop="sum_qty" label="计划重量(吨)" :formatter="crud.formatNum3" min-width="80" />
|
||||
<el-table-column prop="product_num" label="计划批次" min-width="80" />
|
||||
<el-table-column prop="device_name" label="关键设备" width="100" />
|
||||
<el-table-column prop="workorder_date" min-width="130" label="粉料配粉时间" />
|
||||
<el-table-column prop="pw_time" label="粉料喷雾时间" width="130" />
|
||||
<el-table-column prop="in_time" label="最后入库时间" width="130" />
|
||||
<el-table-column prop="in_qty" label="入库重量(吨)" :formatter="crud.formatNum3" min-width="80" />
|
||||
<el-table-column prop="in_num" label="入库批数" width="80" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import producetask from '@/api/wms/pdm/producetask'
|
||||
import dailyplan from '@/api/wms/pdm/dailyplan'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'productmouth',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '日计划按月统计',
|
||||
url: 'api/dailyplan/querymouth',
|
||||
idField: 'material_code',
|
||||
sort: '',
|
||||
query: { device_id: '' },
|
||||
crudMethod: { ...dailyplan },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
Devices: [],
|
||||
form: {},
|
||||
query_flag: true,
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created() {
|
||||
producetask.getDevices().then(res => {
|
||||
this.Devices = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date(), new Date().daysLater(0)]
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date().daysLater(0)).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
stateFormat(row) {
|
||||
return this.dict.label.planstatus[row.status]
|
||||
},
|
||||
workorder_typeFormat(row) {
|
||||
return this.dict.label.workorder_type2[row.workorder_type]
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
seriesFormat(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.product_series) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
seriesFormat2(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.mater_product_series) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
mytoQuery(array1){
|
||||
if(array1 === null){
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
}else{
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
263
mes/qd/src/views/wms/statistics/producttask/index.vue
Normal file
263
mes/qd/src/views/wms/statistics/producttask/index.vue
Normal file
@@ -0,0 +1,263 @@
|
||||
<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-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入物料编码"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="喷雾设备">
|
||||
<label slot="label">喷雾设备:</label>
|
||||
<el-select
|
||||
v-model="query.device_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="喷雾设备"
|
||||
class="filter-item"
|
||||
style="width: 200px"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in Devices"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" :max-height="590" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="workorder_date" min-width="85" label="日期" align="center" :formatter="workorder_dateFormat" />
|
||||
<el-table-column prop="device_name" width="100" label="喷雾塔" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning">{{ scope.row.device_name }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投入(kg)" align="center">
|
||||
<el-table-column label="原材料/kg" align="center">
|
||||
<el-table-column prop="sum_qty1" label="碳化钨" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty2" label="钴粉" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty3" label="镍粉" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty4" label="碳化铬" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty5" label="碳化钒" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty6" label="碳化钽/铌" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty7" label="碳粉" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty8" label="钨粉" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="sum_qty9" label="合计" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
|
||||
<el-table-column label="二次粉" align="center">
|
||||
<el-table-column prop="sum_qty10" label="PG粉" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty11" label="软废" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="成型剂" align="center">
|
||||
<el-table-column prop="sum_qty12" label="PEG2000\PEG" :formatter="crud.formatNum3" min-width="120" align="center" />
|
||||
<el-table-column prop="sum_qty13" label="石蜡/kg" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty14" label="白油" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="sum_qty15" label="合计" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty16" label="投入汇总" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="产出(kg)" align="center">
|
||||
<el-table-column prop="out_qty1" label="PG粉重量" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="out_qty2" label="残料" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="out_qty3" label="总重量" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="in_num" label="投入产出比/%" width="100" align="center" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table2" v-loading="crud.loading" :data="tableDtl" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="pw_time" label="配粉日期" width="140" align="center" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="100" align="center" />
|
||||
<el-table-column prop="old_mark" label="牌号" width="100" align="center" />
|
||||
<el-table-column prop="pcsn" label="批号" width="100" align="center" />
|
||||
<el-table-column prop="org_name" label="归属部门" width="100" align="center" />
|
||||
<el-table-column label="投入(kg)" align="center">
|
||||
<el-table-column label="原材料/kg" align="center">
|
||||
<el-table-column prop="sum_qty1" label="碳化钨" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty2" label="钴粉" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty3" label="镍粉" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty4" label="碳化铬" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty5" label="碳化钒" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty6" label="碳化钽/铌" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty7" label="碳粉" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty8" label="钨粉" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="sum_qty9" label="合计" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
|
||||
<el-table-column label="二次粉" align="center">
|
||||
<el-table-column prop="sum_qty10" label="PG粉" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty11" label="软废" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="成型剂" align="center">
|
||||
<el-table-column prop="sum_qty12" label="PEG2000\PEG" :formatter="crud.formatNum3" min-width="120" align="center" />
|
||||
<el-table-column prop="sum_qty13" label="石蜡/kg" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="sum_qty14" label="白油" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="sum_qty15" label="合计" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="sum_qty16" label="投入汇总" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="投料工序流记录" align="center">
|
||||
<el-table-column label="球磨" align="center">
|
||||
<el-table-column prop="task_qty1" label="开工日期" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="task_qty2" label="设备号" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="task_qty3" label="操作人员" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="喷雾" align="center">
|
||||
<el-table-column prop="task_qty4" label="计划日期" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="task_qty5" label="执行日期" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="task_qty6" label="设备号" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="task_qty7" label="产出Kg" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="task_qty8" label="操作人员" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="锤磨 压团 制粒" align="center">
|
||||
<el-table-column prop="task_qty9" label="日期" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="task_qty10" label="生产线号" :formatter="crud.formatNum3" min-width="80" align="center" />
|
||||
<el-table-column prop="task_qty11" label="操作人员" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="产出" align="center">
|
||||
<el-table-column prop="out_qty1" label="入库日期" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
<el-table-column prop="out_qty2" label="PG粉重量" :formatter="crud.formatNum3" min-width="100" align="center" />
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import producetask from '@/api/wms/pdm/producetask'
|
||||
import dailyplan from '@/api/wms/pdm/dailyplan'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'producttask',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '日计划按月统计',
|
||||
url: 'api/dailyplan/querymouth',
|
||||
idField: 'material_code',
|
||||
sort: '',
|
||||
query: { device_id: '' },
|
||||
crudMethod: { ...dailyplan },
|
||||
props: {
|
||||
// 每页数据条数
|
||||
size: 20
|
||||
},
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
Devices: [],
|
||||
form: {},
|
||||
tableDtl: [],
|
||||
query_flag: true,
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created() {
|
||||
producetask.getDevices().then(res => {
|
||||
this.Devices = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date(), new Date().daysLater(0)]
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date().daysLater(0)).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
workorder_dateFormat(row) {
|
||||
return row.workorder_date.substring(0, 10)
|
||||
},
|
||||
workorder_typeFormat(row) {
|
||||
return this.dict.label.workorder_type2[row.workorder_type]
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
mytoQuery(array1){
|
||||
if(array1 === null){
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
}else{
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -81,22 +81,25 @@
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission"/>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" show-summary :summary-method="getSum" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini"
|
||||
style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="class_name" label="物料分类"/>
|
||||
<el-table ref="table" :cell-style="cellStyleMst" show-summary :summary-method="getSum" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="stor_name" label="仓库"/>
|
||||
<el-table-column prop="class_code" label="物料分类编码" width="100px" />
|
||||
<el-table-column prop="class_name" label="物料分类名称" width="100px" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="pcsn" label="批次" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="quality_scode" label="品质类型" :formatter="formatQualityName" />
|
||||
<el-table-column prop="ivt_level" label="库存等级" :formatter="formatIvtName" />
|
||||
<el-table-column prop="is_active" label="是否可用" :formatter="formatIsName" />
|
||||
<el-table-column prop="unit_name" label="单位"/>
|
||||
<el-table-column prop="start_num" label="期初数" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="in_num" label="入库数" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="out_num" label="出库数" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="less_num" label="其他出" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="more_num" label="其他入" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="end_num" label="结存" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="material_model" label="型号/牌号" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="unit_name" label="主单位"/>
|
||||
<el-table-column prop="pcsn" label="批次号" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="dept_name" label="所属组织" min-width="120" show-overflow-tooltip/>
|
||||
<!-- <el-table-column prop="quality_scode" label="品质类型" :formatter="formatQualityName" />-->
|
||||
<el-table-column prop="ivt_level" label="质量等级" :formatter="formatIvtName" />
|
||||
<!-- <el-table-column prop="is_active" label="是否可用" :formatter="formatIsName" />-->
|
||||
<el-table-column prop="start_num" label="期初主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<el-table-column prop="in_num" label="入库主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<el-table-column prop="out_num" label="出库主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<!-- <el-table-column prop="less_num" label="其他出" :formatter="crud.formatNum3"/>-->
|
||||
<!-- <el-table-column prop="more_num" label="其他入" :formatter="crud.formatNum3"/>-->
|
||||
<el-table-column prop="end_num" label="结存主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
@@ -324,6 +327,13 @@ export default {
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
cellStyleMst({ row, column, rowIndex, columnIndex }) {
|
||||
if (column.property === 'dept_name') {
|
||||
if (row.is_yellow !== undefined) {
|
||||
return 'background: yellow'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,19 +48,72 @@
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
:max-height="590"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="100" align="center" />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip />
|
||||
</template>
|
||||
<el-table ref="table" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="biz_date" label="日期" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="standard_mark" label="牌号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="material_code" label="物料编码" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批号" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="松比g/cm3" align="center">
|
||||
<el-table-column prop="sb_1" label="1" align="center" />
|
||||
<el-table-column prop="sb_2" label="2" align="center" />
|
||||
<el-table-column prop="sb_3" label="3" align="center" />
|
||||
<el-table-column prop="sb_4" label="4" align="center" />
|
||||
<el-table-column prop="sb_5" label="5" align="center" />
|
||||
<el-table-column prop="sb_6" label="6" align="center" />
|
||||
<el-table-column prop="sb_7" label="7" align="center" />
|
||||
<el-table-column prop="sb_8" label="8" align="center" />
|
||||
<el-table-column prop="sb_9" label="9" align="center" />
|
||||
<el-table-column prop="sb_10" label="10" align="center" />
|
||||
<el-table-column prop="sb_11" label="11" align="center" />
|
||||
<el-table-column prop="sb_12" label="12" align="center" />
|
||||
<el-table-column prop="sb_div" label="平均" align="center" />
|
||||
<el-table-column prop="sb_sub" label="极差" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="sb_standard" label="备注(松装密度标准)" align="center" />
|
||||
<el-table-column prop="sb_result" label="结论" align="center" />
|
||||
<el-table-column label="流动性Sec/50g" align="center">
|
||||
<el-table-column prop="ldx_1" label="1" align="center" />
|
||||
<el-table-column prop="ldx_2" label="2" align="center" />
|
||||
<el-table-column prop="ldx_3" label="3" align="center" />
|
||||
<el-table-column prop="ldx_4" label="4" align="center" />
|
||||
<el-table-column prop="ldx_5" label="5" align="center" />
|
||||
<el-table-column prop="ldx_6" label="6" align="center" />
|
||||
<el-table-column prop="ldx_7" label="7" align="center" />
|
||||
<el-table-column prop="ldx_8" label="8" align="center" />
|
||||
<el-table-column prop="ldx_9" label="9" align="center" />
|
||||
<el-table-column prop="ldx_10" label="10" align="center" />
|
||||
<el-table-column prop="ldx_11" label="11" align="center" />
|
||||
<el-table-column prop="ldx_12" label="12" align="center" />
|
||||
<el-table-column prop="ldx_div" label="平均" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="ldx_standard" label="备注(流动性标准)" align="center" />
|
||||
<el-table-column prop="ldx_result" label="结论" align="center" />
|
||||
<el-table-column label="筛分%(100g)" align="center">
|
||||
<el-table-column prop="sf_zb" label="占比%(60-250um)" align="center" />
|
||||
<el-table-column label="+100目" align="center">
|
||||
<el-table-column prop="sf_1" label="≥150 um" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="+150目" align="center">
|
||||
<el-table-column prop="sf_2" label="100 um" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="+170目" align="center">
|
||||
<el-table-column prop="sf_3" label="90 um" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="+200目" align="center">
|
||||
<el-table-column prop="sf_4" label="75 um" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="+250目" align="center">
|
||||
<el-table-column prop="sf_5" label="65 um" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="+325目" align="center">
|
||||
<el-table-column prop="sf_6" label="45 um" align="center" />
|
||||
</el-table-column>
|
||||
<el-table-column label="-325目" align="center">
|
||||
<el-table-column prop="sf_7" label="≤45um" align="center" />
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -76,7 +129,6 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
||||
|
||||
export default {
|
||||
name: 'StifleQuery',
|
||||
@@ -104,27 +156,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
statusList: [],
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
crudStifleQuery.getHeader().then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
crudInspectionsheetmst.getStatus().then(res => {
|
||||
this.statusList = res
|
||||
})
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
|
||||
Reference in New Issue
Block a user