设备点检作业
This commit is contained in:
28
pages.json
28
pages.json
@@ -51,13 +51,37 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/device/EquipMaintainWork",
|
"path": "pages/device/MaintainWork",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/device/EquipCheckWork",
|
"path": "pages/device/MaintainFill",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/device/CheckWork",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/device/CheckFill",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/device/LubricateWork",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/device/LubricateFill",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
|||||||
126
pages/device/CheckFill.vue
Normal file
126
pages/device/CheckFill.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar :inner2="true" @goIn="goIn" title="点检填报"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">设备</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<input type="text" class="filter_input filter_input_disabled" disabled v-model="val1">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">点检单</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<input type="text" class="filter_input filter_input_disabled" disabled v-model="val2">
|
||||||
|
</view>
|
||||||
|
</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" @click="toCheck(e)" :class="{'checked': e.maint_item_code === pkId}">
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="submit-bar">
|
||||||
|
<button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled" @tap="dataList.length === 0">确认</button>
|
||||||
|
<button class="submit-button" @tap="toCancle">取消</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {coolIOQuery, confirmInstor, statusList} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
val3: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 下拉框查询 */
|
||||||
|
async _statusList () {
|
||||||
|
let res = await statusList()
|
||||||
|
this.options = [...res.data]
|
||||||
|
},
|
||||||
|
/** 确认 */
|
||||||
|
async _confirmInstor () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.val1 || !this.pkId || !this.index) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await confirmInstor(this.pkObj, this.val1, this.index)
|
||||||
|
this.disabled = false
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this.searchList()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.maint_item_code ? '' : e.maint_item_code
|
||||||
|
this.pkObj = this.pkId === e.maint_item_code ? e : {}
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
this.goIn()
|
||||||
|
},
|
||||||
|
goIn () {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/device/CheckWork'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
</style>
|
||||||
132
pages/device/CheckWork.vue
Normal file
132
pages/device/CheckWork.vue
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar title="设备点检作业"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">设备</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<search-box
|
||||||
|
v-model="val1"
|
||||||
|
:focused="true"
|
||||||
|
@handleChange="handleChange"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</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>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.maint_code === pkId}">
|
||||||
|
<td>{{e.maint_code}}</td>
|
||||||
|
<td>{{e.device_code}}</td>
|
||||||
|
<td>{{e.device_name}}</td>
|
||||||
|
<td>{{e.invstatus_name}}</td>
|
||||||
|
<td>{{e.plan_start_date}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {sportcheckgetAllQuery, sportcheckbegin} from '@/utils/getData1.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange (e) {
|
||||||
|
this._sportcheckgetAllQuery(e)
|
||||||
|
},
|
||||||
|
/** grid查询 */
|
||||||
|
async _sportcheckgetAllQuery (e) {
|
||||||
|
let res = await sportcheckgetAllQuery(e)
|
||||||
|
res.data.map(el => {
|
||||||
|
if(el.invstatus === '01') {
|
||||||
|
this.$set(el, 'invstatus_name', '生成')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '02') {
|
||||||
|
this.$set(el, 'invstatus_name', '提交')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '03') {
|
||||||
|
this.$set(el, 'invstatus_name', '保养开始')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '06') {
|
||||||
|
this.$set(el, 'invstatus_name', '保养结束')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '99') {
|
||||||
|
this.$set(el, 'invstatus_name', '审核完毕')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dataList = [...res.data]
|
||||||
|
},
|
||||||
|
async toSure1 () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await sportcheckbegin(this.pkObj)
|
||||||
|
this.disabled = false
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this._sportcheckgetAllQuery(this.val1)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.maint_code ? '' : e.maint_code
|
||||||
|
this.pkObj = this.pkId === e.maint_code ? e : {}
|
||||||
|
},
|
||||||
|
toJump () {
|
||||||
|
if (this.pkId) {
|
||||||
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/device/CheckFill'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
</style>
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="zd_container">
|
|
||||||
<nav-bar title="设备保养确认"></nav-bar>
|
|
||||||
<view class="zd_content">
|
|
||||||
<view class="zd_wrapper">
|
|
||||||
<view class="filter_item">
|
|
||||||
<view class="filter_label_wraper">
|
|
||||||
<span class="filter_label">设备保养确认</span>
|
|
||||||
</view>
|
|
||||||
<view class="filter_input_wraper">
|
|
||||||
<search-box
|
|
||||||
v-model="val1"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</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>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="(e, i) in dataList" :key="i">
|
|
||||||
<td>{{e.repair_code}}</td>
|
|
||||||
<td>{{e.device_code}}</td>
|
|
||||||
<td>{{e.device_name}}</td>
|
|
||||||
<td>{{e.status_name}}</td>
|
|
||||||
<td>{{e.plan_start_date}}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="submit-bar">
|
|
||||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !pkId || !index}" :disabled="disabled" @tap="_confirmInstor">通过</button>
|
|
||||||
<button class="submit-button" @tap="searchList">不通过</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import NavBar from '@/components/NavBar.vue'
|
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
|
||||||
import {coolIOQuery, confirmInstor, statusList} from '@/utils/getData2.js'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
NavBar,
|
|
||||||
SearchBox
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
val1: '',
|
|
||||||
dataList: [],
|
|
||||||
pkId: '',
|
|
||||||
pkObj: {},
|
|
||||||
disabled: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created () {
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 下拉框查询 */
|
|
||||||
async _statusList () {
|
|
||||||
let res = await statusList()
|
|
||||||
this.options = [...res.data]
|
|
||||||
},
|
|
||||||
/** 确认 */
|
|
||||||
async _confirmInstor () {
|
|
||||||
this.disabled = true
|
|
||||||
if (!this.val1 || !this.pkId || !this.index) {
|
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
let res = await confirmInstor(this.pkObj, this.val1, this.index)
|
|
||||||
this.disabled = false
|
|
||||||
this.pkId = ''
|
|
||||||
this.pkObj = {}
|
|
||||||
this.searchList()
|
|
||||||
uni.showToast({
|
|
||||||
title: res.message,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="stylus">
|
|
||||||
</style>
|
|
||||||
126
pages/device/LubricateFill.vue
Normal file
126
pages/device/LubricateFill.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar :inner2="true" @goIn="goIn" title="润滑填报"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">设备</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<input type="text" class="filter_input filter_input_disabled" disabled v-model="val1">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">润滑单</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<input type="text" class="filter_input filter_input_disabled" disabled v-model="val2">
|
||||||
|
</view>
|
||||||
|
</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" @click="toCheck(e)" :class="{'checked': e.maint_item_code === pkId}">
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="submit-bar">
|
||||||
|
<button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled" @tap="dataList.length === 0">确认</button>
|
||||||
|
<button class="submit-button" @tap="toCancle">取消</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {coolIOQuery, confirmInstor, statusList} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
val3: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 下拉框查询 */
|
||||||
|
async _statusList () {
|
||||||
|
let res = await statusList()
|
||||||
|
this.options = [...res.data]
|
||||||
|
},
|
||||||
|
/** 确认 */
|
||||||
|
async _confirmInstor () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.val1 || !this.pkId || !this.index) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await confirmInstor(this.pkObj, this.val1, this.index)
|
||||||
|
this.disabled = false
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this.searchList()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.maint_item_code ? '' : e.maint_item_code
|
||||||
|
this.pkObj = this.pkId === e.maint_item_code ? e : {}
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
this.goIn()
|
||||||
|
},
|
||||||
|
goIn () {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/device/LubricateWork'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
</style>
|
||||||
132
pages/device/LubricateWork.vue
Normal file
132
pages/device/LubricateWork.vue
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar title="设备润滑作业"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">设备</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<search-box
|
||||||
|
v-model="val1"
|
||||||
|
:focused="true"
|
||||||
|
@handleChange="handleChange"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</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>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.maint_code === pkId}">
|
||||||
|
<td>{{e.maint_code}}</td>
|
||||||
|
<td>{{e.device_code}}</td>
|
||||||
|
<td>{{e.device_name}}</td>
|
||||||
|
<td>{{e.invstatus_name}}</td>
|
||||||
|
<td>{{e.plan_start_date}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {lubricategetAllQuery, lubricatebegin} from '@/utils/getData1.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange (e) {
|
||||||
|
this._lubricategetAllQuery(e)
|
||||||
|
},
|
||||||
|
/** grid查询 */
|
||||||
|
async _lubricategetAllQuery (e) {
|
||||||
|
let res = await lubricategetAllQuery(e)
|
||||||
|
res.data.map(el => {
|
||||||
|
if(el.invstatus === '01') {
|
||||||
|
this.$set(el, 'invstatus_name', '生成')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '02') {
|
||||||
|
this.$set(el, 'invstatus_name', '提交')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '03') {
|
||||||
|
this.$set(el, 'invstatus_name', '润滑开始')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '06') {
|
||||||
|
this.$set(el, 'invstatus_name', '润滑结束')
|
||||||
|
}
|
||||||
|
if(el.invstatus === '99') {
|
||||||
|
this.$set(el, 'invstatus_name', '审核完毕')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dataList = [...res.data]
|
||||||
|
},
|
||||||
|
async toSure1 () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await lubricatebegin(this.pkObj)
|
||||||
|
this.disabled = false
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this._lubricategetAllQuery(this.val1)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.maint_code ? '' : e.maint_code
|
||||||
|
this.pkObj = this.pkId === e.maint_code ? e : {}
|
||||||
|
},
|
||||||
|
toJump () {
|
||||||
|
if (this.pkId) {
|
||||||
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/device/LubricateFill'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
</style>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
},
|
},
|
||||||
goIn () {
|
goIn () {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/device/EquipMaintainWork'
|
url: '/pages/device/MaintainWork'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user