소스 검색

bug修复

xxm 6 년 전
부모
커밋
55e4341538
4개의 변경된 파일81개의 추가작업 그리고 46개의 파일을 삭제
  1. 5 1
      components/menu/data.js
  2. 18 21
      pages/main/index/artificial_orders.vue
  3. 39 6
      pages/main/index/orders.vue
  4. 19 18
      pages/main/index/orders_detail.vue

+ 5 - 1
components/menu/data.js

@@ -44,7 +44,11 @@ export default [
 			},
 			{
 				title: '财务详情',
-
+				path: baseUrl + 'bills',
+				hidden: true
+			},
+			{
+				title: '财务详情',
 				path: baseUrl + 'orders_detail',
 				hidden: true
 			}

+ 18 - 21
pages/main/index/artificial_orders.vue

@@ -7,7 +7,7 @@
       <div class="clear">
         <div class="floatr">
           <el-button type="primary" @click="createOrder()">新增订单</el-button>
-          <el-button>导出报表</el-button>
+          <el-button @click="downFinanceList">导出报表</el-button>
         </div>
       </div>
     </div>
@@ -21,7 +21,7 @@
             <!-- @click="clickDev(scope.row.uid)"  -->
             <span class="lblue point">
               <nuxt-link
-                :to="{path:'/main/orders_detail?id='+scope.row.id}"
+                :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
               >{{scope.row.product_title}}</nuxt-link>
             </span>
           </template>
@@ -35,7 +35,7 @@
               v-if="parseInt(scope.row.real_amount)>=0"
               class="green"
             >+{{(scope.row.real_amount/100).toFixed(2)}}</span>
-            <span v-else class="orange">-{{(scope.row.real_amount/100).toFixed(2)}}</span>
+            <span v-else class="orange">{{(scope.row.real_amount/100).toFixed(2)}}</span>
           </template>
         </el-table-column>
         <el-table-column label="收支类型">
