二次确认
This commit is contained in:
@@ -53,8 +53,8 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">重新下发</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirm">强制完成</button> -->
|
||||
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">{{$t('button.reissue')}}</button> -->
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirm">{{$t('button.force-complete')}}</button> -->
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="handleConfirm">{{$t('button.reissue')}}</button> -->
|
||||
<!-- <button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="handleConfirm2">{{$t('button.force-complete')}}</button> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -62,6 +62,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {queryTask, againTask, forceConfirm} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -139,13 +140,19 @@
|
||||
this.pkId = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
this.disabled2 = false
|
||||
},
|
||||
async handleConfirm() {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._againTask()
|
||||
}
|
||||
},
|
||||
async _againTask () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await againTask(this.pkId)
|
||||
if (res.code === '200') {
|
||||
@@ -165,12 +172,17 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _forceConfirm () {
|
||||
this.disabled2 = true
|
||||
async handleConfirm2() {
|
||||
if (!this.pkId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._forceConfirm()
|
||||
}
|
||||
},
|
||||
async _forceConfirm () {
|
||||
this.disabled2 = true
|
||||
try {
|
||||
let res = await forceConfirm(this.pkId)
|
||||
if (res.code === '200') {
|
||||
|
||||
Reference in New Issue
Block a user