diff --git a/hb_client/src/api/wpm.js b/hb_client/src/api/wpm.js index 9f67cd4..5c585ca 100644 --- a/hb_client/src/api/wpm.js +++ b/hb_client/src/api/wpm.js @@ -283,13 +283,13 @@ export function createOutputs(data) { export function recordInit(id) { return request({ - url: `/wpm/operation_record/${id}/init/`, + url: `/wpm/operation_record/${id}/`, method: 'GET', }) } -//半产品复检 -export function wproductReview(data) { +//testInit +export function testInit(data) { return request({ url: '/wpm/wproduct/test_init/', method: 'post', diff --git a/hb_client/src/components/customForm/index.vue b/hb_client/src/components/customForm/index.vue index c161268..6231f8f 100644 --- a/hb_client/src/components/customForm/index.vue +++ b/hb_client/src/components/customForm/index.vue @@ -155,9 +155,9 @@ 检查不合格 @@ -188,21 +188,12 @@ type:Number, default:null }, - origin_test: { - type:Number, - default:null - }, hasPicture:{ type:Boolean, default:false - }, - recordItem:{ - type:Boolean, - default:false } }, mounted() { - debugger; let that = this; that.checkForm = {}; this.form = this.formID; @@ -214,7 +205,6 @@ that.formData.push(obj) }); that.formData=[...formData]; - debugger; for(let i=0;i { - if(!item.is_hidden){ - that.field.push({ - id: item.id, - field_value: that.checkForm[item.field_key], - is_testok: item.is_testok,//单项检查结果 - is_hidden: item.is_hidden - }); - } - }); - that.testrecord.record_data = that.field;//检查项列表 - that.testrecord.is_testok = that.is_testok;//检查表检查结果 - that.testrecord.id = that.recordId;//记录id - if(submit){//提交 - this.$emit('recordSubmit',that.testrecord); - }else {//保存 - this.$emit('recordSave',that.testrecord); + that.formData.forEach((item) => { + if(!item.is_hidden){ + that.field.push({ + id: item.id, + field_value: that.checkForm[item.field_key], + is_testok: item.is_testok,//单项检查结果 + is_hidden: item.is_hidden + }); } - }else{//第一次操作时 - that.formData.forEach((item) => { - if(!item.is_hidden){ - that.field.push({ - form_field: item.id, - field_value: that.checkForm[item.field_key], - is_testok: item.is_testok,//单项检查结果 - is_hidden: item.is_hidden - }); - } - }); - if(that.origin_test!==null){ - that.testrecord.origin_test = that.origin_test; - } - that.testrecord.record_data = that.field;//检查项列表 - that.testrecord.is_testok = that.is_testok;//检查表检查结果 - that.testrecord.form = that.formID;//检查表 - that.testrecord.wproduct = that.wproductId;//半成品ID - that.testrecord.is_submited = submit;//提交状态false保存 - this.$emit('formFunc',that.testrecord);//第一次保存或提交 + }); + that.testrecord.record_data = that.field;//检查项列表 + that.testrecord.is_testok = that.is_testok;//检查表检查结果 + that.testrecord.id = that.recordId;//记录id + if(submit){//提交 + this.$emit('recordSubmit',that.testrecord); + }else {//保存 + this.$emit('recordSave',that.testrecord); } }, + recordCancel(){ + this.$emit('recordCancel','') + }, } } diff --git a/hb_client/src/components/customForm/review.vue b/hb_client/src/components/customForm/review.vue index 63f94c3..5b91572 100644 --- a/hb_client/src/components/customForm/review.vue +++ b/hb_client/src/components/customForm/review.vue @@ -9,7 +9,7 @@ @@ -40,7 +40,7 @@ 检查不合格 @@ -257,7 +259,7 @@ type:Number, default:0 }, - origintest: { + recordId: { type:Number, default:0 }, @@ -268,9 +270,9 @@ }, mounted() { let that = this; - this.form = this.formID; + that.form = this.formID; let formData=this.results; - this.origins=this.originList; + // that.origins=this.originList; that.wproductId=this.wproduct; that.origin_test=this.origintest; formData.forEach(item => { @@ -297,11 +299,11 @@ that.judgeList.push(obj) }); //原始表的数据 - for(let i=0;i { return item.field_type === 'draw'; @@ -361,7 +363,7 @@ } }, methods:{ - filterBlock(parent,rule){ + filterBlock(parent,rule,index,field_key){ // debugger; let that = this; if(parent!==''&&parent!==null&&parent!==undefined){ @@ -408,6 +410,12 @@ rea = true; } } + if(rea){ + that.formData[index].is_hidden = false; + }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; + } return rea; }else{ let temp =rule.match(reg)[0]; @@ -415,13 +423,21 @@ let a = rule.replace(key, 'yy'); a = a.replace(key, 'yy'); let yy = "'"+that.checkForm[key]+"'"; + if(eval(eval(a))){ + that.formData[index].is_hidden = false; + }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; + } return eval(eval(a)); - // return eval("'"+y+"'"+str); } }else{ + that.formData[index].is_hidden = true; + that.checkForm[field_key] = null; return false; } }else{ + that.formData[index].is_hidden = false; return true; } }, @@ -741,7 +757,7 @@ } }, //提交检查项目 - submitfield() { + submitfield(isSubmit) { let that = this; let drawArr = that.formData.filter(item=>{ return item.field_type==='draw'; @@ -765,24 +781,38 @@ } }); }else{ - that.fieldData(); + that.fieldData(isSubmit); } }, - fieldData(){ + fieldData(isSubmit){ let that = this; that.field = []; //检查项目 + let submit = isSubmit=='1'?false:true; that.formData.forEach((item) => { - that.field.push({ - form_field: item.id, - field_value: that.checkForm[item.field_key], - is_testok: item.is_testok//单项检查结果 - }); + if(!item.is_hidden){ + that.field.push({ + id: item.id, + field_value: that.checkForm[item.field_key], + is_testok: item.is_testok,//单项检查结果 + is_hidden: item.is_hidden + }); + } }); - that.testrecord.form = that.formID;//检查表 + // that.testrecord.form = that.formID;//检查表 that.testrecord.record_data = that.field;//检查项列表 that.testrecord.is_testok = that.is_testok;//检查表检查结果 - that.testrecord.wproduct = that.wproductId;//半成品ID - this.$emit('formFunc',that.testrecord); + // that.testrecord.wproduct = that.wproductId;//半成品ID + // that.testrecord.is_submited = true; + that.testrecord.id = that.recordId; + if(submit){//提交 + this.$emit('recordSubmit',that.testrecord); + }else {//保存 + this.$emit('recordSave',that.testrecord); + } + + }, + recordCancel(){ + this.$emit('recordCancel','') }, } } diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index 454b5c9..7a32277 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -183,8 +183,8 @@ export const asyncRoutes = [ path: 'gantt', name: 'gantt', component: () => import('@/views/pm/gantt'), - meta: { title: '甘特图', perms: ['vendor_manage'] }, - hidden: true + meta: { title: '甘特图', icon: 'example',perms: ['vendor_manage'] }, + // hidden: true } ] } diff --git a/hb_client/src/views/pm/gantt.vue b/hb_client/src/views/pm/gantt.vue index 1caf17a..6017f44 100644 --- a/hb_client/src/views/pm/gantt.vue +++ b/hb_client/src/views/pm/gantt.vue @@ -388,9 +388,11 @@ obj.top=20; obj.startTime=startTime; obj.endTime=endTime; + obj.planTime = [startTime,endTime]; obj.per=item.count; obj.per1=item.count_real; obj.type=3; + obj.isShow= true; arr.push(obj); } else if (item.children && item.children.length >= 1) { let startTime = new Date(item.start_date).getTime(); @@ -409,6 +411,7 @@ objChild.parentId=parentId; objChild.startTime = start; objChild.endTime = end; + objChild.planTime = [start,end]; objChild.per = child.count; objChild.per1 = child.count_real; objChild.type = 1; @@ -422,6 +425,7 @@ obj.top=20; obj.startTime=startTime; obj.endTime=endTime; + obj.planTime = [startTime,endTime]; obj.per=item.count; obj.per1=item.count_real; obj.type=3; @@ -515,7 +519,7 @@ if (item.children.length > 0) { item.children.forEach((z, o) => { z.planTime = []; - z.top = item.top + o * 40; + z.top = item.top + o * 40+40; z.isShow = true; z.left = this.computedTimeWidth(z.startTime); z.widthMe = z.widthChild = this.computedTimeWidth( @@ -564,17 +568,6 @@ } this.resetTop(rowIndex, !expand, true); }, - //分组添加子集 - handleGroupAdd(row) { - this.$nextTick(() => { - this.$refs.dialogAdd.resetFields(); - }); - this.currentListIndex = this.list.findIndex(item => { - return item.id == row.id; - }); - this.dialogVal = true; - this.isChildren = true; - }, // 根据时间计算距离 computedTimeWidth(startTime, endTime) { let start = new Date(startTime).getTime(); diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 6887d9b..eff343c 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -39,7 +39,7 @@ 检验记录 @@ -84,11 +84,22 @@ @@ -145,8 +156,12 @@ v-if="checkPermission(['warehouse_update'])" @click="handlePutin(scope)" >入库 - + + 检验记录 + @@ -193,8 +208,12 @@ v-if="checkPermission(['warehouse_update'])" @click="handleInspection(scope)" >检验 - + + 检验记录 + @@ -219,7 +238,7 @@ > - + + <!–复检检验表单–> - + --> - + + + + + @@ -313,8 +352,6 @@ :data="recordList" border height="400" - @close="pageRefresh" - @closed="pageRefresh" > @@ -386,7 +423,7 @@