MONSTER-ygh před 8 měsíci
rodič
revize
8559f90a5f

+ 18 - 0
src/api/financeMr/InvoiceRecords.js

@@ -36,3 +36,21 @@ export function getInvoiceDetail(params) {
     params
   });
 }
+
+//  订单查询
+export function queryOrderIdFun(params) {
+  return request({
+    url: '/order/orderInfo/queryOrderId',
+    method: 'get',
+    params
+  });
+}
+
+//  关联订单
+export function bindOrderIdApi(params) {
+  return request({
+    url: '/order/orderInvoice/bindOrderId',
+    method: 'get',
+    params
+  });
+}

+ 28 - 15
src/views/distribution/recordMr/index.vue

@@ -123,37 +123,42 @@
     </el-row>
 
     <el-table ref="tables" v-loading="loading" :data="dataList" border>
-      <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
-      <el-table-column label="分销商名称" align="center" prop="personName" />
-      <el-table-column label="分销商类型" align="center" prop="personType">
+      <el-table-column label="序号" align="center" type="index" width="60" fixed="left"></el-table-column>
+      <el-table-column label="分销商名称" width="120" align="center" prop="personName" fixed="left" />
+      <el-table-column label="分销商类型" width="120" align="center" prop="personType" fixed="left">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.distribution_type" :value="scope.row.personType"/>
         </template>
       </el-table-column>
-      <el-table-column label="入驻银联主体名称" align="center" prop="unionName" />
-      <el-table-column label="订单号" align="center">
+      <el-table-column label="入驻银联主体名称" width="120" align="center" prop="unionName" fixed="left" />
+      <el-table-column label="订单号" width="180" align="center" fixed="left">
         <template slot-scope="scope">
           <el-button type="text" @click="openDetails(scope.row)">{{ scope.row.orderId }}</el-button>
         </template>
       </el-table-column>
