瀏覽代碼

05061555国交部分修改lhj

liuhj 1 年之前
父節點
當前提交
81e9717bd0

+ 5 - 1
src/components/OP/DecreasePayments.vue

@@ -127,8 +127,11 @@ export default {
                 }
                 }
             }).then(function (res) {
             }).then(function (res) {
                 if (res.data.code == 200) {
                 if (res.data.code == 200) {
+                    if(that.DiId==undefined){
+                        that.DiId = that.delegationInfoList[0].id;
+                    }
                     that.delegationInfoList = res.data.data.groupName;
                     that.delegationInfoList = res.data.data.groupName;
-                    that.DiId = that.delegationInfoList[0].id;
+                    console.log(that.DiId)
                     that.delegationInfo = that.delegationInfoList[0];
                     that.delegationInfo = that.delegationInfoList[0];
                     that.DecreasePaymentsList()
                     that.DecreasePaymentsList()
                 }
                 }
@@ -252,6 +255,7 @@ export default {
         }
         }
     },
     },
     mounted() {
     mounted() {
+        this.DiId = JSON.parse(this.$route.query.DiId);
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.DecreasePaymentsSelect();
         this.DecreasePaymentsSelect();

+ 5 - 4
src/components/OP/HotelReservations.vue

@@ -67,12 +67,12 @@
                            
                            
                         </template>
                         </template>
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="address" label="VOUCHER" width="100">
+                    <!-- <el-table-column prop="address" label="VOUCHER" width="100">
                         <template slot-scope="scope">
                         <template slot-scope="scope">
                             <i @click="DownloadVOUCHER(scope.$index, scope.row)">生成</i>
                             <i @click="DownloadVOUCHER(scope.$index, scope.row)">生成</i>
                         </template>
                         </template>
 
 
-                    </el-table-column>
+                    </el-table-column> -->
                 </el-table>
                 </el-table>
                 <div class="block">
                 <div class="block">
                     <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
                     <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
@@ -102,6 +102,7 @@
                         <el-button slot="reference">移上提示每天详细房价</el-button>
                         <el-button slot="reference">移上提示每天详细房价</el-button>
                     </el-popover>
                     </el-popover>
                     <div class="form-head-btn">
                     <div class="form-head-btn">
+                        <el-button type="primary" @click="DownloadVOUCHER">VOUCHER</el-button>
                         <el-button type="primary" @click="ConfirmWord">确认单</el-button>
                         <el-button type="primary" @click="ConfirmWord">确认单</el-button>
                         <el-button type="primary">预订成本</el-button>
                         <el-button type="primary">预订成本</el-button>
                         <el-button type="primary" @click="AddToggle">新增切换</el-button>
                         <el-button type="primary" @click="AddToggle">新增切换</el-button>
@@ -1449,7 +1450,7 @@ export default {
         },
         },
         
         
        
        
-        DownloadVOUCHER(index, row) {
+        DownloadVOUCHER() {
             var url = "/api/Groups/PostHotelReservationsCreateVoucher"
             var url = "/api/Groups/PostHotelReservationsCreateVoucher"
             var that = this
             var that = this
             this.$axios({
             this.$axios({
@@ -1463,7 +1464,7 @@ export default {
                     userId: that.userId ,
                     userId: that.userId ,
                     pageId: that.pageId ,
                     pageId: that.pageId ,
                     diId: that.OpHotelReservationsData.diId ,
                     diId: that.OpHotelReservationsData.diId ,
-                    id: row.id 
+                    id: 0
                 }
                 }
             }).then(function (res) {
             }).then(function (res) {
                 console.log(res)
                 console.log(res)

+ 18 - 12
src/components/OP/OpDecreasePayments.vue

@@ -49,7 +49,7 @@
                         </el-form-item>
                         </el-form-item>
                     </div>
                     </div>
                     <div style="width: 25%;">
                     <div style="width: 25%;">
-                        <el-form-item label="费用金额:" prop="price" label-width="160px">
+                        <el-form-item label="费用金额:" prop="currency" label-width="160px">
                             <el-input placeholder="费用金额" v-model="DecreasePaymentsData.price" style="width: 56%;">
                             <el-input placeholder="费用金额" v-model="DecreasePaymentsData.price" style="width: 56%;">
                             </el-input>
                             </el-input>
                             <el-select v-model="DecreasePaymentsData.currency" style="width: 40%;">
                             <el-select v-model="DecreasePaymentsData.currency" style="width: 40%;">
@@ -110,9 +110,9 @@
                 <el-form-item>
                 <el-form-item>
                     <div style="text-align: right;">
                     <div style="text-align: right;">
                         <el-button type="primary" @click="addBtn">保存</el-button>
                         <el-button type="primary" @click="addBtn">保存</el-button>
-                        <router-link to='/home/DecreasePayments'>
-                            <el-button>取消</el-button>
-                        </router-link>
+                        <!-- <router-link to='/home/DecreasePayments'> -->
+                        <el-button @click="quxiao">取消</el-button>
+                        <!-- </router-link> -->
                     </div>
                     </div>
                 </el-form-item>
                 </el-form-item>
             </el-form>
             </el-form>
@@ -160,9 +160,8 @@ export default {
                 TypeName: "A"
                 TypeName: "A"
             },
             },
             DecreasePaymentsRules: {
             DecreasePaymentsRules: {
-                price: [
-                    { required: true, message: '请输入费用金额', trigger: 'change' },
-                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
+                currency: [
+                    { required: true, message: '请选择币种', trigger: 'change' },
                 ],
                 ],
                 priceName: [
                 priceName: [
                     { required: true, message: '请输入费用名称', trigger: 'change' },
                     { required: true, message: '请输入费用名称', trigger: 'change' },
@@ -206,10 +205,8 @@ export default {
                             break;
                             break;
                         }
                         }
                     }
                     }
-
                     that.payment = res.data.data.payment
                     that.payment = res.data.data.payment
                 }
                 }
-
             })
             })
 
 
 
 
@@ -304,8 +301,8 @@ export default {
                                     });
                                     });
                                     that.loading = true;
                                     that.loading = true;
                                     setTimeout(() => {
                                     setTimeout(() => {
-                                        that.$router.push('/home/DecreasePayments')
-                                    }, 3000);
+                                        that.quxiao()
+                                    }, 1000);
                                 } else {
                                 } else {
                                     that.$message.error(res.data.msg);
                                     that.$message.error(res.data.msg);
                                 }
                                 }
@@ -370,6 +367,15 @@ export default {
             }
             }
             // 此时必填完成,做保存后的业务操作
             // 此时必填完成,做保存后的业务操作
         },
         },
+        //取消
+        quxiao(){
+            this.$router.push({
+                path: "/home/DecreasePayments",
+                query: {
+                    DiId: this.DiIdSelect,
+                }
+            })
+        },
         DecreasePaymentsChange() {
         DecreasePaymentsChange() {
             this.QueryRate();
             this.QueryRate();
             for (let index = 0; index < this.delegationInfoList.length; index++) {
             for (let index = 0; index < this.delegationInfoList.length; index++) {
@@ -488,7 +494,7 @@ export default {
 
 
     mounted() {
     mounted() {
 
 
-        this.DiId = this.$route.query.DiId
+        this.DiId = JSON.parse(this.$route.query.DiId);
         this.QueryRate();
         this.QueryRate();
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId