优化
This commit is contained in:
@@ -48,11 +48,11 @@ public class EquipmentfileServiceImpl implements EquipmentfileService {
|
||||
}
|
||||
String begin_time = map.get("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");
|
||||
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");
|
||||
return json;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
@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-item label="设备档案编码" prop="devicerecord_code">
|
||||
@@ -241,14 +242,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import crudClassstandard from "@/api/wms/basedata/master/classstandard";
|
||||
import crudMaterialbase from "@/api/wms/basedata/master/materialbase";
|
||||
import equipmentfile from "@/api/wms/basedata/em/equipmentfile";
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import equipmentfile from '@/api/wms/basedata/em/equipmentfile'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import {getDepts} from "@/api/system/dept";
|
||||
import { getDepts, getDeptSuperior } from '@/api/system/dept'
|
||||
|
||||
const defaultForm = {
|
||||
devicerecord_id: '',
|
||||
@@ -263,6 +265,7 @@ const defaultForm = {
|
||||
country_manufactur: '',
|
||||
leavefactory_date: new Date().format('yyyy-MM-dd'),
|
||||
leavefactory_number: '',
|
||||
material_type_id: null,
|
||||
drawing_number: '',
|
||||
supplier_name: '',
|
||||
supplier_id: '',
|
||||
@@ -272,6 +275,8 @@ const defaultForm = {
|
||||
user_id: '',
|
||||
user_code: '',
|
||||
user_name: '',
|
||||
use_deptid: null,
|
||||
belong_deptid: null,
|
||||
extend_code: '',
|
||||
card_code: '',
|
||||
assets_id: '',
|
||||
@@ -288,7 +293,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { Treeselect },
|
||||
components: { crudOperation, Treeselect },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
props: {
|
||||
dialogShow: {
|
||||
@@ -320,6 +325,9 @@ export default {
|
||||
material_type_id: [
|
||||
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
||||
],
|
||||
device_bom_id: [
|
||||
{ required: true, message: '设备Bom不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_produceuse: [
|
||||
{ required: true, message: '生产用途不能为空', trigger: 'blur' }
|
||||
]
|
||||
@@ -341,29 +349,50 @@ export default {
|
||||
equipmentfile.queryBomList().then(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: {
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
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
|
||||
open() {
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
if (!form.devicerecord_code) {
|
||||
this.getDepts()
|
||||
|
||||
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() {
|
||||
const param = {
|
||||
'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 }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
|
||||
@@ -147,11 +147,11 @@
|
||||
|
||||
<script>
|
||||
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import localStorage from "@/api/tools/localStorage";
|
||||
import equipmentfile, {queryivt1} from "@/api/wms/basedata/em/equipmentfile";
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {mapGetters} from "vuex";
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import localStorage from '@/api/tools/localStorage'
|
||||
import equipmentfile from '@/api/wms/basedata/em/equipmentfile'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
|
||||
@@ -254,14 +254,14 @@ import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/basedata/em/equipmentfile/AddDialog'
|
||||
import ViewDialog from '@/views/wms/basedata/em/equipmentfile/ViewDialog'
|
||||
import ChangeDialog from '@/views/wms/basedata/em/equipmentfile/ChangeDialog'
|
||||
import {getLodop} from "@/assets/js/lodop/LodopFuncs";
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import Date from "@/utils/datetime";
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import Date from '@/utils/datetime'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import {getDepts} from "@/api/system/dept";
|
||||
import crudClassstandard from "@/api/wms/basedata/master/classstandard";
|
||||
import crudMaterialbase from "@/api/wms/basedata/master/materialbase";
|
||||
import { getDepts } from '@/api/system/dept'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
export default {
|
||||
name: 'equipmentfile',
|
||||
|
||||
Reference in New Issue
Block a user