-      <el-table-column label="场次时间" align="center" prop="performDate" />
+      <el-table-column label="下单地址" width="180" align="center" prop="performDate11">
+        <template slot-scope="scope">
+          <span>{{ setAderr(scope.row) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="场次时间" width="120" align="center" prop="performDate" />
       <el-table-column label="场次" width="120" align="center" prop="timeSnapshot">
         <template slot-scope="scope">
           <span>{{ scope.row.timeSnapshot }} <br /> ({{ scope.row.performTimeStart + '-' + scope.row.performTimeEnd }})</span>
         </template>
       </el-table-column>
-      <el-table-column label="购买人手机号" align="center" prop="memberMobile" />
-      <el-table-column label="票务名称" align="center" prop="goodsName" />
-      <el-table-column label="佣金单价(元)" align="center" prop="brokeragePrice">
+      <el-table-column label="购买人手机号" width="120" align="center" prop="memberMobile" />
+      <el-table-column label="票务名称" width="120" align="center" prop="goodsName" />
+      <el-table-column label="佣金单价(元)" width="120" align="center" prop="brokeragePrice">
         <template slot-scope="scope">
           <span v-if="scope.row.brokeragePrice">¥{{ scope.row.brokeragePrice }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="实付金额" align="center" prop="realPrice" />
-      <el-table-column label="支付时间" align="center" prop="payTime" />
-      <el-table-column label="购买数量(张)" align="center" prop="retailNum" />
-      <el-table-column label="已核销(张)" align="center" prop="usedNum" />
-      <el-table-column label="获得佣金(元)" align="center" prop="brokeragePriceTotal">
+      <el-table-column label="实付金额" width="120" align="center" prop="realPrice" />
+      <el-table-column label="支付时间" width="120" align="center" prop="payTime" />
+      <el-table-column label="购买数量(张)" width="120" align="center" prop="retailNum" />
+      <el-table-column label="已核销(张)" width="120" align="center" prop="usedNum" />
+      <el-table-column label="获得佣金(元)" width="120" align="center" prop="brokeragePriceTotal">
         <template slot-scope="scope">
           <span v-if="scope.row.brokeragePriceTotal">¥{{ scope.row.brokeragePriceTotal }}</span>
         </template>
@@ -205,7 +210,7 @@ export default {
       // 总条数
       total: 0,
       // 用户表格数据
-      dataList: null,
+      dataList: [],
       // 弹出层标题
       title: "",
 
@@ -354,6 +359,14 @@ export default {
 
       }
     },
+    setAderr(row) {
+      let str = ""
+      str = str + (row.province?row.province:'')
+      str = str + (row.city?row.city:'')
+      str = str + (row.county?row.county:'')
+      str = str + (row.address?row.address:'')
+      return str
+    }
   }
 };
 </script>

+ 210 - 0
src/views/finance/InvoiceRecords/dialog/relatedOrders.vue

@@ -0,0 +1,210 @@
+<!--
+ * @Description: 详情弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: gcz
+ * @LastEditTime: 2024-03-18 11:01:58
+ * @FilePath: \great_webui\src\views\finance\InvoiceRecords\dialog\details.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="300"
+      append-to-body
+      :close-on-click-modal="false"
+      @close="cancel"
+    >
+        <div class="dialog" style="padding: 0;display: flex;flex-direction: column;">
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
+                <el-form-item label="订单号" label-width="70px">
+                    <el-input
+                        v-model="queryParams.orderId"
+                        placeholder="请输入订单号"
+                        clearable
+                        style="width: 240px;"
+                        @keyup.enter.native="queryOrderIdFunApi"
+                    />
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" icon="el-icon-search" size="mini" @click="queryOrderIdFunApi">搜索</el-button>
+                </el-form-item>
+            </el-form>
+            <el-table ref="tables" v-loading="tabLoading" :data="dataList" border>
+                <el-table-column width="50" align="center">
+                    <template slot-scope="scope">
+                        <el-radio v-model="orderId" :label="scope.row.id">{{''}}</el-radio>
+                    </template>
+                </el-table-column>
+                <el-table-column label="订单号" align="center" prop="id" />
+            </el-table>
+        </div>
+      <span slot="footer" class="dialog-footer" >
+        <el-button @click="cancel()"><span>关闭</span></el-button>
+        <el-button
+        type="primary"
+        @click="submitForm"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        :disabled="!orderId"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>保存</span>
+      </el-button>
+      </span>
+  
+    </el-dialog>
+  </template>
+  
+  <script>
+  import { queryOrderIdFun,bindOrderIdApi } from '@/api/financeMr/InvoiceRecords'
+  export default {
+    name: "detailsDia",
+    dicts: ['Invoicing_type','lookup_type'],
+    data() {
+      return {
+        title: "编辑",
+        model: "EDIT",
+        open: false,
+        loading: false,
+        performerVisible: false,
+        performerList: [],
+        refund: false,
+        tabLoading: false,
+        dataList: [],
+        queryParams: {},
+        total: 0,
+        orderId: null,
+        id: null,
+      };
+    },
+    methods: {
+      /**
+       * 打开弹框
+       * @date 2023-11-22
+       * @param {any} obj
+       * @returns {any}
+       */
+      openDialog(title, obj, type) {
+        this.title = title
+        this.open = true;
+        this.id = obj.id
+        this.orderId = null
+        this.queryParams = {}
+        this.queryOrderIdFunApi(obj);
+      },
+      /** 获取详情 */
+      queryOrderIdFunApi(row) {
+      this.orderId = null
+      this.tabLoading = true
+        queryOrderIdFun({...this.queryParams}).then(response => {
+            if(response.code == 200) {
+                let list = response.data
+                let listCopy = []
+                list.forEach(item => {
+                    listCopy.push({
+                        id: item
+                    })
+                });
+                this.dataList = listCopy
+            }
+          this.tabLoading = false
+        }).catch(()=>{
+            this.tabLoading = false
+        })
+      },
+      /**
+       * 关闭弹框
+       * @date 2023-11-22
+       * @returns {any}
+       */
+      cancel() {
+        this.open = false;
+      },
+      resetQuery() {
+        this.queryParams.orderId = null
+        this.queryOrderIdFunApi()
+      },
+      /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    async submitForm() {
+        try {
+            this.loading = true;
+            const { code } = await bindOrderIdApi({ 
+                id: this.id,
+                orderId: this.orderId 
+            });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+          } finally {
+            this.loading = false;
+          }
+    },
+    },
+  };
+  </script>
+  
+  <style lang="scss" scoped>
+  .dialog {
+    width: 100%;
+    padding: 0 30px;
+    height: 60vh;
+    overflow-y: auto;
+  }
+  .dialog {
+    padding: 0 30px;
+    width: 100%;
+    box-sizing: border-box;
+    display: flex;
+    >div:first-child {
+      width: 400px;
+      padding-right: 20px;
+      box-sizing: border-box;
+    }
+    >div:last-child {
+      width: calc( 100% - 400px );
+      iframe {
+        width: 100%;
+        height: 100%;
+      }
+    }
+    .upload-btn {
+      width: 100px;
+      height: 100px;
+      background-color: #fbfdff;
+      border: dashed 1px #c0ccda;
+      border-radius: 5px;
+      i {
+        font-size: 30px;
+        margin-top: 20px;
+      }
+      &-text {
+        margin-top: -10px;
+      }
+    }
+    .avatar {
+      cursor: pointer;
+    }
+    .title-class{
+      font-size: 16px;
+      font-weight: bold;
+      color: black;
+      margin-bottom: 20px;
+      margin-top: 20px;
+    }
+    .item-class{
+      margin-bottom: 20px;
+    }
+  }
+  </style>
+  

+ 38 - 1
src/views/finance/InvoiceRecords/index.vue

@@ -49,6 +49,25 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item label="开票来源">
+        <el-select
+          v-model="queryParams.invoiceSource"
+          placeholder="开票来源"
+          clearable
+          style="width: 100%"
+        >
+          <el-option
+            v-for="dict in [
+              { label: '小程序',value: 0 },
+              { label: '团购H5',value: 1 },
+              { label: '线下',value: 2 },
+            ]"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -104,6 +123,16 @@
               @click="openRedBlood(scope.row)"
             >冲红</el-button>
           </span>
