diff --git a/pages/device/CheckFill.vue b/pages/device/CheckFill.vue index a4a98c3..36e1999 100644 --- a/pages/device/CheckFill.vue +++ b/pages/device/CheckFill.vue @@ -21,36 +21,50 @@ - - - - - - - - - - - - - - - - - - - - - - -
序号是否完成点检项目名称点检等级点检内容要求
{{e.indexId}} - - {{e.maint_item_code}}{{e.item_level}}{{e.contents}}{{e.requirement}}
+ + + + + + + + + + + + + +
是否完成
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
点检项目编号点检项目名称点检等级点检内容要求
{{e.maint_item_code}}{{e.maint_item_name}}{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}{{e.contents}}{{e.requirement}}
+
- + @@ -67,36 +81,41 @@ }, data() { return { - options: [{text: '否', value: '0'}, {text: '是', value: '1'}], - index: '', val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '', val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_code : '', + val3: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_id : '', + options: [{text: '否', value: '0'}, {text: '是', value: '1'}], dataList: [], disabled: false }; }, + computed: { + active () { + let t = false + let arr = this.dataList.filter(el => el.isfinish === '1') + if (this.dataList.length > 0 && this.dataList.length === arr.length) { + t = true + } + return t + } + }, created () { this._sportcheckgetDtl() }, methods: { - selectChange (e) { - this.index = e + /** 选择器 */ + selectChange($event, el) { + el.isfinish = $event }, /** grid查询 */ async _sportcheckgetDtl () { - let res = await sportcheckgetDtl(this.val1, this.val2, this.$store.getters.publicObj.maint_id) + let res = await sportcheckgetDtl(this.val1, this.val2, this.val3) this.dataList = [...res.data] }, /** 确认 */ - async _sportcheckconfirm () { + async toSure () { this.disabled = true - if (!this.val1 || !this.val2 || !this.dataList.length) { - this.disabled = false - return - } - if (this.dataList.every(item=>item.isfinish === '1')) { - // console.log('true') - } else { + if (!this.active) { this.disabled = false return } @@ -107,6 +126,7 @@ title: res.message, icon: 'none' }) + this.goIn() } catch (e) { this.disabled = false } diff --git a/pages/device/CheckWork.vue b/pages/device/CheckWork.vue index 9ba96bf..ad7543f 100644 --- a/pages/device/CheckWork.vue +++ b/pages/device/CheckWork.vue @@ -68,6 +68,9 @@ disabled: false }; }, + onShow () { + this._sportcheckgetAllQuery(this.val1) + }, methods: { handleChange (e) { this._sportcheckgetAllQuery(e) diff --git a/pages/device/LubricateFill.vue b/pages/device/LubricateFill.vue index 1596cce..7f98144 100644 --- a/pages/device/LubricateFill.vue +++ b/pages/device/LubricateFill.vue @@ -21,36 +21,50 @@ - - - - - - - - - - - - - - - - - - - - - - -
序号是否完成润滑项目名称润滑等级润滑内容要求
{{e.indexId}} - - {{e.maint_item_code}}{{e.item_level}}{{e.contents}}{{e.requirement}}
+ + + + + + + + + + + + + +
是否完成
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
润滑项目编号润滑项目名称润滑等级润滑内容要求
{{e.maint_item_code}}{{e.maint_item_name}}{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}{{e.contents}}{{e.requirement}}
+
- + @@ -67,36 +81,41 @@ }, data() { return { - options: [{text: '否', value: '0'}, {text: '是', value: '1'}], - index: '', val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '', val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_code : '', + val3: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_id : '', + options: [{text: '否', value: '0'}, {text: '是', value: '1'}], dataList: [], disabled: false }; }, + computed: { + active () { + let t = false + let arr = this.dataList.filter(el => el.isfinish === '1') + if (this.dataList.length > 0 && this.dataList.length === arr.length) { + t = true + } + return t + } + }, created () { this._lubricategetDtl() }, methods: { - selectChange (e) { - this.index = e + /** 选择器 */ + selectChange($event, el) { + el.isfinish = $event }, /** grid查询 */ async _lubricategetDtl () { - let res = await lubricategetDtl(this.val1, this.val2, this.$store.getters.publicObj.maint_id) + let res = await lubricategetDtl(this.val1, this.val2, this.val3) this.dataList = [...res.data] }, /** 确认 */ - async _lubricateconfirm () { + async toSure () { this.disabled = true - if (!this.val1 || !this.val2 || !this.dataList.length) { - this.disabled = false - return - } - if (this.dataList.every(item=>item.isfinish === '1')) { - // console.log('true') - } else { + if (!this.active) { this.disabled = false return } @@ -107,6 +126,7 @@ title: res.message, icon: 'none' }) + this.goIn() } catch (e) { this.disabled = false } diff --git a/pages/device/LubricateWork.vue b/pages/device/LubricateWork.vue index c2c599a..3464a1d 100644 --- a/pages/device/LubricateWork.vue +++ b/pages/device/LubricateWork.vue @@ -68,6 +68,9 @@ disabled: false }; }, + onShow () { + this._lubricategetAllQuery(this.val1) + }, methods: { handleChange (e) { this._lubricategetAllQuery(e) diff --git a/pages/device/MaintainFill.vue b/pages/device/MaintainFill.vue index 53e58ec..eeacf2a 100644 --- a/pages/device/MaintainFill.vue +++ b/pages/device/MaintainFill.vue @@ -21,36 +21,50 @@ - - - - - - - - - - - - - - - - - - - - - - -
序号是否完成保养项目名称保养等级保养内容要求
{{e.indexId}} - - {{e.maint_item_code}}{{e.item_level}}{{e.contents}}{{e.requirement}}
+ + + + + + + + + + + + + +
是否完成
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
保养项目编号保养项目名称保养等级保养内容要求
{{e.maint_item_code}}{{e.maint_item_name}}{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}{{e.contents}}{{e.requirement}}
+
- + @@ -67,36 +81,41 @@ }, data() { return { - options: [{text: '否', value: '0'}, {text: '是', value: '1'}], - index: '', val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '', val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_code : '', + val3: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_id : '', + options: [{text: '否', value: '0'}, {text: '是', value: '1'}], dataList: [], disabled: false }; }, + computed: { + active () { + let t = false + let arr = this.dataList.filter(el => el.isfinish === '1') + if (this.dataList.length > 0 && this.dataList.length === arr.length) { + t = true + } + return t + } + }, created () { this._upkeepgetDtl() }, methods: { - selectChange (e) { - this.index = e + /** 选择器 */ + selectChange($event, el) { + el.isfinish = $event }, /** grid查询 */ async _upkeepgetDtl () { - let res = await upkeepgetDtl(this.val1, this.val2, this.$store.getters.publicObj.maint_id) + let res = await upkeepgetDtl(this.val1, this.val2, this.val3) this.dataList = [...res.data] }, /** 确认 */ - async _upkeepconfirm () { + async toSure () { this.disabled = true - if (!this.val1 || !this.val2 || !this.dataList.length) { - this.disabled = false - return - } - if (this.dataList.every(item=>item.isfinish === '1')) { - // console.log('true') - } else { + if (!this.active) { this.disabled = false return } @@ -107,6 +126,7 @@ title: res.message, icon: 'none' }) + this.goIn() } catch (e) { this.disabled = false } diff --git a/pages/device/MaintainWork.vue b/pages/device/MaintainWork.vue index 375fc5d..fdea881 100644 --- a/pages/device/MaintainWork.vue +++ b/pages/device/MaintainWork.vue @@ -44,8 +44,8 @@ - - + + @@ -68,6 +68,9 @@ disabled: false }; }, + onShow () { + this._upkeepgetAllQuery(this.val1) + }, methods: { handleChange (e) { this._upkeepgetAllQuery(e) @@ -100,6 +103,10 @@ this.disabled = false return } + if (this.pkObj.invstatus !== '02') { + this.disabled = false + return + } try { let res = await upkeepbegin(this.pkObj) this.disabled = false @@ -119,12 +126,16 @@ this.pkObj = this.pkId === e.maint_code ? e : {} }, toJump () { - if (this.pkId) { + if (!this.pkId) { + return + } + if (this.pkObj.invstatus !== '03') { + return + } this.$store.dispatch('setPublicObj', this.pkObj) uni.navigateTo({ url: '/pages/device/MaintainFill' }) - } } } }