Forráskód Böngészése

优化修改提交

LaveyD 4 hónapja
szülő
commit
6ac08d7546

+ 2 - 2
src/api/ticketType.js

@@ -265,8 +265,8 @@ export function signInAfterPass (params) {
 }
 
 // 获取票种排序
-export function getTicketTypeSort () {
-  return http.post('/admin/ticketType/getSort')
+export function getTicketTypeSort (type) {
+  return http.post(`/admin/ticketType/getSort/${type}`)
 }
 
 // 保存票种排序

+ 6 - 3
src/pages/queryReport/checkStatistic.vue

@@ -174,7 +174,8 @@ export default {
         { prop: 'checkCount', label: '检票数量' },
         { prop: 'checkNum', label: '检票人数' },
         { prop: 'checkPrice', label: '检票金额' },
-        { prop: 'orderDateDay', label: '统计日期' }
+        { prop: 'orderDateDay', label: '统计日期' },
+        { prop: 'checkSettlementPrice', label: '结算金额' }
       ],
       selectKeys: [], // 默认选中
       tableIndex: 1,
@@ -244,7 +245,8 @@ export default {
           { prop: 'unitPrice', label: '单价' },
           { prop: 'checkCount', label: '检票数量' },
           { prop: 'checkNum', label: '检票人数' },
-          { prop: 'checkPrice', label: '检票金额' }
+          { prop: 'checkPrice', label: '检票金额' },
+          { prop: 'checkSettlementPrice', label: '结算金额' }
         ]
       } else {
         this.finalGroup = [
@@ -254,7 +256,8 @@ export default {
           { prop: 'unitPrice', label: '单价' },
           { prop: 'checkCount', label: '检票数量' },
           { prop: 'checkNum', label: '检票人数' },
-          { prop: 'checkPrice', label: '检票金额' }
+          { prop: 'checkPrice', label: '检票金额' },
+          { prop: 'checkSettlementPrice', label: '结算金额' }
         ]
       }
 

+ 0 - 1
src/pages/queryReport/wlkData/WlkDetail.vue

@@ -163,7 +163,6 @@ export default {
     return {
       selectedStat: null,
       form: {
-        id: 0,
         export: false,
         exportDetail: false,
         pageSize: 10,

+ 1 - 3
src/pages/queryReport/wlkData/index.vue

@@ -44,9 +44,7 @@ export default {
         this.$refs.stat.getList()
       }
       if (tab.name === 'detail') {
-        if (!this.$refs.detail.selectedStat) {
-          this.$message.warning('请先在统计页面选择一条数据')
-        }
+        this.$refs.detail.getList()
       }
     },
     handleSelectStat (row) {

+ 21 - 11
src/pages/sellManage/common/TicketList.vue

@@ -288,6 +288,14 @@ export default {
     category () {
       return this.$route.meta.category || 'ticket'
     },
+    sortType () {
+      const category = this.$route.meta.category || 'ticket'
+      const type = this.$route.meta.type
+      if (category === 'batch') return 'batch'
+      if (category === 'member') return 'member'
+      if (type === 'team') return 'team'
+      return 'single'
+    },
     userScenic () {
       return this.$store.state.app.account.managerScenicMatrix ? this.$store.state.app.account.managerScenicMatrix.map(i => i.id) : []
     },
@@ -345,13 +353,7 @@ export default {
   watch: {
     // 当数据变化时,默认不选择票种
     filterTableData (val) {
-      this.$nextTick(() => {
-        if (val && val[0]) {
-          this.changeTicket(val[0])
-        } else {
-          this.changeTicket(null)
-        }
-      })
+      // 默认不选中票种
     },
     selectedTag (val) {
       this.getTicketTypeList()
@@ -380,7 +382,11 @@ export default {
     // this.getTicketTagList()
     this.getTopIds()
     EventBus.$on('orderCreated', () => {
-      this.changeTicket(this.currentTicket)
+      if (this.category === 'batch') {
+        this.getBatchList()
+      } else {
+        this.changeTicket(this.currentTicket)
+      }
     })
   },
   methods: {
@@ -622,7 +628,7 @@ export default {
       this.sortDialogVisible = true
       this.sortLoading = true
       try {
-        const sortRes = await getTicketTypeSort()
+        const sortRes = await getTicketTypeSort(this.sortType)
         const sortData = sortRes?.data || []
         // 用排序接口的顺序排列 tableData
         const sortMap = new Map(sortData.map(s => [s.ticketTypeId, s.sort]))
@@ -647,16 +653,20 @@ export default {
     },
     // 保存票种排序
     async saveSortList () {
-      const data = this.sortList.map((item, index) => ({
+      const sorts = this.sortList.map((item, index) => ({
         ticketTypeId: item.ticketTypeId,
         sort: index + 1
       }))
+      const data = {
+        type: this.sortType,
+        sorts
+      }
       try {
         await saveTicketTypeSort(data)
         this.$message.success('排序保存成功')
         this.sortDialogVisible = false
         // 按新排序更新 tableData
-        const sortMap = new Map(data.map(s => [s.ticketTypeId, s.sort]))
+        const sortMap = new Map(sorts.map(s => [s.ticketTypeId, s.sort]))
         this.tableData.sort((a, b) => {
           return (sortMap.get(a.id) || 9999) - (sortMap.get(b.id) || 9999)
         })

+ 1 - 0
src/pages/sellManage/common/confirmMixin.js

@@ -315,6 +315,7 @@ export default {
           EventBus.$emit('orderCreated', order)
         }).catch(e => {
           this.submitDisable = false
+          EventBus.$emit('orderCreated')
         })
       }
     },

+ 33 - 9
src/pages/sellManage/retail/FormInfo.vue

@@ -315,8 +315,32 @@ export default {
       pricePlan: [],
       currentPrice: 0,
       currentPlan: null,
-      retailLockCheckStyle: this.$localStore.get('retailLockCheckStyle') || false,
-      identifyLockCheckStyle: this.$localStore.get('identifyLockCheckStyle') || false,
+      saleType: (() => {
+        const category = this.$route.meta.category || 'ticket'
+        const type = this.$route.meta.type
+        if (category === 'batch') return 'batch'
+        if (category === 'member') return 'member'
+        if (type === 'team') return 'team'
+        return 'single'
+      })(),
+      retailLockCheckStyle: (() => {
+        const category = this.$route.meta.category || 'ticket'
+        const type = this.$route.meta.type
+        let prefix = 'single'
+        if (category === 'batch') prefix = 'batch'
+        else if (category === 'member') prefix = 'member'
+        else if (type === 'team') prefix = 'team'
+        return this.$localStore.get(`${prefix}_lockCheckStyle`) || false
+      })(),
+      identifyLockCheckStyle: (() => {
+        const category = this.$route.meta.category || 'ticket'
+        const type = this.$route.meta.type
+        let prefix = 'single'
+        if (category === 'batch') prefix = 'batch'
+        else if (category === 'member') prefix = 'member'
+        else if (type === 'team') prefix = 'team'
+        return this.$localStore.get(`${prefix}_identifyLockCheckStyle`) || false
+      })(),
 
       touristList: [{
         batchConfigId: randomString(),
@@ -392,7 +416,7 @@ export default {
       this.$refs.form.resetFields()
 
       if (this.retailLockCheckStyle) {
-        this.form.checkWay = this.$localStore.get('retailCheckWay') || (this.isTeam ? 2 : 1)
+        this.form.checkWay = this.$localStore.get(`${this.saleType}_checkWay`) || (this.isTeam ? 2 : 1)
       } else {
         this.form.checkWay = this.isTeam ? 2 : 1
       }
@@ -600,8 +624,8 @@ export default {
     defaultPapersType () {
       if (process.env.VUE_APP_PROJECT === 'zql') {
         return 0
-      } else if (this.$localStore.get('retail_identify')) {
-        return this.$localStore.get('retail_identify')
+      } else if (this.$localStore.get(`${this.saleType}_identify`)) {
+        return this.$localStore.get(`${this.saleType}_identify`)
       } else {
         return ''
       }
@@ -680,15 +704,15 @@ export default {
     },
     retailLockCheckStyle (val) {
       if (val) {
-        this.$localStore.set('retailCheckWay', this.form.checkWay)
+        this.$localStore.set(`${this.saleType}_checkWay`, this.form.checkWay)
       }
-      this.$localStore.set('retailLockCheckStyle', val)
+      this.$localStore.set(`${this.saleType}_lockCheckStyle`, val)
     },
     identifyLockCheckStyle (val) {
       if (val) {
-        this.$localStore.set('retail_identify', this.form.buyerIdentifyType)
+        this.$localStore.set(`${this.saleType}_identify`, this.form.buyerIdentifyType)
       }
-      this.$localStore.set('identifyLockCheckStyle', val)
+      this.$localStore.set(`${this.saleType}_identifyLockCheckStyle`, val)
     },
     'form.playDateBegin' (val) {
       if (val) {

+ 3 - 7
src/store/modules/permission.js

@@ -60,14 +60,10 @@ const permission = {
   actions: {
     GenerateRoutes ({ commit }, data) {
       return new Promise(resolve => {
-        const { roleList, resourceList, admin } = data
-        const { loginName } = admin || {}
+        const { roleList, resourceList } = data
         let accessedRouters = asyncRouterMap
-        if (loginName === 'admin') {
-          accessedRouters = asyncRouterMap
-        } else {
-          accessedRouters = filterAsyncRouter(asyncRouterMap, roleList, resourceList)
-        }
+        accessedRouters = filterAsyncRouter(asyncRouterMap, roleList, resourceList)
+
         commit('SET_ROUTERS', accessedRouters)
         resolve()
       })