Przeglądaj źródła

05221157lhj成本

liuhj 11 miesięcy temu
rodzic
commit
5be684708d
1 zmienionych plików z 45 dodań i 10 usunięć
  1. 45 10
      src/components/Finance/Cost.vue

+ 45 - 10
src/components/Finance/Cost.vue

@@ -1,6 +1,17 @@
 <template>
     <div class="cost-all" v-loading.fullscreen.lock="costloading">
         <div class="cost-box">
+            <el-dialog width="500" title="机票行程数据" :visible.sync="dialogTableVisible">
+                <el-table border :data="gridData">
+                  <el-table-column property="day" label="DAY" width="150"></el-table-column>
+                  <el-table-column property="date" label="DATE" width="200"></el-table-column>
+                  <el-table-column property="itin" label="ITIN"></el-table-column>
+                </el-table>
+                <div class="btn-dialog-cost">
+                    <el-button @click="confirmationTP" size="small" type="primary">行程确认</el-button>
+                    <el-button @click="dialogTableVisible=false" size="small">取消</el-button>
+                </div>
+              </el-dialog>
             <div class="cost-haed">
                 <div class="ser-btn">
                     <div class="ser-btn-li Cost_topFlex" style="display: flex;">
@@ -2653,6 +2664,8 @@ export default {
             acconarrs:[],
             isShare:0,
             blackCodeIsTrue: false,
+            dialogTableVisible:false,
+            gridData:[],
             //监听变量
             count:0,
             x:0,
@@ -5485,6 +5498,7 @@ export default {
             }
         },
         importBlackCode() {
+            this.gridData=[];
             var url = "/api/Groups/CraeteGroupCostTravel"
             var that = this
             this.$axios({
@@ -5494,27 +5508,44 @@ export default {
                     Authorization: 'Bearer ' + that.token
                 },
                 data: {
-                    "diid": this.diid,
+                    "diid": that.diid,
                 }
             }).then(function (resp) {
                 if (resp.data.code == 200) {
                     console.log('CraeteGroupCostTravelResponse', resp.data.data);
+                    that.gridData=resp.data.data.groupCost;
                     that.blackCodeIsTrue = resp.data.data.blackCodeIsTrue;
-                    that.tableData = resp.data.data.groupCost;
-                    for (var i = 0; i < that.tableData.length; i++) {
-                        for (var prop in that.tableData[i]) {
-                            console.log(that.tableData[i][prop]);
-                            if (that.tableData[i][prop] == 0) {
-                                that.tableData[i][prop] = ''
-                            }
-                        }
+                    if (that.blackCodeIsTrue) {
+                        that.dialogTableVisible=true;
+                    }else{
+                        that.$message.error("机票数据未录入!");
                     }
+                    // that.tableData = resp.data.data.groupCost;
+                    // for (var i = 0; i < that.tableData.length; i++) {
+                    //     for (var prop in that.tableData[i]) {
+                    //         if (that.tableData[i][prop] == 0) {
+                    //             that.tableData[i][prop] = ''
+                    //         }
+                    //     }
+                    // }
                 } else {
                     that.$message.error("黑屏代码有误!" + resp.data.msg);
                 }
             })
 
         },
+        //机票行程确认赋值
+        confirmationTP(){
+            this.tableData = this.gridData;
+            for (var i = 0; i < this.tableData.length; i++) {
+                for (var prop in this.tableData[i]) {
+                    if (this.tableData[i][prop] == 0) {
+                        this.tableData[i][prop] = ''
+                    }
+                }
+            }
+            this.dialogTableVisible=false;
+        },
         //监听鼠标
         MonitorMouse(){
             document.onmousemove = (event) => {
@@ -5548,7 +5579,7 @@ export default {
         //执行函数
         cookieTimeout(){
             this.count++;
-            console.log(this.count);
+            // console.log(this.count);
         }
 
     },
@@ -5917,4 +5948,8 @@ export default {
 .accon-ul:last-child {
     bottom: 15px;
 }
+.btn-dialog-cost{
+    margin-top: 20px;
+    text-align: right;
+}
 </style>