浏览代码

地接费用明细添加

yuanrf 10 月之前
父节点
当前提交
f96af1d53f
共有 1 个文件被更改,包括 24 次插入0 次删除
  1. 24 0
      src/components/OP/CarTouristGuideGroundId.vue

+ 24 - 0
src/components/OP/CarTouristGuideGroundId.vue

@@ -19,6 +19,7 @@
                         </div>
                     </div>
                     <div style="width: 20%;text-align: right;">
+                        <el-button type="primary" style="" @click="exportPriceDetail">导出费用明细</el-button>
                         <el-button type="primary" style="" @click="addIf">新增</el-button>
                     </div>
                 </div>
@@ -311,6 +312,29 @@ export default {
                 });
             });
         },
+        exportPriceDetail() {
+            var url = "/api/Groups/ExportLocalGuidePriceDetail"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    "diid": this.DiId,
+                }
+            }).then(function (res) {
+                console.log(res)
+                if (res.data.code == 200) {
+                    window.open(res.data.data.url);
+                } else {
+                    that.$message.error('导出失败!' + res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        }
     },
     mounted() {
         this.DiId = this.$route.query.diId