二次确认
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_comfirmGetting">确认取货</button> -->
|
||||
<button class="zd-col-8 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-7 button-primary" @tap="searchList">{{$t('button.search')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_comfirmGetting">{{$t('button.confirm-quhuo')}}</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm-quhuo')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -65,6 +65,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getMaterialInfoByPoint, comfirmGetting} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -137,12 +138,17 @@
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
async _comfirmGetting () {
|
||||
this.disabled = true
|
||||
async handleConfirm() {
|
||||
if (!this.val1 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._comfirmGetting()
|
||||
}
|
||||
},
|
||||
async _comfirmGetting () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await comfirmGetting(this.val1, this.dataList)
|
||||
if (res.code === '200') {
|
||||
|
||||
Reference in New Issue
Block a user