MONSTER-ygh 1 سال پیش
والد
کامیت
0bece903f5

+ 11 - 0
src/api/windowTicketSales/ticketingSales.js

@@ -105,4 +105,15 @@ export const orderInfoCancel = (query) => {
     method: 'post',
     data: query
   })
+}
+
+// 身份证校验
+
+
+export const factorAuth = (query) => {
+  return request({
+    url: '/thirdapi/identity/factorAuth',
+    method: 'post',
+    data: query
+  })
 }

+ 3 - 1
src/views/order/orderMr/dialog/details.vue

@@ -11,7 +11,7 @@
   <el-dialog
     title="订单详情"
     :visible.sync="open"
-    width="800px"
+    width="80%"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
@@ -91,6 +91,8 @@
             </el-table-column>
             <el-table-column label="核销时间" align="center" prop="qrcodeUseTime" />
             <el-table-column label="座位信息" align="center" prop="seatName" />
+            <el-table-column label="人员类别" align="center" prop="seatName1" />
+            <el-table-column label="备注" align="center" prop="seatName12" />
           </el-table>
         </el-col>
       </el-row>

+ 9 - 11
src/views/venue/performanceHallMr/dialog/seatTemplateEdit.vue

@@ -138,13 +138,13 @@ export default {
         this.$set(this.seatMap, 'col', obj.cols);
         this.$set(this, 'seatMapRow', obj.rows);
         this.$set(this, 'seatMapCol', obj.cols);
-
+        let tableHeader = []
         this.getSelectByIdApi(obj)
       }else{ // 新增模式
         this.seatType = true;
         this.title = "座位模板";
         this.$nextTick(() => {
-          this.$refs["form"].clearValidate();
+          //this.$refs["form"].clearValidate();
         });
       }
     },
@@ -161,7 +161,7 @@ export default {
             this.$set(this.colSeatMap, item.sortId + '_', item);
           })
           this.seatType = true;
-          this.$refs.seatManagementTable.initData(dataList,'edit')
+          this.$refs.seatManagementTable.initData(row,dataList,'edit')
         })
       });
     },
@@ -173,7 +173,9 @@ export default {
           }
         );
     },
