填报
This commit is contained in:
@@ -21,36 +21,50 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>是否完成</th>
|
||||
<th>点检项目名称</th>
|
||||
<th>点检等级</th>
|
||||
<th>点检内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.indexId}}</td>
|
||||
<td>
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</td>
|
||||
<td>{{e.maint_item_code}}</td>
|
||||
<td>{{e.item_level}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<view class="grid_new">
|
||||
<view class="grid_l">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>是否完成</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(el, i) in dataList" :key="i">
|
||||
<td>
|
||||
<uni-data-select v-model="el.isfinish" :localdata="options" @change="selectChange($event, el)"></uni-data-select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
<view class="grid_r">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>点检项目编号</th>
|
||||
<th>点检项目名称</th>
|
||||
<th>点检等级</th>
|
||||
<th>点检内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.maint_item_code}}</td>
|
||||
<td>{{e.maint_item_name}}</td>
|
||||
<td>{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !dataList.every(item=>item.isfinish === '1')}" :disabled="disabled" @tap="_sportcheckconfirm">确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !active}" :disabled="disabled" @tap="toSure">确认</button>
|
||||
<button class="submit-button" @tap="toCancle">取消</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onShow () {
|
||||
this._sportcheckgetAllQuery(this.val1)
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._sportcheckgetAllQuery(e)
|
||||
|
||||
@@ -21,36 +21,50 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>是否完成</th>
|
||||
<th>润滑项目名称</th>
|
||||
<th>润滑等级</th>
|
||||
<th>润滑内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.indexId}}</td>
|
||||
<td>
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</td>
|
||||
<td>{{e.maint_item_code}}</td>
|
||||
<td>{{e.item_level}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<view class="grid_new">
|
||||
<view class="grid_l">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>是否完成</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(el, i) in dataList" :key="i">
|
||||
<td>
|
||||
<uni-data-select v-model="el.isfinish" :localdata="options" @change="selectChange($event, el)"></uni-data-select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
<view class="grid_r">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>润滑项目编号</th>
|
||||
<th>润滑项目名称</th>
|
||||
<th>润滑等级</th>
|
||||
<th>润滑内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.maint_item_code}}</td>
|
||||
<td>{{e.maint_item_name}}</td>
|
||||
<td>{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !dataList.every(item=>item.isfinish === '1')}" :disabled="disabled" @tap="_lubricateconfirm">确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !active}" :disabled="disabled" @tap="toSure">确认</button>
|
||||
<button class="submit-button" @tap="toCancle">取消</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onShow () {
|
||||
this._lubricategetAllQuery(this.val1)
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._lubricategetAllQuery(e)
|
||||
|
||||
@@ -21,36 +21,50 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>是否完成</th>
|
||||
<th>保养项目名称</th>
|
||||
<th>保养等级</th>
|
||||
<th>保养内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.indexId}}</td>
|
||||
<td>
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</td>
|
||||
<td>{{e.maint_item_code}}</td>
|
||||
<td>{{e.item_level}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<view class="grid_new">
|
||||
<view class="grid_l">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>是否完成</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(el, i) in dataList" :key="i">
|
||||
<td>
|
||||
<uni-data-select v-model="el.isfinish" :localdata="options" @change="selectChange($event, el)"></uni-data-select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
<view class="grid_r">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>保养项目编号</th>
|
||||
<th>保养项目名称</th>
|
||||
<th>保养等级</th>
|
||||
<th>保养内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.maint_item_code}}</td>
|
||||
<td>{{e.maint_item_name}}</td>
|
||||
<td>{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !dataList.every(item=>item.isfinish === '1')}" :disabled="disabled" @tap="_upkeepconfirm">确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !active}" :disabled="disabled" @tap="toSure">确认</button>
|
||||
<button class="submit-button" @tap="toCancle">取消</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="toSure1">开始保养</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" @tap="toJump">结束保养</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId || pkObj.invstatus !== '02'}" :disabled="disabled" @tap="toSure1">开始保养</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId || pkObj.invstatus !== '03'}" @tap="toJump">结束保养</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -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'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user