@@ -234,7 +234,7 @@ export default {
     }
   },
   mounted() {
-    this.getTableData();
+    // this.getTableData();
     this.getFinanceList();
   },
   methods: {
@@ -287,23 +287,7 @@ export default {
     },
 
     // 获取列表数据
-    async getTableData() {
-      this.tableData = [];
-      let url = "/api/admin/job/get_all_periods";
-      let body = { page: this.currentPage, page_size: this.currentPageSize };
-      if (this.status) body.j_status = this.status;
-      if (this.period) body.p_status = this.period;
-      if (this.checkUser) body.chk_user = this.checkUser;
-      if (this.jobID) body.job_id = this.jobID;
-      const res = await this.$post(url, body);
-      const data = res.data;
-      this.tableData = this.formatTableData(data.list);
-      this.totalData = data;
-      // // console.log(this.tableData)
-      // this.totalCount = Number(data.total);
-      // this.totalPage = data.totalPage;
-      this.localData.env = data.current_env;
-    },
+
     async getFinanceList() {
       let body = {
         page: this.currentPage,
@@ -315,6 +299,19 @@ export default {
       this.finaceList = data.orders;
       this.totalCount = Number(data.count);
     },
+    async downFinanceList() {
+      let body = {
+        page: this.currentPage,
+        page_size: this.currentPageSize,
+        artificial_mark: 1
+      };
+      // const res = await this.$get("/api/admin/order/get_orders", body);
+      // http://local-rooter.proginn.com:20201/api/admin/order/get_orders?page=1&page_size=20&artificial_mark=1
+      var url =
+        window.location.host + "/api/admin/order/export?" + "artificial_mark=1";
+      console.log(url);
+      window.location.href = "http://" + url;
+    },
     createOrder() {
       this.$router.push({
         path: "artificial_order/",

+ 39 - 6
pages/main/index/orders.vue

@@ -161,9 +161,10 @@
         <el-table-column label="订单名称">
           <template slot-scope="scope">
             <!-- @click="clickDev(scope.row.uid)"  -->
+
             <span class="lblue point">
               <nuxt-link
-                :to="{path:'/main/orders_detail?id='+scope.row.id}"
+                :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
               >{{scope.row.product_title}}</nuxt-link>
             </span>
           </template>
@@ -177,7 +178,7 @@
               v-if="parseInt(scope.row.real_amount)>=0"
               class="green"
             >+{{(scope.row.real_amount/100).toFixed(2)}}</span>
-            <span v-else class="orange">-{{(scope.row.real_amount/100).toFixed(2)}}</span>
+            <span v-else class="orange">{{(scope.row.real_amount/100).toFixed(2)}}</span>
           </template>
         </el-table-column>
         <el-table-column prop="channel_name" label="支付方式"></el-table-column>
@@ -501,6 +502,9 @@ export default {
     this.getFinanceList();
   },
   methods: {
+    handleOrderClick(id) {
+      this.$router.push(`/main/bills/${id}`);
+    },
     formatDate(time) {
       var now = new Date(time * 1000);
       var year = now.getFullYear();
@@ -714,9 +718,9 @@ export default {
     },
     async downFinanceList() {
       var checkedTF = 0;
-      console.log(this.checked);
+      // console.log(this.checked);
       if (this.checked) {
-        console.log(333);
+        // console.log(333);
         checkedTF = 1;
       }
       var arr1 = [];
@@ -766,9 +770,38 @@ export default {
         page: this.currentPage,
         page_size: this.currentPageSize
       };
-      const res = await this.$post("/api/admin/order/export", body);
+      // http://local-rooter.proginn.com:20201/api/admin/order/export?product_type=&order_type=&channel=&start_time=&end_time=&date_type=2&status=&artificial_mark=0&order=&user=&product_id=&page=1&page_size=20
+      // const res = await this.$get("/api/admin/order/export", body);
+      var url =
+        window.location.host +
+        "/api/admin/order/export?product_type=" +
+        arr1 +
+        "&order_type=" +
+        this.orderTypes +
+        "&channel=" +
+        arr2 +
+        "&start_time=" +
+        starTime +
+        "&end_time=" +
+        endTime +
+        "&date_type=" +
+        time +
+        "&status=" +
+        this.orderState +
+        "&artificial_mark=" +
+        checkedTF +
+        "&order=" +
+        this.searchId +
+        "&user=" +
+        this.checkUser +
+        "&product_id=" +
+        this.productId;
+      console.log(url);
+      window.location.href = "http://" + url;
     },
     async getFinanceList() {
+      // console.log("timeRange:", this.timeRange);
+      // return false;
       var checkedTF = 0;
       console.log(this.checked);
       if (this.checked) {
@@ -796,7 +829,7 @@ export default {
       }
       var starTime = "";
       var endTime = "";
-      if (this.timeRange.length) {
+      if (this.timeRange) {
         starTime = this.formatDate(this.timeRange[0] / 1000);
         endTime = this.formatDate(this.timeRange[1] / 1000);
       } else {

+ 19 - 18
pages/main/index/orders_detail.vue

@@ -22,12 +22,12 @@
           <span
             v-else
             class="detail-pays orange font20"
-          >{{(inforDetail.real_amount/100).toFixed(2)}}</span>
+          >{{(inforDetail.real_amount/100).toFixed(2)}}</span>
         </p>
         <p>
           <span class="pays-title">原始金额:</span>
-          <span v-if="inforDetail.amount>=0" class>+¥{{inforDetail.amount}}</span>
-          <span v-else class>{{inforDetail.amount}}</span>
+          <span v-if="inforDetail.amount>=0" class>+{{inforDetail.amount}}</span>
+          <span v-else class>{{inforDetail.amount}}</span>
         </p>
         <p>
           <span class="pays-title">支付方式:</span>
@@ -69,8 +69,8 @@
         </p>
       </div>
       <span class="lines"></span>
-      <h3 style="padding:20px 0 10px 0">整包协作开发者认证</h3>
-      <div class="pays-others" style="padding-bottom:40px">
+      <!-- <h3 style="padding:20px 0 10px 0">整包协作开发者认证</h3> -->
+      <div class="pays-others" style="padding:10px 0 40px 0">
         <p>
           <span>订单类型:</span>
           <span>{{inforDetail.product_type_name}}</span>
@@ -120,17 +120,11 @@
         </p>
       </div>
     </div>
-    <div class="person-img floatr">
+    <a :href="inforDetail.user_url" target="blank" class="person-img floatr">
       <img :src="iconUrl" alt />
       <p class="textc">{{nikeName}}</p>
-    </div>
-    <el-dialog title="数据备注" :visible.sync="centerDialogVisible" width="50%" center>
-      <p>接口的咖啡饿的发呆发呆发呆发呆发呆发呆地方地方机看对方空间对方看当看到反馈的风景看对方空间发的快点放假放的看对方空间对方</p>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click=" centerDialogVisible=false">取 消</el-button>
-        <el-button type="primary" @click="centerDialogVisible=false">确 定</el-button>
-      </span>
-    </el-dialog>
+    </a>
+
     <!-- </section> -->
   </div>
 </template>
@@ -172,6 +166,11 @@ export default {
     // this.getEnum();
   },
   methods: {
+    jumpUser() {
+      window.location.href(
+        "https://dev.test.proginn.com/rooter/user/" + this.ids
+      );
+    },
     getUrlParam(name) {
       var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
       var r = window.location.search.substr(1).match(reg); //匹配目标参数
@@ -206,7 +205,7 @@ export default {
     },
     async getFinanceList() {
       let body = {
-        order_id: this.ids
+        order_no: this.ids
       };
       const res = await this.$post("/api/admin/order/get", body);
       var data = res.data;
@@ -217,9 +216,11 @@ export default {
     }
   },
   created() {
-    // this.ids = this.getUrlParam("id");
-    console.log(this.$route.query.id);
-    this.ids = this.$route.query.id;
+    this.ids = this.getUrlParam("id");
+    // var url = window.location.href;
+    // var index = url.lastIndexOf("/");
+    // var str = url.substring(index + 1, url.length);
+    // this.ids = str;
   }
 };
 </script>