作业管理
This commit is contained in:
@@ -24,7 +24,9 @@
|
||||
<th>维修单</th>
|
||||
<th>设备编号</th>
|
||||
<th>设备名称</th>
|
||||
<th>故障等级</th>
|
||||
<th>状态</th>
|
||||
<th>类型</th>
|
||||
<th>计划维修日期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -33,7 +35,9 @@
|
||||
<td>{{e.repair_code}}</td>
|
||||
<td>{{e.device_code}}</td>
|
||||
<td>{{e.device_name}}</td>
|
||||
<td>{{['紧急', '一般', '不紧急'][Number(e.fault_level) - 1]}}</td>
|
||||
<td>{{e.invstatus_name}}</td>
|
||||
<td>{{['计划维修', '临时维修'][Number(e.maintenancecycle) - 1]}}</td>
|
||||
<td>{{e.plan_start_date}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -1,19 +1,130 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<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">作业类型</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<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"
|
||||
@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>
|
||||
<th>状态</th>
|
||||
<th>计划开始日期</th>
|
||||
<th>计划结束日期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.checked}">
|
||||
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}" @tap="toCheck(e)"></span></td>
|
||||
<td>{{['维修单', '保养单', '点检单', '润滑单'][Number(e.job_type) - 1]}}</td>
|
||||
<td @tap="toJump(e)">{{e.job_code}}</td>
|
||||
<td>{{e.device_code}}</td>
|
||||
<td>{{e.device_name}}</td>
|
||||
<td>结束</td>
|
||||
<td>{{e.plan_start_date}}</td>
|
||||
<td>{{e.plan_end_date}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': checkArr.length === 0}" :disabled="disabled" @tap="toSure">审核完成</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {deviceManageGetAllQuery, deviceManageConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
options: [{text: '维修单', value: '1'}, {text: '保养单', value: '2'}, {text: '点检单', value: '3'}, {text: '润滑单', value: '4'}],
|
||||
index: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
checkArr: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
handleChange (e) {
|
||||
this._deviceManageGetAllQuery(e)
|
||||
},
|
||||
/** grid查询 */
|
||||
async _deviceManageGetAllQuery (e) {
|
||||
let res = await deviceManageGetAllQuery(this.index, e)
|
||||
res.data.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
/** 确认 */
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (this.checkArr.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await deviceManageConfirm(this.checkArr)
|
||||
this.disabled = false
|
||||
this.checkArr = []
|
||||
this._deviceManageGetAllQuery(this.val1)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
toJump (e) {
|
||||
this.$store.dispatch('setPublicObj', e)
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/workDetail'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :inner2="true" @goIn="goIn" title="维修填报"></nav-bar>
|
||||
<nav-bar :inner2="true" @goIn="goIn" title="作业明细"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
@@ -36,8 +36,8 @@
|
||||
<th>是否完成</th>
|
||||
<th>项目编码</th>
|
||||
<th>项目名称</th>
|
||||
<th>项目等级</th>
|
||||
<th>项目内容</th>
|
||||
<th v-show="val2 !== '1'">项目等级</th>
|
||||
<th v-show="val2 !== '1'">项目内容</th>
|
||||
<th>要求</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -46,8 +46,8 @@
|
||||
<td>{{['否', '是'][Number(e.isfinish) - 1]}}</td>
|
||||
<td>{{e.item_code}}</td>
|
||||
<td>{{e.item_name}}</td>
|
||||
<td>{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}</td>
|
||||
<td>{{e.contents}}</td>
|
||||
<td v-show="val2 !== '1'">{{['日常', '一级', '二级'][Number(e.item_level) - 1]}}</td>
|
||||
<td v-show="val2 !== '1'">{{e.contents}}</td>
|
||||
<td>{{e.requirement}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -56,8 +56,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<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>
|
||||
</template>
|
||||
@@ -65,7 +64,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {deviceRepairGetDtl, deviceRepairConfirm} from '@/utils/getData2.js'
|
||||
import {deviceManageGetDtl} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -76,53 +75,18 @@
|
||||
val1: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.device_code : '',
|
||||
val2: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.job_type : '',
|
||||
val3: this.$store.getters.publicObj !== '' ? this.$store.getters.publicObj.job_code : '',
|
||||
options: [{text: '否', value: '0'}, {text: '是', value: '1'}],
|
||||
dataList: [],
|
||||
disabled: false
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
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._deviceRepairGetDtl()
|
||||
this._deviceManageGetDtl()
|
||||
},
|
||||
methods: {
|
||||
/** 选择器 */
|
||||
selectChange($event, el) {
|
||||
el.isfinish = $event
|
||||
},
|
||||
/** grid查询 */
|
||||
async _deviceRepairGetDtl () {
|
||||
let res = await deviceRepairGetDtl(this.val1, this.val2, this.val3)
|
||||
async _deviceManageGetDtl () {
|
||||
let res = await deviceManageGetDtl(this.val1, this.val2, this.val3)
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
/** 确认 */
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.active) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await deviceRepairConfirm(this.val1, this.val2, this.dataList)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.goIn()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toCancle () {
|
||||
this.goIn()
|
||||
},
|
||||
|
||||
@@ -127,9 +127,7 @@
|
||||
|
||||
},
|
||||
goIn () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/warehouse/SemifinishedInStore'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,18 +55,18 @@ export const BcpConfirm = (from) => request({
|
||||
* 设备维修作业
|
||||
*/
|
||||
// 1.1设备维修作业页面 (初始查询)-- 单选
|
||||
// export const deviceRepairGetAllQuery = (code) => request({
|
||||
// url:'api/pda/device/repair/getAllQuery',
|
||||
// data: {
|
||||
// device_code: code
|
||||
// }
|
||||
// })
|
||||
export const deviceRepairGetAllQuery = (code) => {
|
||||
let res = {
|
||||
data: [{device_code: '01', invstatus: '99', repair_code: '11', repair_id: '111'}]
|
||||
export const deviceRepairGetAllQuery = (code) => request({
|
||||
url:'api/pda/device/repair/getAllQuery',
|
||||
data: {
|
||||
device_code: code
|
||||
}
|
||||
return res
|
||||
}
|
||||
})
|
||||
// export const deviceRepairGetAllQuery = (code) => {
|
||||
// let res = {
|
||||
// data: [{device_code: '01', invstatus: '99', repair_code: '11', repair_id: '111'}]
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
// 1.2开始维修(按钮)
|
||||
export const deviceRepairBegin = (row) => request({
|
||||
url:'api/pda/device/repair/begin',
|
||||
@@ -75,20 +75,20 @@ export const deviceRepairBegin = (row) => request({
|
||||
}
|
||||
})
|
||||
// 1.4维修填报页面(二级页面)
|
||||
// export const deviceRepairGetDtl = (code, rcode, id) => request({
|
||||
// url:'api/pda/device/repair/getDtl',
|
||||
// data: {
|
||||
// device_code: code,
|
||||
// repair_code: rcode,
|
||||
// repair_id: id
|
||||
// }
|
||||
// })
|
||||
export const deviceRepairGetDtl = (code) => {
|
||||
let res = {
|
||||
data: [{isfinish: '1', repair_item_code: '99', repair_item_name: '11', requirement: '检查减速机皮带轮、配重块配合情况,更换减速机齿轮油'}, {isfinish: '0', repair_item_code: '99', repair_item_name: '11', requirement: '111'}]
|
||||
export const deviceRepairGetDtl = (code, rcode, id) => request({
|
||||
url:'api/pda/device/repair/getDtl',
|
||||
data: {
|
||||
device_code: code,
|
||||
repair_code: rcode,
|
||||
repair_id: id
|
||||
}
|
||||
return res
|
||||
}
|
||||
})
|
||||
// export const deviceRepairGetDtl = (code) => {
|
||||
// let res = {
|
||||
// data: [{isfinish: '1', repair_item_code: '99', repair_item_name: '11', requirement: '检查减速机皮带轮、配重块配合情况,更换减速机齿轮油'}, {isfinish: '0', repair_item_code: '99', repair_item_name: '11', requirement: '111'}]
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
// 1.4.1确认(按钮)-- 是否完成全部为是【确认】按钮可点击,否则为灰色不可点击
|
||||
export const deviceRepairConfirm = (code, rcode, rows) => request({
|
||||
url:'api/pda/device/repair/confirm',
|
||||
|
||||
Reference in New Issue
Block a user