Переглянути джерело

锁定问题及团体加订单

LaveyD 1 місяць тому
батько
коміт
98893ad41b
1 змінених файлів з 11 додано та 3 видалено
  1. 11 3
      src/pages/sellManage/retail/FormInfo.vue

+ 11 - 3
src/pages/sellManage/retail/FormInfo.vue

@@ -319,14 +319,14 @@ export default {
         if (category === 'batch') prefix = 'batch'
         else if (category === 'member') prefix = 'member'
         else if (type === 'team') prefix = 'team'
-        return this.$localStore.get(`${prefix}_lockCheckStyle`) || false
+        return !!this.$localStore.get(`${prefix}_lockCheckStyle`) || false
       })(),
       identifyLockCheckStyle: (() => {
         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
+        return !!this.$localStore.get(`${prefix}_identifyLockCheckStyle`) || false
       })(),
       saleType: (() => {
         if (category === 'batch') return 'batch'
@@ -382,6 +382,8 @@ export default {
     if (this.isTeam) {
       getTeamList({ pageSize: -1, pageNum: 1 }).then(res => {
         this.teamList = res.data.records || []
+
+        this.form.teamId = this.teamList.length > 0 ? this.teamList[0].id : ''
       })
       getGuideList({ pageSize: -1, pageNum: 1 }).then(res => {
         this.guideList = res.data.records || []
@@ -630,13 +632,19 @@ export default {
       this.currentTicket = ticket
 
       setTimeout(() => {
-        if (this.category === 'batch' || this.isTeam) return
+        if (this.category === 'batch') return
         // if (!this.ticketAutoAddMap[this.currentTicket.id]) {
         //   this.ticketAutoAddMap[this.currentTicket.id] = true
         // }
         this.addToOrder()
       }, 500)
     })
+
+    if (this.retailLockCheckStyle) {
+      this.form.checkWay = this.$localStore.get(`${this.saleType}_checkWay`) || (this.isTeam ? 2 : 1)
+    } else {
+      this.form.checkWay = this.isTeam ? 2 : 1
+    }
   },
   beforeDestroy () {
     EventBus.$off('ticketChanged')