This commit is contained in:
2025-02-17 19:01:32 +08:00
parent fb5eb76135
commit 4de06af3d8
10 changed files with 173 additions and 111 deletions

View File

@@ -48,6 +48,10 @@
},
async _callTask () {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
try {
let res = await callTask(this.val1)
uni.showToast({

View File

@@ -154,7 +154,7 @@
<style lang="stylus" scoped>
.btn_wraper
width 3.4rem
width 170px
.filter-select
width 3.1rem
width 155px
</style>

View File

@@ -62,16 +62,6 @@
</view>
</view>
</view>
<!-- <el-dialog :visible.sync="dialogVisible">
<div class="zd-row filter-item">
<div class="zd-col-6 filter-label">补发桶数</div>
<el-input-number class="zd-col-17" v-model="inputNumber" :min="1" label="请输入数字"></el-input-number>
</div>
<div class="zd-row jcenter button-wrap">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button>
</div>
</el-dialog> -->
</view>
</template>
@@ -126,9 +116,25 @@
this.$set(el, 'checked', false)
})
},
async _sendWork (e) {
_sendWork (e) {
this.disabled1 = true
e.checked = true
uni.showModal({
title: '提示',
content: '确定下发任务?',
cancelColor: '#fff',
confirmColor: '#6fc4e2',
success: (res) => {
if (res.confirm) {
this.__sendWork(e)
} else if (res.cancel) {
this.disabled1 = false
e.checked = false
}
}
})
},
async __sendWork (e) {
try {
let res = await sendWork(e.work_code)
this._queryWorks()
@@ -160,9 +166,25 @@
e.checked = false
}
},
async _pdaPause (e) {
_pdaPause (e) {
this.disabled3 = true
e.checked = true
uni.showModal({
title: '提示',
content: '确定暂停任务?',
cancelColor: '#fff',
confirmColor: '#6fc4e2',
success: (res) => {
if (res.confirm) {
this.__pdaPause(e)
} else if (res.cancel) {
this.disabled3 = false
e.checked = false
}
}
})
},
async __pdaPause (e) {
try {
let res = await pdaPause(e.work_code)
this._queryWorks()
@@ -177,9 +199,25 @@
e.checked = false
}
},
async _finishWork (e) {
_finishWork (e) {
this.disabled4 = true
e.checked = true
uni.showModal({
title: '提示',
content: '确定完成任务?',
cancelColor: '#fff',
confirmColor: '#6fc4e2',
success: (res) => {
if (res.confirm) {
this.__finishWork(e)
} else if (res.cancel) {
this.disabled4 = false
e.checked = false
}
}
})
},
async __finishWork (e) {
try {
let res = await finishWork(e.work_code)
this._queryWorks()
@@ -211,5 +249,5 @@
.grid_wraper
height 100%
.btn_wraper
width 3.5rem
width 170px
</style>