优化
This commit is contained in:
@@ -48,11 +48,11 @@ public class EquipmentfileServiceImpl implements EquipmentfileService {
|
|||||||
}
|
}
|
||||||
String begin_time = map.get("begin_time");
|
String begin_time = map.get("begin_time");
|
||||||
if (StrUtil.isNotEmpty(begin_time)) {
|
if (StrUtil.isNotEmpty(begin_time)) {
|
||||||
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
|
map.put("begin_time", begin_time.substring(0,10));
|
||||||
}
|
}
|
||||||
String end_time = map.get("end_time");
|
String end_time = map.get("end_time");
|
||||||
if (StrUtil.isNotEmpty(end_time)) {
|
if (StrUtil.isNotEmpty(end_time)) {
|
||||||
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
|
map.put("end_time", end_time.substring(0,10));
|
||||||
}
|
}
|
||||||
JSONObject json = WQL.getWO("QEM_EQUIPMENTFILE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "equipmentfile.devicerecord_code");
|
JSONObject json = WQL.getWO("QEM_EQUIPMENTFILE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "equipmentfile.devicerecord_code");
|
||||||
return json;
|
return json;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
:before-close="crud.cancelCU"
|
:before-close="crud.cancelCU"
|
||||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||||
@close="close"
|
@close="close"
|
||||||
|
@open="open"
|
||||||
>
|
>
|
||||||
<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="105px" label-suffix=":">
|
<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="105px" label-suffix=":">
|
||||||
<el-form-item label="设备档案编码" prop="devicerecord_code">
|
<el-form-item label="设备档案编码" prop="devicerecord_code">
|
||||||
@@ -241,14 +242,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import CRUD, { crud, form } from '@crud/crud'
|
import CRUD, { crud, form } from '@crud/crud'
|
||||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||||
import crudClassstandard from "@/api/wms/basedata/master/classstandard";
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
import crudMaterialbase from "@/api/wms/basedata/master/materialbase";
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
import equipmentfile from "@/api/wms/basedata/em/equipmentfile";
|
import equipmentfile from '@/api/wms/basedata/em/equipmentfile'
|
||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import {getDepts} from "@/api/system/dept";
|
import { getDepts, getDeptSuperior } from '@/api/system/dept'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
devicerecord_id: '',
|
devicerecord_id: '',
|
||||||
@@ -263,6 +265,7 @@ const defaultForm = {
|
|||||||
country_manufactur: '',
|
country_manufactur: '',
|
||||||
leavefactory_date: new Date().format('yyyy-MM-dd'),
|
leavefactory_date: new Date().format('yyyy-MM-dd'),
|
||||||
leavefactory_number: '',
|
leavefactory_number: '',
|
||||||
|
material_type_id: null,
|
||||||
drawing_number: '',
|
drawing_number: '',
|
||||||
supplier_name: '',
|
supplier_name: '',
|
||||||
supplier_id: '',
|
supplier_id: '',
|
||||||
@@ -272,6 +275,8 @@ const defaultForm = {
|
|||||||
user_id: '',
|
user_id: '',
|
||||||
user_code: '',
|
user_code: '',
|
||||||
user_name: '',
|
user_name: '',
|
||||||
|
use_deptid: null,
|
||||||
|
belong_deptid: null,
|
||||||
extend_code: '',
|
extend_code: '',
|
||||||
card_code: '',
|
card_code: '',
|
||||||
assets_id: '',
|
assets_id: '',
|
||||||
@@ -288,7 +293,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: { Treeselect },
|
components: { crudOperation, Treeselect },
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
@@ -320,6 +325,9 @@ export default {
|
|||||||
material_type_id: [
|
material_type_id: [
|
||||||
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
device_bom_id: [
|
||||||
|
{ required: true, message: '设备Bom不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
is_produceuse: [
|
is_produceuse: [
|
||||||
{ required: true, message: '生产用途不能为空', trigger: 'blur' }
|
{ required: true, message: '生产用途不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
@@ -341,29 +349,50 @@ export default {
|
|||||||
equipmentfile.queryBomList().then(res => {
|
equipmentfile.queryBomList().then(res => {
|
||||||
this.bomlist = res
|
this.bomlist = res
|
||||||
})
|
})
|
||||||
const param = {
|
|
||||||
'materOpt_code': '23'
|
|
||||||
}
|
|
||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
|
||||||
this.class_idStr = res.class_idStr
|
|
||||||
this.queryClassId()
|
|
||||||
})
|
|
||||||
this.getDepts()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
this.$emit('AddChanged')
|
this.$emit('AddChanged')
|
||||||
},
|
},
|
||||||
createPcsn() {
|
open() {
|
||||||
if (this.form.material_code === '') {
|
},
|
||||||
this.crud.notify('请选择产品!', CRUD.NOTIFICATION_TYPE.INFO)
|
[CRUD.HOOK.afterToCU](crud, form) {
|
||||||
return
|
debugger
|
||||||
}
|
if (!form.devicerecord_code) {
|
||||||
if (this.form.org_id === '') {
|
this.getDepts()
|
||||||
this.crud.notify('请选择所属组织!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
const param = {
|
||||||
|
'materOpt_code': '23'
|
||||||
|
}
|
||||||
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
|
this.class_idStr = res.class_idStr
|
||||||
|
this.queryClassId()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
debugger
|
||||||
|
this.getSupDepts(form.use_deptid)
|
||||||
|
this.getSubTypes(form.material_type_id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSubTypes(id) {
|
||||||
|
debugger
|
||||||
|
crudClassstandard.getClassSuperior(id).then(res => {
|
||||||
|
debugger
|
||||||
|
const date = res.content
|
||||||
|
this.buildClass(date)
|
||||||
|
this.classes = date
|
||||||
|
})
|
||||||
|
},
|
||||||
|
buildClass(classes) {
|
||||||
|
classes.forEach(data => {
|
||||||
|
if (data.children) {
|
||||||
|
this.buildClass(data.children)
|
||||||
|
}
|
||||||
|
if (data.hasChildren && !data.children) {
|
||||||
|
data.children = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': this.class_idStr
|
'class_idStr': this.class_idStr
|
||||||
@@ -392,6 +421,26 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSupDepts(deptId) {
|
||||||
|
debugger
|
||||||
|
var number = parseFloat(deptId)
|
||||||
|
getDeptSuperior(number).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.buildDepts(date)
|
||||||
|
this.depts = date
|
||||||
|
})
|
||||||
|
},
|
||||||
|
buildDepts(depts) {
|
||||||
|
debugger
|
||||||
|
depts.forEach(data => {
|
||||||
|
if (data.children) {
|
||||||
|
this.buildDepts(data.children)
|
||||||
|
}
|
||||||
|
if (data.hasChildren && !data.children) {
|
||||||
|
data.children = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取弹窗内部门数据
|
// 获取弹窗内部门数据
|
||||||
loadDepts({ action, parentNode, callback }) {
|
loadDepts({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
|||||||
@@ -147,11 +147,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||||
import localStorage from "@/api/tools/localStorage";
|
import localStorage from '@/api/tools/localStorage'
|
||||||
import equipmentfile, {queryivt1} from "@/api/wms/basedata/em/equipmentfile";
|
import equipmentfile from '@/api/wms/basedata/em/equipmentfile'
|
||||||
import {getToken} from "@/utils/auth";
|
import { getToken } from '@/utils/auth'
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from 'vuex'
|
||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ViewDialog',
|
name: 'ViewDialog',
|
||||||
|
|||||||
@@ -254,14 +254,14 @@ import pagination from '@crud/Pagination'
|
|||||||
import AddDialog from '@/views/wms/basedata/em/equipmentfile/AddDialog'
|
import AddDialog from '@/views/wms/basedata/em/equipmentfile/AddDialog'
|
||||||
import ViewDialog from '@/views/wms/basedata/em/equipmentfile/ViewDialog'
|
import ViewDialog from '@/views/wms/basedata/em/equipmentfile/ViewDialog'
|
||||||
import ChangeDialog from '@/views/wms/basedata/em/equipmentfile/ChangeDialog'
|
import ChangeDialog from '@/views/wms/basedata/em/equipmentfile/ChangeDialog'
|
||||||
import {getLodop} from "@/assets/js/lodop/LodopFuncs";
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||||
import Date from "@/utils/datetime";
|
import Date from '@/utils/datetime'
|
||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import {getDepts} from "@/api/system/dept";
|
import { getDepts } from '@/api/system/dept'
|
||||||
import crudClassstandard from "@/api/wms/basedata/master/classstandard";
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
import crudMaterialbase from "@/api/wms/basedata/master/materialbase";
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'equipmentfile',
|
name: 'equipmentfile',
|
||||||
|
|||||||
Reference in New Issue
Block a user