搬运任务加提示框
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-22 button-primary" :disabled="disabled" @tap="_callTask('1')">{{$t('button.handtask')}}</button>
|
||||
<button class="zd-col-22 button-primary" :disabled="disabled" @tap="toSure('1')">{{$t('button.handtask')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -44,8 +44,23 @@
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
async _callTask (type) {
|
||||
toSure (type) {
|
||||
this.disabled = true
|
||||
uni.showModal({
|
||||
title: this.$t('warning'),
|
||||
cancelText: this.$t('button.cancel'),
|
||||
confirmText: this.$t('button.confirm'),
|
||||
content: this.$t('toast.command-reissue'),
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._callTask(type)
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async _callTask (type) {
|
||||
try {
|
||||
let res = await callTask(this.sCode, this.nCode, type)
|
||||
this.disabled = false
|
||||
|
||||
Reference in New Issue
Block a user