diff --git a/package.json b/package.json index 71788f1c..1a17ce14 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "babylonjs-gui": "^6.46.0", "babylonjs-loaders": "^6.46.0", "cesium": "1.75", - "codemirror": "5.65.5", + "codemirror": "^5.65.17", + "codemirror-editor-vue3": "^2.7.0", "core-js": "3.29.0", "cropperjs": "1.5.13", "crypto-browserify": "^3.12.0", diff --git a/src/App.vue b/src/App.vue index 2f29a496..545c4771 100644 --- a/src/App.vue +++ b/src/App.vue @@ -301,5 +301,18 @@ export default { width: 9vh !important; height: 9vh !important; } +#progressbwlq .el-progress-bar__innerText{ + width: 100%; + position: absolute; + top: 4px; + left: 50%; + color: #cccccc; +} +.el-select-dropdown__item{ + height:auto!important; +} +.el-select-dropdown__item div{ + margin-left:15px!important; +} //排放系统 diff --git a/src/api/model/enm.js b/src/api/model/enm.js index d562fadd..44ef9bae 100644 --- a/src/api/model/enm.js +++ b/src/api/model/enm.js @@ -3,6 +3,64 @@ import http from "@/utils/request" /*EM接口*/ export default { // 测点 + xscript: { + list: { + name: "脚本", + req: async function(data){ + return await http.get( + `${config.API_URL}/enm/xscript/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/enm/xscript/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/enm/xscript/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/xscript/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/enm/xscript/${id}/`); + } + }, + toggle: { + name: "启用/禁用", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/enm/xscript/${id}/toggle/`, + data); + } + }, + change_data: { + name: "变更数据", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/enm/xscript/${id}/change_data/`, + data); + } + } + }, mpoint: { mplog: { name: "测点原始记录", diff --git a/src/api/model/pm.js b/src/api/model/pm.js index 894aa937..f7fd7f5a 100644 --- a/src/api/model/pm.js +++ b/src/api/model/pm.js @@ -94,6 +94,64 @@ export default { } }, }, + mtaskbAdd: { + name: "创建", + req: async function(id,data){ + return await http.post( + `${config.API_URL}/pm/mtask/${id}/add_mtaskb/`, + data); + } + }, + mtaskb:{ + list: { + name: "生产任务列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/pm/mtaskb/`, + data + ); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/pm/mtaskb/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/pm/mtaskb/cquery/`, + data); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/pm/mtaskb/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/pm/mtaskb/${id}/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/pm/mtaskb/${id}/`); + } + }, + }, // 生产大任务 utask: { list: { diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index 56f64454..bbb0c48a 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -126,9 +126,53 @@ export default { }, }, }, + fmlog: { + list: { + name: "列表", + req: async function (data) { + return await http.get(`${config.API_URL}/wpm/fmlog/`, data); + }, + }, + item: { + name: "获取详情", + req: async function (id) { + return await http.get(`${config.API_URL}/wpm/fmlog/${id}/`); + }, + }, + cquery: { + name: "复杂查询", + req: async function (data) { + return await http.post( + `${config.API_URL}/wpm/fmlog/cquery/`, + data + ); + }, + }, + update: { + name: "更新", + req: async function (id, data) { + return await http.put( + `${config.API_URL}/wpm/fmlog/${id}/`, + data + ); + }, + }, + create: { + name: "创建", + req: async function (data) { + return await http.post(`${config.API_URL}/wpm/fmlog/`, data); + }, + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete(`${config.API_URL}/wpm/fmlog/${id}/`); + }, + }, + }, mlog: { list: { - name: "值班记录列表", + name: "列表", req: async function (data) { return await http.get(`${config.API_URL}/wpm/mlog/`, data); }, diff --git a/src/assets/icons/Jcpz.vue b/src/assets/icons/Jcpz.vue new file mode 100644 index 00000000..f7f9d4d2 --- /dev/null +++ b/src/assets/icons/Jcpz.vue @@ -0,0 +1,5 @@ + diff --git a/src/assets/icons/index.js b/src/assets/icons/index.js index fe8a6acb..f51c6b06 100644 --- a/src/assets/icons/index.js +++ b/src/assets/icons/index.js @@ -23,4 +23,5 @@ export { default as Xiaoshou } from './Xiaoshou.vue' export { default as Zhixing } from './Zhixing.vue' export { default as Zhizao } from './Zhizao.vue' export { default as Env } from './Env.vue' -export { default as Elec } from './Elec.vue' \ No newline at end of file +export { default as Elec } from './Elec.vue' +export { default as Jcpz } from './Jcpz.vue' \ No newline at end of file diff --git a/src/config/route.js b/src/config/route.js index 5a0f3731..6f9ba82c 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -35,6 +35,16 @@ const routes = [ }, component: "home/testx", }, + { + name: "blank", + path: "/blank", + meta: { + title: "控制台", + // icon: "el-icon-monitor", + perms: ["home_blank"], + }, + component: "home/blank", + }, { name: "dashboard", path: "/dashboard", @@ -53,7 +63,7 @@ const routes = [ title: "控制台", // icon: "el-icon-monitor", affix: true, - perms: ["enm"], + perms: ["enmdashboard"], }, component: "home/enm_home", }, @@ -1841,6 +1851,33 @@ const routes = [ }, component: "inm/mioitem", }, + { + name: "workshop", + path: "/inm/workshop", + meta: { + title: "车间库存", + hidden: true, + }, + component: "inm/workshop", + }, + { + name: "workshop_mio", + path: "/inm/workshop_mio", + meta: { + title: "车间出入库记录", + hidden: true, + }, + component: "inm/workshop_mio", + }, + { + name: "inmScrap", + path: "/inm/inmScrap", + meta: { + title: "废品库", + perms: ["inmScrap"], + }, + component: "inm/inmScrap", + }, ], }, //采购 pum @@ -2697,13 +2734,46 @@ const routes = [ }, component: "enm_base/search", }, + //计算中心 + { + name: "fac_cal", + path: "/fac_cal", + meta: { + title: "计算中心", + icon: "el-icon-menu", + type: "menu", + perms: ["fac_cal"], + }, + children: [ + { + path: "/fac_cal/mpointstat", + meta: { + title: "计算结果", + // icon: "el-icon-postcard", + type: "menu", + perms: ["mpointstat"], + }, + component: "fac_cal/mpointstat", + }, + { + path: "/fac_cal/caltask", + meta: { + title: "计算任务", + // icon: "el-icon-postcard", + type: "menu", + perms: ["caltask"], + }, + component: "fac_cal/caltask", + }, + ] + }, //基础配置 { name: "enm_base", path: "/enm_base", meta: { title: "基础配置", - icon: "el-icon-management", + icon: "sc-icon-jcpz", type: "menu", perms: ["enm_base"], }, @@ -2720,7 +2790,7 @@ const routes = [ component: "enm_base/team", }, { - name: "mgruop", + name: "mgroup", path: "/enm_base/mgruop", meta: { title: "工段", @@ -2869,6 +2939,16 @@ const routes = [ }, component: "sys/role", }, + { + path: "/sys/myschedule", + name: "myschedule", + meta: { + title: "定时策略", + type: "menu", + perms: ["myschedule"], + }, + component: "sys/myschedule" + }, { path: "/sys/dict", name: "dict", @@ -2966,6 +3046,17 @@ const routes = [ perms: ["bigScreenP_dept"], }, children: [ + { + path: "/bigScreenP_heihua", + name: "bigScreenP_heihua", + meta: { + title: "黑化车间", + icon: "el-icon-trend-charts", + perms: ["bigScreenP_dept_hh"], + fullpage: true, + }, + component: "bigScreen/index_heihuadept.vue", + }, { path: "/bigScreenP_10", name: "bigScreenP_10", @@ -3181,6 +3272,72 @@ const routes = [ }, component: "statistics/stock_statistics.vue", }, + //合格数统计——光芯 + { + name: "pass_num_gx", + path: "/statistic/pass_num_gx", + meta: { + title: "合格数统计", + icon: "el-icon-DataAnalysis", + perms: ["pass_num_gx"], + }, + component: "statistics/pass_num_gx.vue", + }, + //任务进度统计——光芯 + { + name: "task_rate_gx", + path: "/statistic/task_rate_gx", + meta: { + title: "任务进度", + icon: "el-icon-DataAnalysis", + perms: ["task_rate_gx"], + }, + component: "statistics/task_rate_gx.vue", + }, + //库存统计——光芯 + { + path: "/statistic_inm", + name: "statistic_inm", + meta: { + title: "库存统计", + icon: "el-icon-trend-charts", + perms: ["statistic_inm_gx"], + }, + component: "statistics/statistics_inm.vue", + }, + //过程检验统计——光芯 + { + path: "/process_check_gx", + name: "process_check_gx", + meta: { + title: "过程检验统计", + icon: "el-icon-trend-charts", + perms: ["process_check_gx"], + }, + component: "statistics/process_check_gx.vue", + }, + //成品检验统计——光芯 + { + path: "/good_check_gx", + name: "good_check_gx", + meta: { + title: "成品检验统计", + icon: "el-icon-trend-charts", + perms: ["good_check_gx"], + }, + component: "statistics/good_check_gx.vue", + }, + //扫边车间数据汇总——光芯 + // { + // path: "/statistics_saobian", + // name: "statistics_saobian", + // meta: { + // title: "扫边车间统计", + // icon: "el-icon-trend-charts", + // perms: ["statistic_inm"], + // }, + // component: "statistics/statistics_saobian.vue", + // }, //综合查询 { name: "total_statistics", diff --git a/src/layout/index.vue b/src/layout/index.vue index 28153bff..298d3346 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -355,7 +355,7 @@ export default { // let baseInFo = data[data.current]; let base_logo = this.$TOOL.data.get("BASE_INFO") !== null - ? this.$TOOL.data.get("BASE_INFO").base.base_logo + ? this.$TOOL.data.get("BASE_INFO").base.base_logo_i : "img/logo.png"; // let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png'; return base_logo; diff --git a/src/views/bigScreen/enpComponents/pollutant.vue b/src/views/bigScreen/enpComponents/pollutant.vue index 4330aaac..2c19a7fd 100644 --- a/src/views/bigScreen/enpComponents/pollutant.vue +++ b/src/views/bigScreen/enpComponents/pollutant.vue @@ -223,6 +223,21 @@
TSP: 0.000 m³/h
+ +
+
+
+
+ 监控设备 +
+
+ + {{ eqj.name }} +
+ + +
+
@@ -255,6 +270,7 @@ export default { eqs: {}, eqc: {}, eqz: {}, + eqj: {}, pollutantDetail: false, query: {}, apiObj: this.$API.enp.drain.list, @@ -316,7 +332,8 @@ export default { } }, mounted() { - + let that = this; + that.init(); }, methods: { initDom() { @@ -363,7 +380,13 @@ export default { that.getDetailData(2, id); } else if (res.type == 30) { //治理设备 that.eqz = res; + that.getDetailData(3, id); + } + else if (res.type == 50) { //监控设备 + debugger; + this.login(res);//监控摄像头 + that.eqj = res; } }) }); @@ -425,6 +448,70 @@ export default { this.pollutantDetail = false; this.detailItem = {}; }, + + //监控摄像头 + //初始化插件 + init() { + + WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin"); + //初始化 + alert(1) + WebVideoCtrl.I_InitPlugin("divPlugin", 200, 200, { + iWndowType: 2, //分裂系数N*N + bWndFull: true, //双击全屏 + cbInitPluginCompleted: function () { + alert(1) + WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(() => { + // 检查插件是否最新 + WebVideoCtrl.I_CheckPluginVersion().then((bFlag) => { + if (bFlag) { + alert("检测到新的插件版本,双击开发包目录里的HCWebSDKPlugin.exe升级!"); + } + }); + }, () => { + alert("插件初始化失败,请确认是否已安装插件;如果未安装,请双击开发包目录里的HCWebSDKPlugin.exe安装!"); + }); + + }, + }); + + }, + + //摄像头登录 + login(jkdata){ + + WebVideoCtrl.I_Login( + jkdata.ip, + 1, + jkdata.port, + jkdata.login_name, + jkdata.login_pwd, + { + async: true, + cgi: 1, + success: (xmlDoc) => { + console.log("登录成功", xmlDoc); + //预览 + WebVideoCtrl.I_StartRealPlay(szIp + "_" + ipPort, { + success: () => { + console.log("预览成功"); + }, + }); + }, + error: (xmlDoc) => { + console.log("登录失败", xmlDoc); + }, + } + ); + } + } } - \ No newline at end of file + + diff --git a/src/views/bigScreen/enpComponents/transport.vue b/src/views/bigScreen/enpComponents/transport.vue index 43e64cb7..78d217c7 100644 --- a/src/views/bigScreen/enpComponents/transport.vue +++ b/src/views/bigScreen/enpComponents/transport.vue @@ -58,27 +58,27 @@ background-color: rgb(4, 50, 83); box-shadow: inset 0px 0px 30px 15px rgb(7, 79, 109)" v-model="dialogFormVisible" title="车辆运输台账详情" > - {{ ysdata.crkbh }} - {{ ysdata.dzbh }} - {{ ysdata.tgfs }} - {{ ysdata.jcsj }} - {{ ysdata.ccsj }} - {{ ysdata.cllx }} - {{ ysdata.clys }} - {{ ysdata.cph }} - {{ ysdata.zcdjsj }} - {{ ysdata.cpsbdm }} - {{ ysdata.clppxh }} - {{ ysdata.fdjhm }} - {{ ysdata.rllx }} - {{ ysdata.pfjd }} - {{ ysdata.syxz }} - {{ ysdata.lwzt }} - {{ ysdata.jcyshwmc }} - {{ ysdata.jchwl }} - {{ ysdata.cchwmc }} - {{ ysdata.cchwl }} - {{ ysdata.cdmc }} + {{ ysdata.crkbh }} + {{ ysdata.dzbh }} + {{ ysdata.tgfs }} + {{ ysdata.jcsj }} + {{ ysdata.ccsj }} + {{ ysdata.cllx }} + {{ ysdata.clys }} + {{ ysdata.cph }} + {{ ysdata.zcdjsj }} + {{ ysdata.cpsbdm }} + {{ ysdata.clppxh }} + {{ ysdata.fdjhm }} + {{ ysdata.rllx }} + {{ ysdata.pfjd }} + {{ ysdata.syxz }} + {{ ysdata.lwzt }} + {{ ysdata.jcyshwmc }} + {{ ysdata.jchwl }} + {{ ysdata.cchwmc }} + {{ ysdata.cchwl }} + {{ ysdata.cdmc }}
diff --git a/src/views/bigScreen/enpComponents/video.vue b/src/views/bigScreen/enpComponents/video.vue index ac64f767..88ce17b6 100644 --- a/src/views/bigScreen/enpComponents/video.vue +++ b/src/views/bigScreen/enpComponents/video.vue @@ -3,18 +3,29 @@
- 登录 - 预览 - 停止预览 - 登出设备 - 销毁设备 - 初始化设备 +
+ 登录 + 预览 + 停止预览 + 登出设备 + 销毁设备 + 初始化设备 + + + + + +
+
diff --git a/src/views/bigScreen/index_heihuadept.vue b/src/views/bigScreen/index_heihuadept.vue new file mode 100644 index 00000000..a6be8cfd --- /dev/null +++ b/src/views/bigScreen/index_heihuadept.vue @@ -0,0 +1,992 @@ + + + + diff --git a/src/views/em/equipment.vue b/src/views/em/equipment.vue index f5760a78..217eeba0 100644 --- a/src/views/em/equipment.vue +++ b/src/views/em/equipment.vue @@ -159,7 +159,7 @@ + + + + + + + + + {{ form.belong_dept_name }} + + + + + {{ form.mgroup_name }} + + + + + + + + + + + + 保存 + 取消 + + + + + + + diff --git a/src/views/fac_cal/taskresult.vue b/src/views/fac_cal/taskresult.vue new file mode 100644 index 00000000..d63d2f62 --- /dev/null +++ b/src/views/fac_cal/taskresult.vue @@ -0,0 +1,75 @@ + + \ No newline at end of file diff --git a/src/views/fac_cal/xscript.vue b/src/views/fac_cal/xscript.vue new file mode 100644 index 00000000..80fc545e --- /dev/null +++ b/src/views/fac_cal/xscript.vue @@ -0,0 +1,224 @@ + + diff --git a/src/views/home/blank.vue b/src/views/home/blank.vue new file mode 100644 index 00000000..d4b7d494 --- /dev/null +++ b/src/views/home/blank.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/inm/inmScrap.vue b/src/views/inm/inmScrap.vue new file mode 100644 index 00000000..5edb3cbb --- /dev/null +++ b/src/views/inm/inmScrap.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/views/inm/mioitem_check.vue b/src/views/inm/mioitem_check.vue index 534a1ed2..1613fca0 100644 --- a/src/views/inm/mioitem_check.vue +++ b/src/views/inm/mioitem_check.vue @@ -1019,15 +1019,10 @@ export default { that.weight_kgs.forEach((item) => { arr.push(item.value); }); - let obj = {}; - obj.test_date = that.form.test_date; - obj.test_user = that.form.test_user; - obj.count_bag = that.form.count_bag; - obj.weight_kgs = arr; - obj.is_testok = that.form.is_testok; - console.log(obj); + that.form.weight_kgs = arr; + console.log('that.form',that.form); that.$API.inm.mioitem.testpurin - .req(that.mioitemId, obj) + .req(that.mioitemId, that.form) .then((res) => { that.isSaveing = false; that.$emit("success"); diff --git a/src/views/inm/workshop.vue b/src/views/inm/workshop.vue new file mode 100644 index 00000000..b8d72119 --- /dev/null +++ b/src/views/inm/workshop.vue @@ -0,0 +1,105 @@ + + diff --git a/src/views/inm/workshop_mio.vue b/src/views/inm/workshop_mio.vue new file mode 100644 index 00000000..6386374b --- /dev/null +++ b/src/views/inm/workshop_mio.vue @@ -0,0 +1,254 @@ + + diff --git a/src/views/mtm/materials_form_gx.vue b/src/views/mtm/materials_form_gx.vue index 4620327f..88a370da 100644 --- a/src/views/mtm/materials_form_gx.vue +++ b/src/views/mtm/materials_form_gx.vue @@ -66,8 +66,15 @@ /> - + + + + + --> - + - + --> - + @@ -171,9 +171,12 @@ const defaultForm = { process: null, sort: 1, out_rate: 100, + material_in:'', + material_out:'', + hour_work:0, batch_bind: true, is_autotask: true, - is_count_utask: false, + // is_count_utask: false, }; export default { props: { @@ -185,7 +188,7 @@ export default { loading: false, mode: "add", //表单数据 - form: defaultForm, + form: Object.assign({}, defaultForm), //验证规则 rules: { process: [ diff --git a/src/views/mtm/routepack_form.vue b/src/views/mtm/routepack_form.vue index 8d270754..aa16da3b 100644 --- a/src/views/mtm/routepack_form.vue +++ b/src/views/mtm/routepack_form.vue @@ -79,67 +79,73 @@ -
- -
- - - - - - - - - - - - - - - - - - - -
- + + + + + + 上一步 退出 -
-
+ - 模块 - 页面 - 接口 + 模块 + 页面 + 接口 @@ -86,6 +86,11 @@ + + diff --git a/src/views/statistics/pass_num_gx.vue b/src/views/statistics/pass_num_gx.vue new file mode 100644 index 00000000..61daef0a --- /dev/null +++ b/src/views/statistics/pass_num_gx.vue @@ -0,0 +1,1004 @@ + + + + diff --git a/src/views/statistics/process_check_gx.vue b/src/views/statistics/process_check_gx.vue new file mode 100644 index 00000000..521d2845 --- /dev/null +++ b/src/views/statistics/process_check_gx.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/views/statistics/statistics_inm.vue b/src/views/statistics/statistics_inm.vue new file mode 100644 index 00000000..465a29e5 --- /dev/null +++ b/src/views/statistics/statistics_inm.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/src/views/statistics/statistics_saobian.vue b/src/views/statistics/statistics_saobian.vue new file mode 100644 index 00000000..726b1b94 --- /dev/null +++ b/src/views/statistics/statistics_saobian.vue @@ -0,0 +1,421 @@ + + + + + diff --git a/src/views/statistics/task_rate_gx.vue b/src/views/statistics/task_rate_gx.vue new file mode 100644 index 00000000..9bd3be5c --- /dev/null +++ b/src/views/statistics/task_rate_gx.vue @@ -0,0 +1,217 @@ + + + + diff --git a/src/views/sys/myschedule.vue b/src/views/sys/myschedule.vue index 8f29a37d..84e67180 100644 --- a/src/views/sys/myschedule.vue +++ b/src/views/sys/myschedule.vue @@ -1,11 +1,16 @@ diff --git a/src/views/wpm_gx/check_form.vue b/src/views/wpm_gx/check_form.vue index eb777ba6..8c8c25f5 100644 --- a/src/views/wpm_gx/check_form.vue +++ b/src/views/wpm_gx/check_form.vue @@ -16,26 +16,26 @@ > - + - - {{item.batch}} - ({{item.count}}) - + + + + + + - + - + + + + + + - - - + + + precision="0" + > @@ -85,6 +95,16 @@ >
+ + + + + @@ -135,7 +154,6 @@ v-model="count_notok_json.count_n_wj" style="width: 100%" precision="0" - @change="handleCountChange" >
@@ -147,7 +165,6 @@ v-model="count_notok_json.count_n_yd" style="width: 100%" precision="0" - @change="handleCountChange" >
@@ -159,7 +176,6 @@ v-model="count_notok_json.count_n_txd" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -171,7 +187,6 @@ v-model="count_notok_json.count_n_qp" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -183,7 +198,6 @@ v-model="count_notok_json.count_n_swen" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -195,12 +209,21 @@ v-model="count_notok_json.count_n_bb" style="width: 100%" precision="0" - @change="handleCountChange" >
- + + + + + @@ -220,7 +242,6 @@ v-model="count_notok_json.count_n_md" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -233,7 +254,17 @@ v-model="count_notok_json.count_n_ps" style="width: 100%" precision="0" - + @change="handleCountChange" + > + + + + + @@ -243,7 +274,7 @@ 保存 + >提交 取消 @@ -273,10 +304,12 @@ export default { test_date: "", batch: "", count: null, - count_ok: null, + count_ok: 0, + count_sampling_ok:'', count_notok: 0, count_notok_json:{} }, + count_ok_rate:100, count_notok_json:{ //尺寸 count_n_wj: 0, @@ -289,32 +322,27 @@ export default { count_n_hs: 0, count_n_md: 0, count_n_bb:0, + count_n_xbb:0, count_n_ps: 0, count_n_qt:0, }, rules: { - test_date: [ - { - required: true, - message: "请选择检验日期", - trigger: "blur", - }, - ], - batch: [ - { - required: true, - message: "请选择物料批次", - trigger: "blur", - }, - ], + test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}], + batch: [{required: true,message: "请选择物料批次",trigger: "blur"}], + test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}], }, + options: [], + userList : [], + typeOption:[ + {name:'全检',value:20}, + {name:'抽检',value:10}, + ], + selectionFilters: [], batchCount:null, formCount:null, visible: false, + supplier:null, isSaveing: false, - options: [], - userList : [], - selectionFilters: [], setFiltersVisible: false, }; }, @@ -323,6 +351,7 @@ export default { this.form.batch = this.itemObj.batch; this.form.wm = this.itemObj.id; this.form.count = this.itemObj.count; + this.form.supplier = this.itemObj.supplier; this.deptID = this.$TOOL.data.get('gx_deptID'); this.getUsers(); }, @@ -351,9 +380,6 @@ export default { }); }); }, - handleCheckChange(){ - this.form.count_ok = this.form.count-this.form.count_notok; - }, handleCountChange(type){ this.form.count_notok = this.count_notok_json.count_n_wj+ @@ -364,12 +390,20 @@ export default { this.count_notok_json.count_n_swen+ this.count_notok_json.count_n_hs+ this.count_notok_json.count_n_bb+ + this.count_notok_json.count_n_xbb+ this.count_notok_json.count_n_md+ - this.count_notok_json.count_n_ps; - this.form.count_ok = this.form.count - this.form.count_notok; + this.count_notok_json.count_n_ps+ + this.count_notok_json.count_n_qt; + this.handleCountNotokChange(); }, handleCountNotokChange(){ - this.form.count_ok = this.form.count - this.form.count_notok; + if(this.form.type2==10){//抽检 + this.form.count_sampling_ok = this.form.count_sampling - this.form.count_notok; + this.count_ok_rate = ((this.form.count_sampling_ok/this.form.count_sampling)*100).toFixed(2); + }else if(this.form.type2==20){//全检 + this.form.count_ok = this.form.count - this.form.count_notok; + this.count_ok_rate = ((this.form.count_ok/this.form.count)*100).toFixed(2); + } }, //获取物料批次 getMaterialBatch() { @@ -398,17 +432,28 @@ export default { this.count_notok_json.count_n_swen+ this.count_notok_json.count_n_hs+ this.count_notok_json.count_n_bb+ + this.count_notok_json.count_n_xbb+ this.count_notok_json.count_n_md+ - this.count_notok_json.count_n_ps; - if(count_notok>this.form.count_notok){ - this.$notify.error("不合格数量有问题"); + this.count_notok_json.count_n_ps+ + this.count_notok_json.count_n_qt; + if(count_notok>that.form.count_notok){ + that.$notify.error("不合格数量有问题"); that.isSaveing = false; }else{ - if(count_notok { that.$API.qm.ftestwork.submit.req(res.id) diff --git a/src/views/wpm_gx/chengpinpao.vue b/src/views/wpm_gx/chengpinpao.vue index a6e395e8..5eefabab 100644 --- a/src/views/wpm_gx/chengpinpao.vue +++ b/src/views/wpm_gx/chengpinpao.vue @@ -32,7 +32,7 @@ + + diff --git a/src/views/wpm_gx/fmlog_detail.vue b/src/views/wpm_gx/fmlog_detail.vue new file mode 100644 index 00000000..6252bce0 --- /dev/null +++ b/src/views/wpm_gx/fmlog_detail.vue @@ -0,0 +1,312 @@ + + + + diff --git a/src/views/wpm_gx/fmlog_form.vue b/src/views/wpm_gx/fmlog_form.vue new file mode 100644 index 00000000..dd28f1a1 --- /dev/null +++ b/src/views/wpm_gx/fmlog_form.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/src/views/wpm_gx/fmlogs.vue b/src/views/wpm_gx/fmlogs.vue new file mode 100644 index 00000000..79c73f0a --- /dev/null +++ b/src/views/wpm_gx/fmlogs.vue @@ -0,0 +1,215 @@ + + + diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue index df4244e3..66749295 100644 --- a/src/views/wpm_gx/handover.vue +++ b/src/views/wpm_gx/handover.vue @@ -16,6 +16,11 @@ v-auth="'handover.create'" >返工 + 打印机 + + + + @@ -144,6 +173,14 @@ " >接收 + 查看 { + this.$refs.saveDialog.open("show").setData(row); + }); + }, //删除 async table_del(row) { var id = row.id; diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index 17503778..73a09904 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -14,35 +14,6 @@ label-width="80px" > - - - - - {{ item.batch }} -
- {{ item.count }} - ({{ item.notok_sign_name }}) -
-
-
-
-
- + +
+ + + + + + + + + + + {{ item.batch }} +
+ {{ item.count }} + + ({{ item.notok_sign_name }}) + +
+
+
+
+
+ + + + + + + + + +
- + 确定 @@ -178,16 +200,15 @@ export default { edit: "编辑交接记录", show: "查看交接记录", }, + lists:[],//交接数组 handle_user: [], form: { - batch: "", - count: 0, //送料数 - wm: "", - send_date: "", - send_user: "", - send_mgroup: "", - recive_user: "", - recive_mgroup: "", + send_date: null, + send_user: null, + send_mgroup: null, + recive_user: null, + recive_mgroup: null, + handoverb:[{wm:'',count:''}], }, rules: { batch: [ @@ -271,7 +292,11 @@ export default { that.deptID = that.$TOOL.data.get('gx_deptID'); that.getUserList(); } - that.getMaterial(); + if(that.type==40){ + that.getMaterialNotok(); + }else{ + that.getMaterial(); + } that.getDeptOptions(); that.getMgroupOptions(); }, @@ -306,30 +331,44 @@ export default { }else if(that.mgroupName=="facade"){ req.material__process__name="二次超洗"; } - // else{ - // if (this.type == 10) { - // req.notok_sign__isnull = 1; - // } else if (this.type == 20) { - // req.notok_sign__isnull = 0; - // }else if (this.type == 30) { - // req.notok_sign__isnull = 1; - // } - // } - - this.$API.wpm.wmaterial.list - .req(req) - .then((res) => { - that.materialOptions = res; - }); + this.$API.wpm.wmaterial.list.req(req).then((res) => { + // that.materialOptions = res; + let arr = []; + res.forEach(item=>{ + let obj = {}; + Object.assign(obj,item); + obj.label = item.batch; + arr.push(obj); + }) + that.materialOptions = arr; + }); + }, + //获取车间不合格物料 + getMaterialNotok() { + let that = this; + var req = { + mgroupx: that.mgroupId, + page: 0, + notok_sign__isnull : 0, + count_xtest__isnull:1 + }; + this.$API.wpm.wmaterial.list.req(req).then((res) => { + let arr = []; + res.forEach(item=>{ + let obj = {}; + Object.assign(obj,item); + obj.label = item.batch+'('+item.notok_sign_name+')'; + arr.push(obj); + }) + that.materialOptions = arr; + }); }, //获取交送工段人员 getUserList() { let that = this; - this.$API.system.user.list - .req({ depts: that.deptID, page: 0 }) - .then((res) => { - that.userList = res; - }); + this.$API.system.user.list.req({ depts: that.deptID, page: 0 }).then((res) => { + that.userList = res; + }); }, //获取接收工段人员 getUserList2() { @@ -338,9 +377,7 @@ export default { this.mgroupOptions.forEach(item => { if(item.id==that.form.recive_mgroup){ deptID = item.belong_dept; - this.$API.system.user.list - .req({ depts: deptID, page: 0 }) - .then((res) => { + this.$API.system.user.list.req({ depts: deptID, page: 0 }).then((res) => { that.userList2 = res; }); } @@ -355,6 +392,12 @@ export default { that.userList2 = res; }); }, + addMaterial(){ + this.form.handoverb.push({wm:'',count:''}); + }, + delMaterial(index){ + this.form.handoverb.splice(index,1); + }, //显示 open(mode = "add") { this.mode = mode; @@ -369,36 +412,42 @@ export default { }, //提交 submit() { - this.$refs.dialogForm.validate(async (valid) => { + let that = this; + that.$refs.dialogForm.validate(async (valid) => { if (valid) { - if (this.mode == "add") { - this.$API.wpm.handover.create - .req(this.form) - .then((res) => { - this.isSaveing = false; - this.$emit("success", this.form, this.mode); - this.visible = false; - this.$message.success("操作成功"); - }) - .catch((err) => { - //可以处理校验错误 - this.isSaveing = false; - return err; - }); - } else if (this.mode == "edit") { - this.$API.wpm.handover.update - .req(this.form.id, this.form) - .then((res) => { - this.isSaveing = false; - this.$emit("success", this.form, this.mode); - this.visible = false; - this.$message.success("操作成功"); - }) - .catch((err) => { - //可以处理校验错误 - this.isSaveing = false; - return err; - }); + if (that.mode == "add") { + that.$API.wpm.handover.create.req(that.form).then((res) => { + if(that.type==40){ + //提交 + that.$API.wpm.handover.submit.req(res.id).then((res1) => { + that.isSaveing = false; + that.$emit("success"); + that.visible = false; + that.$message.success("操作成功"); + }); + }else{ + that.isSaveing = false; + that.$emit("success"); + that.visible = false; + that.$message.success("操作成功"); + } + }).catch((err) => { + //可以处理校验错误 + that.isSaveing = false; + return err; + }); + } else if (that.mode == "edit") { + that.$API.wpm.handover.update.req(that.form.id, that.form).then((res) => { + that.isSaveing = false; + that.$emit("success", that.form, that.mode); + that.visible = false; + that.$message.success("操作成功"); + }) + .catch((err) => { + //可以处理校验错误 + that.isSaveing = false; + return err; + }); } } }); diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue index dac8f8df..13ef1dfb 100644 --- a/src/views/wpm_gx/inm.vue +++ b/src/views/wpm_gx/inm.vue @@ -9,6 +9,8 @@ 入库 + + 报废
+ 放行审批
+ 新增 - + 编辑 @@ -126,6 +141,47 @@ + + + + + + + + + + + + + + + + + + + @@ -312,13 +430,32 @@ export default { mlogItem: {}, saveInForm: { count_use: 0, - count_break: 0, + count_pn_jgqbl: 0, }, + oinfo_json:{ + 退火炉号:'', + 退火时间:'', + 退火温度:'', + 抽检结果:'', + 抽检数:'', + 强度落球:'', + }, + act_states: { + 0: "草稿中", + 1: "进行中", + 2: "被退回", + 3: "被撤回", + 4: "已完成", + 5: "已关闭", + }, + fileList:[], + test_file:'', deptId: "", visible: false, isSaveing: false, options: [], saveInDialog: false, + ticketDialog:false, setFiltersVisible: false, rules: { count_use: [ @@ -328,13 +465,6 @@ export default { trigger: "blur", }, ], - count_break: [ - { - required: true, - message: "请输入破碎数量", - trigger: "blur", - }, - ], }, }; }, @@ -343,15 +473,21 @@ export default { this.paramsIn.mlog = this.mlogId; this.paramsOut.mlog = this.mlogId; this.apiObj = this.$API.wpm.mlogb.list; + this.getInit(); }, methods: { open() { this.visible = true; }, + getMlogItem() { let that = this; that.$API.wpm.mlog.item.req(that.mlogId).then((res) => { that.mlogItem = res; + if(res.test_file!==null){ + that.fileList = [{name:res.test_file,url:res.test_file}]; + that.form.test_file = res.test_file; + } that.mgroup = res.mgroup; that.materialIn = res.material_in; that.deptId = res.belong_dept; @@ -391,7 +527,7 @@ export default { that.isSaveing = true; let obj = {}; obj.count_use = that.saveInForm.count_use; - obj.count_break = that.saveInForm.count_break; + obj.count_pn_jgqbl = that.saveInForm.count_pn_jgqbl; that.$API.wpm.mlogb.updateIn .req(that.saveInForm.id, obj) .then((res) => { @@ -420,8 +556,11 @@ export default { }, table_out_check(row) { this.dialog.check = true; + let obj = {}; + Object.assign(obj, row); + obj.mgroup_name = this.mlogItem.mgroup_name; this.$nextTick(() => { - this.$refs.checkDialog.open(row); + this.$refs.checkDialog.open(obj); }); }, @@ -434,6 +573,49 @@ export default { that.$message.success("操作成功"); }); }, + //渲染工单提交按钮 + getInit() { + let that = this; + that.$API.wf.workflow.initkey.req(" backfire").then((res) => { + that.initForm = res; + }); + }, + //填写退火放行单信息 + createTicket(){ + if(this.mlogItem.work_end_time==null){ + this.$message.error("请先编辑日志并选择结束时间"); + }else{ + let sum = 0; + this.mlogItem.reminder_interval_list.forEach(item => { + sum+=item; + }); + this.oinfo_json.退火时间 = sum; + this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:''; + this.ticketDialog = true; + } + }, + //提交退火放行单信息,创建工单 + submitTicketCreate(id) { + let that = this; + let obj = {}; + obj.oinfo_json = that.oinfo_json; + obj.test_file = that.test_file; + that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => { + let ticket = {}; + that.isSaveing = true; + ticket.title = '退火放行审批单'; + ticket.workflow = that.initForm.workflow; + ticket.ticket_data = {t_id: that.mlogItem.id}; + ticket.transition = id; + that.$API.wf.ticket.create.req(ticket).then((res) => { + that.isSaveing = false; + that.ticketDialog = false; + that.$message.success("提交成功"); + }).catch((e) => { + that.isSaveing = false; + }); + }); + }, handleSaveSuccess() { this.$refs.tableIn.refresh(); this.$refs.tableOut.refresh(); @@ -441,6 +623,11 @@ export default { handleCheckSuccess() { this.$refs.tableOut.refresh(); }, + fileUPSuccess(res) { + let that = this; + console.log('res',res); + this.test_file = res.path; + }, handleEditSuccess() {}, //设置过滤项 setFilters(filters) { diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue index 8490c42b..6bcb02e6 100644 --- a/src/views/wpm_gx/mlog_form.vue +++ b/src/views/wpm_gx/mlog_form.vue @@ -13,7 +13,7 @@ :model="form" :rules="rules" label-position="right" - label-width="100px" + label-width="80px" style="padding: 0 10px" > @@ -72,7 +72,7 @@ {{item.name}} @@ -132,6 +132,26 @@ /> + + + (min) + + + + + (min) + + - + + + + + + + + + - - - - - - -
(h)
-
-
@@ -211,12 +200,15 @@ - + diff --git a/src/views/wpm_gx/mtask.vue b/src/views/wpm_gx/mtask.vue index 3951f11f..1988896a 100644 --- a/src/views/wpm_gx/mtask.vue +++ b/src/views/wpm_gx/mtask.vue @@ -8,23 +8,10 @@ row-key="id" :params="params" > - - + + - + @@ -33,31 +20,50 @@ - + - +
+ + + + diff --git a/src/views/wpm_gx/pingmo.vue b/src/views/wpm_gx/pingmo.vue index 1b2a0547..1ef49570 100644 --- a/src/views/wpm_gx/pingmo.vue +++ b/src/views/wpm_gx/pingmo.vue @@ -32,7 +32,7 @@