diff --git a/package.json b/package.json index beef902a..5d14edbf 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,11 @@ "babylonjs": "^6.46.0", "babylonjs-gui": "^6.46.0", "babylonjs-loaders": "^6.46.0", - "cesium": "1.75", + "cesium": "^1.126.0", "codemirror": "^5.65.17", "codemirror-editor-vue3": "^2.7.0", + "compression-webpack-plugin": "^11.1.0", + "copy-webpack-plugin": "^12.0.2", "core-js": "3.29.0", "cropperjs": "1.5.13", "crypto-browserify": "^3.12.0", @@ -37,6 +39,7 @@ "moment": "^2.30.1", "node-polyfill-webpack-plugin": "^4.0.0", "nprogress": "0.2.0", + "path": "^0.12.7", "print-js": "^1.6.0", "qrcodejs2": "0.0.2", "sortablejs": "1.15.0", diff --git a/src/main.js b/src/main.js index e55fa8bb..ec952eff 100644 --- a/src/main.js +++ b/src/main.js @@ -16,14 +16,11 @@ import jsBarCode from "./utils/jsBarCode"; import DataVVue3 from "@kjgl77/datav-vue3"; import htmlToPdf from "./utils/htmlToPdf"; -import * as Cesium from "cesium"; - const app = createApp(App); app.use(store); app.use(router); app.use(ElementPlus); -app.use(Cesium); app.use(i18n); app.use(scui); app.use(xtui); diff --git a/src/views/bigScreen/cesiumtest.vue b/src/views/bigScreen/cesiumtest.vue index cabbd357..a0318585 100644 --- a/src/views/bigScreen/cesiumtest.vue +++ b/src/views/bigScreen/cesiumtest.vue @@ -269,9 +269,18 @@ diff --git a/src/views/wpm/middle_test.vue b/src/views/wpm/middle_test.vue new file mode 100644 index 00000000..7b28226a --- /dev/null +++ b/src/views/wpm/middle_test.vue @@ -0,0 +1,929 @@ + + + + diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue index 3b66e668..9a1885e6 100644 --- a/src/views/wpm/mlog_dept10.vue +++ b/src/views/wpm/mlog_dept10.vue @@ -180,13 +180,9 @@ type="primary" icon="el-icon-plus" @click="addMlog" - v-if=" - currentMtask && - currentMtask.state == 20 - " + v-if="currentMtask &¤tMtask.state == 20" v-auth="'mlog.create'" - >新增 + >新增 @@ -218,40 +214,19 @@ width="300" > @@ -265,17 +240,7 @@ prop="count" > 编辑 删除 提交 撤回 - @@ -568,7 +504,6 @@ row-key="id" :params="paramsWm" stripe - hidePagination > @@ -674,12 +628,16 @@ import handoverDialog from "./handover_form.vue"; import saveDialog from "./worktask_form.vue"; import showDrawer from "./mlog_drawer.vue"; import materials from "./../mtm/materials.vue"; +import checkDrawer from "./check_drawer.vue"; +import middleDialog from "./middle_test.vue"; export default { components: { saveDialog, showDrawer, materials, - handoverDialog + handoverDialog, + middleDialog, + checkDrawer, }, data() { return { @@ -717,6 +675,7 @@ export default { material: "", }, materialType: "wm", + wm:'', mgroup: "", mlogId: "", mtaskDate: "", @@ -725,6 +684,8 @@ export default { queryMtaskState: false, materialsVisible: false, dialogHandover:false, + dialogInmTest:false, + visibleCheckDrawer:false, }; }, mounted() { @@ -818,13 +779,12 @@ export default { this.$refs.table_mtask.queryData(this.queryMtask); }, handover_submit(row) { - this.$API.wpm.handover.submit - .req(row.id) - .then((res) => { - this.$refs.table_handover.refresh(); - this.$message.success("操作成功"); - }) - .catch((e) => {}); + let that = this; + that.$API.wpm.handover.submit.req(row.id).then((res) => { + that.$refs.table_wm.refresh(); + that.$refs.table_handover.refresh(); + that.$message.success("操作成功"); + }).catch((e) => {}); }, getMlogs() { this.$API.wpm.mlog.list @@ -870,6 +830,7 @@ export default { } }, table_submit(row) { + let that = this; let lengths = row.mlogs.length, infoText = ""; if (lengths > 0) { @@ -877,18 +838,16 @@ export default { } else { infoText = "该任务没有日志,确定提交吗?"; } - this.$confirm(infoText, "提示", { + that.$confirm(infoText, "提示", { type: "warning", }).then(() => { - this.$API.pm.mtask.submit - .req(row.id) - .then((res) => { - this.$message.success("操作成功"); - this.$refs.table_wm.refresh(); - this.$refs.table_mtask.refresh(); - this.mtaskClick(this.currentMtask); - }) - .catch((err) => {}); + that.$API.pm.mtask.submit.req(row.id).then((res) => { + that.$message.success("操作成功"); + that.$refs.table_wm.refresh(); + that.$refs.table_mtask.refresh(); + that.mtaskClick(that.currentMtask); + that.currentMtask.state = 20 + }).catch((err) => {}); }); }, // table_submit(row) { @@ -940,18 +899,19 @@ export default { this.getMlogs(); }, mlog_submit(row) { - this.mlogHandleLoading = true; - this.$API.wpm.mlog.submit + let that = this; + that.mlogHandleLoading = true; + that.$API.wpm.mlog.submit .req(row.id) .then((res) => { - this.$message.success("操作成功"); - this.mtaskClick(this.currentMtask); - this.$refs.table_wm.refresh(); - this.$refs.table_mtask.refresh(); - this.mlogHandleLoading = false; + that.$message.success("操作成功"); + that.mtaskClick(that.currentMtask); + that.$refs.table_wm.refresh(); + that.$refs.table_mtask.refresh(); + that.mlogHandleLoading = false; }) .catch((err) => { - this.mlogHandleLoading = false; + that.mlogHandleLoading = false; }); }, //从生产日志生成交接记录 @@ -962,6 +922,20 @@ export default { }) }, handleHandoverSuccess(){}, + //获取当前车间物料的检验记录 + inm_record(row){ + this.wm = row.id; + this.visibleCheckDrawer = true; + this.$nextTick(() => { + this.$refs.checkDrawers.open(); + }); + }, + inm_test(row){ + this.dialogInmTest = true; + this.$nextTick(() => { + this.$refs.inmTestDialog.open('10车间').setData(row); + }) + }, }, }; diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue index adb4fd13..cdcf1076 100644 --- a/src/views/wpm/mlog_dept6.vue +++ b/src/views/wpm/mlog_dept6.vue @@ -90,8 +90,8 @@ ref="tableprocess" row-key="id" stripe - :hideDo="hideDo" - :data="processList" + :params="paramsProcess" + :apiObj="apiObjProcess" @row-click="itemClick" > @@ -233,14 +229,13 @@ label="操作" fixed="right" align="left" + width="60" > @@ -538,7 +482,6 @@ row-key="id" :params="paramsWm" stripe - hidePagination > diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 0ed3beaf..8680b343 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -26,20 +26,6 @@ /> - - @@ -428,18 +359,23 @@ export default { let day = date.getDate(); that.form.handle_date = year + "-" + month + "-" + day; that.form.send_mgroup = that.mgroupId; + // type=10 物料交接 物料都可交接,接收工段有限制 + // type=20 物料返工 不合格品交接,接收工段为该工艺流程中的工段 + // type=30 物料检验 合格品交接,检验部接收 + // type=40 废品入库 不合格品交接,接收工段固定为废品库 + // type=50 改版 灵活无限制 + //获取当前工段/部门交送人 if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接 - that.$API.system.user.list - .req({ page: 0, posts__code__contains: "check" }) - .then((res) => { - that.userList = res; - }); + that.$API.system.user.list.req({ page: 0, posts__code__contains: "check" }).then((res) => { + that.userList = res; + }); }else if(that.type==20&&that.mgroupName=='废品库'){//废品交接 that.getCkUserList(); }else{ that.deptID = that.$TOOL.data.get('gx_deptID'); that.getUserList(); } + //获取交送物料 if((that.type==20&&that.mgroupName!=='废品库')||that.type==40){ that.getMaterialNotok(); }else if(that.type==20&&that.mgroupName=='废品库'){ @@ -447,7 +383,10 @@ export default { }else{ that.getMaterial(); } - that.getDeptOptions(); + if(that.type==30){ + that.getDeptOptions(); + } + that.getMgroupOptions(); }, methods: { @@ -464,11 +403,9 @@ export default { }, //获取部门列表 getDeptOptions() { - this.$API.system.dept.list - .req({ page: 0, type: "dept" }) - .then((res) => { - this.deptOptions = res; - }); + this.$API.system.dept.list.req({ page: 0, type: "dept" }).then((res) => { + this.deptOptions = res; + }); }, //获取工段列表 getMgroupOptions() { @@ -484,8 +421,6 @@ export default { that.getCkUserList();//废品库接收人 }else if(that.type==30){ this.getUserList3(); - }else{ - this.getUserList2(); } }); }, @@ -555,23 +490,28 @@ export default { //获取接收工段人员 getUserList2() { let that = this; - this.mgroupOptions.forEach(item => { - if(item.id==that.form.recive_mgroup){ - let deptID = item.belong_dept; - this.$API.system.user.list.req({ belong_dept: deptID, page: 0 }).then((res) => { + if(that.mode=="add"){ + that.$API.mtm.mgroup.item.req(that.form.recive_mgroup).then((res) => { + this.$API.system.user.list.req({ depts: res.belong_dept, page: 0 }).then((res) => { that.userList2 = res; }); - } - }); + }) + }else{ + this.mgroupOptions.forEach(item => { + if(item.id==that.form.recive_mgroup){ + this.$API.system.user.list.req({ depts: item.belong_dept, page: 0 }).then((res) => { + that.userList2 = res; + }); + } + }); + } }, //获取接收部门人员 getUserList3() { let that = this; - this.$API.system.user.list - .req({ depts: that.form.recive_dept, page: 0 }) - .then((res) => { - that.userList2 = res; - }); + this.$API.system.user.list.req({ depts: that.form.recive_dept, page: 0 }).then((res) => { + that.userList2 = res; + }); }, addMaterial(){ this.addShow = true; @@ -679,12 +619,27 @@ export default { }, //表单注入数据 setData(data) { + let that = this; this.totalCount = data.count?data.count:data.handoverb.count; Object.assign(this.form, data); if(data.type==30){ this.getUserList3(); }else{ - this.getUserList2(); + this.$API.system.user.list.req({ depts: data.recive_dept, page: 0 }).then((res) => { + that.userList2 = res; + }); + setTimeout(() => { + let arr =that.userList2.filter((item) => { + return item.id == data.recive_user + }) + if(arr.length>0){}else{ + let obj = {}; + obj.id = data.recive_user; + obj.name = data.recive_user_name; + that.userList2.push(obj); + } + },500) + } if(data.new_batch!==''&&data.new_batch!==undefined&&data.new_batch!==null){ this.change_batch = true; diff --git a/src/views/wpm_bx/inm.vue b/src/views/wpm_bx/inm.vue index 318a0535..bfbcf994 100644 --- a/src/views/wpm_bx/inm.vue +++ b/src/views/wpm_bx/inm.vue @@ -168,13 +168,13 @@ @success="handleinmSuccess" > - +