jwyu 2 years ago
parent
commit
053de5d8d7
2 changed files with 26 additions and 15 deletions
  1. 1 1
      pages-approve/businessTrip/add.vue
  2. 25 14
      pages-approve/businessTrip/detail.vue

+ 1 - 1
pages-approve/businessTrip/add.vue

@@ -33,7 +33,7 @@
         <view class="form-item has-arrow">
             <view class="label">目的地</view>
             <view class="content" @click="showDestination=true">
-                <view :class="['text',formData.destination.length?'':'placeholde-text']">{{formData.destination.join('')||'请选择目的地'}}</view>
+                <view :class="['text',formData.destination.length==0?'placeholde-text':'']">{{formData.destination.join('')||'请选择目的地'}}</view>
             </view>
         </view>
         <view class="form-item has-arrow">

+ 25 - 14
pages-approve/businessTrip/detail.vue

@@ -127,21 +127,32 @@ export default {
 
         // 删除
         handleDel(){
-            apiDelApply({BusinessApplyId:Number(this.id)}).then(res=>{
-                if(res.code===200){
-                    uni.$emit('businessApproveListUpdate')
-                    uni.showToast({
-                        title:"删除成功",
-                        icon:'success'
-                    })
-                    setTimeout(() => {
-                        uni.navigateBack({
-                            delta: 1
-                        });
-                    }, 1500);
-                    
+            const that=this
+            uni.showModal({
+                title: '',
+                content: '确定要删除该出差申请吗?',
+                success: function (res) {
+                    if (res.confirm) {
+                        console.log('用户点击确定');
+                        apiDelApply({BusinessApplyId:Number(that.id)}).then(res=>{
+                            if(res.code===200){
+                                uni.$emit('businessApproveListUpdate')
+                                uni.showToast({
+                                    title:"删除成功",
+                                    icon:'success'
+                                })
+                                setTimeout(() => {
+                                    uni.navigateBack({
+                                        delta: 1
+                                    });
+                                }, 1500);     
+                            }
+                        })
+                    } else if (res.cancel) {
+                        console.log('用户点击取消');
+                    }
                 }
-            })
+            });
         },
 
         //审批驳回