报工查询
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<div class="wrap-buttons">
|
||||
<button class="button button--primary" @click="getDatas">查询</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled1" @click="showDialog">修改</button>
|
||||
<button class="button button--primary" :disabled="disabled2">删除</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled2" @click="_deleteReport">删除</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_wraper">
|
||||
@@ -113,7 +113,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deviceList, reportQuery } from '../../../config/getData2.js'
|
||||
import { deviceList, reportQuery, updateReport, deleteReport } from '../../../config/getData2.js'
|
||||
import jxDialog from '@components/dialog.vue'
|
||||
import {dateFtt} from '@config/utils.js'
|
||||
export default {
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
workorder: '',
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
dataList: [],
|
||||
dataList: [{macoperate_id: '1'}],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
reportQty: '',
|
||||
@@ -195,7 +195,37 @@ export default {
|
||||
this.$refs.child.active = true
|
||||
},
|
||||
toSureDialog () {
|
||||
this.$refs.child.active = false
|
||||
this._updateReport()
|
||||
},
|
||||
async _updateReport () {
|
||||
try {
|
||||
let res = await updateReport(this.pkId, this.reportQty, this.nokQty, this.repareQty)
|
||||
this.toast(res.message)
|
||||
this.disabled1 = false
|
||||
this.$refs.child.active = false
|
||||
this.$refs.child.disabled = false
|
||||
this.getDatas()
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
this.$refs.child.active = false
|
||||
this.$refs.child.disabled = false
|
||||
}
|
||||
},
|
||||
async _deleteReport () {
|
||||
this.disabled2 = true
|
||||
if (!this.pkId) {
|
||||
this.toast('请选择一行')
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await deleteReport(this.pkId)
|
||||
this.toast(res.message)
|
||||
this.disabled2 = false
|
||||
this.getDatas()
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,5 +26,6 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
.icon_dropdown
|
||||
font-size 15px
|
||||
&::before
|
||||
content: '\e626'
|
||||
|
||||
Reference in New Issue
Block a user