+    /**  保存  */
     saveSeat(list,style){
+      console.log("list,style====",list,style)
       this.submitForm(list,style)
     },
     submitFormCopy(){
@@ -184,11 +186,9 @@ export default {
      * @date 2023-11-22
      * @returns {any}
      */
-    submitForm(list,style) {
+    async submitForm(list,style) {
       let that = this;
-      this.$refs["form"].validate(async (valid) => {
-        if (valid) {
-          let postList = []
+      let postList = []
           for (const codeKey in this.colSeatMap) {
             postList.push(this.colSeatMap[codeKey])
           }
@@ -199,7 +199,7 @@ export default {
               id: this.auditoriumId, 
               rows: this.seatMap.row, 
               cols: this.seatMap.col,
-              style: style
+              styleCss: style
             });
             if (code === 200) {
               let postList = []
@@ -219,8 +219,6 @@ export default {
           } finally {
             this.loading = false;
           }
-        }
-      });
     },
     /**
      * 重置
@@ -228,7 +226,7 @@ export default {
      * @returns {any}
      */
     reset() {
-      this.$refs["form"].resetFields();
+      //this.$refs["form"].resetFields();
       this.form.id = undefined;
     },
     /**

+ 1 - 1
src/views/venue/performanceHallMr/index.vue

@@ -131,7 +131,7 @@
 
 import { merchantPageList, deleteById } from '@/api/performanceHallMr/performanceHallMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
-//import seatTemplateEdit from "./dialog/seatTemplateEdit";
+// import seatTemplateEdit from "./dialog/seatTemplateEdit";
 import seatTemplateEdit from "./dialog/seatTemplateEditOld";
 import programmeAddAndEdit from "./dialog/programmeAddAndEdit";
 

+ 36 - 18
src/views/venue/performanceHallMr/model/seatManagementTable.vue

@@ -58,9 +58,9 @@
                                 <div 
                                 class="row-item"
                                 v-for="(item1,index1) in scope.row[item.key]" 
-                                :key="item1.style.id"
+                                :key="item1.styleCss.id"
                                 dragSelectType="div"
-                                :dragSelectId="item1.style.id"
+                                :dragSelectId="item1.styleCss.id"
                                 :style="{backgroundColor: item1.delFlag !=0?'#ccc':item1.color}"
                                 >
                                     <i style="line-height: 15px;">{{ item1.columnNo }}</i>
@@ -270,7 +270,7 @@
                             align="center"
                             label="区域">
                                 <template slot-scope="scope">
-                                    <span>{{ scope.row.style && scope.row.style.keyLabel ? scope.row.style.keyLabel : '暂未分区' }}</span>
+                                    <span>{{ scope.row.styleCss && scope.row.styleCss.keyLabel ? scope.row.styleCss.keyLabel : '暂未分区' }}</span>
                                 </template>
                             </el-table-column>
                         </el-table>
@@ -561,20 +561,30 @@ export default {
         },
 
         /**  初始化数据  */
-        initData(list,type){
+        initData(row,list,type){
+            if(row.styleCss) {
+                this.tableHeader =  JSON.parse(row.styleCss).tableHeader
+            }
+            this.rowAll = row.rows
+            //console.log("tableHeader,list===",tableHeader,list)
+            //this.tableHeader =  JSON.parse(JSON.stringify(tableHeader))
             this.tableDataAll = JSON.parse(JSON.stringify(list))
-            //this.batchTableList = JSON.parse(JSON.stringify(list))
-            let listHeader = []
-            let listTabel = []
+            this.createTableList()
+            this.dataProcess() // 数据整理
         },
         dataProcess(){
             let list = JSON.parse(JSON.stringify(this.tableDataAll))
             let list1 = JSON.parse(JSON.stringify(this.tableData))
             list.forEach((item,index)=>{
-                if(item.style && item.style.key) {
-                    list1[item.rowNo-1][item.style.key].push(item)
+                if(item.styleCss && item.styleCss.key && list1[item.rowNo-1][item.styleCss.key]) {
+                    
+                    list1[item.rowNo-1][item.styleCss.key].push({
+                        ...item,
+                        styleCss: item.styleCss ? typeof item.styleCss == 'string' ? JSON.parse(item.styleCss) : item.styleCss : {}
+                    })
                 }
             })
+            console.log("this.tableData===",this.tableData)
             this.tableData = JSON.parse(JSON.stringify(list1))
             this.countRegionW()
         },
@@ -614,7 +624,7 @@ export default {
         delTableHeader(params,index){
             let flog = false
             this.tableDataAll.forEach((item,index)=>{
-                if(item.style && item.style.key == params.key) {
+                if(item.styleCss && item.styleCss.key == params.key) {
                     flog = true
                 }
             })
@@ -771,7 +781,7 @@ export default {
                             id: this.currentRow+"_"+this.currentProperty+"_"+i,
                             name: this.ruleForm1.name.replace('${row}',this.currentRow).replace('${col}',i),
                             status: this.ruleForm1.seatTypeId,
-                            style: {
+                            styleCss: {
                                 key: this.currentProperty, // 所属区域的key
                                 keyLabel: this.currentLabel, // 所属区域的名称
                                 sort: 0,
@@ -799,7 +809,7 @@ export default {
                         rowNo: this.currentRow,
                         sort: index+1,
 
-                        style: {
+                        styleCss: {
                             key: this.currentProperty, // 所属区域的key
                             keyLabel: this.currentLabel, // 所属区域的名称
                             sort: 0,
@@ -922,8 +932,8 @@ export default {
                     if(this.multipleSelection[i].id == this.tableDataAll[j].id){
                         listTabel[j] = {
                         ...this.tableDataAll[j],
-                            style: {
-                                ...this.tableDataAll[j].style,
+                            styleCss: {
+                                ...this.tableDataAll[j].styleCss,
                                 key: this.formAll.status, // 所属区域的key
                                 keyLabel: currentLabel, // 所属区域的名称
                             }
@@ -953,7 +963,7 @@ export default {
                 let list = []
                 this.tableDataAll.forEach((item,index)=>{
                     if(this.queryParams.menuName&&this.queryParams.status) {
-                        if(item.rowNo==this.queryParams.menuName && item.style.key == this.queryParams.status) {
+                        if(item.rowNo==this.queryParams.menuName && item.styleCss.key == this.queryParams.status) {
                             list.push(item)
                         }
                     }else if(this.queryParams.menuName){
@@ -961,7 +971,7 @@ export default {
                             list.push(item)
                         }
                     }else {
-                        if(item.style.key == this.queryParams.status) {
+                        if(item.styleCss.key == this.queryParams.status) {
                             list.push(item)
                         }
                     }
@@ -1026,8 +1036,16 @@ export default {
         /**   保存座位   */
         saveSeat() {
             console.log('this.tableDataAll',this.tableDataAll)
-            
-            //this.$emit('saveSeat',this.tableDataAll)
+            let list = JSON.parse(JSON.stringify(this.tableDataAll))
+            list.forEach((item,index)=>{
+                if(item.styleCss) {
+                    list[index].styleCss = JSON.stringify(item.styleCss)
+                }
+            })
+            let styleCss = {
+                tableHeader: this.tableHeader
+            }
+            this.$emit('saveSeat',list,JSON.stringify(styleCss))
         }
     }
 };

+ 64 - 21
src/views/windowTicketSales/model/increaseViewers.vue

@@ -72,7 +72,7 @@
                 </el-table-column>
                 <el-table-column
                     label="人员类别"
-                    width="130">
+                    width="140">
                     <template slot-scope="scope">
                         <div>
                             <span v-if="actionIndex != scope.row.id">{{ 
@@ -127,8 +127,9 @@
                         <el-button
                         size="mini"
                         type="success"
+                        :loading="factorAuthLoading"
                         v-if="actionIndex == scope.row.id"
-                        @click="handleSeva(scope.$index, scope.row)">保存</el-button>
+                        @click="handleSeva(scope.$index, scope.row)">{{ factorAuthLoading ? '保存中....' : '保存' }}</el-button>
                         <el-button
                         :disabled="!!actionIndex"
                         size="mini"
@@ -154,16 +155,22 @@
             size="mini"
             >
                 
-                <el-form-item label="用户来源 :" prop="source">
-                    <el-radio-group v-model="ruleForm.source">
-                        <el-radio label="7">窗口</el-radio>
-                        <el-radio label="10">美团</el-radio>
-                        <el-radio label="11">携程</el-radio>
-                        <el-radio label="13">抖音</el-radio>
-                        <el-radio label="14">猫眼</el-radio>
-                        <el-radio label="15">去哪儿</el-radio>
-                    </el-radio-group>
-                </el-form-item>
+                <div style="display: flex;">
+                    <el-form-item label="用户来源 :" prop="source">
+                        <el-radio-group v-model="ruleForm.source">
+                            <el-radio label="7">窗口</el-radio>
+                            <el-radio label="10">美团</el-radio>
+                            <el-radio label="11">携程</el-radio>
+                            <el-radio label="13">抖音</el-radio>
+                            <el-radio label="14">猫眼</el-radio>
+                            <el-radio label="15">去哪儿</el-radio>
+                            <el-radio label="16">其他</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                    <el-form-item label-width="60px" v-if="ruleForm.source && ruleForm.source == 16" label="备注 :" prop="sourceRemark">
+                        <el-input style="width: 200px;" v-model="ruleForm.sourceRemark"></el-input>
+                    </el-form-item>
+                </div>
                 <el-form-item v-if="ruleForm.source && ruleForm.source != 7" label="核销码/订单码" prop="orderIdOrQrCode">
                     <el-input style="width: 400px;" v-model="ruleForm.orderIdOrQrCode"></el-input>
                 </el-form-item>
@@ -182,6 +189,9 @@
                 <el-form-item label="找零金额 :" v-if="ruleForm.paymentType == 2">
                     ¥{{ ruleForm.small }}元
                 </el-form-item>
+                <el-form-item label="订单备注 :" prop="remark">
+                    <el-input style="width: 400px;" type="textarea" :rows="2" maxlength="200" v-model="ruleForm.remark" show-word-limit></el-input>
+                </el-form-item>
             </el-form>
         </div>
         <!--  支付过程 控制  -->
@@ -237,16 +247,13 @@
 </template>
 <script>
 import { 
-  querySeatList,
-  merchantPerformTimeList,
   orderInfoSubmit,
   gotoMicroPay,
   gotoCashPay,
   payQuery,
   selectRegion,
   orderInfoCancel,
-  lockOrUnLock,
-  merchantTheatreAuditoriumList
+  factorAuth
  } from '@/api/windowTicketSales/ticketingSales'
  import { pageList as getPrintListApi } from "@/api/device/pda";
  import { printApi } from '@/api/windowTicketSales/ticketingCollection'
@@ -301,6 +308,9 @@ import {
             realPrice: [
                 { required: true, message: '请输入实付金额', trigger: ['blur','change']},
             ],
+            sourceRemark: [
+                { required: true, message: '请输入备注', trigger: ['blur','change']},
+            ],
         },
         moneyAll: '',
         payment: '',
@@ -323,6 +333,8 @@ import {
         printListId: null,
         printList: [],
 
+        // 身份证校验 loading
+        factorAuthLoading: false,
       };
       
     },
@@ -345,6 +357,8 @@ import {
                     paymentType: '', // 支付方式
                     small: '',// 实付金额
                     realPrice: '', // 实付金额
+                    remark: '', // 订单备注
+                    sourceRemark: '', //  来源备注
                 }
                 this.payStatus = null
                 this.orderId = null
@@ -496,6 +510,7 @@ import {
                 })
                 .catch(_ => {});
         },
+        /**  保存个人信息 */
         handleSeva(index, row) {    
             if(!this.tableForm.name){
                 this.$message.error('请输入姓名!!!');
@@ -511,9 +526,36 @@ import {
                     return 
                 }
             }
-            this.$set(this.viewerList,index,JSON.parse(JSON.stringify(this.tableForm)))
-            this.actionIndex = null
-            this.setMoneyAll()
+            this.factorAuthFun(index,this.tableForm)
+            // this.$set(this.viewerList,index,JSON.parse(JSON.stringify(this.tableForm)))
+            // this.actionIndex = null
+            // this.setMoneyAll()
+        },
+        /**  校验 身份证 */
+        async factorAuthFun(index, obj){
+            try {
+                this.factorAuthLoading = true
+                let res = await factorAuth({
+                    "name": obj.name,
+                    "idcard": obj.idcard
+                })
+                if(res.code == 200){
+                    this.factorAuthLoading = false
+                    if(res.data.status != 1) {
+                        this.$message.error(res.data.errReason);
+                    }else {
+                        this.$set(this.viewerList,index,JSON.parse(JSON.stringify(this.tableForm)))
+                        this.actionIndex = null
+                        this.setMoneyAll()
+                    }
+                }else {
+                    this.$message.error(res.msg);
+                    this.factorAuthLoading = false
+                }
+            } catch (error) {
+                this.$message.error(error);
+                this.factorAuthLoading = false
+            }
         },
         handleEdit(index, row) {
             this.actionIndex = row.id
@@ -728,14 +770,14 @@ import {
                                 clearInterval(this.payTime)
                             }
                             if(this.ruleForm.paymentType == 2){
-                                this.$message.error('"订单入库成功"');
+                                this.$message('订单入库成功');
                                 this.loading = false
                                 // this.payStatus = 8
                                 // this.getPrintListApi()
                                 this.goTicketingCollections()
                                 
                             }else {
-                                this.$message('用户已支付!!!');
+                                this.$message('用户已支付成功,请打印门票');
                                 // 开始 打印
                                 this.loading = false
                                 // this.payStatus = 8
@@ -959,6 +1001,7 @@ import {
           //   this.loading = false
           // })
         },
+        
     }
 }
 </script>