diff --git a/src/api/model/em.js b/src/api/model/em.js index 2edb6643..a9263441 100644 --- a/src/api/model/em.js +++ b/src/api/model/em.js @@ -2,6 +2,12 @@ import config from "@/config" import http from "@/utils/request" /*EM接口*/ export default { + cd:{ + name: "执行采集数据方法", + req: async function(data){ + return await http.post(`${config.API_URL}/em/cd/`,data); + } + }, // 设备分类 ecate: { list: { diff --git a/src/api/model/system.js b/src/api/model/system.js index 150c8f64..8e1acd83 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -212,6 +212,12 @@ export default { return await http.get(this.url, params); } }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get(`${config.API_URL}/system/user/${id}/`); + } + }, read: { name: "用户详情", req: async function(id){ diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index e646da5f..e1f38234 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -468,8 +468,8 @@ export default { prints: { name: "打印", req: async function (data) { - return await http.post("http://localhost:8080/prints/", data); - // return await http.post("http://127.0.0.1:8080/prints/", data); + // return await http.post("http://localhost:8080/prints/", data); + return await http.post("http://127.0.0.1:8080/prints/", data); }, }, ana:{ diff --git a/src/utils/enum.js b/src/utils/enum.js index acecc11a..a7be6348 100644 --- a/src/utils/enum.js +++ b/src/utils/enum.js @@ -204,6 +204,7 @@ export const wmState = new EnumFactory({ 10: { text: '合格', type: 'success' }, 20: { text: '不合格', type: 'warning' }, 30: { text: '返修', type: 'warning' }, + 34: { text: '返修完成', type: 'warning' }, 40: { text: '检验', type: 'primary' }, 50: { text: '报废', type: 'danger' }, }, parseInt) diff --git a/src/views/bigScreen/index_jianbodept.vue b/src/views/bigScreen/index_jianbodept.vue index 78932f48..1621c0fd 100644 --- a/src/views/bigScreen/index_jianbodept.vue +++ b/src/views/bigScreen/index_jianbodept.vue @@ -425,6 +425,14 @@ export default { } if (list.length > 0) { list.forEach((item) => { + let dateNow = new Date().getDate(); + if(item.日 == dateNow){ + that.sctj.rtcs = item.总重量; + that.sctj.rjgs = item.生产数; + that.sctj.rjgqbls = item.生产数-item.不合格数-item.合格数; + that.sctj.rhgs = item.合格数; + that.sctj.rbhgs = item.不合格数; + } let arr = []; arr[0] = item.年+'-'+item.月+'-'+item.日; arr[1] = item.生产数; diff --git a/src/views/inm/mainso.vue b/src/views/inm/mainso.vue index bf59197c..dbfe4d9a 100644 --- a/src/views/inm/mainso.vue +++ b/src/views/inm/mainso.vue @@ -52,7 +52,10 @@ - + + @@ -72,6 +75,39 @@ :mtype="wmtype" :apiObj="apiObjPrint" > + + + + + diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index c4f18d6e..5e5bb07e 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -12,119 +12,142 @@ :rules="rules" label-width="120px" > - - - - {{ item.full_name }} - + + + - - - - - - - - {{ item.batch }} - {{ item.count }} + {{ item.full_name }} + + + + + + + + + - - - - - - - {{ item.batch }} - {{ item.count }} -- {{ item.warehouse_name }} + {{ item.batch }} + {{ item.count }} + + + + + + + - - - - - - - - - - - - - - + + {{ item.batch }} + {{ item.count }} -- {{ item.warehouse_name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
this.mioitems.length){ + this.mioitems = []; + for(let i=0;i { @@ -439,8 +499,17 @@ export default { }); } } + let mioitemw = []; + if(this.mioitems.length>1){ + this.mioitems.forEach((item)=>{ + let obj = {}; + obj.number= item; + mioitemw.push(obj); + }) + this.form.mioitemw = mioitemw; + } try { - var res; + let res; if (this.mode == "add") { res = await this.$API.inm.mioitem.create.req( this.form diff --git a/src/views/mtm/materials_form_gx.vue b/src/views/mtm/materials_form_gx.vue index debcd0ed..81fdf5a7 100644 --- a/src/views/mtm/materials_form_gx.vue +++ b/src/views/mtm/materials_form_gx.vue @@ -192,7 +192,7 @@ export default { { id: 10, name: "成品" }, { id: 20, name: "半成品" }, { id: 30, name: "主要原料" }, - { id: 40, name: "辅助材料" }, + // { id: 40, name: "辅助材料" }, ], handle_user: [], selectionFilters: [], @@ -200,9 +200,13 @@ export default { setFiltersVisible: false, processOptions: [], componentList: [{ id: "", count: 1 }], + project_code : this.$TOOL.data.get("BASE_INFO").base.base_code, }; }, mounted() { + if(this.project_code !== 'bxerp'){ + this.options.push({ name: "辅助材料", id: 40 }); + } this.getProcessOptions(); }, methods: { diff --git a/src/views/mtm/materials_gx.vue b/src/views/mtm/materials_gx.vue index a79baa52..ee4b0cfa 100644 --- a/src/views/mtm/materials_gx.vue +++ b/src/views/mtm/materials_gx.vue @@ -196,13 +196,14 @@ export default { }, data() { return { + project_code : this.$TOOL.data.get("BASE_INFO").base.base_code, materialTemplate: " /media/default/template/material.xlsx", dialog: { save: false, }, apiObj: null, query: { type: 10, is_hidden: false }, - activeName: "主要原料", + activeName: 10, selection: [], state_: { 10: "完好", @@ -214,30 +215,31 @@ export default { { label: "成品", name: 10 }, { label: "半成品", name: 20 }, { label: "主要原料", name: 30 }, - { label: "辅助材料", name: 40 }, + // { label: "辅助材料", name: 40 },//光芯显示,玻纤不显示 ], typeOptions: { 10: "成品", 20: "半成品", 30: "主要原料", - 40: "辅助材料", + // 40: "辅助材料",//光芯显示,玻纤不显示 }, - project_code:"", materialId: "", materialName: "", showHidden: false, }; }, mounted() { - // console.log("materialType", this.materialType); + this.query.type = 10; this.apiObj = this.$API.mtm.material.list; this.$refs.table.queryData(this.query); this.materialTemplate = this.materialTemplate+"?t=" + new Date().getTime(); - this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; + if(this.project_code !== 'bxerp'){ + this.tabOptions.push({ label: "辅助材料", name: 40 }); + this.typeOptions[40] = "辅助材料"; + } }, methods: { rowClick(row) { - // console.log("rowClick", row); this.materialId = row.id; this.materialName = row.full_name; this.$emit("choseChange", row.id); diff --git a/src/views/mtm/route_form.vue b/src/views/mtm/route_form.vue index ab9b74c7..b2d17db3 100644 --- a/src/views/mtm/route_form.vue +++ b/src/views/mtm/route_form.vue @@ -138,6 +138,21 @@ /> + + + + + + + + + +
{{ productName }}
@@ -59,6 +60,19 @@
+ + + + + + +
@@ -196,6 +210,7 @@ export default { dialog: { save: false, }, + fileList:[], form: { name: "", material: "", @@ -210,7 +225,8 @@ export default { name: [{ required: true, message: "请输入" }], }, routepack: "", - project_code:'' + project_code:'', + productName:'', }; }, mounted() { @@ -227,7 +243,17 @@ export default { }, setData(data) { Object.assign(this.form, data); - console.log("setData this.form", this.form); + let obj = {}; + obj.name=data.document_.name; + obj.url=data.document_.file; + this.fileList.push(obj); + // console.log("setData this.form", this.form); + }, + fileUPSuccess(res) { + let that = this; + // console.log('res',res); + // console.log('that.fileList',that.fileList); + that.form.document = res.id; }, getMaterials() { let that = this; @@ -237,6 +263,9 @@ export default { that.materials = res; }); }, + handleMaterialChange(val){ + console.log("val",val); + }, handleStep(val) { //点击步骤条 if (this.stepSuc.includes(val) === true) { @@ -253,14 +282,12 @@ export default { let form = {}; form.name = that.form.name; form.material = that.form.material; - console.log("that.form",that.form) if (that.form.id) { that.$API.mtm.routepack.update .req(that.form.id, that.form) .then((res) => { that.routepack = res.id; that.query.routepack = res.id; - console.log("that.query", that.query); that.apiObj = that.$API.mtm.route.list; that.active = 1; // that.$refs.tables.refresh(); @@ -270,9 +297,13 @@ export default { this.active = 1; that.form.id = res.id; that.routepack = res.id; - console.log("that.form",that.form) }); } + that.materials.forEach((item) => { + if (item.id == that.form.material) { + that.productName = item.full_name; + } + }) }, table_add() { this.dialog.save = true; @@ -353,3 +384,12 @@ export default { }, }; + \ No newline at end of file diff --git a/src/views/qm/testItem_form.vue b/src/views/qm/testItem_form.vue index d0d02cba..993a9892 100644 --- a/src/views/qm/testItem_form.vue +++ b/src/views/qm/testItem_form.vue @@ -230,9 +230,9 @@ export default { tagsOptions: [ {value:"purin",name:"入厂检验"}, {value:"process",name:"过程检验"}, - {value:"first",name:"首件检验"}, - {value:"prod",name:"成品检验"}, - {value:"performance",name:"性能检验"}, + // {value:"first",name:"首件检验"}, + // {value:"prod",name:"成品检验"}, + // {value:"performance",name:"性能检验"}, ], mcateTagsOptions: [], processOptions: [], diff --git a/src/views/wpm/check_drawer.vue b/src/views/wpm/check_drawer.vue index f37b0896..3eae8209 100644 --- a/src/views/wpm/check_drawer.vue +++ b/src/views/wpm/check_drawer.vue @@ -15,7 +15,7 @@ stripe :params="paramsObj" > - + - + + + + + @@ -264,6 +266,7 @@ export default { if(arr2.length > 0){ that.selectBatch = arr2[0].batch; that.form.batch = arr2[0].batch; + that.form.count = arr2[0].count; that.form.mb = arr2[0].id; that.form.warehouse = arr2[0].warehouse; that.$refs.scanDialog.visible = false; @@ -296,6 +299,7 @@ export default { }else{ this.form.batch = item.batch; this.form.mb = item.id; + this.form.count = item.count; this.form.warehouse = item.warehouse; } } @@ -306,6 +310,7 @@ export default { that.wbatchOptions.forEach((item) => { if (item.batch == val) { that.form.material = item.material; + that.form.count = item.count; } }) }, @@ -328,6 +333,7 @@ export default { if (valid) { that.isSaveing = true; that.form.mio = that.mioId; + that.form.count = parseInt(that.form.count); try { var res; if (that.mode == "add") { diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 75fa6c89..e89a1317 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -3,20 +3,20 @@
- {{ + {{ mlogItem.routepack_name }} - {{ + {{ mlogItem.material_in_name }} - {{ + {{ mlogItem.material_out_name }} {{ @@ -40,6 +40,9 @@ {{ mlogItem.create_time }} + + 查看 +
- - - + diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue index 012d8b1f..0b19a594 100644 --- a/src/views/wpm_bx/mlog_form.vue +++ b/src/views/wpm_bx/mlog_form.vue @@ -17,7 +17,7 @@ style="padding: 0 10px" > - + - + - + { that.testitems.forEach((item) => { - item.value = data.oinfo_json[item.id]; - }); + item.value = data.oinfo_json[item.id]; + }); },500) } } diff --git a/src/views/wpm_bx/mlogb_form.vue b/src/views/wpm_bx/mlogb_form.vue index 44fc2fef..a7003ba8 100644 --- a/src/views/wpm_bx/mlogb_form.vue +++ b/src/views/wpm_bx/mlogb_form.vue @@ -17,7 +17,7 @@ label-width="80px" style="padding: 0 10px" > - + - + { + let obj = {}; + obj.mtaskx =that.form.mtask; + obj.mgroupx =that.mgroup; + obj.route =that.routeId; + obj.page =0; + if(that.isfix){ + obj.state =30; + } + this.$API.wpm.wmaterial.list.req(obj).then((res) => { that.materialOptions = res; }); }, diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 1e8d1ba4..a8d5233c 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -4,163 +4,331 @@ v-model="visible" :size="'90%'" destroy-on-close + :close-on-click-modal="false" @closed="$emit('closed')" > + +
+
检验人:{{setForm.test_user_name}}
+
检验设备:{{setForm.equipment_name}}
+
缺陷项: + {{ item1.defect_name }} + + +
+
检测项: + {{ item2.testitem_name }} + + +
+
+
+ 检验 + 批量操作 + 批量操作 - - + + + + + + + + + + +
- + + + + + + + + + + + + + + + {{item.name}} + {{item.number}} + + + + + + + + + + + + + + + + + + + + + + + + 确定 + 取消 + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item2.value }} + + + + + + + + 保存 + 取消 + + + + diff --git a/src/views/wpm_bx/mlogbw_check_form.vue b/src/views/wpm_bx/mlogbw_check_form.vue new file mode 100644 index 00000000..a6f553f0 --- /dev/null +++ b/src/views/wpm_bx/mlogbw_check_form.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/views/wpm_bx/mlogs.vue b/src/views/wpm_bx/mlogs.vue index 03d336a5..f00f630d 100644 --- a/src/views/wpm_bx/mlogs.vue +++ b/src/views/wpm_bx/mlogs.vue @@ -9,7 +9,15 @@ v-auth="'mlog.create'" >新增
+ 返工
+
+ { + this.$refs.saveDialog.open("add","rework"); + }); + }, //编辑日志 table_edit(row) { this.dialog.save = true; this.$nextTick(() => { - this.$refs.saveDialog.open("edit").setData(row); + if(row.is_fix){ + this.$refs.saveDialog.open("edit","rework").setData(row); + }else{ + this.$refs.saveDialog.open("edit").setData(row); + } + }); }, //日志详情 diff --git a/src/views/wpm_bx/mock.json b/src/views/wpm_bx/mock.json new file mode 100644 index 00000000..fb7911d5 --- /dev/null +++ b/src/views/wpm_bx/mock.json @@ -0,0 +1,7 @@ +[ + { + "x":2.5, + "y":3.5, + "z":5.0 + } +] \ No newline at end of file diff --git a/src/views/wpm_bx/mtask.vue b/src/views/wpm_bx/mtask.vue index a00b9406..8e2106c9 100644 --- a/src/views/wpm_bx/mtask.vue +++ b/src/views/wpm_bx/mtask.vue @@ -27,7 +27,7 @@ - + @@ -103,6 +94,14 @@ export default { type: String, default: "", }, + mgroupId:{ + type: String, + default: "", + }, + deptId:{ + type: String, + default: "", + } }, components: { deliverDrawer, @@ -130,14 +129,6 @@ export default { 34: "danger", 40: "success", }, - // state_: { - // 10: "创建中", - // 20: "已下达", - // 30: "生产中", - // 34: "已终止", - // 40: "已提交", - // }, - deptId: null, mgroup_name:'', deliverShow:false, }; @@ -154,7 +145,11 @@ export default { // }, }, mounted() { - this.getMgroupInfo(); + let that = this; + that.params.mgroup = that.mgroupId; + that.apiObj = this.$API.pm.mtask.list; + that.$refs.table.refresh(); + // this.getMgroupInfo(); }, methods: { getMgroupInfo(){ @@ -165,8 +160,6 @@ export default { if(res.length>0){ that.mgroupId = res[0].id; that.deptId = res[0].belong_dept; - that.processId = res[0].process; - that.processCate = res[0].process_cate; that.params.mgroup = res[0].id; that.apiObj = this.$API.pm.mtask.list; that.$refs.table.refresh();