设备维修

This commit is contained in:
2022-07-01 09:54:17 +08:00
parent a59f5168fb
commit 91f376cb59
10 changed files with 169 additions and 103 deletions

View File

@@ -25,7 +25,7 @@
<div class="menu-col fxrow" @click="goInner('/MaintainConfirm')"><p class="fxcol">设备保养确认-生产员</p></div>
<div class="menu-col fxrow" @click="goInner('/EquipRepair')"><p class="fxcol">设备报修</p></div>
<div class="menu-col fxrow" @click="goInner('/EquipRepairExecute')"><p class="fxcol">设备维修执行</p></div>
<div class="menu-col fxrow" @click="goInner('/MaintainResultFill')"><p class="fxcol">设备维修确认</p></div> -->
<div class="menu-col fxrow" @click="goInner('/EquipRepairConfirm')"><p class="fxcol">设备维修确认</p></div> -->
<!-- <div class="menu-col fxrow" @click="goInner('/ProcessMakePowder')"><p class="fxcol">配粉工序</p></div>
<div class="menu-col fxrow" @click="goInner('/ProcessGrindBall')"><p class="fxcol">球磨工序</p></div>
<div class="menu-col fxrow" @click="goInner('/ProcessSpray')"><p class="fxcol">喷雾工序</p></div>
@@ -129,7 +129,7 @@ export default {
},
toPage2 (e) {
let name = e.path.substr(2)
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe') {
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe' || name === 'MaintainExecution' || name === 'MaintainConfirm' || name === 'EquipRepair' || name === 'EquipRepairExecute' || name === 'EquipRepairConfirm') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(e.path.substr(2))
@@ -149,7 +149,7 @@ export default {
},
goInner (path) {
let name = path.substr(1)
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe') {
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe' || name === 'MaintainExecution' || name === 'MaintainConfirm' || name === 'EquipRepair' || name === 'EquipRepairExecute' || name === 'EquipRepairConfirm') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(path)

View File

@@ -6,7 +6,7 @@
<search-box
label="设备"
v-model="val1"
@handleChange="handleChange1"
:seaShow='false'
></search-box>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">故障类型</div>
@@ -41,7 +41,7 @@
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">解决措施</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" placeholder="" v-model="val3">
<input type="text" class="filter-input filter-scan-input" placeholder="" disabled v-model="val3">
</div>
</div>
</div>
@@ -51,8 +51,8 @@
<tr>
<th>序号</th>
</tr>
<tr v-for="e in dataList" :key="e.worktask_id" @click="toCheck(e)" :class="{'checked': e.worktask_id === pkId}">
<td></td>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{parseInt(i) + 1}}</td>
</tr>
</table>
</div>
@@ -61,7 +61,7 @@
<tr>
<th>图片编号</th>
</tr>
<tr v-for="e in dataList" :key="e.worktask_id" @click="toCheck(e)" :class="{'checked': e.worktask_id === pkId}">
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e.workorder_code}}</td>
</tr>
</table>
@@ -104,12 +104,18 @@ export default {
disabled1: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {},
created () {
this._errorType()
this._errorLevel()
},
methods: {
handleChange1 (e, type) {
if (type) {
console.log(e)
}
},
/** 故障类型 */
async _errorType () {
let res = await errorType()
@@ -140,11 +146,14 @@ export default {
let level = this.active2 !== '' ? this.option2[this.active2].value : ''
let res = await repairs(this.val1, type, this.val2, level)
if (res.code === '1') {
this.option2 = [...res.rows]
this.toast(res.desc)
Object.assign(this.$data, this.$options.data())
this._errorType()
this._errorLevel()
} else {
this.Dialog(res.desc)
this.disabled1 = false
}
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}

View File

@@ -7,6 +7,7 @@
label="设备"
v-model="val1"
@handleChange="handleChange1"
:seaShow="false"
></search-box>
</div>
<div class="grid-wraper">
@@ -15,8 +16,8 @@
<tr>
<th>维修单</th>
</tr>
<tr v-for="e in dataList" :key="e.worktask_id" @click="toCheck(e)" :class="{'checked': e.worktask_id === pkId}">
<td>{{e.device_code}}</td>
<tr v-for="e in dataList" :key="e.repair_id" @click="toCheck(e)" :class="{'checked': e.repair_id === pkId}">
<td @click="toPage(e)">{{e.repair_code}}</td>
</tr>
</table>
</div>
@@ -28,19 +29,19 @@
<th>状态</th>
<th>维修日期</th>
</tr>
<tr v-for="e in dataList" :key="e.worktask_id" @click="toCheck(e)" :class="{'checked': e.worktask_id === pkId}">
<td>{{e.workorder_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.pcsn}}</td>
<tr v-for="e in dataList" :key="e.repair_id" @click="toCheck(e)" :class="{'checked': e.repair_id === pkId}">
<td>{{e.device_code}}</td>
<td>{{e.device_name}}</td>
<td>{{e.status_name}}</td>
<td>{{e.plan_start_date}}</td>
</tr>
</table>
</div>
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button">通过</button>
<button class="btn submit-button">不通过</button>
<button class="btn submit-button" :class="{'btn-disabled': pkId === ''}" :disabled="disabled1" @click="toSure1">通过</button>
<button class="btn submit-button" :class="{'btn-disabled': pkId === ''}" :disabled="disabled2" @click="toSure2">不通过</button>
</section>
</section>
</template>
@@ -48,6 +49,7 @@
<script>
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
import { queryRepairs, repairOpeate } from '@config/getData2.js'
export default {
name: 'EquipRepairConfirm',
components: {
@@ -59,18 +61,75 @@ export default {
val1: '',
dataList: [],
pkId: '',
pkObj: {}
pkObj: {},
disabled1: false,
disabled2: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {},
methods: {
handleChange1 (e, type) {
if (type) {
console.log(e)
this._queryRepairs(e)
}
},
toCheck (e) {
this.pkId = this.pkId === e.worktask_id ? '' : e.worktask_id
this.pkObj = this.pkId === e.worktask_id ? e : {}
this.pkId = this.pkId === e.repair_id ? '' : e.repair_id
this.pkObj = this.pkId === e.repair_id ? e : {}
},
/** 设备查询 */
async _queryRepairs (e) {
let res = await queryRepairs(e, '2')
if (res.code === '1') {
this.dataList = [...res.content.rows]
} else {
this.Dialog(res.desc)
}
},
async _repairOpeate (type) {
try {
let res = await repairOpeate(this.pkObj, type)
if (res.code === '1') {
this.toast(res.desc)
} else {
this.Dialog(res.desc)
}
this.disabled1 = false
this.disabled2 = false
this.disabled3 = false
} catch (e) {
this.disabled1 = false
this.disabled2 = false
this.disabled3 = false
}
},
toSure1 () {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
this._repairOpeate('4')
},
toSure2 () {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
this._repairOpeate('5')
},
toPage (e) {
this.$store.dispatch('materObj', e)
this.$router.push({
path: '/MaintainDetails'
})
}
}
}

View File

@@ -7,6 +7,7 @@
label="设备"
v-model="val1"
@handleChange="handleChange1"
:seaShow="false"
></search-box>
</div>
<div class="grid-wraper">
@@ -68,6 +69,13 @@ export default {
disabled3: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {},
methods: {
handleChange1 (e, type) {
if (type) {

View File

@@ -7,6 +7,7 @@
label="设备"
v-model="val1"
@handleChange="handleChange1"
:seaShow="false"
></search-box>
</div>
<div class="grid-wraper">
@@ -15,8 +16,8 @@
<tr>
<th>保养单</th>
</tr>
<tr v-for="e in dataList" :key="e.maint_id" @click="toCheck(e)" :class="{'checked': e.maint_id === pkId}">
<td>{{e.maint_code}}</td>
<tr v-for="e in dataList" :key="e.maint_id" :class="{'checked': e.maint_id === pkId}">
<td @click="toPage(e)">{{e.maint_code}}</td>
</tr>
</table>
</div>
@@ -65,6 +66,13 @@ export default {
disabled2: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {},
methods: {
handleChange1 (e, type) {
if (type) {
@@ -114,6 +122,12 @@ export default {
return
}
this._maintOpeate('4')
},
toPage (e) {
this.$store.dispatch('materObj', e)
this.$router.push({
path: '/MaintainDetails'
})
}
}
}

View File

@@ -3,15 +3,16 @@
<nav-bar :inner="true" title="保养明细"></nav-bar>
<section class="content mgt186">
<div class="filter-wraper">
<search-box
label="设备"
v-model="val1"
@handleChange="handleChange1"
></search-box>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">设备</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val1">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">保养单</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" placeholder="" v-model="val2">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val2">
</div>
</div>
</div>
@@ -45,8 +46,7 @@
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled1" @click="toSure1">>确认</button>
<button class="btn submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled2" @click="toSure2">取消</button>
<button class="btn submit-button" @click="toCancle">取消</button>
</section>
</section>
</template>
@@ -54,7 +54,7 @@
<script>
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
import {queryMaintenanceDtl, dtlConfirm} from '@config/getData2.js'
import {queryMaintenanceDtl} from '@config/getData2.js'
export default {
name: 'MaintainDetails',
components: {
@@ -72,12 +72,10 @@ export default {
disabled2: false
}
},
mounted () {
this._queryMaintenanceDtl()
},
methods: {
handleChange1 (e, type) {
if (type) {
console.log(e)
}
},
toCheck (e) {
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
@@ -91,36 +89,9 @@ export default {
this.Dialog(res.desc)
}
},
async _dtlConfirm () {
try {
let res = await dtlConfirm(this.dataList)
if (res.code === '1') {
this.toast(res.desc)
} else {
this.Dialog(res.desc)
}
this.disabled1 = false
this.disabled2 = false
} catch (e) {
this.disabled1 = false
this.disabled2 = false
}
},
toSure1 () {
this.disabled1 = true
if (!this.dataList.length) {
this.disabled1 = false
return
}
this._dtlConfirm()
},
toSure2 () {
this.disabled2 = true
if (!this.dataList.length) {
this.disabled2 = false
return
}
this._dtlConfirm()
toCancle () {
this.$store.dispatch('materObj', {})
this.$router.back()
}
}
}

View File

@@ -7,6 +7,7 @@
label="设备"
v-model="val1"
@handleChange="handleChange1"
:seaShow="false"
></search-box>
</div>
<div class="grid-wraper">
@@ -66,6 +67,15 @@ export default {
disabled2: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
this._queryMaintenance(this.val1)
},
methods: {
handleChange1 (e, type) {
if (type) {

View File

@@ -3,21 +3,22 @@
<nav-bar :inner="true" title="维修结果填报"></nav-bar>
<section class="content mgt186">
<div class="filter-wraper">
<search-box
label="设备"
v-model="val1"
@handleChange="handleChange1"
></search-box>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">设备</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val1">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">维修单</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" placeholder="" v-model="val2">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val2">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">生产负责人</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" placeholder="" v-model="val3">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val3">
</div>
</div>
</div>
@@ -42,7 +43,7 @@
<th>维修项目名称</th>
<th>要求</th>
</tr>
<tr v-for="e in dataList" :key="e.repair_dtl_id" @click="toCheck(e)" :class="{'checked': e.repair_dtl_id === pkId}">
<tr v-for="e in dataList" :key="e.repair_dtl_id">
<td>
<for-dropdown-menu
:value="e.isfinish"
@@ -83,11 +84,6 @@ export default {
val2: JSON.stringify(this.$store.getters.materObj) !== '{}' ? this.$store.getters.materObj.repair_code : '',
val3: '',
dataList: [],
pkId: '',
pkObj: {},
option: [{value: '1', label: '是'}, {value: '2', label: '否'}],
active: '0',
open: false,
disabled1: false
}
},
@@ -100,10 +96,6 @@ export default {
console.log(e)
}
},
toCheck (e) {
this.pkId = this.pkId === e.repair_dtl_id ? '' : e.repair_dtl_id
this.pkObj = this.pkId === e.repair_dtl_id ? e : {}
},
/** 明细查询 */
async _queryRepairDtl () {
let res = await queryRepairDtl(this.$store.getters.materObj)
@@ -118,10 +110,11 @@ export default {
let res = await repaireDtlConfirm(this.$store.getters.materObj, this.dataList, this.val3)
if (res.code === '1') {
this.toast(res.desc)
this.toCancle()
} else {
this.Dialog(res.desc)
this.disabled1 = false
}
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
@@ -132,9 +125,11 @@ export default {
this.disabled1 = false
return
}
this._dtlConfirm()
this._repaireDtlConfirm()
},
toCancle () {
this.$store.dispatch('materObj', {})
this.$router.back()
},
getValue (p) {
this.dataList.map(el => {

View File

@@ -3,15 +3,16 @@
<nav-bar :inner="true" title="保养结果填报"></nav-bar>
<section class="content mgt186">
<div class="filter-wraper">
<search-box
label="设备"
v-model="val1"
@handleChange="handleChange1"
></search-box>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">设备</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val1">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">保养单</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" placeholder="" v-model="val2">
<input type="text" class="filter-input filter-scan-input" disabled v-model="val2">
</div>
</div>
</div>
@@ -83,11 +84,6 @@ export default {
this._queryMaintenanceDtl()
},
methods: {
handleChange1 (e, type) {
if (type) {
console.log(e)
}
},
toCheck (e) {
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
@@ -113,6 +109,7 @@ export default {
let res = await dtlConfirm(this.dataList)
if (res.code === '1') {
this.toast(res.desc)
this.toCancle()
} else {
this.Dialog(res.desc)
}
@@ -132,6 +129,8 @@ export default {
this._dtlConfirm()
},
toCancle () {
this.$store.dispatch('materObj', {})
this.$router.back()
}
}
}