|
@@ -94,11 +94,15 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="footer flex align_center justify_center" v-if="info">
|
|
|
|
+ <u-button v-if="info.billStatus == 'WAIT_AUDIT'" shape="circle" type="error" plain @click="cancelOrder(info)">取消订单</u-button>
|
|
|
|
+ <u-button v-if="info.billStatus == 'WAIT_RECEIVE'" shape="circle" type="primary" @click="receiveOrder(info)">确认收货</u-button>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import { purchaseQueryDetailPage } from '@/api/purchase.js'
|
|
|
|
|
|
+ import { purchaseQueryDetailPage,purchaseCancel,purchaseReceive } from '@/api/purchase.js'
|
|
export default {
|
|
export default {
|
|
name: 'procureDetailOrder',
|
|
name: 'procureDetailOrder',
|
|
data() {
|
|
data() {
|
|
@@ -195,6 +199,48 @@
|
|
title: title
|
|
title: title
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 取消订单
|
|
|
|
+ cancelOrder(item){
|
|
|
|
+ let _this = this
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确定取消订单吗?',
|
|
|
|
+ success: function (res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ purchaseCancel({purchaseSn:_this.purchaseSn}).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.message('取消成功')
|
|
|
|
+ uni.$emit('refreshOrder')
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ } else {
|
|
|
|
+ _this.message(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 确认收货
|
|
|
|
+ receiveOrder(item){
|
|
|
|
+ let _this = this
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确定收货吗?',
|
|
|
|
+ success: function (res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ purchaseReceive({purchaseSn:_this.purchaseSn}).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.message('收货成功')
|
|
|
|
+ uni.$emit('refreshOrder')
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ } else {
|
|
|
|
+ _this.message(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|