+          <!-- v-hasPermi="['finance:InvoiceRecords:relatedOrders']" -->
+          <span style="display: inline-block;" v-hasPermi="['finance:InvoiceRecords:relatedOrders']">
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              v-if="scope.row.status == 6"
+              @click="openRelatedOrders(scope.row)"
+            >{{ scope.row.orderId ? '重新关联订单': '关联订单' }}</el-button>
+          </span>
         </template>
       </el-table-column>
     </el-table>
@@ -118,6 +147,8 @@
 
     <!-- 详情 -->
     <details-dia ref="detailsDia" @getList="getList"></details-dia>
+    <!-- 关联订单 -->
+    <relatedOrders ref="relatedOrders" @getList="getList"></relatedOrders>
   </div>
 </template>
 
@@ -125,10 +156,11 @@
 
 import { pageList,orderInvoiceRed } from '@/api/financeMr/InvoiceRecords'
 import detailsDia from "./dialog/details.vue";
+import relatedOrders from "./dialog/relatedOrders.vue";
 export default {
   name: "InvoiceRecords",
   dicts: ['Invoicing_type','lookup_type'],
-  components: { detailsDia },
+  components: { detailsDia,relatedOrders },
   data() {
     return {
       // 遮罩层
@@ -190,6 +222,7 @@ export default {
       this.$set(this.queryParams, 'name', '');
       this.$set(this.queryParams, 'status', '');
       this.$set(this.queryParams, 'handlerType', '');
+      this.$set(this.queryParams,'invoiceSource','')
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
@@ -197,6 +230,10 @@ export default {
     openDetails(row, type) {
       this.$refs["detailsDia"].openDialog("详情", row, type);
     },
+    /**  打开  */
+    openRelatedOrders(row, type){
+      this.$refs["relatedOrders"].openDialog("关联订单",row,type)
+    },
     openRedBlood(row){
       this.$confirm('您即将进行冲红操作,是否继续?', '提示', {
           confirmButtonText: '确定',

+ 63 - 7
src/views/team/ticketMr/dialog/dumplingEdit.vue

@@ -11,7 +11,7 @@
   <el-dialog
     :title="title"
     :visible.sync="open"
-    width="700px"
+    width="900px"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
@@ -27,6 +27,23 @@
             @click="handleAdd"
           >添加</el-button>
         </el-col>
+        <el-col :span="1.5">
+          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
+            <el-form-item label="团队名称" label-width="70px">
+              <el-input
+                v-model="queryParams.name"
+                placeholder="请输入团队名称"
+                clearable
+                style="width: 240px;"
+                @keyup.enter.native="getList"
+              />
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
+              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
       </el-row>
       <el-table ref="tables" v-loading="tabLoading" :data="dataList" border>
         <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
@@ -37,7 +54,7 @@
           </template>
         </el-table-column>
         <el-table-column label="负责人" align="center" prop="contact" />
-        <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
+        <el-table-column label="操作" align="center" width="80px" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
               size="mini"
@@ -65,8 +82,25 @@
       @close="selectionCancel"
     >
       <div class="dialog" style="padding: 0">
-        <el-table ref="tables" v-loading="selectionTabLoading" :data="selectionDataList" border @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="50" align="center" />
+        <div>
+          <el-form :model="queryParamsS" ref="queryForm" size="small" :inline="true" label-width="120px">
+            <el-form-item label="团队名称" label-width="70px">
+              <el-input
+                v-model="queryParamsS.name"
+                placeholder="请输入团队名称"
+                clearable
+                style="width: 240px;"
+                @keyup.enter.native="handleQuery"
+              />
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </div>
+        <el-table ref="tablesS" row-key="id" v-loading="selectionTabLoading" :data="selectionDataList" border @selection-change="handleSelectionChange">
+          <el-table-column type="selection" reserve-selection width="50" align="center" />
           <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
           <el-table-column label="团队名称" align="center" prop="name" />
           <el-table-column label="团队类型" align="center" prop="type">
@@ -89,13 +123,14 @@
       <el-button
         type="primary"
         @click="submitForm"
+        :disabled="selectList.length==0"
         v-loading.fullscreen.lock="loading"
         element-loading-text="提交中..."
         element-loading-spinner="el-icon-loading"
         element-loading-background="rgba(0, 0, 0, 0.8)"
       >
         <span v-if="loading">提交中...</span>
-        <span v-else>确认</span>
+        <span v-else>确认(已选{{ selectList.length }})</span>
       </el-button>
     </span>
     </el-dialog>
@@ -148,6 +183,7 @@ export default {
       selectList: [],
       selectionOpen: false,
       onwObj: {},
+      queryParamsS: {}
     };
   },
   methods: {
@@ -160,18 +196,24 @@ export default {
     openDialog(title, obj) {
       this.open = true;
       this.title = "团队绑定";
+      this.queryParams.name = null
       this.onwObj = obj;
       this.getList(obj);
     },
     handleAdd() {
+      this.selectList = []
+      this.queryParamsS = {}
       this.getSelectList();
       this.selectionOpen = true
+      this.$nextTick(()=>{
+        this.$refs.tablesS.clearSelection()
+      })
     },
     /** 查询列表 */
     getList(obj) {
       this.tabLoading = true;
       this.queryParams.configId = this.onwObj.id
-      queryBindTeam(this.queryParams)
+      queryBindTeam({...this.queryParams})
         .then(response => {
             this.dataList = response.data.rows;
             this.total = response.data.total;
@@ -184,7 +226,7 @@ export default {
     /** 查询列表 */
     getSelectList(obj) {
       this.selectionTabLoading = true;
-      queryBindTeam(this.selectQueryParams)
+      queryBindTeam({...this.selectQueryParams,...this.queryParamsS})
         .then(response => {
             this.selectionDataList = response.data.rows;
             this.selectionTabTotal = response.data.total;
@@ -264,6 +306,18 @@ export default {
     },
     selectionCancel() {
       this.selectionOpen = false;
+    },
+
+    handleQuery() {
+      this.getSelectList()
+    },
+    resetQuery() {
+      this.queryParamsS = {}
+      this.getSelectList()
+    },
+    resetQuery1() {
+      this.queryParams.name = null
+      this.getList()
     }
   },
 };
@@ -273,6 +327,8 @@ export default {
 .dialog {
   padding: 0 30px;
   max-height: 65vh;
+  min-height: 65vh;
+  overflow: hidden;
   overflow-y: auto;
 }
 .dialog {