|
@@ -11,7 +11,7 @@
|
|
|
<view class="messageText" v-html="info&&info.remindMessage||''"></view>
|
|
|
<view class="button-group">
|
|
|
<button :hover-stop-propagation="true" @click="toScan" v-if="state == 1&&partList.length" class="back" size="mini">扫码取货</button>
|
|
|
- <button :hover-stop-propagation="true" @click="onceQh" v-if="state == 1&&partList.length" class="action" size="mini">一键取货</button>
|
|
|
+ <button :hover-stop-propagation="true" :loading="loading" @click="onceQh" v-if="state == 1&&partList.length" class="action" size="mini">一键取货</button>
|
|
|
<button :hover-stop-propagation="true" @click="toSettle" v-if="state == 0" class="actionFail" size="mini">去结算</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -102,7 +102,7 @@
|
|
|
<script>
|
|
|
import uniIcons from "@/components/uni-icons/uni-icons.vue"
|
|
|
import moment from 'moment'
|
|
|
- import { findBySnShelfOrder } from '@/api/shelf'
|
|
|
+ import { findBySnShelfOrder, takeGoods } from '@/api/shelf'
|
|
|
import { clzConfirm } from '@/libs/tools.js'
|
|
|
export default {
|
|
|
name: 'choosePartResult',
|
|
@@ -111,6 +111,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading: false,
|
|
|
info: null,
|
|
|
statusText: '',
|
|
|
statusIcon: '', // 结算状态icon
|
|
@@ -178,7 +179,17 @@
|
|
|
},
|
|
|
// 一键取货
|
|
|
onceQh(){
|
|
|
-
|
|
|
+ this.loading = true
|
|
|
+ takeGoods({sn:this.shelfOrderSn}).then(res => {
|
|
|
+ if(res.status == 200){
|
|
|
+ uni.navigateBack()
|
|
|
+ }
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon:"none"
|
|
|
+ })
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 去结算
|
|
|
toSettle(){
|