diff --git a/src/components/GanttComponent.vue b/src/components/GanttComponent.vue index 0d26a515..bab4818e 100644 --- a/src/components/GanttComponent.vue +++ b/src/components/GanttComponent.vue @@ -2,90 +2,92 @@
- \ No newline at end of file +} + + \ No newline at end of file diff --git a/src/views/em/equipment.vue b/src/views/em/equipment.vue index fba7344a..bfce55ca 100644 --- a/src/views/em/equipment.vue +++ b/src/views/em/equipment.vue @@ -2,38 +2,23 @@
- 新增 + 新增
- - + +
- - + + - + @@ -41,13 +26,13 @@ - + diff --git a/src/views/em/equipmentc.vue b/src/views/em/equipmentc.vue index 6e4712db..46964259 100644 --- a/src/views/em/equipmentc.vue +++ b/src/views/em/equipmentc.vue @@ -2,31 +2,16 @@
- 新增 + 新增
- - + +
- - + + @@ -45,17 +30,17 @@ - + - + - + - - - + - + - + - + @@ -131,18 +92,14 @@ - + - + @@ -152,62 +109,41 @@ 取消 - + - + - - - + + + - - - - + +
- + - \ No newline at end of file diff --git a/src/views/pm/mtask2.vue b/src/views/pm/mtask2.vue index b47b8ce0..2bd1fc0c 100644 --- a/src/views/pm/mtask2.vue +++ b/src/views/pm/mtask2.vue @@ -4,34 +4,40 @@
新增 任务分解 - 任务下达 + 任务下达
- + + + + + + + + + + + + {{ state_[scope.row.state] }} + + + {{ state_[scope.row.state] }} + + @@ -48,14 +54,15 @@ 查看 - - + + 编辑 - - 终止 - - + + 终止 + + 删除 @@ -70,102 +77,68 @@ - + +
- + - + - + - 保存 - 取消 - - - -
- - 查询 -
- - - - - - - - - - - - - - - - - - + 保存 + 取消 + +
+ +
+ + 查询 +
+ + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/views/pm/mtask_form.vue b/src/views/pm/mtask_form.vue index 84e9c1d6..0b3ff9ab 100644 --- a/src/views/pm/mtask_form.vue +++ b/src/views/pm/mtask_form.vue @@ -1,87 +1,48 @@ - - @@ -68,8 +60,6 @@ }} - - @@ -86,7 +76,7 @@ 编辑 - + 删除 @@ -170,26 +160,18 @@ - - - + + - - + + - + + - - - - - - - + + + + + + + - + @@ -48,12 +57,18 @@ - + + + + + + @@ -462,7 +477,7 @@ 确定 - 取消 + 取消 @@ -506,7 +521,7 @@ export default { materialOptions: [], equipmentOptions: [], wMaterialOptions: [], - shiftOptions: ['白班', '夜班'], + shiftOptions: [], visible: false, isSaveing: false, setFiltersVisible: false, @@ -516,22 +531,21 @@ export default { }; }, mounted() { - let materialObj = this.$TOOL.data.get('MATERIAL_OBJECT'); - this.materialObj = materialObj; - this.form.material_out = materialObj.id; - this.getMaterial(); + // 先去除缓存 + // let materialObj = this.$TOOL.data.get('MATERIAL_OBJECT'); + // this.materialObj = materialObj; + // this.form.material_out = materialObj.id; + // this.getMaterial(); + this.getMgroupList(); this.getUserList(); this.getEquipment(); - this.getMgroupList(); + this.getShiftOptions(); let date = new Date(); let year = date.getFullYear(); let month = date.getMonth() + 1; let day = date.getDate(); this.form.handle_date = year + '-' + month + '-' + day; if (this.activeType == '10车间') { - this.$API.mtm.shift.list.req({ page: 0 }).then(res => { - this.shiftOptions = res; - }) if (this.mode == 'add') { let mlogb = []; if (this.brothersList && this.brothersList.length > 0) { @@ -548,6 +562,11 @@ export default { this.getWorkShopMaterial(); }, methods: { + getShiftOptions() { + this.$API.mtm.shift.list.req({ page: 0 }).then(res => { + this.shiftOptions = res; + }) + }, getUserList() { let that = this; let deptName = ''; @@ -570,10 +589,10 @@ export default { //获取集合列表 getMgroupList() { let that = this; - this.$API.mtm.mgroup.list.req({ page: 0, cate: 'photon' }).then(res => { - let data = res.filter(item => { - return item.process_cate == '成型' - }) + this.$API.mtm.mgroup.list.req({ page: 0, belong_dept__name: this.activeType }).then(res => { + // let data = res.filter(item => { + // return item.process_cate == '成型' + // }) that.mgroupOptions = res; }) }, @@ -583,13 +602,20 @@ export default { this.equipmentOptions = res; }) }, - getMaterial() { - let obj = {}; - obj.page = 0; - obj.is_hidden = false; - this.$API.mtm.material.list.req(obj).then(res => { - this.materialOptions = res; + getMaterial(mgroupId) { + this.$API.mtm.route.list.req({ page: 0, mgroup: mgroupId }).then(res => { + let mOptions = [] + for (var i = 0; i < res.length; i++) { + mOptions.push({ 'id': res[i].material_out, 'name': res[i].material_out_name }) + } + this.materialOptions = mOptions; }) + // let obj = {}; + // obj.page = 0; + // obj.is_hidden = false; + // this.$API.mtm.material.list.req(obj).then(res => { + // this.materialOptions = res; + // }) }, //获取车间物料 // getMaterial(){ @@ -694,6 +720,7 @@ export default { //表单注入数据 setData(data) { Object.assign(this.form, data); + this.getMaterial(this.form.mgroup) if (this.activeType == '8车间') { if (this.form.handle_user.indexOf(',') > -1) { this.handle_user = this.form.handle_user.split(',')