设备维修
This commit is contained in:
@@ -474,6 +474,7 @@ export const queryMaintenanceDtl = (row) => post('api/pda/sb/queryMaintenanceDtl
|
|||||||
export const dtlConfirm = (row) => post('api/pda/sb/dtlConfirm', {
|
export const dtlConfirm = (row) => post('api/pda/sb/dtlConfirm', {
|
||||||
rows: row
|
rows: row
|
||||||
})
|
})
|
||||||
|
/** 设备报修 */
|
||||||
// 1.5故障类型
|
// 1.5故障类型
|
||||||
export const errorType = (row) => post('api/pda/sb/errorType', {})
|
export const errorType = (row) => post('api/pda/sb/errorType', {})
|
||||||
// 1.6故障等级
|
// 1.6故障等级
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<div class="menu-col fxrow" @click="goInner('/MaintainConfirm')"><p class="fxcol">设备保养确认-生产员</p></div>
|
<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('/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('/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('/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('/ProcessGrindBall')"><p class="fxcol">球磨工序</p></div>
|
||||||
<div class="menu-col fxrow" @click="goInner('/ProcessSpray')"><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) {
|
toPage2 (e) {
|
||||||
let name = e.path.substr(2)
|
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.$store.dispatch('setKeepAlive', [name])
|
||||||
}
|
}
|
||||||
this.$router.push(e.path.substr(2))
|
this.$router.push(e.path.substr(2))
|
||||||
@@ -149,7 +149,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goInner (path) {
|
goInner (path) {
|
||||||
let name = path.substr(1)
|
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.$store.dispatch('setKeepAlive', [name])
|
||||||
}
|
}
|
||||||
this.$router.push(path)
|
this.$router.push(path)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<search-box
|
<search-box
|
||||||
label="设备"
|
label="设备"
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
@handleChange="handleChange1"
|
:seaShow='false'
|
||||||
></search-box>
|
></search-box>
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">故障类型</div>
|
<div class="filter-label txtjustify">故障类型</div>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">解决措施</div>
|
<div class="filter-label txtjustify">解决措施</div>
|
||||||
<div class="fxcol mgl20">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,8 +51,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
</tr>
|
</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></td>
|
<td>{{parseInt(i) + 1}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>图片编号</th>
|
<th>图片编号</th>
|
||||||
</tr>
|
</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>
|
<td>{{e.workorder_code}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -104,12 +104,18 @@ export default {
|
|||||||
disabled1: false
|
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: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
|
||||||
if (type) {
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 故障类型 */
|
/** 故障类型 */
|
||||||
async _errorType () {
|
async _errorType () {
|
||||||
let res = await errorType()
|
let res = await errorType()
|
||||||
@@ -140,11 +146,14 @@ export default {
|
|||||||
let level = this.active2 !== '' ? this.option2[this.active2].value : ''
|
let level = this.active2 !== '' ? this.option2[this.active2].value : ''
|
||||||
let res = await repairs(this.val1, type, this.val2, level)
|
let res = await repairs(this.val1, type, this.val2, level)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.option2 = [...res.rows]
|
this.toast(res.desc)
|
||||||
|
Object.assign(this.$data, this.$options.data())
|
||||||
|
this._errorType()
|
||||||
|
this._errorLevel()
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
this.disabled1 = false
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
label="设备"
|
label="设备"
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
@handleChange="handleChange1"
|
@handleChange="handleChange1"
|
||||||
|
:seaShow="false"
|
||||||
></search-box>
|
></search-box>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-wraper">
|
<div class="grid-wraper">
|
||||||
@@ -15,8 +16,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>维修单</th>
|
<th>维修单</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="e in dataList" :key="e.worktask_id" @click="toCheck(e)" :class="{'checked': e.worktask_id === pkId}">
|
<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 @click="toPage(e)">{{e.repair_code}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,19 +29,19 @@
|
|||||||
<th>状态</th>
|
<th>状态</th>
|
||||||
<th>维修日期</th>
|
<th>维修日期</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="e in dataList" :key="e.worktask_id" @click="toCheck(e)" :class="{'checked': e.worktask_id === pkId}">
|
<tr v-for="e in dataList" :key="e.repair_id" @click="toCheck(e)" :class="{'checked': e.repair_id === pkId}">
|
||||||
<td>{{e.workorder_code}}</td>
|
<td>{{e.device_code}}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.device_name}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
|
||||||
<td>{{e.status_name}}</td>
|
<td>{{e.status_name}}</td>
|
||||||
|
<td>{{e.plan_start_date}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<section class="submit-bar">
|
||||||
<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">不通过</button>
|
<button class="btn submit-button" :class="{'btn-disabled': pkId === ''}" :disabled="disabled2" @click="toSure2">不通过</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import SearchBox from '@components/SearchBox.vue'
|
import SearchBox from '@components/SearchBox.vue'
|
||||||
|
import { queryRepairs, repairOpeate } from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'EquipRepairConfirm',
|
name: 'EquipRepairConfirm',
|
||||||
components: {
|
components: {
|
||||||
@@ -59,18 +61,75 @@ export default {
|
|||||||
val1: '',
|
val1: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
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: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
handleChange1 (e, type) {
|
||||||
if (type) {
|
if (type) {
|
||||||
console.log(e)
|
this._queryRepairs(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.worktask_id ? '' : e.worktask_id
|
this.pkId = this.pkId === e.repair_id ? '' : e.repair_id
|
||||||
this.pkObj = this.pkId === e.worktask_id ? e : {}
|
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'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
label="设备"
|
label="设备"
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
@handleChange="handleChange1"
|
@handleChange="handleChange1"
|
||||||
|
:seaShow="false"
|
||||||
></search-box>
|
></search-box>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-wraper">
|
<div class="grid-wraper">
|
||||||
@@ -68,6 +69,13 @@ export default {
|
|||||||
disabled3: false
|
disabled3: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeRouteLeave (to, from, next) {
|
||||||
|
if (to.path === '/home' || to.path === '/login') {
|
||||||
|
this.$store.dispatch('setKeepAlive', [])
|
||||||
|
}
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
activated () {},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
handleChange1 (e, type) {
|
||||||
if (type) {
|
if (type) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
label="设备"
|
label="设备"
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
@handleChange="handleChange1"
|
@handleChange="handleChange1"
|
||||||
|
:seaShow="false"
|
||||||
></search-box>
|
></search-box>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-wraper">
|
<div class="grid-wraper">
|
||||||
@@ -15,8 +16,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>保养单</th>
|
<th>保养单</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="e in dataList" :key="e.maint_id" @click="toCheck(e)" :class="{'checked': e.maint_id === pkId}">
|
<tr v-for="e in dataList" :key="e.maint_id" :class="{'checked': e.maint_id === pkId}">
|
||||||
<td>{{e.maint_code}}</td>
|
<td @click="toPage(e)">{{e.maint_code}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,6 +66,13 @@ export default {
|
|||||||
disabled2: false
|
disabled2: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeRouteLeave (to, from, next) {
|
||||||
|
if (to.path === '/home' || to.path === '/login') {
|
||||||
|
this.$store.dispatch('setKeepAlive', [])
|
||||||
|
}
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
activated () {},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
handleChange1 (e, type) {
|
||||||
if (type) {
|
if (type) {
|
||||||
@@ -114,6 +122,12 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this._maintOpeate('4')
|
this._maintOpeate('4')
|
||||||
|
},
|
||||||
|
toPage (e) {
|
||||||
|
this.$store.dispatch('materObj', e)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/MaintainDetails'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,16 @@
|
|||||||
<nav-bar :inner="true" title="保养明细"></nav-bar>
|
<nav-bar :inner="true" title="保养明细"></nav-bar>
|
||||||
<section class="content mgt186">
|
<section class="content mgt186">
|
||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<search-box
|
<div class="bottom-filter-tip">
|
||||||
label="设备"
|
<div class="filter-label txtjustify">设备</div>
|
||||||
v-model="val1"
|
<div class="fxcol mgl20">
|
||||||
@handleChange="handleChange1"
|
<input type="text" class="filter-input filter-scan-input" disabled v-model="val1">
|
||||||
></search-box>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">保养单</div>
|
<div class="filter-label txtjustify">保养单</div>
|
||||||
<div class="fxcol mgl20">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,8 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<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" @click="toCancle">取消</button>
|
||||||
<button class="btn submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled2" @click="toSure2">取消</button>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import SearchBox from '@components/SearchBox.vue'
|
import SearchBox from '@components/SearchBox.vue'
|
||||||
import {queryMaintenanceDtl, dtlConfirm} from '@config/getData2.js'
|
import {queryMaintenanceDtl} from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'MaintainDetails',
|
name: 'MaintainDetails',
|
||||||
components: {
|
components: {
|
||||||
@@ -72,12 +72,10 @@ export default {
|
|||||||
disabled2: false
|
disabled2: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this._queryMaintenanceDtl()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
|
||||||
if (type) {
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
|
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
|
||||||
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
|
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
|
||||||
@@ -91,36 +89,9 @@ export default {
|
|||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _dtlConfirm () {
|
toCancle () {
|
||||||
try {
|
this.$store.dispatch('materObj', {})
|
||||||
let res = await dtlConfirm(this.dataList)
|
this.$router.back()
|
||||||
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
label="设备"
|
label="设备"
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
@handleChange="handleChange1"
|
@handleChange="handleChange1"
|
||||||
|
:seaShow="false"
|
||||||
></search-box>
|
></search-box>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-wraper">
|
<div class="grid-wraper">
|
||||||
@@ -66,6 +67,15 @@ export default {
|
|||||||
disabled2: false
|
disabled2: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeRouteLeave (to, from, next) {
|
||||||
|
if (to.path === '/home' || to.path === '/login') {
|
||||||
|
this.$store.dispatch('setKeepAlive', [])
|
||||||
|
}
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
activated () {
|
||||||
|
this._queryMaintenance(this.val1)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
handleChange1 (e, type) {
|
||||||
if (type) {
|
if (type) {
|
||||||
|
|||||||
@@ -3,21 +3,22 @@
|
|||||||
<nav-bar :inner="true" title="维修结果填报"></nav-bar>
|
<nav-bar :inner="true" title="维修结果填报"></nav-bar>
|
||||||
<section class="content mgt186">
|
<section class="content mgt186">
|
||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<search-box
|
<div class="bottom-filter-tip">
|
||||||
label="设备"
|
<div class="filter-label txtjustify">设备</div>
|
||||||
v-model="val1"
|
<div class="fxcol mgl20">
|
||||||
@handleChange="handleChange1"
|
<input type="text" class="filter-input filter-scan-input" disabled v-model="val1">
|
||||||
></search-box>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">维修单</div>
|
<div class="filter-label txtjustify">维修单</div>
|
||||||
<div class="fxcol mgl20">
|
<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>
|
</div>
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">生产负责人</div>
|
<div class="filter-label txtjustify">生产负责人</div>
|
||||||
<div class="fxcol mgl20">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
<th>维修项目名称</th>
|
<th>维修项目名称</th>
|
||||||
<th>要求</th>
|
<th>要求</th>
|
||||||
</tr>
|
</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>
|
<td>
|
||||||
<for-dropdown-menu
|
<for-dropdown-menu
|
||||||
:value="e.isfinish"
|
:value="e.isfinish"
|
||||||
@@ -83,11 +84,6 @@ export default {
|
|||||||
val2: JSON.stringify(this.$store.getters.materObj) !== '{}' ? this.$store.getters.materObj.repair_code : '',
|
val2: JSON.stringify(this.$store.getters.materObj) !== '{}' ? this.$store.getters.materObj.repair_code : '',
|
||||||
val3: '',
|
val3: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
|
||||||
pkObj: {},
|
|
||||||
option: [{value: '1', label: '是'}, {value: '2', label: '否'}],
|
|
||||||
active: '0',
|
|
||||||
open: false,
|
|
||||||
disabled1: false
|
disabled1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -100,10 +96,6 @@ export default {
|
|||||||
console.log(e)
|
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 () {
|
async _queryRepairDtl () {
|
||||||
let res = await queryRepairDtl(this.$store.getters.materObj)
|
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)
|
let res = await repaireDtlConfirm(this.$store.getters.materObj, this.dataList, this.val3)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
|
this.toCancle()
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
this.disabled1 = false
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
@@ -132,9 +125,11 @@ export default {
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this._dtlConfirm()
|
this._repaireDtlConfirm()
|
||||||
},
|
},
|
||||||
toCancle () {
|
toCancle () {
|
||||||
|
this.$store.dispatch('materObj', {})
|
||||||
|
this.$router.back()
|
||||||
},
|
},
|
||||||
getValue (p) {
|
getValue (p) {
|
||||||
this.dataList.map(el => {
|
this.dataList.map(el => {
|
||||||
|
|||||||
@@ -3,15 +3,16 @@
|
|||||||
<nav-bar :inner="true" title="保养结果填报"></nav-bar>
|
<nav-bar :inner="true" title="保养结果填报"></nav-bar>
|
||||||
<section class="content mgt186">
|
<section class="content mgt186">
|
||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<search-box
|
<div class="bottom-filter-tip">
|
||||||
label="设备"
|
<div class="filter-label txtjustify">设备</div>
|
||||||
v-model="val1"
|
<div class="fxcol mgl20">
|
||||||
@handleChange="handleChange1"
|
<input type="text" class="filter-input filter-scan-input" disabled v-model="val1">
|
||||||
></search-box>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">保养单</div>
|
<div class="filter-label txtjustify">保养单</div>
|
||||||
<div class="fxcol mgl20">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,11 +84,6 @@ export default {
|
|||||||
this._queryMaintenanceDtl()
|
this._queryMaintenanceDtl()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange1 (e, type) {
|
|
||||||
if (type) {
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toCheck (e) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
|
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
|
||||||
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
|
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
|
||||||
@@ -113,6 +109,7 @@ export default {
|
|||||||
let res = await dtlConfirm(this.dataList)
|
let res = await dtlConfirm(this.dataList)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
|
this.toCancle()
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
@@ -132,6 +129,8 @@ export default {
|
|||||||
this._dtlConfirm()
|
this._dtlConfirm()
|
||||||
},
|
},
|
||||||
toCancle () {
|
toCancle () {
|
||||||
|
this.$store.dispatch('materObj', {})
|
||||||
|
this.$router.back()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user