填报
This commit is contained in:
@@ -21,36 +21,50 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
<view class="slide_new">
|
<view class="grid_new">
|
||||||
<table>
|
<view class="grid_l">
|
||||||
<thead>
|
<table>
|
||||||
<tr>
|
<thead>
|
||||||
<th>序号</th>
|
<tr>
|
||||||
<th>是否完成</th>
|
<th>是否完成</th>
|
||||||
<th>点检项目名称</th>
|
</tr>
|
||||||
<th>点检等级</th>
|
</thead>
|
||||||
<th>点检内容</th>
|
<tbody>
|
||||||
<th>要求</th>
|
<tr v-for="(el, i) in dataList" :key="i">
|
||||||
</tr>
|
<td>
|
||||||
</thead>
|
<uni-data-select v-model="el.isfinish" :localdata="options" @change="selectChange($event, el)"></uni-data-select>
|
||||||
<tbody>
|
</td>
|
||||||
<tr v-for="(e, i) in dataList" :key="i">
|
</tr>
|
||||||
<td>{{e.indexId}}</td>
|
</tbody>
|
||||||
<td>
|
</table>
|
||||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
</view>
|
||||||
</td>
|
<view class="grid_r">
|
||||||
<td>{{e.maint_item_code}}</td>
|
<table>
|
||||||
<td>{{e.item_level}}</td>
|
<thead>
|
||||||
<td>{{e.contents}}</td>
|
<tr>
|
||||||
<td>{{e.requirement}}</td>
|
<th>点检项目编号</th>
|
||||||
</tr>
|
<th>点检项目名称</th>
|
||||||
</tbody>
|
<th>点检等级</th>
|
||||||
</table>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<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>
|
<button class="submit-button" @tap="toCancle">取消</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,36 +81,41 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: [{text: '否', value: '0'}, {text: '是', value: '1'}],
|
|
||||||
index: '',
|
|
||||||
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
||||||
val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_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: [],
|
dataList: [],
|
||||||
disabled: false
|
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 () {
|
created () {
|
||||||
this._sportcheckgetDtl()
|
this._sportcheckgetDtl()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectChange (e) {
|
/** 选择器 */
|
||||||
this.index = e
|
selectChange($event, el) {
|
||||||
|
el.isfinish = $event
|
||||||
},
|
},
|
||||||
/** grid查询 */
|
/** grid查询 */
|
||||||
async _sportcheckgetDtl () {
|
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]
|
this.dataList = [...res.data]
|
||||||
},
|
},
|
||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _sportcheckconfirm () {
|
async toSure () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.val2 || !this.dataList.length) {
|
if (!this.active) {
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dataList.every(item=>item.isfinish === '1')) {
|
|
||||||
// console.log('true')
|
|
||||||
} else {
|
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -107,6 +126,7 @@
|
|||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
this.goIn()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,9 @@
|
|||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow () {
|
||||||
|
this._sportcheckgetAllQuery(this.val1)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
this._sportcheckgetAllQuery(e)
|
this._sportcheckgetAllQuery(e)
|
||||||
|
|||||||
@@ -21,36 +21,50 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
<view class="slide_new">
|
<view class="grid_new">
|
||||||
<table>
|
<view class="grid_l">
|
||||||
<thead>
|
<table>
|
||||||
<tr>
|
<thead>
|
||||||
<th>序号</th>
|
<tr>
|
||||||
<th>是否完成</th>
|
<th>是否完成</th>
|
||||||
<th>润滑项目名称</th>
|
</tr>
|
||||||
<th>润滑等级</th>
|
</thead>
|
||||||
<th>润滑内容</th>
|
<tbody>
|
||||||
<th>要求</th>
|
<tr v-for="(el, i) in dataList" :key="i">
|
||||||
</tr>
|
<td>
|
||||||
</thead>
|
<uni-data-select v-model="el.isfinish" :localdata="options" @change="selectChange($event, el)"></uni-data-select>
|
||||||
<tbody>
|
</td>
|
||||||
<tr v-for="(e, i) in dataList" :key="i">
|
</tr>
|
||||||
<td>{{e.indexId}}</td>
|
</tbody>
|
||||||
<td>
|
</table>
|
||||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
</view>
|
||||||
</td>
|
<view class="grid_r">
|
||||||
<td>{{e.maint_item_code}}</td>
|
<table>
|
||||||
<td>{{e.item_level}}</td>
|
<thead>
|
||||||
<td>{{e.contents}}</td>
|
<tr>
|
||||||
<td>{{e.requirement}}</td>
|
<th>润滑项目编号</th>
|
||||||
</tr>
|
<th>润滑项目名称</th>
|
||||||
</tbody>
|
<th>润滑等级</th>
|
||||||
</table>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<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>
|
<button class="submit-button" @tap="toCancle">取消</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,36 +81,41 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: [{text: '否', value: '0'}, {text: '是', value: '1'}],
|
|
||||||
index: '',
|
|
||||||
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
||||||
val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_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: [],
|
dataList: [],
|
||||||
disabled: false
|
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 () {
|
created () {
|
||||||
this._lubricategetDtl()
|
this._lubricategetDtl()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectChange (e) {
|
/** 选择器 */
|
||||||
this.index = e
|
selectChange($event, el) {
|
||||||
|
el.isfinish = $event
|
||||||
},
|
},
|
||||||
/** grid查询 */
|
/** grid查询 */
|
||||||
async _lubricategetDtl () {
|
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]
|
this.dataList = [...res.data]
|
||||||
},
|
},
|
||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _lubricateconfirm () {
|
async toSure () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.val2 || !this.dataList.length) {
|
if (!this.active) {
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dataList.every(item=>item.isfinish === '1')) {
|
|
||||||
// console.log('true')
|
|
||||||
} else {
|
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -107,6 +126,7 @@
|
|||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
this.goIn()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,9 @@
|
|||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow () {
|
||||||
|
this._lubricategetAllQuery(this.val1)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
this._lubricategetAllQuery(e)
|
this._lubricategetAllQuery(e)
|
||||||
|
|||||||
@@ -21,36 +21,50 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
<view class="slide_new">
|
<view class="grid_new">
|
||||||
<table>
|
<view class="grid_l">
|
||||||
<thead>
|
<table>
|
||||||
<tr>
|
<thead>
|
||||||
<th>序号</th>
|
<tr>
|
||||||
<th>是否完成</th>
|
<th>是否完成</th>
|
||||||
<th>保养项目名称</th>
|
</tr>
|
||||||
<th>保养等级</th>
|
</thead>
|
||||||
<th>保养内容</th>
|
<tbody>
|
||||||
<th>要求</th>
|
<tr v-for="(el, i) in dataList" :key="i">
|
||||||
</tr>
|
<td>
|
||||||
</thead>
|
<uni-data-select v-model="el.isfinish" :localdata="options" @change="selectChange($event, el)"></uni-data-select>
|
||||||
<tbody>
|
</td>
|
||||||
<tr v-for="(e, i) in dataList" :key="i">
|
</tr>
|
||||||
<td>{{e.indexId}}</td>
|
</tbody>
|
||||||
<td>
|
</table>
|
||||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
</view>
|
||||||
</td>
|
<view class="grid_r">
|
||||||
<td>{{e.maint_item_code}}</td>
|
<table>
|
||||||
<td>{{e.item_level}}</td>
|
<thead>
|
||||||
<td>{{e.contents}}</td>
|
<tr>
|
||||||
<td>{{e.requirement}}</td>
|
<th>保养项目编号</th>
|
||||||
</tr>
|
<th>保养项目名称</th>
|
||||||
</tbody>
|
<th>保养等级</th>
|
||||||
</table>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<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>
|
<button class="submit-button" @tap="toCancle">取消</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,36 +81,41 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: [{text: '否', value: '0'}, {text: '是', value: '1'}],
|
|
||||||
index: '',
|
|
||||||
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
||||||
val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.maint_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: [],
|
dataList: [],
|
||||||
disabled: false
|
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 () {
|
created () {
|
||||||
this._upkeepgetDtl()
|
this._upkeepgetDtl()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectChange (e) {
|
/** 选择器 */
|
||||||
this.index = e
|
selectChange($event, el) {
|
||||||
|
el.isfinish = $event
|
||||||
},
|
},
|
||||||
/** grid查询 */
|
/** grid查询 */
|
||||||
async _upkeepgetDtl () {
|
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]
|
this.dataList = [...res.data]
|
||||||
},
|
},
|
||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _upkeepconfirm () {
|
async toSure () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.val2 || !this.dataList.length) {
|
if (!this.active) {
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.dataList.every(item=>item.isfinish === '1')) {
|
|
||||||
// console.log('true')
|
|
||||||
} else {
|
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -107,6 +126,7 @@
|
|||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
this.goIn()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<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 || pkObj.invstatus !== '02'}" :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 !== '03'}" @tap="toJump">结束保养</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -68,6 +68,9 @@
|
|||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow () {
|
||||||
|
this._upkeepgetAllQuery(this.val1)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
this._upkeepgetAllQuery(e)
|
this._upkeepgetAllQuery(e)
|
||||||
@@ -100,6 +103,10 @@
|
|||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.pkObj.invstatus !== '02') {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let res = await upkeepbegin(this.pkObj)
|
let res = await upkeepbegin(this.pkObj)
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
@@ -119,12 +126,16 @@
|
|||||||
this.pkObj = this.pkId === e.maint_code ? e : {}
|
this.pkObj = this.pkId === e.maint_code ? e : {}
|
||||||
},
|
},
|
||||||
toJump () {
|
toJump () {
|
||||||
if (this.pkId) {
|
if (!this.pkId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.pkObj.invstatus !== '03') {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/device/MaintainFill'
|
url: '/pages/device/MaintainFill'
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user