Pārlūkot izejas kodu

11/12 16:31

111
mo 4 gadi atpakaļ
vecāks
revīzija
1e2b909281

+ 18 - 0
src/api/orderManager.js

@@ -215,3 +215,21 @@ export function orderDelete (data) {
     data: qs.stringify(data)
   })
 }
+
+// 审核列表查询
+export function getRouteOrderList (data) {
+  return request({
+    url: api + '/routeOrder/queryPage',
+    method: 'get',
+    params: data
+  })
+}
+
+// 审核详情
+export function getRouteOrderInfo (data) {
+  return request({
+    url: api + '/routeOrder/query',
+    method: 'get',
+    params: data
+  })
+}

+ 6 - 0
src/constant/index.js

@@ -116,4 +116,10 @@ export const auditPaymentType = {
 export const orderServerType = {
   SERVICE: '服务收入',
   SELL: '销售收入'
+}
+
+export const orderAuditType = {
+  ING: '审核中',
+  REJECT: '审核驳回',
+  PASS: '审核通过'
 }

+ 2 - 2
src/utils/searchArray.js

@@ -1,5 +1,5 @@
 // 搜索用的下拉数据列表
-import { payOrderType, auditType, auditPaymentType, orderServerType } from '../constant'
+import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType } from '../constant'
 // 课程类型
 export const courseType = [
   { label: "单技课", value: "SINGLE" },
@@ -213,7 +213,7 @@ export const payOrderTypeList = getValueForKey(payOrderType)
 export const auditTypeList = getValueForKey(auditType)
 export const auditPaymentTypeList = getValueForKey(auditPaymentType)
 export const orderServerList = getValueForKey(orderServerType)
-
+export const orderAuditTypeList = getValueForKey(orderAuditType)
 function getValueForKey (obj) {
   let arr = []
   for (let k in obj) {

+ 8 - 2
src/utils/vueFilter.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import dayjs from 'dayjs'
 import numeral from 'numeral'
-import { feeProject, feeType, saleType, payStatus, payOrderType, paymentPatternType, payUserType, userPaymentType, courseType, auditType, auditPaymentType, orderServerType } from '../constant'
+import { feeProject, feeType, saleType, payStatus, payOrderType, paymentPatternType, payUserType, userPaymentType, courseType, auditType, auditPaymentType, orderServerType, orderAuditType } from '../constant'
 
 // 合并数组
 Vue.filter('joinArray', (value, type) => {
@@ -684,7 +684,13 @@ Vue.filter('auditPaymentType', value => {
   return auditPaymentType[value]
 })
 
-// 销售收入和服务收入 orderServerType
+// 销售收入和服务收入 
 Vue.filter('orderServer', value => {
   return orderServerType[value]
 })
+
+// 订单审核状态 orderAuditType
+Vue.filter('orderAuditType', value => {
+  orderAuditType[''] = '审核通过'
+  return orderAuditType[value]
+})

+ 61 - 22
src/views/businessManager/orderManager/orderAudit/index.vue

@@ -43,7 +43,7 @@
                      filterable
                      clearable
                      placeholder="请选择审核状态">
-            <el-option v-for="(item,index) in orderServerList"
+            <el-option v-for="(item,index) in orderAuditTypeList"
                        :key="index"
                        :label="item.label"
                        :value="item.value"></el-option>
@@ -55,36 +55,59 @@
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                   :data="tableList">
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="merNo"
                            label="交易流水号"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="organ.name"
                            label="分部"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="school.name"
                            label="学校名称"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="serviceAmount"
                            label="服务收入">
           </el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="saleAmount"
                            label="销售收入"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
-                           label="备注"></el-table-column>
+                           prop="memo"
+                           label="备注">
+            <template slot-scope="scope">
+              <Tooltip :content="scope.row.memo?scope.row.memo:''" />
+            </template>
+          </el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="operator.username"
                            label="申请人"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
-                           label="状态"></el-table-column>
+                           prop="auditStatus"
+                           label="状态">
+            <template slot-scope="scope">
+              <div>
+                {{scope.row.auditStatus?(scope.row.auditStatus| orderAuditType):'审核通过'}}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
-                           label="交易日期"></el-table-column>
+                           prop="payTime"
+                           label="交易日期">
+            <template slot-scope="scope">
+              <div>
+                {{scope.row.payTime | dateForMinFormat}}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
-                           label="申请时间"></el-table-column>
+                           prop="createTime"
+                           label="申请时间">
+
+            <template slot-scope="scope">
+              <div>
+                {{scope.row.createTime | dateForMinFormat}}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center"
                            prop="studentId"
                            label="操作">
@@ -107,7 +130,8 @@
     <el-dialog title="审核详情"
                :visible.sync="orderVisible"
                width="600px">
-      <orderAuditDetail />
+      <orderAuditDetail :orderId='activceId'
+                        v-if="orderVisible" />
     </el-dialog>
   </div>
 </template>
@@ -118,10 +142,13 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getEmployeeOrgan } from "@/api/buildTeam";
-import { orderServerList } from "@/utils/searchArray"
+import { orderServerList, orderAuditTypeList } from "@/utils/searchArray"
 import orderAuditDetail from './orderAuditDetail'
+import { getRouteOrderList } from '@/api/orderManager'
+import { formatData } from '@/utils/utils';
+import Tooltip from '@/components/Tooltip/index'
 export default {
-  components: { pagination, orderAuditDetail },
+  components: { pagination, orderAuditDetail, Tooltip },
   data () {
     return {
       searchForm: {
@@ -131,6 +158,7 @@ export default {
       tableList: [{}],
       organList: [],
       orderServerList,
+      orderAuditTypeList,
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -138,7 +166,8 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
       },
-      orderVisible: false
+      orderVisible: false,
+      activceId: null
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -153,17 +182,27 @@ export default {
     // 获取分部
 
     this.init();
-
-
   },
   // activated () {
   //   this.init();
   // },
   methods: {
     init () {
+      this.getList()
+    },
+    getList () {
+      let params = this.searchForm
+      params.rows = this.rules.limit
+      params.page = this.rules.page
+      getRouteOrderList(params).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows
+          this.rules.total = res.data.total
+        }
+      })
     },
-    getList () { },
     lookDetail (row) {
+      this.activceId = row.id
       this.orderVisible = true
     }
   }

+ 13 - 1
src/views/businessManager/orderManager/orderAudit/orderAuditDetail.vue

@@ -168,7 +168,9 @@
   </div>
 </template>
 <script>
+import { getRouteOrderInfo } from '@/api/orderManager'
 export default {
+  props: ['orderId'],
   data () {
     return {
       formLabelWidth: "100px",
@@ -192,7 +194,17 @@ export default {
       },
       isAdd: false
     }
-  }
+  },
+  mounted () {
+    if (this.orderId) {
+      getRouteOrderInfo({ id: this.orderId }).then(res => {
+        if (res.code == 200) {
+
+        }
+      })
+    }
+
+  },
 }
 </script>
 <style lang="scss" scoped>

+ 5 - 4
vue.config.js

@@ -20,9 +20,9 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://dyme.utools.club' //test环境
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.248:8000' //邹璇
-// let target = 'http://192.168.3.8:8000' //勇哥
+let target = 'http://192.168.3.204:8000' //勇哥
 // let target = 'http://dev.dayaedu.com' // 测试服
-let target = 'http://192.168.3.196' // 乔
+// let target = 'http://192.168.3.196' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**
@@ -60,7 +60,7 @@ module.exports = {
       // http://47.99.212.176:8000
       // http://192.168.3.28:8000
       '/api-auth': {
-        target: target,
+        target: 'http://dev.dayaedu.com',
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''
@@ -97,7 +97,8 @@ module.exports = {
       '/jiari': {
         target: 'http://tool.bitefu.net',
         changeOrigin: true,
-      }
+      },
+
     },
   },
   configureWebpack: {