<template>
	<div class="app-container">

		<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
			<el-table :data="tjsjdata" v-if="this.$auth.hasPermi('system:goodsPayment:bt')"
				style="width: 100%;margin-bottom: 30px;">
				<el-table-column prop="originalprice" label="成本金额" width="180">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.originalprice}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="salesprice" label="销售金额" width="180">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.salesprice}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="paidinprice" label="到手金额">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.paidinprice}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="fxlr" label="分销利润">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.fxlr}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="selfProfit" label="自营利润">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.selfProfit}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="lr" label="利润">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.lr}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="bplr" label="包赔利润">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.bplr}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="bplr1" label="多倍包赔利润">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.bplr1}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="allhandlingfee" label="手续费">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.allhandlingfee}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="totalPrice" label="付款总价">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.totalPrice}}</span>
					</template>
				</el-table-column>
			</el-table>
			<el-table :data="tjsjdata1" v-if="isAdmin" style="width: 100%;margin-bottom: 30px;">
				<el-table-column prop="count" label="销量" width="200">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.count}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="original_price" label="成本金额" width="200">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.original_price}}</span>
					</template>
				</el-table-column>
				<el-table-column v-if="isLirun" prop="platform_Profit" label="手续费" width="200">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.platform_Profit}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="sales_price" label="销售金额" width="200">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.sales_price}}</span>
					</template>
				</el-table-column>
				<el-table-column v-if="isSelfProfit" prop="self_Profit" label="自营利润" width="200">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.self_Profit}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="lirun" label="利润" width="200">
					<template slot-scope="scope">
						<span style="color: red;">{{scope.row.lirun}}</span>
					</template>
				</el-table-column>
			</el-table>


			<el-form-item label="开始日期" prop="beginTime">
				<div class="block">
					<el-date-picker v-model="queryParams.beginTime" value-format="yyyy-MM-dd" type="date"
						placeholder="选择日期" style="width: 200px;">
					</el-date-picker>
				</div>
			</el-form-item>
			<el-form-item label="结束日期" prop="endTime">
				<div class="block">
					<el-date-picker v-model="queryParams.endTime" type="date" value-format="yyyy-MM-dd"
						placeholder="选择日期" style="width: 200px;">
					</el-date-picker>
				</div>
			</el-form-item>
			<el-form-item label="商品名称" prop="goodsName">
				<el-input v-model="queryParams.goodsName" style="width: 200px;" placeholder="请输入商品名称" clearable
					@keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="所属游戏" prop="gameId">
				<el-select v-model="queryParams.gameId" clearable placeholder="请选择游戏">
					<el-option v-for="(item,index) in gameList" :key="item.id" :label="item.gameName" :value="item.id">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="商品编号" prop="goodsId">
				<el-input v-model="queryParams.goodsId" style="width: 200px;" placeholder="请输入商品编号" clearable
					@keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="游戏账号" prop="gameAccount">
				<el-input v-model="queryParams.gameAccount" style="width: 200px;" placeholder="请输入游戏账号" clearable
					@keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="分销编号" prop="channelId" v-if="this.$auth.hasPermi('system:channelId:list')">
				<el-input v-model="queryParams.channelId" style="width: 200px;" placeholder="请输入分销编号" clearable
					@keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="状态" prop="paymentStatus">
				<el-select v-model="queryParams.paymentStatus" style="width: 200px" clearable placeholder="请选择付款状态">
					<el-option v-for="(item,index) in options1" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="售后状态" prop="aftermarketStatus">
				<el-select v-model="queryParams.aftermarketStatus" style="width: 200px" clearable placeholder="请选择售后状态">
					<el-option v-for="(item,index) in stoptions" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item v-if="bpLr3" label="付款方式" prop="paymentMethod">
				<el-select v-model="queryParams.paymentMethod" style="width: 200px" clearable placeholder="请选择付款状方式">
					<el-option v-for="(item,index) in options12" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item v-if="bpLr3" label="销售渠道" prop="distributionChannel">
				<el-select v-model="queryParams.distributionChannel" style="width: 200px" clearable
					placeholder="请选择销售渠道">
					<el-option v-for="(item,index) in dict.type.game_platform_mapping" :label="item.label"
						:value="item.value">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="店铺名称" prop="shopName" v-if="this.$auth.hasPermi('system:shopName:list')">
				<el-autocomplete class="inline-input" v-model="queryParams.shopName" :fetch-suggestions="querySearch"
					placeholder="请输入店铺名称" @select="handleSelect" :trigger-on-focus="false"></el-autocomplete>
			</el-form-item>
			<el-form-item v-show="bpLr3" label="多倍包赔" prop="isMultiple">
				<el-select v-model="queryParams.isMultiple" style="width: 200px" clearable placeholder="请选择多倍包赔">
					<el-option v-for="(item,index) in options2" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item v-show="bpLr3" label="普通包赔" prop="isSecurity">
				<el-select v-model="queryParams.isSecurity" style="width: 200px" clearable placeholder="请选择普通包赔">
					<el-option v-for="(item,index) in options10" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
			</el-form-item>
			<el-form-item v-show="bpLr3" label="是否分期" prop="byStages">
				<el-select v-model="queryParams.byStages" style="width: 200px" clearable placeholder="请选择是否分期">
					<el-option v-for="(item,index) in options10" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
			</el-form-item>

			<el-form-item>
				<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索
				</el-button>

				<el-button style="margin-left: 20px;" icon="el-icon-refresh" size="mini" @click="resetQuery">重置
				</el-button>
				<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
					v-hasPermi="['system:goodsPayment:export']">导出
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics"
					v-hasPermi="['system:goodsPayment:tongji']">渠道统计
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics1"
					v-hasPermi="['system:goodsPayment:tongji']">卖号统计
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics2"
					v-hasPermi="['system:goodsPayment:tongji']">号商卖号
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics3"
					v-hasPermi="['system:goodsPayment:tongji']">游戏统计
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics4"
					v-hasPermi="['system:goodsPayment:tongji']">渠道卖号
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics5"
					v-hasPermi="['system:goodsPayment:tongji']">利润统计
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics6"
					v-hasPermi="['system:goodsPayment:tongji']">提号率
				</el-button>
				<el-button type="danger" plain icon="el-icon-share" size="mini" @click="handleStatistics7"
					v-hasPermi="['system:money:shouhou']">售后订单
				</el-button>
			</el-form-item>
		</el-form>

		<el-row :gutter="10" class="mb8">
			<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
		</el-row>
		<el-table :row-class-name="tableRowClassName" border :data="tableData" style="width: 100%" row-key="goodsId">
			<el-table-column prop="id" label="订单编号">
			</el-table-column>
			<el-table-column prop="createTime" show-overflow-tooltip align="center" width="110px" height="20px"
				label="订单时间">
			</el-table-column>
			<el-table-column prop="deptName" label="部门">
			</el-table-column>
			<el-table-column prop="shopName" label="店铺">
			</el-table-column>
			<el-table-column label="游戏名称" align="center" prop="gameName">
			</el-table-column>
			<el-table-column prop="goodsId" label="商品编号">
			</el-table-column>
			<el-table-column prop="gameAccount" label="游戏账号">
			</el-table-column>
			<el-table-column prop="goodsName" label="商品名称" show-overflow-tooltip align="center" width="110px"
				height="20px">
			</el-table-column>
			<el-table-column v-if="bpLr3" prop="distributionChannel" key="distributionChannel" label="销售渠道">
				<template slot-scope="scope">
					<dict-tag :options="dict.type.game_platform_mapping" :value="scope.row.distributionChannel" />
				</template>

			</el-table-column>
			<el-table-column v-if="bpLr5" prop="distributionChannel" key="distributionChannel" label="销售渠道">
				<template slot-scope="scope">
					<span v-if="scope.row.distributionChannel=='taohaowan'">淘号玩</span>
					<span
						v-if="scope.row.distributionChannel!='taohaowan'&&scope.row.distributionChannel!=null&&scope.row.distributionChannel!=''">淘号玩店铺</span>
					<span v-if="scope.row.distributionChannel==null||scope.row.distributionChannel==''"></span>
				</template>
			</el-table-column>
			<el-table-column v-if="bpLr3" key="channelId" prop="channelId" label="分销编号">
			</el-table-column>
			<el-table-column v-if="bpLr1" key="originalPrice" prop="originalPrice" label="成本价">
			</el-table-column>
			<el-table-column prop="salesPrice" label="销售价">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="paidinPrice" prop="paidinPrice" label="到手金额">
			</el-table-column>


			<el-table-column prop="gameName" v-if="columns[3].visible" label="游戏名称">
			</el-table-column>
			<el-table-column prop="goodsName" v-if="columns[4].visible" show-overflow-tooltip height="20px"
				label="商品名称">
			</el-table-column>
			<el-table-column prop="settlementPrice" label="结算价格">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="fxProfit" prop="fxProfit" label="分销利润">
			</el-table-column>
			<el-table-column v-if="this.$auth.hasPermi('system:goodsPayment:zy')" key="selfProfit" prop="selfProfit"
				width="110px" label="自营利润">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="platformProfit" prop="platformProfit" label="手续费">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="securityPrice" prop="securityPrice" label="普通包赔">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="multiplePrice" prop="multiplePrice" label="多倍包赔">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="handlingfee" prop="handlingfee" width="110px" label="手续费(线上)">
			</el-table-column>
			<el-table-column v-if="bpLr3" key="totalPrice" prop="totalPrice" label="总价">
				<template slot-scope="scope">
					<el-tooltip class="item" effect="dark" content="总价=到手金额+手续费+包赔价格" placement="top-start">
						<span>{{scope.row.totalPrice}}</span>
					</el-tooltip>
				</template>
			</el-table-column>
			<el-table-column v-if="bpLr3" key="byStages" prop="byStages" label="分期购买">
				<template slot-scope="scope">
					<span v-if="scope.row.byStages=='by_stages_0'">分期客服-辉提</span>
					<span v-if="scope.row.byStages=='by_stages_1'">分期客服-苗提</span>
					<span v-if="scope.row.byStages=='by_stages_2'">没购买分期</span>
				</template>
			</el-table-column>
			<el-table-column v-if="!this.$auth.hasPermi('system:goodsPayment:wbhs')||bpLr6" key="paymentVoucher"
				prop="paymentVoucher" label="付款凭证">
				<template slot-scope="scope">
					<span style="color:blue;cursor: pointer"
						v-if="scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentVoucher!=null&&bpLr5"
						@click="openFkpz(scope.row)">已上传</span>
					<span style="color:blue;cursor: pointer" v-if="scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentVoucher!=null&&bpLr3"
						@click="openFkpz(scope.row)">已上传</span>
				</template>
			</el-table-column>
			<el-table-column prop="paymentStatus" label="状态">
				<template slot-scope="scope">
					<span v-if="scope.row.paymentStatus=='Y'">已付款</span>
					<span v-if="scope.row.paymentStatus=='S'">结算已入账</span>
					<span v-if="scope.row.paymentStatus=='TS'">已退款</span>
					<span v-if="scope.row.paymentStatus=='T'">退款审核中</span>
					<span v-if="scope.row.paymentStatus=='SH'">结算审核中</span>
					<span style="color: blue;cursor: pointer;" @click="ybh(scope.row)"
						v-if="scope.row.paymentStatus=='DH'&&!bpLr3&&scope.row.distributionChannel=='taohaowan'">已驳回</span>
					<span
						v-if="scope.row.paymentStatus=='DH'&&!bpLr3&&scope.row.distributionChannel!='taohaowan'">已驳回</span>
					<span style="color: blue;cursor: pointer;" @click="ybh(scope.row)"
						v-if="scope.row.paymentStatus=='DH'&&bpLr3">已驳回</span>
				</template>
			</el-table-column>

      <el-table-column prop="afterorderStatus" label="售后订单状态">
        <template slot-scope="scope">
          <span v-if="scope.row.afterorderStatus=='0' || scope.row.afterorderStatus == null">处理中</span>
          <span v-if="scope.row.afterorderStatus=='1'">售后已退款</span>
          <span v-if="scope.row.afterorderStatus=='2'">售后已解决</span>
        </template>
      </el-table-column>


			<!--<el-table-column prop="aftermarketStatus" label="售后状态">-->
      <!--<template slot-scope="scope">-->
        <!--<span v-if="scope.row.aftermarketStatus=='0'">处理中</span>-->
        <!--<span v-if="scope.row.aftermarketStatus=='1'">处理失败</span>-->
        <!--<span v-if="scope.row.aftermarketStatus=='2'">处理成功</span>-->
        <!--<span v-if="scope.row.aftermarketStatus=='3'">售后已退款</span>-->
        <!--<span v-if="scope.row.aftermarketStatus=='4'">售后已还号</span>-->
        <!--<span v-if="scope.row.aftermarketStatus==null">正常</span>-->
      <!--</template>-->
    <!--</el-table-column>-->

			<el-table-column v-if="bpLr3" key="paymentMethod" prop="paymentMethod" label="付款方式">
				<template slot-scope="scope">
					<span v-if="scope.row.paymentMethod=='pay_type_4'">线下支付</span>
					<span v-if="scope.row.paymentMethod=='pay_type_0'">微信</span>
					<span v-if="scope.row.paymentMethod=='pay_type_1'">支付宝</span>
				</template>
			</el-table-column>

			<el-table-column prop="createBy" v-if="columns[5].visible" label="创建者">
			</el-table-column>
			<el-table-column prop="remark" v-if="columns[6].visible" label="备注">
			</el-table-column>
			<el-table-column v-if="!this.$auth.hasPermi('system:goodsPayment:wbhs')||bpLr6" label="上传凭证" align="center"
				class-name="small-padding fixed-width">
				<template slot-scope="scope">
					<el-button style="color: red;" size="mini"
						v-if="scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&bpLr3"
						type="text" icon="el-icon-upload" @click="handleUpdate3(scope.row)">上传凭证
					</el-button>
					<el-button style="color: red;" size="mini"
						v-if="scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&bpLr5&&scope.row.distributionChannel=='taohaowan'"
						type="text" icon="el-icon-upload" @click="handleUpdate3(scope.row)">上传凭证
					</el-button>
				</template>
			</el-table-column>


			<el-table-column label="操作" v-if="this.$auth.hasPermi('system:goodsPayment:nbhs')&&!bpLr6" width="300px"
				align="center" class-name="small-padding fixed-width">
				<template slot-scope="scope">
					<div>
						<el-button size="small" type="primary"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&scope.row.distributionChannel=='taohaowan'||scope.row.distributionChannel==null||scope.row.distributionChannel==''"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
							@click="handleUpdate1(scope.row)">编辑
						</el-button>
						<el-button size="small" type="success"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							@click="handleUpdate2(scope.row)">结算
						</el-button>
						<el-button size="small" type="danger"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&scope.row.distributionChannel=='taohaowan'"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
							@click="handleUpdate4(scope.row)">退款
						</el-button>
						<el-button size="small" type="warning"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='S'&&scope.row.distributionChannel=='taohaowan'"
							@click="handleUpdate5(scope.row)"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">撤销
						</el-button>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="操作" v-if="this.$auth.hasPermi('system:goodsPayment:zy')&&!bpLr6" width="300px"
				align="center" class-name="small-padding fixed-width">
				<template slot-scope="scope">
					<div>
						<el-button size="small" type="primary"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
							@click="handleUpdate1(scope.row)">编辑
						</el-button>
						<el-button size="small" type="success"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							@click="handleUpdate2(scope.row)">结算
						</el-button>
						<el-button size="small" type="danger"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
							@click="handleUpdate4(scope.row)">退款
						</el-button>
						<el-button size="small" type="warning"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='S'"
							@click="handleUpdate5(scope.row)"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">撤销
						</el-button>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="操作" v-if="this.$auth.hasPermi('system:goodsPayment:wbhs')&&!bpLr6" width="300px"
				align="center" class-name="small-padding fixed-width">
				<template slot-scope="scope">
					<div>
						<el-button size="small" type="success"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							@click="handleUpdate2(scope.row)">结算
						</el-button>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="操作" v-if="bpLr6" width="300px" align="center"
				class-name="small-padding fixed-width">
				<template slot-scope="scope">
					<div style="line-height: 10px;">
						<el-button size="small" type="primary"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
							@click="handleUpdate1(scope.row)">编辑
						</el-button>
						<el-button size="small" type="success"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							@click="handleUpdate2(scope.row)">结算
						</el-button>
						<el-button size="small" type="danger"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
							@click="handleUpdate4(scope.row)">退款
						</el-button>
						<el-button size="small" type="warning"
							v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='S'"
							@click="handleUpdate5(scope.row)"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">撤销
						</el-button>
						<el-button size="small" v-if="scope.row.paymentStatus!='TS'&&scope.row.aftermarketStatus==null" style="background-color: #edc57e;color:white;" @click="sqSh(scope.row)"
							v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">订单售后
						</el-button>
						<el-button size="small" v-if="scope.row.paymentStatus!='TS'&&scope.row.aftermarketStatus!=null" style="background-color: #A52A2A;color:white;" @click="shXq(scope.row)"
							v-hasPermi="['system:money:shouhou']">售后详情
						</el-button>
					</div>
				</template>
			</el-table-column>
		</el-table>

		<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
			@pagination="getList" />
		<!-- 编辑状态信息 -->
		<el-dialog v-if="open2" title="上传凭证" :visible.sync="open2" append-to-body width="1000px">
			<div style="padding: 10px;overflow: auto">
				<el-form ref="form1" :model="form1" :rules="rules" label-width="80px">
					<div>
						<p style="font-size:20px; color: red;">如果是申请结算请上传商品截图和付款截图，如果是退款请上传退款截图！</p>
					</div>
					<el-row>
						<el-col :span="12">
							<el-form-item label="凭证" prop="paymentVoucher">
								<div class="img_list">
									<div style="position: relative;width: 100px;height: 100px;"
										v-for="item in attach_list">
										<el-image @click="deletePicture(item.id)" style="width: 100px;height: 100px;"
											:src="nginx_pictures_path+item.url"></el-image>
									</div>
								</div>
								<el-upload ref="upload" :action="uploadImgUrl" list-type="picture-card"
									:before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess"
									:on-remove="handleRemove" :on-change="changeUpload" :show-file-list="true"
									accept="image/png, image/jpeg, application/pdf" :multiple="true" :headers="headers">
								</el-upload>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="付款渠道" prop="paymentChannels">
								<el-input v-model="form1.paymentChannels"
									placeholder="如：微信(账号+姓名)、支付宝(账号+姓名)、某某银行(账号+姓名)" />
							</el-form-item>
						</el-col>
					</el-row>
				</el-form>
			</div>

			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="submitForm2">确 定</el-button>
				<el-button @click="cancel">取 消</el-button>
			</div>
		</el-dialog>
		<!-- 编辑状态信息 -->
		<el-dialog v-if="open1" title="编辑信息" :visible.sync="open1" append-to-body width="1000px">
			<div style="padding: 10px;overflow: auto">
				<el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
					<el-row>
						<el-col :span="12">
							<el-form-item label="商品编号" prop="id">
								<el-input v-model="form1.id" disabled placeholder="请输入商品编号" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="商品名称" prop="goodsName">
								<el-input v-model="form1.goodsName" disabled placeholder="请输入商品名称" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="游戏账号" prop="gameAccount">
								<el-input v-model="form1.gameAccount" placeholder="请输入游戏账号" />
							</el-form-item>
						</el-col>

						<el-col :span="12">
							<el-form-item label="所属游戏" prop="gameId">
								<el-select v-model="form1.gameId" disabled @change="changeGameArea" style="width: 100%"
									filterable placeholder="请选择所属游戏">
									<el-option v-for="(item,index) in gameList" :key="item.id" :label="item.gameName"
										:value="item.id"></el-option>
								</el-select>

							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="游戏大区" prop="gameareaValue">
								<el-input v-model="form1.gameareaValue" disabled placeholder="请输入游戏大区" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item
								v-if="form1.ranking!=''&&form1.ranking!=null&&form1.ranking!=undefined&&form1.ranking!='null'"
								label="排位情况" prop="ranking">
								<el-input v-if="form1.ranking=='ranking_1'" value="不可排位" disabled
									placeholder="请输入游戏大区" />
								<el-input v-if="form1.ranking=='ranking_2'" value="可排位" disabled
									placeholder="请输入游戏大区" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="实名情况" prop="identifiedName">
								<el-input v-if="form1.identifiedName=='identified_name_1'" value="可二次" disabled
									placeholder="请输入付款状态" />

								<el-input v-if="form1.identifiedName=='identified_name_3'" value="包人脸" disabled
									placeholder="请输入付款状态" />

							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="号商" prop="shopName">
								<el-input v-model="form1.shopName" disabled placeholder="请输入号商" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="付款方式" prop="paymentMethod">
								<el-input v-if="form1.paymentMethod=='pay_type_0'" value="线上(微信)" disabled
									placeholder="请输入付款状态" />
								<el-input v-if="form1.paymentMethod=='pay_type_1'" value="线上(支付宝)" disabled
									placeholder="请输入付款状态" />
								<el-input v-if="form1.paymentMethod=='pay_type_4'" value="线下支付" disabled
									placeholder="请输入付款状态" />
							</el-form-item>
						</el-col>
						<el-col v-if="form1.paymentMethod!='pay_type_4'" :span="12">
							<el-form-item label="手续费" prop="handlingfee">
								<el-input v-model="form1.handlingfee" disabled placeholder="线上手续费" />
							</el-form-item>
						</el-col>

						<el-col :span="12">
							<el-form-item label="销售价格" prop="price">
								<el-input v-model="form1.price" disabled placeholder="请输入销售价格" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="form1.discountedPrice!=0">
							<el-form-item label="折扣价格" prop="price">
								<el-input v-model="form1.discountedPrice" disabled placeholder="请输入折扣价格" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item v-show="xx" label="到手价格" prop="paidinPrice">
								<el-input @input="jg" v-model="form1.paidinPrice" placeholder="请输入到手价格" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item v-show="xs" label="到手价格" prop="paidinPrice">
								<el-input @input="jg" v-model="form1.paidinPrice" disabled placeholder="请输入到手价格" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item v-show="cbj" label="成本价" prop="originalPrice">
								<!-- <el-input v-if="Number(form1.originalPrice)!=0" v-model="form1.originalPrice" disabled placeholder="请输入成本价" /> -->
								<el-input v-model="form1.originalPrice" placeholder="请输入成本价" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item v-show="xx&&!bpLr7" label="销售渠道" prop="distributionChannel">
								<el-cascader style="width: 100%" placeholder="请选择销售渠道"
									v-model="form1.distributionChannel" :options="xsOptions" @change="handleChange">
								</el-cascader>
							</el-form-item>
							<el-form-item v-show="bpLr7" label="销售渠道" prop="distributionChannel">
								<el-cascader style="width: 100%" disabled placeholder="请选择销售渠道"
									v-model="form1.distributionChannel" :options="xsOptions" @change="handleChange">
								</el-cascader>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item v-show="xs&&!bpLr7" label="销售渠道" prop="distributionChannel">
								<el-cascader style="width: 100%" placeholder="请选择销售渠道" disabled
									v-model="form1.distributionChannel" :options="xsOptions" @change="handleChange">
								</el-cascader>
							</el-form-item>
						</el-col>

						<el-col :span="12">
							<el-form-item v-show="channelid" label="分销编号" prop="channelId">
								<el-input v-model="form1.channelId" placeholder="请输入分销编号" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item v-if="bp" label="普通包赔" prop="isSecurity">
								<el-select style="width: 100%;" placeholder="请选择是否购买普通包赔" @change="bpp"
									v-model="form1.isSecurity" clearable>
									<el-option v-for="(item,index) in options8" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
							<el-form-item v-if="xs" label="普通包赔" prop="isSecurity">
								<el-select style="width: 100%;" disabled placeholder="请选择是否购买普通包赔" @change="bpp"
									v-model="form1.isSecurity" clearable>
									<el-option v-for="(item,index) in options8" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</el-form-item>

						</el-col>


						<el-col v-show="bp1" :span="12">
							<el-form-item label="包赔费率" prop="securityRate">
								<el-input v-model="form1.securityRate" disabled placeholder="请输入包赔费率" />
							</el-form-item>
						</el-col>
						<el-col v-show="bp1" :span="12">
							<el-form-item label="包赔费用" prop="securityPrice">
								<el-input v-model="form1.securityPrice" disabled placeholder="到手价格乘以包赔费率" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item v-show="dbbp" label="多倍包赔" prop="isMultiple">
								<el-select style="width: 100%;" placeholder="请选择是否购买多倍包赔" @change="bpp1"
									v-model="form1.isMultiple" clearable>
									<el-option v-for="(item,index) in options6" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</el-form-item>

						</el-col>
						<el-col :span="12">
							<el-form-item v-show="xs" label="多倍包赔" prop="isMultiple">
								<el-select style="width: 100%;" disabled placeholder="请选择是否购买多倍包赔" @change="bpp1"
									v-model="form1.isMultiple" clearable>
									<el-option v-for="(item,index) in options6" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</el-form-item>

						</el-col>
						<el-col v-show="bp2" :span="12">
							<el-form-item label="多倍包赔费率" prop="securityRate1">
								<el-input v-model="form1.securityRate1" disabled placeholder="请输入多倍包赔费率" />
							</el-form-item>
						</el-col>
						<el-col v-show="bp2" :span="12">
							<el-form-item label="多倍包赔费用" prop="multiplePrice">
								<el-input v-model="form1.multiplePrice" disabled placeholder="到手价格乘以包赔费率" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<!-- v-show="dbbp1" -->
							<el-form-item label="分期购买" prop="byStages">
								<el-select style="width: 100%;" placeholder="请选择分期购买" v-model="form1.byStages"
									clearable>
									<el-option v-for="(item,index) in options9" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row>

				</el-form>
			</div>

			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="submitForm1">确 定</el-button>
				<el-button @click="cancel">取 消</el-button>
			</div>
		</el-dialog>
		<!-- 付款凭证信息 -->
		<el-dialog v-if="openFkpz1" title="付款凭证" :visible.sync="openFkpz1" append-to-body width="800px">
			<div style="display: flex;flex-wrap: wrap;">
				<div style="padding: 10px;overflow: auto;" v-for="(item,index) in carouselImg" :key="item.id">
					<el-image style="width: 200px;height: 200px;" :preview-src-list="srcList"
						:src="pictureServerPath+item">
					</el-image>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="openFkpz1=false">确 定</el-button>
				<el-button @click="openFkpz1=false">取 消</el-button>
			</div>
		</el-dialog>
		<!-- 渠道销售数量统计 -->
		<el-dialog v-if="tongji" title="渠道销售数量统计" :visible.sync="tongji" append-to-body :width="tjwidth">
			<div>
				<el-select style="width: 20%" clearable v-model="queryParamsTj1.type" placeholder="请选择日期类型">
					<el-option v-for="item in bboptions" :key="item.value" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
				<el-select style="width: 20%" filterable clearable v-model="queryParamsTj1.gameId" placeholder="请选择游戏">
					<el-option v-for="item in gameList" :key="item.id" :label="item.gameName" :value="item.id">
					</el-option>
				</el-select>
				<el-select style="width: 20%" filterable clearable v-model="queryParamsTj1.shopId" placeholder="请选择店铺">
					<el-option v-for="item in deptOptions" :key="item.value" :label="item.label" :value="item.value">
					</el-option>
				</el-select>
				<el-button style="margin-left: 5%;" type="primary" icon="el-icon-search" size="mini"
					@click="handleStatistics">搜索
				</el-button>
				<el-table :data="tableData1" show-summary style="width: 100%">
					<el-table-column prop="channel" label="渠道" width="100">
						<template slot-scope="scope">
							<span v-if="scope.row.channel">{{scope.row.channel}}</span>
							<span v-else>未选渠道</span>
						</template>
					</el-table-column>
					<el-table-column :prop="item.value" :label="item.label" width="90" v-for="item in timeList">
					</el-table-column>
				</el-table>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji=false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji1" title="卖号情况统计" :before-close="canceltj" :visible.sync="tongji1" width="500px">
			<div>
				<el-form>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsTj.shopId" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<el-select style="width: 20%" v-model="queryParamsTj.type" @change="selectDateType"
							placeholder="请选择日期类型">
							<el-option v-for="item in bboptions" :key="item.value" :label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-if="Dtype" v-model="value1" type="daterange" value-format="yyyy-MM-dd"
							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
						<el-date-picker v-if="Mtype" v-model="value2" type="monthrange" value-format="yyyy-MM"
							range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份">
						</el-date-picker>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics1">搜索
						</el-button>
					</el-form-item>
				</el-form>
				<el-table :data="tableData2" style="width: 100%">
					<el-table-column prop="create_time" label="日期" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column label="操作" width="100">
						<template slot-scope="scope">
							<span style="color: blue;cursor: pointer;" @click="handleDetails(scope.row)">明细</span>
						</template>
					</el-table-column>
				</el-table>
				<pagination v-show="total1>0" layout="prev, pager, next" :total="total1"
					:page.sync="queryParamsTj.pageNum" :limit.sync="queryParamsTj.pageSize"
					@pagination="handleStatistics1" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji2" title="卖号情况明细" :visible.sync="tongji2" append-to-body width="600px">
			<div>
				<el-table :data="tableData3" show-summary style="width: 100%">
					<el-table-column prop="create_time" label="日期" width="100">
					</el-table-column>
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column label="操作" width="100">
						<template slot-scope="scope">
							<span style="color: blue;cursor: pointer;"
								@click="handleDetailsGameName(scope.row)">明细</span>
						</template>
					</el-table-column>
				</el-table>
				<pagination v-show="total2>0" layout="prev, pager, next" :total="total2"
					:page.sync="queryParamsTj.pageNum" :limit.sync="queryParamsTj.pageSize"
					@pagination="handleDetailsFy" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji2=false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji3" title="游戏明细" :visible.sync="tongji3" append-to-body width="600px">
			<div>
				<el-table :data="tableData4" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="create_time" label="日期" width="100">
					</el-table-column>
					<el-table-column prop="shop_name" label="店铺" width="100">
					</el-table-column>
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
				</el-table>
				<pagination v-show="total3>0" layout="prev, pager, next" :total="total3"
					:page.sync="queryParamsTj.pageNum" :limit.sync="queryParamsTj.pageSize"
					@pagination="handleDetailsGameNameFy" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji3=false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji4" title="号商卖号统计" :before-close="canceltj" :visible.sync="tongji4" append-to-body
			width="600px">
			<div>
				<el-form>
					<el-form-item label="游戏" prop="shopName">
						<el-select v-model="queryParamsHstj.gameName" clearable style="width: 50%" filterable
							placeholder="请选择所属游戏">
							<el-option v-for="(item,index) in gameList" :key="item.id" :label="item.gameName"
								:value="item.gameName"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsHstj.shopId" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<el-select style="width: 20%" v-model="queryParamsHstj.type" @change="selectDateType"
							placeholder="请选择日期类型">
							<el-option v-for="item in bboptions" :key="item.value" :label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-if="Dtype" v-model="value1" type="daterange" value-format="yyyy-MM-dd"
							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
						<el-date-picker v-if="Mtype" v-model="value2" type="monthrange" value-format="yyyy-MM"
							range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份">
						</el-date-picker>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics2">搜索
						</el-button>
					</el-form-item>


				</el-form>
				<el-table :data="tableData5" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="create_time" label="日期" width="100">
					</el-table-column>
					<el-table-column prop="shop_name" label="店铺" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column label="操作" width="100">
						<template slot-scope="scope">
							<span style="color: blue;cursor: pointer;" @click="handleDetailshstj(scope.row)">明细</span>
						</template>
					</el-table-column>
				</el-table>
				<pagination v-show="total4>0" layout="sizes, prev, pager, next" :total="total4"
					:page.sync="queryParamsHstj.pageNum" :limit.sync="queryParamsHstj.pageSize"
					@pagination="handleDetailsHsFy" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji6" :before-close="canceltj" title="游戏卖号统计" :visible.sync="tongji6" append-to-body
			width="500px">
			<div>
				<el-form>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsYxtj.shopId" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<el-select style="width: 20%" v-model="queryParamsYxtj.type" @change="selectDateType"
							placeholder="请选择日期类型">
							<el-option v-for="item in bboptions" :key="item.value" :label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="渠道" prop="shopName">
						<el-select v-model="queryParamsYxtj.channel" clearable style="width: 50%" filterable
							placeholder="请选择渠道">
							<el-option v-for="(item,index) in dict.type.game_platform_mapping" :key="item.value"
								:label="item.label" :value="item.label"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-if="Dtype" v-model="value1" type="daterange" value-format="yyyy-MM-dd"
							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
						<el-date-picker v-if="Mtype" v-model="value2" type="monthrange" value-format="yyyy-MM"
							range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份">
						</el-date-picker>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics3">搜索
						</el-button>
					</el-form-item>


				</el-form>

				<el-table :data="tableData7" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column label="操作" width="100">
						<template slot-scope="scope">
							<span style="color: blue;cursor: pointer;" @click="handleDetailsYxtj(scope.row)">明细</span>
						</template>
					</el-table-column>
				</el-table>
				<pagination v-show="total5>0" layout="prev, pager, next" :total="total5"
					:page.sync="queryParamsYxtj.pageNum" :limit.sync="queryParamsYxtj.pageSize"
					@pagination="handleStatistics3" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji8" :before-close="canceltj" title="渠道卖号统计" :visible.sync="tongji8" append-to-body
			width="500px">
			<div>
				<el-form>
					<el-form-item label="游戏" prop="shopName">
						<el-select v-model="queryParamsQdtj.gameName" clearable style="width: 50%" filterable
							placeholder="请选择所属游戏">
							<el-option v-for="(item,index) in gameList" :key="item.id" :label="item.gameName"
								:value="item.gameName"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsQdtj.shopId" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
						<el-select style="width: 20%" v-model="queryParamsQdtj.type" @change="selectDateType"
							placeholder="请选择日期类型">
							<el-option v-for="item in bboptions" :key="item.value" :label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
					</el-form-item>

					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-if="Dtype" v-model="value1" type="daterange" value-format="yyyy-MM-dd"
							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
						<el-date-picker v-if="Mtype" v-model="value2" type="monthrange" value-format="yyyy-MM"
							range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份">
						</el-date-picker>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics4">搜索
						</el-button>
					</el-form-item>


				</el-form>
				<el-table :data="tableData9" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="distribution_channel" label="渠道" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column label="操作" width="100">
						<template slot-scope="scope">
							<span style="color: blue;cursor: pointer;" @click="handleDetailsQdtj(scope.row)">明细</span>
						</template>
					</el-table-column>
				</el-table>
				<pagination v-show="total6>0" layout="sizes, prev, pager, next" :total="total6"
					:page.sync="queryParamsQdtj.pageNum" :limit.sync="queryParamsQdtj.pageSize"
					@pagination="handleStatistics4" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji9" title="渠道明细-游戏" :visible.sync="tongji9" append-to-body width="500px">
			<div>
				<el-table :data="tableData10" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="distribution_channel" label="渠道" width="100">
					</el-table-column>
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column label="操作" width="100">
						<template slot-scope="scope">
							<span style="color: blue;cursor: pointer;" @click="handleDetailsQdtj1(scope.row)">明细</span>
						</template>
					</el-table-column>
				</el-table>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji9=false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji10" title="渠道明细-店铺" :visible.sync="tongji10" append-to-body width="500px">
			<div>
				<el-table :data="tableData11" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="distribution_channel" label="渠道" width="100">
					</el-table-column>
					<el-table-column prop="shop_name" label="店铺" width="100">
					</el-table-column>
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
				</el-table>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji10=false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji7" title="游戏卖号统计" :visible.sync="tongji7" append-to-body width="500px">
			<div>
				<el-table :data="tableData8" show-summary style="width: 100%">
					<el-table-column prop="create_time" label="日期" width="100">
					</el-table-column>
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
				</el-table>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji7=false">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji5" title="号商卖号统计(游戏)" :visible.sync="tongji5" append-to-body width="600px">
			<div>
				<el-form>
					<el-row>
						<el-col :span="24">
							<el-form-item label="展示渠道" prop="goodsName">
								<el-radio-group v-model="checkList" @change="handleDetailshstj1()">
									<el-radio label="Y">是</el-radio>
									<el-radio label="N">否</el-radio>
								</el-radio-group>

							</el-form-item>
						</el-col>
					</el-row>
				</el-form>
				<el-table :data="tableData6" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="create_time" label="日期" width="100">
					</el-table-column>
					<el-table-column prop="game_name" label="游戏" width="100">
					</el-table-column>
					<el-table-column prop="count" label="数量" width="100">
					</el-table-column>
					<el-table-column prop="sales_price" label="金额" width="100">
					</el-table-column>
					<el-table-column v-if="channelvisible" prop="distribution_channel" label="渠道" width="100">
					</el-table-column>
					<!-- <el-table-column label="合计" width="100">
						<template slot-scope="scope">
							<span></span>
						</template>
					</el-table-column> -->
				</el-table>
				<el-form v-if="channelvisible">
					<el-row>
						<el-col :span="24">
							<el-form-item label="渠道统计" prop="goodsName">
								<span style="margin-right: 10px;"
									v-for="item in channelList"><span>{{item.label}}:{{item.value}}个</span></span>
							</el-form-item>
						</el-col>
					</el-row>
				</el-form>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="tongji5=false">关闭</el-button>
			</div>
		</el-dialog>
		<!-- 驳回信息 -->
		<el-dialog v-if="bhxx" title="驳回原因" :visible.sync="bhxx" append-to-body width="800px">
			<div style="display: flex;flex-wrap: wrap;">
				<div style="padding: 10px;overflow: auto;">
					<p>{{bhyy}}</p>
				</div>
			</div>
		</el-dialog>
		<!-- 撤回信息 -->
		<el-dialog v-if="chxx" title="撤回原因" :visible.sync="chxx" append-to-body width="800px">
			<div style="display: flex;flex-wrap: wrap;">
				<div style="padding: 10px;overflow: auto;">
					<p>{{chyy}}</p>
				</div>
			</div>
		</el-dialog>
		<!-- 退款信息 -->
		<el-dialog v-if="tuikuan" title="退款" :visible.sync="tuikuan" append-to-body width="800px">
			<div style="display: flex;flex-wrap: wrap;">
				<el-form ref="form" :model="form" :rules="rules">
					<el-row>
						<el-col :span="12">
							<el-form-item label="退款原因" prop="remark">
								<el-input style="width: 500px;" v-model="queryParams.remark" type="textarea" :rows="2"
									placeholder="请输入退款原因" />
							</el-form-item>
						</el-col>
					</el-row>
				</el-form>
				<el-form>
				</el-form>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="bh">确 定</el-button>
				<el-button @click="tuikuan=false">取 消</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji11" :before-close="canceltj" title="利润统计" :visible.sync="tongji11" append-to-body
			width="1000px">
			<div>
				<el-form>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsLrtj.shopId" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="销售渠道" prop="distributionChannel">
						<el-select v-model="queryParamsLrtj.distributionChannel" style="width: 200px" clearable
							placeholder="请选择销售渠道">
							<el-option v-for="(item,index) in dict.type.game_platform_mapping" :label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
					</el-form-item>

					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-model="value1" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
							start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics5">搜索
						</el-button>
						<span style="color: red;margin: 0 20px;">不包含退款数据</span>
					</el-form-item>


				</el-form>
				<div class="">
					<div class="lirunList">
						<p> <span></span><span>自营成本价：{{lirunList.cbj}}</span> <span></span>
							<span>自营销售额：{{lirunList.xsj}}</span><span>自营手续费：{{lirunList.zysxf}}</span>
						</p>
						<p> <span></span><span></span><span></span><span></span><span>自营差价率：{{lirunList.zycjl}}</span>
						</p>
						<p> <span></span><span>号商成本价：{{lirunList.hscbj}}</span><span></span><span>号商销售额：{{lirunList.hsxse}}</span><span>号商手续费：{{lirunList.hssxf}}</span>
						</p>
						<p> <span></span><span></span><span></span><span>商户销售额：{{lirunList.shxse}}</span><span>商户手续费：{{lirunList.shsxf}}</span>
						</p>
						<p> <span></span><span></span><span></span><span>代售销售额：{{lirunList.dsxse}}</span><span>代售手续费：{{lirunList.dssxf}}</span>
						</p>
						<p> <span></span><span></span><span></span><span></span><span>线上手续费：{{lirunList.xszfsxf}}</span>
						</p>
						<p> <span></span><span></span><span></span><span></span><span>普通包赔：{{lirunList.ptbp}}</span></p>
						<p> <span></span><span></span><span></span><span></span><span>多倍包赔：{{lirunList.dbpp}}</span></p>
						<p> <span></span><span></span><span></span><span></span><span>分销利润：{{lirunList.fxlr}}</span></p>
						<p>
							<span>合计</span>
							<el-tooltip class="item" effect="dark" content="销售金额+分销利润" placement="top-start">
								<span>到手金额：{{lirunList.dsj}}</span>
							</el-tooltip>
							<el-tooltip class="item" effect="dark" content="到手金额+普通包赔+多倍包赔+线上手续费" placement="top-start">
								<span>付款总金额：{{lirunListtotalPrice}}</span>
							</el-tooltip>

							<span>销售金额：{{xsehj}}</span><span>总利润：{{sxfhj}}</span>
						</p>
					</div>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji12" :before-close="canceltj" title="提号率" :visible.sync="tongji12" append-to-body
			width="1000px">
			<div>
				<el-form>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsThl.shopId" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-model="value1" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
							start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics6">搜索
						</el-button>
					</el-form-item>
				</el-form>
				<el-table :data="tableData12" show-summary :summary-method="getSummaries" style="width: 100%">
					<el-table-column prop="failures" label="失败数量" width="100">
						<template slot-scope="scope">
							<span v-if="scope.row.failures==0">{{scope.row.failures}}</span>
							<span v-if="scope.row.failures!=0" style="color: red;cursor: pointer; "
								@click="goTjsb(scope.row)">{{scope.row.failures}}</span>
						</template>
					</el-table-column>
					<el-table-column prop="success" label="成功数量" width="100">
					</el-table-column>
					<el-table-column prop="successlv" label="成功率" width="100">
						<template slot-scope="scope">
							<span v-if="scope.row.success==0&&scope.row.failures==0">0</span>
							<span
								v-else>{{Math.floor((Number(scope.row.success)/(Number(scope.row.success)+Number(scope.row.failures))) *100)+"%"}}</span>
						</template>
					</el-table-column>
					<el-table-column prop="name" label="店铺" width="100">
					</el-table-column>
				</el-table>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>
		<el-dialog v-if="tongji13" :before-close="canceltj" title="售后订单" :visible.sync="tongji13" append-to-body
			width="90%">
			<div>
				<el-form>
					<el-form-item label="店铺名称" prop="shopName">
						<el-select filterable v-model="queryParamsShdd.shopName" style="width: 35%" clearable
							placeholder="请选择店铺名称">
							<el-option v-for="(item,index) in deptOptions" :label="item.label" :value="item.label">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="日期间隔" prop="shopName">
						<el-date-picker v-model="value3" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
							start-placeholder="开始日期" end-placeholder="结束日期">
						</el-date-picker>
					</el-form-item>
					<el-form-item label="售后状态" prop="aftermarketStatus">
						<el-select v-model="queryParamsShdd.aftermarketStatus" style="width: 200px" clearable placeholder="请选择售后状态">
							<el-option v-for="(item,index) in stoptions" :label="item.label" :value="item.value">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" icon="el-icon-search" size="mini" @click="handleStatistics7">搜索
						</el-button>
					</el-form-item>
				</el-form>
				<el-table :data="tableData13" empty-text="暂无数据" style="width: 100%">
					<el-table-column prop="createTime" show-overflow-tooltip align="center" width="110px" height="20px"
						label="订单时间">
					</el-table-column>
					<el-table-column prop="deptName" label="部门">
					</el-table-column>
					<el-table-column prop="shopName" label="店铺">
					</el-table-column>
					<el-table-column label="游戏名称" align="center" prop="gameName">
					</el-table-column>
					<el-table-column prop="goodsId" label="商品编号">
					</el-table-column>
					<el-table-column prop="gameAccount" label="游戏账号">
					</el-table-column>
					<el-table-column prop="goodsName" label="商品名称" show-overflow-tooltip align="center" width="110px"
						height="20px">
					</el-table-column>
					<el-table-column v-if="bpLr3" prop="distributionChannel" key="distributionChannel" label="销售渠道">
						<template slot-scope="scope">
							<dict-tag :options="dict.type.game_platform_mapping" :value="scope.row.distributionChannel" />
						</template>

					</el-table-column>
					<el-table-column v-if="bpLr5" prop="distributionChannel" key="distributionChannel" label="销售渠道">
						<template slot-scope="scope">
							<span v-if="scope.row.distributionChannel=='taohaowan'">淘号玩</span>
							<span
								v-if="scope.row.distributionChannel!='taohaowan'&&scope.row.distributionChannel!=null&&scope.row.distributionChannel!=''">淘号玩店铺</span>
							<span v-if="scope.row.distributionChannel==null||scope.row.distributionChannel==''"></span>
						</template>
					</el-table-column>
					<el-table-column v-if="bpLr3" key="channelId" prop="channelId" label="分销编号">
					</el-table-column>
					<el-table-column v-if="bpLr1" key="originalPrice" prop="originalPrice" label="成本价">
					</el-table-column>
					<el-table-column prop="salesPrice" label="销售价">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="paidinPrice" prop="paidinPrice" label="到手金额">
					</el-table-column>


					<el-table-column prop="gameName" v-if="columns[3].visible" label="游戏名称">
					</el-table-column>
					<el-table-column prop="goodsName" v-if="columns[4].visible" show-overflow-tooltip height="20px"
						label="商品名称">
					</el-table-column>
					<el-table-column prop="settlementPrice" label="结算价格">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="fxProfit" prop="fxProfit" label="分销利润">
					</el-table-column>
					<el-table-column v-if="this.$auth.hasPermi('system:goodsPayment:zy')" key="selfProfit" prop="selfProfit"
						width="110px" label="自营利润">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="platformProfit" prop="platformProfit" label="手续费">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="securityPrice" prop="securityPrice" label="普通包赔">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="multiplePrice" prop="multiplePrice" label="多倍包赔">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="handlingfee" prop="handlingfee" width="110px" label="手续费(线上)">
					</el-table-column>
					<el-table-column v-if="bpLr3" key="totalPrice" prop="totalPrice" label="总价">
						<template slot-scope="scope">
							<el-tooltip class="item" effect="dark" content="总价=到手金额+手续费+包赔价格" placement="top-start">
								<span>{{scope.row.totalPrice}}</span>
							</el-tooltip>
						</template>
					</el-table-column>
					<el-table-column v-if="bpLr3" key="byStages" prop="byStages" label="分期购买">
						<template slot-scope="scope">
							<span v-if="scope.row.byStages=='by_stages_0'">分期客服-辉提</span>
							<span v-if="scope.row.byStages=='by_stages_1'">分期客服-苗提</span>
							<span v-if="scope.row.byStages=='by_stages_2'">没购买分期</span>
						</template>
					</el-table-column>
					<el-table-column v-if="!this.$auth.hasPermi('system:goodsPayment:wbhs')||bpLr6" key="paymentVoucher"
						prop="paymentVoucher" label="付款凭证">
						<template slot-scope="scope">
							<span style="color:blue;cursor: pointer"
								v-if="scope.row.paymentVoucher!=null&&bpLr5&&scope.row.distributionChannel=='taohaowan'"
								@click="openFkpz(scope.row)">已上传</span>
							<span style="color:blue;cursor: pointer" v-if="scope.row.paymentVoucher!=null&&bpLr3"
								@click="openFkpz(scope.row)">已上传</span>
						</template>
					</el-table-column>
					<el-table-column prop="paymentStatus" label="状态">
						<template slot-scope="scope">
							<span v-if="scope.row.paymentStatus=='Y'">已付款</span>
							<span v-if="scope.row.paymentStatus=='S'">已入账</span>
							<span v-if="scope.row.paymentStatus=='TS'">已退款</span>
							<span v-if="scope.row.paymentStatus=='T'">退款审核中</span>
							<span v-if="scope.row.paymentStatus=='SH'">结算中</span>
							<span style="color: blue;cursor: pointer;" @click="ybh(scope.row)"
								v-if="scope.row.paymentStatus=='DH'&&!bpLr3&&scope.row.distributionChannel=='taohaowan'">已驳回</span>
							<span
								v-if="scope.row.paymentStatus=='DH'&&!bpLr3&&scope.row.distributionChannel!='taohaowan'">已驳回</span>
							<span style="color: blue;cursor: pointer;" @click="ybh(scope.row)"
								v-if="scope.row.paymentStatus=='DH'&&bpLr3">已驳回</span>
						</template>
					</el-table-column>
					<el-table-column prop="aftermarketStatus" label="售后状态">
						<template slot-scope="scope">
							<span v-if="scope.row.aftermarketStatus=='0'">处理中</span>
							<span v-if="scope.row.aftermarketStatus=='1'">处理失败</span>
							<span v-if="scope.row.aftermarketStatus=='2'">处理成功</span>
						</template>
					</el-table-column>

					<el-table-column v-if="bpLr3" key="paymentMethod" prop="paymentMethod" label="付款方式">
						<template slot-scope="scope">
							<span v-if="scope.row.paymentMethod=='pay_type_4'">线下支付</span>
							<span v-if="scope.row.paymentMethod=='pay_type_0'">微信</span>
							<span v-if="scope.row.paymentMethod=='pay_type_1'">支付宝</span>
						</template>
					</el-table-column>

					<el-table-column prop="createBy" v-if="columns[5].visible" label="创建者">
					</el-table-column>
					<el-table-column prop="remark" v-if="columns[6].visible" label="备注">
					</el-table-column>
					<el-table-column v-if="!this.$auth.hasPermi('system:goodsPayment:wbhs')||bpLr6" label="上传凭证" align="center"
						class-name="small-padding fixed-width">
						<template slot-scope="scope">
							<el-button style="color: red;" size="mini"
								v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&bpLr3"
								type="text" icon="el-icon-upload" @click="handleUpdate3(scope.row)">上传凭证
							</el-button>
							<el-button style="color: red;" size="mini"
								v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&bpLr5&&scope.row.distributionChannel=='taohaowan'"
								type="text" icon="el-icon-upload" @click="handleUpdate3(scope.row)">上传凭证
							</el-button>
						</template>
					</el-table-column>


					<el-table-column label="操作" v-if="this.$auth.hasPermi('system:goodsPayment:nbhs')&&!bpLr6" width="300px"
						align="center" class-name="small-padding fixed-width">
						<template slot-scope="scope">
							<div>
								<el-button size="small" type="primary"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&scope.row.distributionChannel=='taohaowan'||scope.row.distributionChannel==null||scope.row.distributionChannel==''"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
									@click="handleUpdate1(scope.row)">编辑
								</el-button>
								<el-button size="small" type="success"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									@click="handleUpdate2(scope.row)">结算
								</el-button>
								<el-button size="small" type="danger"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'&&scope.row.distributionChannel=='taohaowan'"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
									@click="handleUpdate4(scope.row)">退款
								</el-button>
								<el-button size="small" type="warning"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='S'&&scope.row.distributionChannel=='taohaowan'"
									@click="handleUpdate5(scope.row)"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">撤销
								</el-button>
							</div>
						</template>
					</el-table-column>
					<el-table-column label="操作" v-if="this.$auth.hasPermi('system:goodsPayment:zy')&&!bpLr6" width="300px"
						align="center" class-name="small-padding fixed-width">
						<template slot-scope="scope">
							<div>
								<el-button size="small" type="primary"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
									@click="handleUpdate1(scope.row)">编辑
								</el-button>
								<el-button size="small" type="success"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									@click="handleUpdate2(scope.row)">结算
								</el-button>
								<el-button size="small" type="danger"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
									@click="handleUpdate4(scope.row)">退款
								</el-button>
								<el-button size="small" type="warning"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='S'"
									@click="handleUpdate5(scope.row)"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">撤销
								</el-button>
							</div>
						</template>
					</el-table-column>
					<el-table-column label="操作" v-if="this.$auth.hasPermi('system:goodsPayment:wbhs')&&!bpLr6" width="300px"
						align="center" class-name="small-padding fixed-width">
						<template slot-scope="scope">
							<div>
								<el-button size="small" type="success"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									@click="handleUpdate2(scope.row)">结算
								</el-button>
							</div>
						</template>
					</el-table-column>
					<el-table-column label="操作" v-if="bpLr6" width="300px" align="center"
						class-name="small-padding fixed-width">
						<template slot-scope="scope">
							<div style="line-height: 10px;">
								<el-button size="small" type="primary"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
									@click="handleUpdate1(scope.row)">编辑
								</el-button>
								<el-button size="small" type="success"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									@click="handleUpdate2(scope.row)">结算
								</el-button>
								<el-button size="small" type="danger"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentStatus!='S'"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']"
									@click="handleUpdate4(scope.row)">退款
								</el-button>
								<el-button size="small" type="warning"
									v-if="scope.row.paymentStatus!='T'&&scope.row.paymentStatus!='TS'&&scope.row.paymentStatus!='SH'&&scope.row.paymentMethod=='pay_type_4'&&scope.row.paymentStatus!='S'"
									@click="handleUpdate5(scope.row)"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">撤销
								</el-button>
								<!-- <el-button size="small" style="background-color: #c77cc7;color:white;" @click="goQdlb(scope.row)"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">渠道详情
								</el-button> -->
								<!-- <el-button size="small" style="background-color: #edc57e;color:white;" @click="sqSh(scope.row)"
									v-hasPermi="['system:goodsPayment:zy','system:goodsPayment:nbhs']">订单售后
								</el-button> -->
								<el-button size="small" style="background-color: #A52A2A;color:white;" @click="shXq(scope.row)"
									v-hasPermi="['system:money:shouhou']">售后详情
								</el-button>
							</div>
						</template>
					</el-table-column>
				</el-table>
				<pagination v-show="total13>0" layout="sizes, prev, pager, next" :total="total13"
					:page.sync="queryParamsShdd.pageNum" :limit.sync="queryParamsShdd.pageSize"
					@pagination="handleStatistics7" />
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="canceltj">关闭</el-button>
			</div>
		</el-dialog>


		<!-- 详情状态信息 -->
		<el-dialog v-if="open" title="商品付款明细信息" :visible.sync="open" append-to-body width="1000px">
			<div style="padding: 10px;overflow: auto">
				<el-form ref="form" :model="form" label-width="80px">
					<el-row>

						<el-col :span="12">
							<el-form-item label="创建时间" prop="gameId">
								<el-input v-model="form.createTime" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="商品编号" prop="idNo">
								<el-input v-model="form.goodsId" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="商品名称" prop="idNo">
								<el-input v-model="form.goodsName" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="游戏名称" prop="accountId">
								<el-input v-model="form.gameName" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="销售价格" prop="idNo">
								<el-input v-model="form.salesPrice" disabled />
							</el-form-item>
						</el-col>

						<el-col :span="12">
							<el-form-item label="实际价格" prop="idNo">
								<el-input v-model="form.paidinPrice" disabled />
							</el-form-item>
						</el-col>

						<el-col :span="12">
							<el-form-item label="费率" prop="partnerHandlingFee">
								<el-input v-model="form.partnerHandlingFee" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="结算价格" prop="settlementPrice">
								<el-input v-model="form.settlementPrice" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="利润" prop="platformProfit">
								<el-input v-model="form.platformProfit" disabled />
							</el-form-item>
						</el-col>

						<el-col :span="12">
							<el-form-item label="号商" prop="wxNo">
								<el-input v-model="form.shopName" disabled />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="状态 " prop="remark">
								<el-input value="已售出" disabled />
							</el-form-item>
						</el-col>


						<el-col :span="12">
							<el-form-item v-show="channelid" label="渠道id" prop="channelId">
								<el-input v-model="form.channelId" disabled placeholder="请输入渠道id" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-show="bp">
							<el-form-item label="是否包赔" prop="isSecurity">
								<el-select style="width: 100%;" v-if="form.isSecurity=='Y'" placeholder="请选择是否包赔"
									disabled v-model="form.isSecurity" clearable>
									<el-option label="是" value="Y"></el-option>
								</el-select>
								<el-select style="width: 100%;" v-if="form.isSecurity=='N'" placeholder="请选择是否包赔"
									disabled v-model="form.isSecurity" clearable>
									<el-option label="否" value="N"></el-option>
								</el-select>
							</el-form-item>

						</el-col>

					</el-row>
				</el-form>
			</div>
		</el-dialog>
		<!-- 添加手机号信息对话框 -->
		<el-dialog v-if="zhsh" :title="shTitle" :visible.sync="zhsh" append-to-body width="1000px">
			<div style="padding: 10px;overflow: auto">
				<el-form ref="zhshform" :model="zhshform" label-width="80px">
					<el-row>
						<el-col :span="12">
							<el-form-item label="店铺名称" prop="shopId">
								<el-select filterable disabled v-model="zhshform.shopId" style="width: 100%" clearable
									placeholder="请选择店铺名称">
									<el-option v-for="(item,index) in deptOptions" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="售后类型" prop="aftermarketType">
								<el-select v-model="zhshform.aftermarketType" style="width: 100%" clearable
									placeholder="请选择售后类型">
									<el-option v-for="(item,index) in dict.type.after_sales_type" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="找回日期" prop="retrieveDate">
								<el-date-picker style="width: 100%" value-format="yyyy-MM-dd"
									v-model="zhshform.retrieveDate" type="date" placeholder="请选择找回日期">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="shTitle=='售后详情'">
							<el-form-item label="处理日期" prop="transactTime">
								<el-date-picker style="width: 100%" value-format="yyyy-MM-dd"
									v-model="zhshform.transactTime" type="date" placeholder="请选择处理日期">
								</el-date-picker>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="买家姓名" prop="name">
								<el-input v-model="zhshform.name" placeholder="请输入买家姓名" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="身份证" prop="idNo">
								<el-input v-model="zhshform.idNo" placeholder="请输入身份证" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="买家联系方式" prop="mobile">
								<el-input v-model="zhshform.mobile" placeholder="请输入买家联系方式" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="this.$auth.hasPermi('system:money:shouhou')&&zhshform.mainIndustry=='account_source_2'">
							<el-form-item label="买家收款账户" prop="buyersAccounts">
								<el-input v-model="zhshform.buyersAccounts" placeholder="请输入买家收款账户" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="this.$auth.hasPermi('system:money:shouhou')&&zhshform.mainIndustry=='account_source_2'">
							<el-form-item label="外部回款账户" prop="externalAccounts">
								<el-input v-model="zhshform.externalAccounts" placeholder="请输入外部回款账户" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="this.$auth.hasPermi('system:money:shouhou')&&zhshform.mainIndustry=='account_source_2'">
							<el-form-item label="外部回款金额" prop="externalAmount">
								<el-input v-model="zhshform.externalAmount" placeholder="请输入外部回款金额" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="this.$auth.hasPermi('system:money:shouhou')&&zhshform.mainIndustry=='account_source_2'">
							<el-form-item label="退款金额" prop="refundAmount">
								<el-input v-model="zhshform.refundAmount" placeholder="请输入退款金额" />
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="this.$auth.hasPermi('system:money:shouhou')&&zhshform.mainIndustry=='account_source_2'">
							<el-form-item label="支出利润" prop="profitExpenses">
								<el-input v-model="zhshform.profitExpenses" placeholder="请输入支出利润" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="销售价格" prop="acquirePrice">
								<el-input disabled v-model="zhshform.acquirePrice" placeholder="请输入销售价格" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="所属游戏" prop="gameId">
								<el-select disabled style="width: 100%" v-model="zhshform.gameId" placeholder="请选择所属游戏">
									<el-option v-for="(item,index) in gameList" :key="item.id" :label="item.gameName"
										:value="item.id"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="游戏账号" prop="gameAccount">
								<el-input disabled v-model="zhshform.gameAccount" placeholder="请输入游戏账号" />
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="包赔服务" prop="service">
								<el-select style="width: 100%" v-model="zhshform.service" placeholder="请选择包赔服务商">
									<el-option v-for="item in bpfwsoptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12" v-if="this.$auth.hasPermi('system:money:shouhou')">
							<el-form-item label="状态" prop="status">
								<el-select style="width: 100%" v-model="zhshform.status" placeholder="请选择状态">
									<el-option v-for="item in stoptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="备注" prop="remark">
								<el-input v-model="zhshform.remark" placeholder="请输入备注" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="12">
							<el-form-item label="收款凭证" prop="credentials">
								<div class="img_list">
									<div style="position: relative;">
										<span style="color: red;" v-if="zhshform.credentials==null">无凭证</span>
										<image-preview style="margin-right: 10px;" v-else
											:src="'https://static.taohaowan.com/'+zhshform.credentials" :width="100" :height="100" />
									</div>
								</div>
								<el-upload ref="upload" :action="uploadImgUrl" list-type="picture-card"
									:before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess1"
									:on-remove="handleRemove" :on-change="changeUpload" :show-file-list="true"
									accept="image/png, image/jpeg, application/pdf" :headers="headers">
								</el-upload>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="退款凭证" prop="refundEvidence">
								<div class="img_list">
									<div style="position: relative;">
										<span style="color: red;" v-if="zhshform.refundEvidence==null">无凭证</span>
										<image-preview style="margin-right: 10px;" v-else
											:src="'https://static.taohaowan.com/'+zhshform.refundEvidence" :width="100" :height="100" />
									</div>
								</div>
								<el-upload ref="upload" :action="uploadImgUrl" list-type="picture-card"
									:before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess1"
									:on-remove="handleRemove" :on-change="changeUpload1" :show-file-list="true"
									accept="image/png, image/jpeg, application/pdf" :headers="headers">
								</el-upload>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="24" v-if="zhshform.aftermarketType=='after_sales_type_0'">
							<el-form-item label="售后信息" prop="retrieveMessage">
								<editor v-model="zhshform.retrieveMessage" :min-height="192" />
							</el-form-item>
						</el-col>
					</el-row>
				</el-form>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" v-if="shTitle=='售后信息'" @click="submitFormzhsh">确 定</el-button>
				<!-- <el-button type="primary" v-if="shTitle=='售后详情'" @click="editFormzhsh">修 改</el-button> -->
				<el-button @click="cancelzhsh">取 消</el-button>
			</div>
		</el-dialog>

	</div>
</template>

<script>
	import {
		getSuccessRate,
		getSysDeptInfo,
		edit,
		getDeptInfo,
		getStatistics,
		getquiryStatistics,
		getquiryHandlerStatistics,
		getquiryGameStatistics,
		getquiryChannelStatistics,
		getquiryLirunStatistics,
		goodsPayment,
		updatepartnerlist,
		getInitGoodsManager,
		getPaymentInfo,
		getGoodsInfo,
		updateOriginalPrice,
		updatePic,
		updateProductCode,
		getTBusGoodsPaymentSum,
		applyForSettlement,
		getTBusShopInfo,
		revoke,
		queryTBusShop,
		quiryShopProfitStatistics,
		getpayment,
		getInfo,
		updateStatus
	} from "@/api/data/goodsPayment";
	import {
		add,
		upData
	} from "@/api/data/retrieveDetails";
	import {
		updateTefund,
	} from "@/api/data/settlement";
	import Cookies from 'js-cookie';
	import {
		getToken
	} from "@/utils/auth";
	import {
		getDicts
	} from "../../../api/system/dict/data";
	export default {
		dicts: ['game_platform_mapping', 'after_sales_type'],
		data() {
			return {
				userName:'',
				zhsh: false,
				isAdmin: false,
				isLirun: false,
				isSelfProfit: false,
				xsOptions: [{
					value: 'zichu',
					label: '自出',
					children: [],
				}, {
					value: 'fenxiao',
					label: '分销',
					children: [],
				}],
				uploadImgUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传的图片服务器地址
				headers: {
					Authorization: "Bearer " + getToken(),
				},
				// electronicDataList: [],
				// 表单参数
				form: {
					electronicDataList: [],
					// electronicDataList: '',
					gamePicture: [],
					//创建一个游戏属性数值
					arrayLIst: []
				},
				// 统计
				tjsjdata: [{
					originalprice: 0,
					salesprice: 0,
					paidinprice: 0,
					fxlr: 0,
					lr: 0,
					bplr: 0,
					bplr1: 0,
					totalPrice: 0,
					allhandlingfee: 0,
				}],
				tjsjdata1: [],
				allPrice: 0,
				dbbp: false,
				dbbp1: false,
				bp1: false,
				bp2: false,
				//店铺名称
				restaurants: [],
				options11: [],
				deptOptions: [],
				deptOptions1: [],
				// 筛选
				// activeNames: ['1'],
				//驳回
				bhxx: false,
				chxx: false,
				ch: false,
				tuikuan: false,
				bhyy: '',
				chyy: '',
				admin: '',
				options: [],
				//状态
				options1: [{
						value: "'Y'",
						label: '已付款'
					}, {
						value: "'DH'",
						label: '已驳回'
					}, {
						value: "'S'",
						label: '已入账'
					},
					{
						value: "'TS'",
						label: '已退款'
					},
					{
						value: "'T'",
						label: '退款审核中'
					},
					{
						value: "'SH'",
						label: '结算中'
					}
				],
				//多倍包赔
				options2: [{
					value: "is_multiple_0",
					label: '是'
				}, {
					value: "is_multiple_1",
					label: '否'
				}],
				//付款方式
				options12: [{
						value: "pay_type_0",
						label: '微信'
					}, {
						value: "pay_type_1",
						label: '支付宝'
					},
					{
						value: "pay_type_4",
						label: '线下'
					}
				],
				//多倍包赔
				options6: [{
					value: "is_multiple_0",
					label: '是'
				}, {
					value: "is_multiple_1",
					label: '否'
				}],
				//包赔
				options8: [{
					value: "Y",
					label: '是'
				}, {
					value: "N",
					label: '否'
				}],
				//包赔
				options10: [{
					value: "Y",
					label: '是'
				}, {
					value: "N",
					label: '否'
				}],
				//日期类型
				bboptions: [{
						value: "Y",
						label: '年'
					}, {
						value: "M",
						label: '月'
					},
					{
						value: "D",
						label: '日'
					}
				],
				//分期购买
				options7: [{
						value: "by_stages_0",
						label: '分期客服-辉提'
					}, {
						value: "by_stages_1",
						label: '分期客服-苗提'
					},
					{
						value: "by_stages_2",
						label: '没购买分期'
					}
				],
				lirunList: [

				],
				xsehj: 0,
				sxfhj: 0,
				lirunListtotalPrice: 0,
				cs: 0,
				cs1: 0,
				cs2: 0,
				cs3: 0,
				input: '',
				yxbh: false,
				yxdq: false,
				sjbh: false,
				disabled: true,
				block: false,
				originalPrice1open: false,
				originalPriceopen: false,
				open1: false,
				open2: false,
				openPicture: false,
				cbj: false,
				cbj1: false,
				cbj2: true,
				fl: false,
				openFkpz1: false,
				bp: false,
				zybd: true,
				sjbd: false,
				bpLr: true,
				bpLr1: true,
				bpLr2: true,
				bpLr3: true,
				bpLr4: true,
				bpLr5: false,
				bpLr6: false,
				bpLr7: false,
				channelid: false,
				// 付款凭证
				attach_list: [],
				carouselImg: [],
				srcList: [],
				// 列信息
				columns: [{
						key: 0,
						label: `手续费`,
						visible: false
					},
					{
						key: 1,
						label: `普通包赔价格`,
						visible: false
					},
					{
						key: 2,
						label: `多倍包赔价格`,
						visible: false
					},
					{
						key: 3,
						label: `游戏名称`,
						visible: false
					},
					{
						key: 4,
						label: `商品名称`,
						visible: false
					},

					{
						key: 5,
						label: `备注`,
						visible: false
					},
					{
						key: 6,
						label: `创建者`,
						visible: false
					},
				],
				tableData12: [],
				tableData13: [],

				rules1: {

					gameAccount: [{
						required: true,
						message: '请输入游戏账号',
						trigger: 'blur'
					}],
					paidinPrice: [{
						required: true,
						message: '请输入到手价',
						trigger: 'blur'
					}, ],
					// originalPrice: [{
					// 	type: 'number',
					// 	message: '成本价必须为数字值'
					// }],
					distributionChannel: [{
						required: true,
						message: '请选择销售渠道',
						trigger: 'blur'
					}],
					paymentVoucher: [{
						required: true,
						message: '请上传付款凭证',
						trigger: 'blur'
					}],
					paymentChannels: [{
						required: true,
						message: '请输入付款渠道',
						trigger: 'blur'
					}]
				},
				checkList: 'N',
				gameList: [],
				tableData: [],
				tongji: false,
				isZy: false,
				tableData2: [],
				tableData3: [],
				tableData4: [],
				tableData5: [],
				tableData6: [],
				tableData7: [],
				tableData8: [],
				tableData9: [],
				tableData10: [],
				tableData11: [],
				tongji1: false,
				tongji2: false,
				tongji3: false,
				tongji4: false,
				tongji5: false,
				tongji6: false,
				tongji7: false,
				tongji8: false,
				tongji9: false,
				tongji10: false,
				tongji11: false,
				tongji12: false,
				tongji13: false,
				tongji14: false,
				formXgtk:{},
				tjwidth: '1100px',
				timeList: [],
				timeList1: [],
				timeList2: [],
				timeList3: [],
				tableData1: [],
				// 遮罩层
				loading: true,
				// open:false

				// 总条数
				total: 0,
				// 弹出层标题
				title: "",
				// 显示搜索条件
				showSearch: true,
				// 是否显示弹出层
				open: false,
				// 查询参数
				queryParams: {
					pageNum: 1,
					pageSize: 10,
					publishStatus: null,
					deleteStatus: null,
					updateStatus: null,
					goodsName: null,
					gameAccount: null,
					goodsId: null,
					gameName: null,
					partnerName: null,
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
					paymentStatus: null,
					type: null,
					originalPrice: null,
				},
				// 查询参数-店铺
				queryParamsdp: {
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
					shopId: '',
					mainIndustry: '',
				},
				total1: 0,
				total2: 0,
				total3: 0,
				total4: 0,
				total8: 0,
				queryParamsTj: {
					pageNum: 1,
					pageSize: 10,
					type: 'D',
					shopId: '',
					details: '0',
					gameName: '',
					beginTime: '',
					endTime: '',
				},
				queryParamsTj1: {
					type: 'M',
				},
				channelvisible: false,
				channelList: [],
				value1: '',
				value2: '',
				value3: '',
				Dtype: true,
				Mtype: false,
				queryParamsHstj: {
					pageNum: 1,
					pageSize: 30,
					shopId: '',
					type: 'D',
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
					details: '0'
				},
				queryParamsYxtj: {
					pageNum: 1,
					pageSize: 10,
					shopId: '',
					type: 'D',
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
					details: '0'
				},
				queryParamsQdtj: {
					pageNum: 1,
					pageSize: 30,
					shopId: '',
					type: 'D',
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
					details: '0',
					gameName: '',
				},
				queryParamsLrtj: {
					type: 'D',
					pageNum: 1,
					pageSize: 30,
					shopId: '',
					mainIndustry: '',
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
				},
				queryParamsThl: {
					type: "D",
					pageNum: 1,
					pageSize: 30,
					shopId: '',
					mainIndustry: '',
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
				},
				queryParamsShdd:{
					pageNum: 1,
					pageSize: 10,
					shopId: '',
					aftermarketStatus:'0',
					beginTime: this.$moment().subtract(3, 'days').format("YYYY-MM-DD"), // 当前时间往前推 3 天
					endTime: this.$moment().format("YYYY-MM-DD"), // 获取当前日期,
				},

				// 表单参数
				form1: {
					id: null,
					goodsId: null,
					goodsName: null,
					gameAccount: null,
					price: null,
					originalPrice: null,
					paymentChannels: null,
					paymentVoucher: null,
					paidinPrice: null,
					distributionChannel: null,
					channelId: null,
					isSecurity: null,
					securityRate: null,
					securityPrice: null,
					isMultiple: null,
					securityRate1: null,
					multiplePrice: null,
					byStages: null,
					gameAccount: null,
				},
				bpfwsoptions: [{
					value: 'taohaowan',
					label: '淘号玩'
				}, {
					value: 'panzhi',
					label: '盼之'
				}, {
					value: 'nanzhi',
					label: '南栀'
				}, {
					value: 'pangxie',
					label: '螃蟹'
				}, {
					value: 'baiqing',
					label: '白情'
				}, {
					value: 'jiaoyiyou',
					label: '交易游'
				}, {
					value: 'kejinshou',
					label: '氪金兽'
				}, ],
				shdjoptions: [{
					value: '1',
					label: '售后一级'
				}, {
					value: '2',
					label: '售后二级'
				}, ],
				stoptions: [{
					value: '0',
					label: '处理中'
				}, {
					value: '1',
					label: '处理失败'
				}, {
					value: '2',
					label: '处理成功'
				}

        ],
				options5: [{
					value: 'Y',
					label: '是'
				}, {
					value: 'N',
					label: '否'
				}],
				options9: [{
						value: 'by_stages_0',
						label: '分期客服-辉提'
					}, {
						value: 'by_stages_1',
						label: '分期客服-苗提'
					},
					{
						value: 'by_stages_2',
						label: '没购买分期'
					}
				],
				zhshform: {
					retrieveMessage: '<p>一、此账号您在手期间是否出售、以及换绑过、给过他人验证码.密码：</p><p><br></p><p>二、此账号您之前绑定的电话是多少：</p><p><br></p><p>三、此账号您最后一次登陆的时间以及地址：</p><p><br></p><p>四、此账号的防沉迷实名您是否修改成为了您自己的：</p><p><br></p><p>五、此账号您自己是否提交过申诉：</p><p><br></p><p>六、是否给别人开过腾讯会议：</p><p><br></p>',
				},
				shDisable: false,
				shTitle: '',
				queryForm: {
					publishStatus: null,
					deleteStatus: null,
					updateStatus: null,
					goodsName: null,
					gameAccount: null,
					gameName: null,
					partnerName: null,
				},
			};
		},
		created() {
			this.user();
			this.getList();
			this.initGoodsManager();
			this.getxsoptions();
		},
		mounted() {
			this.restaurants = this.loadAll();
		},
		methods: {
			sqSh(item) {
			  console.log("####",item)
				const result = this.findObjectById(this.deptOptions1,item.shopId);
				const result1 = this.gameList.find(res=>res.gameName===item.gameName);
				this.zhshform = {};
				this.zhsh = true;
				this.shTitle = '售后信息';
				this.zhshform.gameId=result1.id;
				this.zhshform.mainIndustry=result.mainIndustry;
				this.zhshform.shopId = item.shopId;
				this.zhshform.acquirePrice = item.salesPrice;
				this.zhshform.gameAccount = item.gameAccount;
				this.zhshform.paymentId = item.id;
				this.zhshform.retrieveMessage =
					'<p>一、此账号您在手期间是否出售、以及换绑过、给过他人验证码.密码：</p><p><br></p><p>二、此账号您之前绑定的电话是多少：</p><p><br></p><p>三、此账号您最后一次登陆的时间以及地址：</p><p><br></p><p>四、此账号的防沉迷实名您是否修改成为了您自己的：</p><p><br></p><p>五、此账号您自己是否提交过申诉：</p><p><br></p><p>六、是否给别人开过腾讯会议：</p><p><br></p>';
			},
			shXq(item) {
				const result = this.findObjectById(this.deptOptions1,item.shopId);
				this.shTitle = '售后详情';
				this.shDisable = true;
				getpayment(item.id).then(res => {
					if (res.data) {
						this.zhshform = res.data;
						this.zhshform.mainIndustry=result.mainIndustry;
						this.zhsh = true;
					} else {
						this.$modal.msgError("暂无申报售后!");
					}

				})
			},
			findObjectById(array, targetId) {
			    return array.find(item => item.id === targetId);
			},
			editFormzhsh(){
				upData(this.zhshform).then(res => {
					if (res.code == 200) {
						this.zhsh = false;
						this.getList();
						this.$modal.msgSuccess("修改成功");
					} else {
						alert(res.msg)
					}
				})
			},
			submitFormzhsh() {
				this.gameList.forEach(res => {
					if (res.id == this.zhshform.gameId) {
						this.zhshform.gameName = res.gameName
					}
				})
				this.zhshform.createBy=this.userName;
				this.zhshform.logStatus = '分销客服申请';
				this.zhshform.logRemark = this.zhshform.remark;
				add(this.zhshform).then(res => {
					if (res.code == 200) {
						this.getList();
						this.zhsh = false;
						this.$modal.msgSuccess("已申请售后!");
					} else {
						alert(res.msg)
					}
				})
			},
			cancelzhsh() {
				this.zhsh = false;
			},
			getxsoptions() {
				getDicts('game_platform_mapping').then(res => {
					let list = res.data
					list.forEach((item) => {
						if (item.dictValue == 'taohaowan' || item.dictValue == 'daishouwan') {
							this.xsOptions[0].children.push({
								value: item.dictValue,
								label: item.dictLabel
							})
						} else {
							this.xsOptions[1].children.push({
								value: item.dictValue,
								label: item.dictLabel
							})
						}
					});
				})
			},
			objectSpanMethod({
				row,
				column,
				rowIndex,
				columnIndex
			}) {
				if (columnIndex === 0) {
					// 获取当前单元格的值
					const currentValue = row[column.property];
					// 获取上一行相同列的值
					const preRow = this.tableData[rowIndex - 1];
					const preValue = preRow ? preRow[column.property] : null;
					// 如果当前值和上一行的值相同，则将当前单元格隐藏
					if (currentValue === preValue) {
						return {
							rowspan: 0,
							colspan: 0
						};
					} else {
						// 否则计算当前单元格应该跨越多少行
						let rowspan = 1;
						for (let i = rowIndex + 1; i < this.tableData.length; i++) {
							const nextRow = this.tableData[i];
							const nextValue = nextRow[column.property];
							if (nextValue === currentValue) {
								rowspan++;
							} else {
								break;
							}
						}
						return {
							rowspan,
							colspan: 1
						};
					}
				}
			},

			// 合计 指定某一列添加合计

			getSummaries(param) {
				const {
					columns,
					data
				} = param;
				const sums = [];
				columns.forEach((column, index) => {
					if (index === 0) {
						sums[index] = "合计";
						return;
					} else if (column.property == "sales_price" || column.property == 'count') {
						//如果是经费（正常的加减法）
						const values = data.map((item) => Number(item[column.property]));
						if (!values.every((value) => isNaN(value))) {
							sums[index] = values.reduce((prev, curr) => {
								const value = Number(curr);
								var sum = 0;
								if (!isNaN(value)) {
									sum = Number(Number(prev) + Number(curr));
									return sum;
								} else {
									return prev;
								}
							}, 0);
							sums[index] += " ";
						}
					}
				});
				return sums;
			},
			/** 导出按钮操作 */
			handleExport() {
				this.download('system/goodsPayment/export', {
					...this.queryParams
				}, `订单明细_${this.$moment().format('YYYY-MM-DD')}.xlsx`)
			},
			//店铺名称
			querySearch(queryString, cb) {
				var restaurants = this.restaurants;
				var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
				// 调用 callback 返回建议列表的数据
				cb(results);
			},
			createFilter(queryString) {
				return (restaurant) => {
					return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
				};
			},
			loadAll() {
				queryTBusShop().then(response => {
					response.data.forEach((item) => {
						this.options11.push({
							label: item.id,
							value: item.name,
						});
					});
					response.data.forEach((item) => {
						this.deptOptions.push({
							label: item.name,
							value: item.id,
						});
					});
					this.deptOptions1=response.data;
				});
				return this.options11;
			},
			goTjsb() {
				this.$router.push('/guanli/numberIncreaseFailed');
			},
			handleSelect(item) {
				// console.log(item);
				// this.queryParams.shopId=item.address
			},
			// 普通包赔
			bpp() {
				if (this.form1.isSecurity == 'Y') {
					this.multiplePrice = 0
					this.bp1 = true;
					this.form1.securityRate = 0.08
					if (this.form1.paidinPrice == null) {
						this.form1.multiplePrice = 0
					} else {
						this.form1.securityPrice = (this.form1.paidinPrice * 0.08).toString()
						this.form1.securityPrice = parseFloat(this.form1.securityPrice).toFixed(2)
					}
				} else if (this.form1.isSecurity == 'N') {
					// this.dbbp=true
					this.bp1 = false;
					this.form1.securityPrice = 0
					this.form1.securityRate = 0
				}
			},
			// 多倍包赔
			bpp1() {
				if (this.form1.isMultiple == 'is_multiple_0') {
					this.bp1 = false;
					this.form1.securityPrice = 0
					this.form1.securityRate = 0
					this.bp2 = true;
					this.form1.securityRate1 = 0.20
					if (this.form1.paidinPrice == null) {
						this.form1.multiplePrice == null
					} else {
						this.form1.multiplePrice = (this.form1.paidinPrice * 0.20).toString()
						this.form1.multiplePrice = Math.round(parseFloat(this.form1.multiplePrice))
					}
				} else if (this.form1.isMultiple == 'is_multiple_1') {
					this.bp2 = false;
					this.form1.multiplePrice = 0
					this.form1.securityRate1 = 0
				}
			},
			//价格计算
			jg() {
				if (this.form1.isSecurity == 'Y') {
					this.form1.securityPrice = (this.form1.paidinPrice * 0.08).toString()
					this.form1.securityPrice = parseFloat(this.form1.securityPrice).toFixed(2)
				} else if (this.form1.isSecurity == 'N') {
					this.form1.securityPrice = null
				}
				if (this.form1.isMultiple == 'is_multiple_0') {
					this.form1.multiplePrice = (this.form1.paidinPrice * 0.2).toString()
					this.form1.multiplePrice = Math.round(parseFloat(this.form1.multiplePrice))
				} else if (this.form1.isMultiple == 'is_multiple_1') {
					this.form1.multiplePrice = null
				}
			},
			//游戏大区
			initGoodsManager() {
				getInitGoodsManager().then(res => {
					this.pictureServerPath = res.pictureServerPath
					this.gameList = res.gameList
				})
			},
			changeGameArea(id) {
				this.form.arrayList = []
				let that = this
				let gm = {
					gameId: this.form.gameId || id
				}
				getGameArea(gm).then(res => {

					that.options = res.gameArea
				})
				getGameAttrib(gm.gameId).then(res => {

					if (res.data.gameProperties != null) {
						this.block = true;
						let data = res.data.gameProperties.split(",")
						this.type = data
					} else {
						this.block = false
					}
				})
			},
			// 销售渠道
			handleChange() {

				let getmainIndustry = Cookies.get('mainIndustry')
				const validChannels = ['daishouwan', 'taohaowan'];
				if (validChannels.indexOf(this.form1.distributionChannel[1]) === -1) {
					this.channelid = true;
				} else {
					this.channelid = false;
					this.form1.channelId = null;
				}
				if (validChannels.includes(this.form1.distributionChannel[1])) {
					this.dbbp = true
					this.dbbp1 = true
				} else {
					this.form1.isMultiple = null
					this.form1.isSecurity = null
					this.form1.securityPrice = null
					this.form1.multiplePrice = null
					this.form1.securityRate1 = null
					this.form1.securityRate = null
					this.form1.byStages = null
					this.dbbp = false
					this.dbbp1 = false
					this.bp2 = false
					this.bp1 = false
				}
				if (this.channelid == false) {
					this.form1.channelId = null
				}
				if (this.dbbp1 == false) {
					this.form1.byStages = null
				}
				if ((getmainIndustry == 'account_source_2' || getmainIndustry == 'account_source_3') && this.form1
					.distributionChannel[1] == 'daishouwan') {
					this.bp = true
				} else {
					this.bp = false
				}
			},
			tableRowClassName({
				row,
				rowIndex
			}) {
				if (rowIndex === 1 || Number.isInteger((rowIndex - 1) / 4)) {
					return 'warning-row';
				} else if (rowIndex === 3 || Number.isInteger((rowIndex - 3) / 4)) {
					return 'success-row';
				}
				return '';
			},
			//驳回信息
			ybh(row) {
				this.bhxx = true;
				this.bhyy = row.remark;
			},
			//撤回信息
			ych(row) {
				this.chxx = true;
				this.chyy = row.remark;
			},
			user() {
				getInitGoodsManager().then(res => {
					this.pictureServerPath = res.pictureServerPath
				})
				getTBusShopInfo().then(res => {
					if (res.msg) {
						if (res.data.mainIndustry == 'account_source_1' || res.data.mainIndustry ==
							'account_source_2' || res.data.mainIndustry == 'account_source_3') { //商家
							this.bpLr3 = false
							this.bpLr5 = true
						}
						if (res.data.mainIndustry == 'account_source_0') { //自营和自营商家
							this.isZy = true
						}
						if (res.data.mainIndustry == 'account_source_1' || res.data.mainIndustry ==
							'account_source_0') { //自营和自营商家
							this.queryParamsdp.shopId = res.data.id;
							this.getquiryShopProfitStatistics();
							this.isAdmin = true;
						}
						if (res.data.name == '代售玩') {
							this.bpLr6 = true
							this.bpLr3 = true
						}
					} else { //admin/分销/买号
						this.bpLr6 = true
						this.admin = 'admin'
						this.isAdmin = false;
					}

				})
				getDeptInfo().then(res => {
					if (res.data.deptName == '自营商家' || res.data.deptName == '自营本部' || res.data.deptName ==
						'对接平台') {
						this.bpLr = false
						this.bpLr4 = false
					}
					if (res.data.deptName == '对接平台') {
						this.cbj2 = false
						this.bpLr1 = false
						this.bpLr2 = false
					}
				})
				getInfo().then(res=>{
					this.userName=res.user.userName;
				})
			},
			getquiryShopProfitStatistics() {
				this.queryParamsdp.beginTime = this.queryParams.beginTime
				this.queryParamsdp.endTime = this.queryParams.endTime
				if (this.queryParamsdp.beginTime == '' || this.queryParamsdp.beginTime == null) {
					this.$message.error('开始日期不能为空!');
					return;
				}
				if (this.queryParamsdp.endTime == '' || this.queryParamsdp.endTime == null) {
					this.$message.error('结束日期不能为空!');
					return;
				}
				quiryShopProfitStatistics(this.queryParamsdp).then(res => {
					this.tjsjdata1 = res.data.table.rows
					if (this.tjsjdata1[0].main_industry == 'account_source_0') {
						this.isLirun = false;
						this.isSelfProfit = true;
					} else {
						this.isLirun = true;
						this.isSelfProfit = false;
					}
				})
			},
			deletePicture(id) {
				let that = this
				this.$modal.confirm("确定删除此图片吗？").then(function() {
					delAttach(id).then(r => {
						getGoodsPictures({
							goodsId: that.form.id
						}).then(resp => {
							that.nginx_pictures_path = resp.nginx_pictures_path
							that.attach_list = resp.attachlist
						})
					})
				})
			},
			//付款凭证信息
			openFkpz(row) {
				this.carouselImg = row.paymentVoucher.split(",")
				this.carouselImg.forEach((item) => {
					this.srcList.push(this.pictureServerPath + item);
				});
				this.openFkpz1 = true
			},
			// 上传之前
			beforeAvatarUpload(file) {
				const isJPG = file.type === 'image/jpeg'
				const isPng = file.type === 'image/png'
				const isPdf = file.type === 'application/pdf'
				const isLt50M = file.size / 1024 / 1024 < 50
				if (!isLt50M) {
					this.$message.warning('上传文件大小不能超过 50MB!')
					return false
				}
				if (!isJPG && !isPng && !isPdf) {
					this.$message.warning('只能上传 JPG/PNG/PDF/JPEG 格式!')
					return false
				}
			},
			canceltj() {
				this.Dtype = true;
				this.Mtype = false;
				this.queryParamsQdtj.type = 'D';
				this.queryParamsHstj.type = 'D';
				this.queryParamsYxtj.type = 'D';
				this.queryParamsTj.type = 'D';
				this.queryParamsQdtj.gameName = '';
				this.queryParamsQdtj.shopId = '';
				this.queryParamsHstj.gameName = '';
				this.queryParamsHstj.shopId = '';
				this.queryParamsYxtj.channel = '';
				this.queryParamsYxtj.shopId = '';
				this.queryParamsLrtj.shopId = '';
				this.queryParamsThl.shopId = '';
				this.queryParamsShdd.shopName = '';
				this.tongji1 = false;
				this.tongji4 = false;
				this.tongji8 = false;
				this.tongji6 = false;
				this.tongji11 = false;
				this.tongji12 = false;
				this.tongji13 = false;
				this.tongji14 = false;
			},
			// 上传成功
			handleAvatarSuccess(res) {
				this.form.gamePicture = res.data.url
			},
			// 删除
			handleRemove(file, fileList) {
				this.form.electronicDataList = this.form.electronicDataList.filter(item => item !== file.response.data
					.webUrl);
			},
			// 上传成功
			handleAvatarSuccess1(res) {
				// this.zhshform.credentials = res.data.url
			},
			// 文件状态改变时的钩子，添加文件、上传成功和上传失败时都会被调用
			changeUpload(file, fileList) {

				if (file.status === 'success') {
					this.$refs.upload.uploadFiles = this.$refs.upload.uploadFiles.filter((item) => {
						return item.raw.size / 1024 / 1024 < 50
					})
					this.tobase64(file, fileList)
				}
			},
			tobase64(file, fileList) {
				var reader = new FileReader()
				reader.readAsDataURL(file.raw)
				reader.onload = (e) => {
					const tempobj = {
						data: file.response.data.webUrl,
						suffix: '.' + file.raw.type.split('/')[1],
						fileName: file.name
					}
					this.form.electronicDataList.push(tempobj.data)
					this.zhshform.credentials=tempobj.data
				}

			},
			changeUpload1(file, fileList) {

				if (file.status === 'success') {
					this.$refs.upload.uploadFiles = this.$refs.upload.uploadFiles.filter((item) => {
						return item.raw.size / 1024 / 1024 < 50
					})
					this.tobase65(file, fileList)
				}
			},
			tobase65(file, fileList) {
				var reader = new FileReader()
				reader.readAsDataURL(file.raw)
				reader.onload = (e) => {
					const tempobj = {
						data: file.response.data.webUrl,
						suffix: '.' + file.raw.type.split('/')[1],
						fileName: file.name
					}
					this.zhshform.refundEvidence=tempobj.data
				}
			},






			/** 查询付款信息列表 */
			getList() {
				this.loading = true;
				goodsPayment(this.queryParams).then(response => {
					this.tableData = response.data.table.rows;
					this.total = response.data.table.total
					this.tjsjdata[0].originalprice = response.data.sum.originalPrice
					this.tjsjdata[0].salesprice = response.data.sum.salesPrice
					this.tjsjdata[0].paidinprice = response.data.sum.paidinPrice
					this.tjsjdata[0].fxlr = response.data.sum.fxProfit
					this.tjsjdata[0].selfProfit = response.data.sum.selfProfit
					this.tjsjdata[0].lr = response.data.sum.platformProfit
					this.tjsjdata[0].bplr = response.data.sum.securityPrice
					this.tjsjdata[0].bplr1 = response.data.sum.multiplePrice
					this.tjsjdata[0].allhandlingfee = response.data.sum.handlingfee
					this.tjsjdata[0].totalPrice = (Number(this.tjsjdata[0].paidinprice) + Number(this.tjsjdata[0]
							.allhandlingfee) + Number(this.tjsjdata[0].bplr) +
						Number(this.tjsjdata[0].bplr1)).toFixed(2)
					this.loading = false;
				});
			},
			//搜索按钮使用
			getList1() {
				this.loading = true;
				goodsPayment(this.queryParams).then(response => {
					// console.log(response)
					this.disabled = false;
					this.block = true;
					this.tableData = response.rows;
					this.total = response.total
					this.loading = false;
				});
			},
			// 统计按钮操作
			handleStatistics() {
				this.timeList3 = [];
				this.timeList2 = [];
				this.timeList1 = [];
				let timeList1 = [];
				for (let i = 0; i < 3; i++) {
					timeList1.push(this.$moment().subtract(i, 'years').format("YYYY"))
				}
				timeList1.forEach(item => {
					this.timeList1.push({
						label: item,
						value: item,
					});
				})
				let timeList2 = [];
				for (let i = 0; i < 12; i++) {
					timeList2.push(this.$moment().subtract(i, 'months').format("YYYY-MM"))
				}
				timeList2.forEach(item => {
					this.timeList2.push({
						label: item,
						value: item,
					});
				})
				let timeList3 = [];
				for (let i = 0; i < 15; i++) {
					timeList3.push(this.$moment().subtract(i, 'days').format("YYYY-MM-DD"))
				}
				timeList3.forEach(item => {
					this.timeList3.push({
						label: item,
						value: item,
					});
				})
				getStatistics(this.queryParamsTj1).then(res => {
					this.tableData1 = res.data.table0.rows
					if (this.queryParamsTj1.type == 'Y') {
						this.timeList = this.timeList1;
						this.tjwidth = '450px';
					}
					if (this.queryParamsTj1.type == 'M') {
						this.timeList = this.timeList2
						this.tjwidth = '1250px';
					}
					if (this.queryParamsTj1.type == 'D') {
						this.timeList = this.timeList3
						this.tjwidth = '1500px';
					}
					this.tongji = true;
				})
			},
			// 统计按钮操作
			handleStatistics1() {
				this.queryParamsTj.details = '0';
				this.queryParamsTj.createTime = '';
				this.queryParamsTj.gameName = '';
				this.selectDateType();
				getquiryStatistics(this.queryParamsTj).then(res => {
					this.total1 = res.data.table.total
					this.tableData2 = res.data.table.rows
					this.tongji1 = true;
				})
			},
			selectDateType() {
				if (this.queryParamsHstj.type == 'D' || this.queryParamsTj.type == 'D' || this.queryParamsYxtj.type ==
					'D' || this.queryParamsQdtj.type == 'D' || this.queryParamsLrtj.type == 'D' || this.queryParamsThl
					.type == 'D') {
					this.Dtype = true;
					this.Mtype = false;
					if (this.value1 || this.value2) {
						this.queryParamsHstj.beginTime = this.value1[0];
						this.queryParamsHstj.endTime = this.value1[1];
						this.queryParamsTj.beginTime = this.value1[0];
						this.queryParamsTj.endTime = this.value1[1];
						this.queryParamsYxtj.beginTime = this.value1[0];
						this.queryParamsYxtj.endTime = this.value1[1];
						this.queryParamsQdtj.beginTime = this.value1[0];
						this.queryParamsQdtj.endTime = this.value1[1];
						this.queryParamsLrtj.beginTime = this.value1[0];
						this.queryParamsLrtj.endTime = this.value1[1];
						this.queryParamsThl.beginTime = this.value1[0];
						this.queryParamsThl.endTime = this.value1[1];
					}
				}
				if (this.queryParamsHstj.type == 'M' || this.queryParamsTj.type == 'M' || this.queryParamsYxtj.type ==
					'M' || this.queryParamsQdtj.type == 'M') {
					this.Dtype = false;
					this.Mtype = true;
					if (this.value1 || this.value2) {
						this.queryParamsHstj.beginTime = this.value2[0];
						this.queryParamsHstj.endTime = this.value2[1];
						this.queryParamsTj.beginTime = this.value2[0];
						this.queryParamsTj.endTime = this.value2[1];
						this.queryParamsYxtj.beginTime = this.value2[0];
						this.queryParamsYxtj.endTime = this.value2[1];
						this.queryParamsQdtj.beginTime = this.value2[0];
						this.queryParamsQdtj.endTime = this.value2[1];
					}

				}
				if (this.queryParamsHstj.type == 'Y' || this.queryParamsTj.type == 'Y' || this.queryParamsYxtj.type ==
					'Y' || this.queryParamsQdtj.type == 'Y') {
					this.Dtype = false;
					this.Mtype = true;
					if (this.value1 || this.value2) {
						this.queryParamsHstj.beginTime = this.value2[0].slice(0, 4);
						this.queryParamsHstj.endTime = this.value2[1].slice(0, 4);
						this.queryParamsTj.beginTime = this.value2[0].slice(0, 4);
						this.queryParamsTj.endTime = this.value2[1].slice(0, 4);
						this.queryParamsYxtj.beginTime = this.value2[0].slice(0, 4);
						this.queryParamsYxtj.endTime = this.value2[1].slice(0, 4);
						this.queryParamsQdtj.beginTime = this.value2[0].slice(0, 4);
						this.queryParamsQdtj.endTime = this.value2[1].slice(0, 4);
					}
				}
			},
			// 号商统计按钮操作
			handleStatistics2() {
				this.selectDateType();
				this.queryParamsHstj.details = '0';
				this.channel = 'N';
				getquiryHandlerStatistics(this.queryParamsHstj).then(res => {
					this.total4 = res.data.table.total
					this.tableData5 = res.data.table.rows
					let timelist = this.queryParamsHstj.beginTime + ',' + this.queryParamsHstj.endTime
					this.value1 = timelist.split(',')
					this.tongji4 = true;
				})
			},
			// 游戏统计按钮操作
			handleStatistics3() {
				this.selectDateType();
				this.queryParamsYxtj.details = '0';
				this.queryParamsYxtj.gameName = '';
				getquiryGameStatistics(this.queryParamsYxtj).then(res => {
					this.total5 = res.data.table.total
					this.tableData7 = res.data.table.rows
					let timelist = this.queryParamsYxtj.beginTime + ',' + this.queryParamsYxtj.endTime
					this.value1 = timelist.split(',')
					this.tongji6 = true;
				})
			},
			// 渠道统计按钮操作
			handleStatistics4() {
				this.selectDateType();
				this.queryParamsQdtj.details = '0';
				this.queryParamsQdtj.channel = '';
				getquiryChannelStatistics(this.queryParamsQdtj).then(res => {
					this.total6 = res.data.table.total
					this.tableData9 = res.data.table.rows
					let timelist = this.queryParamsQdtj.beginTime + ',' + this.queryParamsQdtj.endTime
					this.value1 = timelist.split(',')
					this.tongji8 = true;
				})
			},
			// 利润统计按钮操作
			handleStatistics5() {
				this.selectDateType();
				this.queryParamsLrtj.mainIndustry = '';
				getquiryLirunStatistics(this.queryParamsLrtj).then(res => {
					this.lirunList = res.data[0]
					//合计
					this.xsehj = (Number(res.data[0].shxse) + Number(res.data[0].xsj) + Number(res
						.data[0].hsxse) + Number(res.data[0].dsxse)).toFixed(2)
					this.sxfhj = (Number(res.data[0].dssxf) + Number(res.data[0].shsxf) + Number(res
								.data[0].hssxf) +
							Number(res.data[0].fxlr) + Number(res.data[0].zysxf) + Number(res.data[0].ptbp) +
							Number(res.data[0].dbpp) + Number(res.data[0].zycjl) + Number(res.data[0].xszfsxf))
						.toFixed(2)
					this.lirunListtotalPrice = (Number(res.data[0].dsj) + Number(res.data[0].dbpp) + Number(res
						.data[0]
						.ptbp) + Number(res.data[0].xszfsxf)).toFixed(2)
					let timelist = this.queryParamsLrtj.beginTime + ',' + this.queryParamsLrtj.endTime
					this.value1 = timelist.split(',')
					this.tongji11 = true;
				})
			},
			// 提号率按钮操作
			handleStatistics6() {
				this.selectDateType();
				getSuccessRate(this.queryParamsThl).then(res => {
					this.tableData12 = res.data.sort((a, b) => {
						return b.success - a.success;
					});
					let timelist = this.queryParamsThl.beginTime + ',' + this.queryParamsThl.endTime
					this.value1 = timelist.split(',')
					this.tongji12 = true;
				})
			},
			// 售后订单按钮操作
			handleStatistics7() {
				this.queryParamsShdd.beginTime=this.value3[0];
				this.queryParamsShdd.endTime=this.value3[1];
				goodsPayment(this.queryParamsShdd).then(res => {
					this.tableData13 = res.data.table.rows;
					let timelist = this.queryParamsShdd.beginTime + ',' + this.queryParamsShdd.endTime
					this.value3 = timelist.split(',')
					this.tongji13 = true;
					this.total13=res.data.table.total;
				})
			},
			// 售后订单按钮操作
			handleStatistics8() {
				this.tongji14 = true;
			},
			submitFormxgTk(){
				updateStatus(this.formXgtk.goodsId).then(res => {
					this.$message({
						type: 'success',
						message: '修改成功!'
					})
					this.tongji14 = false;
				})
			},
			// 明细按钮操作
			handleDetails(row) {
				this.queryParamsTj.createTime = row.create_time;
				this.queryParamsTj.details = '1';
				this.queryParamsTj.pageNum = 1;
				getquiryStatistics(this.queryParamsTj).then(res => {
					this.total2 = res.data.table.total
					this.tableData3 = res.data.table.rows
					this.tongji2 = true;
				})
			},
			// 明细按钮操作
			handleDetailsFy() {
				this.queryParamsTj.details = '1';
				getquiryStatistics(this.queryParamsTj).then(res => {
					this.total2 = res.data.table.total
					this.tableData3 = res.data.table.rows
					this.tongji2 = true;
				})
			},
			// 游戏明细按钮操作
			handleDetailsGameName(row) {
				this.queryParamsTj.createTime = row.create_time;
				this.queryParamsTj.gameName = row.game_name;
				this.queryParamsTj.pageNum = 1;
				this.queryParamsTj.details = '2';
				getquiryStatistics(this.queryParamsTj).then(res => {
					this.total3 = res.data.table.total
					this.tableData4 = res.data.table.rows
					this.tongji3 = true;
				})
			},
			// 游戏明细按钮操作
			handleDetailsGameNameFy(row) {
				this.queryParamsTj.details = '2';
				getquiryStatistics(this.queryParamsTj).then(res => {
					this.tableData4 = res.data.table.rows
					this.tongji3 = true;
				})
			},
			// 号商统计分页按钮操作
			handleDetailsHsFy(row) {
				this.queryParamsHstj.details = '0';
				this.channel = 'N';
				getquiryHandlerStatistics(this.queryParamsHstj).then(res => {
					this.tableData5 = res.data.table.rows
				})
			},
			handleDetailsYxtj(row) {
				this.queryParamsYxtj.gameName = row.game_name;
				this.queryParamsYxtj.details = '1';
				this.selectDateType();
				getquiryGameStatistics(this.queryParamsYxtj).then(res => {
					this.tableData8 = res.data.table.rows
					this.tongji7 = true;
				})
			},
			handleDetailsQdtj(row) {
				this.queryParamsQdtj.channel = row.distribution_channel;
				this.queryParamsQdtj.details = '1';
				this.selectDateType();
				getquiryChannelStatistics(this.queryParamsQdtj).then(res => {
					this.tableData10 = res.data.table.rows
					this.tongji9 = true;
				})
			},
			handleDetailsQdtj1(row) {
				this.queryParamsQdtj.gameName = row.game_name;
				this.queryParamsQdtj.details = '2';
				getquiryChannelStatistics(this.queryParamsQdtj).then(res => {
					this.tableData11 = res.data.table.rows
					this.tongji10 = true;
				})
			},
			// 游戏明细按钮操作（号商）
			handleDetailshstj(row) {
				this.queryParamsHstj.shopId = row.shop_Id;
				this.queryParamsHstj.beginTime = row.create_time;
				this.queryParamsHstj.endTime = row.create_time;
				this.queryParamsHstj.details = '1';
				getquiryHandlerStatistics(this.queryParamsHstj).then(res => {
					this.tableData6 = res.data.table.rows
					this.tongji5 = true;
				})
			},
			// 游戏明细按钮操作（号商）
			handleDetailshstj1() {
				if (this.checkList == 'Y') {
					this.queryParamsHstj.channel = "Y";
					this.channelvisible = true;
				} else {
					this.queryParamsHstj.channel = "";
					this.channelvisible = false;
				}
				getquiryHandlerStatistics(this.queryParamsHstj).then(res => {
					this.channelList = res.data.dataChannel
					let arr = []
					for (let key in this.channelList) {
						arr.push({
							value: this.channelList[key], // label 字段
							label: key // value字段
						})
					}
					this.channelList = arr
					this.tableData6 = res.data.table.rows
					this.tongji5 = true;
				})
			},
			/** 搜索按钮操作 */
			handleQuery() {
				this.disabled = true;
				this.block = false;
				this.queryParams.pageNum = 1;
				this.getList();
				if (this.admin != 'admin') {
					this.getquiryShopProfitStatistics();
				}
			},
			handleQuery1() {
				this.queryParams.pageNum = 1;
				this.getList();
				this.getquiryShopProfitStatistics();
			},
			handleQuery2() {
				this.disabled = true;
				this.block = false;
				this.queryParams.pageNum = 1;
				this.getList1();
			},
			/** 重置按钮操作 */
			resetQuery() {
				this.block = false;
				this.disabled = true;
				this.resetForm("queryForm");
				this.handleQuery1();
			},



			/** 详细按钮操作 */
			handleUpdate(row) {
				this.open = true;
				if (row.isSecurity == null) {
					this.bp = false
				} else {
					this.bp = true
				}
				let query = {
					id: row.id
				}
				getPaymentInfo(query).then(response => {
					this.form = response.data;
				});
			},
			//上传凭证按钮
			handleUpdate3(row) {
				Cookies.set('id', row.id)
				Cookies.set('mainIndustry', row.mainIndustry)
				this.open2 = true;
			},
			// 退款按钮
			handleUpdate4(row) {
				Cookies.set('id', row.id)
				this.tuikuan = true
			},
			// 撤回按钮
			// 撤回按钮
			handleUpdate5(row) {
			  this.$prompt('请输入商品编码', '确认撤回', {
			    confirmButtonText: '确定',
			    cancelButtonText: '取消',
			    inputPattern: /^\S+$/, // 可选：正则限制输入（非空等）
			    inputErrorMessage: '商品编码不能为空' // 正则不通过时的提示
			  }).then(({ value }) => {
			    // value 是用户输入的商品编码
			    // 这里可校验 value 是否等于 row.goodsId（如果需要匹配）
			    if (value !== row.goodsId) {
			      this.$message({
			        type: 'warning',
			        message: '商品编码不匹配，请重新输入'
			      });
			      return; // 不继续执行撤回逻辑
			    }else{
					let query = {
					  id: row.id
					}
					console.log(query)
					revoke(query).then(res => {
					  this.$message({
					    type: 'success',
					    message: '撤回成功!'
					  })
					  this.getList()
					})
				}
			  }).then(() => {

			  }).catch((error) => {
			    // 取消或输入错误时的处理
			    if (error === 'cancel') {
			      this.$message({
			        type: 'info',
			        message: '已取消撤回'
			      });
			    } else {
			      // 输入错误（如正则校验失败），可根据需要处理
			    }
			  });
			},
			// handleUpdate5(row) {
			// 	this.$confirm('确定撤销商品编号为' + row.goodsId + '的数据吗？', '撤回', {
			// 		confirmButtonText: '确定',
			// 		cancelButtonText: '取消',
			// 		type: 'warning'
			// 	}).then(() => {
			// 		let query = {
			// 			id: row.id
			// 		}
			// 		revoke(query).then(res => {
			// 			this.$message({
			// 				type: 'success',
			// 				message: '撤回成功!'
			// 			})
			// 			this.getList()
			// 		})

			// 	}).catch(() => {
			// 		this.$message({
			// 			type: 'info',
			// 			message: '已取消撤回'
			// 		});
			// 	});

			// },
			goQdlb(item) {
				let channel = item.distributionChannel;
				this.$router.push({
					path: "/MoneyGoodsPayment/goodsPaymentqdxq?channel=" + channel
				}).catch(() => {});
			},
			bh() {
				let id = Cookies.get('id')
				let query = {
					id: id,
					remark: this.queryParams.remark
				}
				updateTefund(query).then(res => {
					// console.log(res)
					this.$message({
						type: 'success',
						message: '退款成功!'
					})
					this.tuikuan = false
					this.getList()
				})
			},
			/** 编辑按钮操作 */
			handleUpdate1(row) {
				if (row.paymentMethod == 'pay_type_4' || row.paymentMethod == '' || row.paymentMethod == 'null' || row
					.paymentMethod == null) {
					this.xs = false
					this.xx = true
					this.bp = true
					this.dbbp = true
				} else {
					this.xs = true
					this.xx = false
					this.bp = false
					this.dbbp = false
				}
				if (row.distributionChannel != 'taohaowan' && row.distributionChannel !=
					'all' && row.distributionChannel != 'null' && row.distributionChannel != null) {
					this.channelid = true
				} else {
					this.channelid = false
				}
				if (row.isSecurity == 'Y') {
					this.bp1 = true
				} else {
					this.bp1 = false
				}
				if (row.isMultiple == 'is_multiple_0') {
					this.bp2 = true
				} else {
					this.bp2 = false
				}
				if (row.byStages != '' && row.byStages != null && row.byStages != 'null') {
					this.dbbp1 = true
				} else {
					this.dbbp1 = false
				}
				if (row.paymentStatus == 'CX' || row.paymentStatus == 'DH') {
					this.ch = true;
				} else {
					this.ch = false;
				}
				let query = {
					goodsId: row.goodsId
				}
				let data = {
					goodsId: row.goodsId
				}
				getGoodsInfo(data).then(response => {
					if (response.data.gameAccount != undefined && response.data.gameAccount != '') {
						this.form1.gameAccount = response.data.gameAccount;
					} else {
						this.form1.gameAccount = null
					}
					this.form1.id = response.data.id;
					this.form1.goodsName = response.data.goodsName;
					this.form1.gameId = response.data.gameId;
					this.form1.gameareaValue = response.data.gameareaValue;
					this.form1.identifiedName = response.data.identifiedName;
					this.form1.ranking = response.data.ranking;
					this.form1.shopName = response.data.shopName;
					this.form1.price = response.data.price;
					this.form1.discountedPrice = response.data.discountedPrice;
					Cookies.set('mainIndustry', response.data.mainIndustry)
					Cookies.set('shopId', response.data.shopId)
					if (response.data.mainIndustry == 'account_source_0' || response.data.mainIndustry ==
						'account_source_1' || response.data.mainIndustry == 'account_source_3') {
						this.cbj = true;
					} else {
						this.cbj = false;
					}
				});
				let query1 = {
					id: row.id
				}
				getPaymentInfo(query1).then(response => {
					this.form1.paidinPrice = Number(response.data.paidinPrice);
					this.form1.originalPrice = response.data.originalPrice;
					if (this.$auth.hasPermi('system:goodsPayment:nbhs')) {
						if (!this.bpLr6) {
							this.form1.distributionChannel = 'taohaowan';
							this.bpLr7 = true;
						} else {
							this.form1.distributionChannel = response.data.distributionChannel;
						}
					} else {
						this.form1.distributionChannel = response.data.distributionChannel;
					}
					this.form1.paymentMethod = response.data.paymentMethod;
					this.form1.handlingfee = response.data.handlingfee;
					this.form1.paymentChannels = response.data.paymentChannels;
					this.form1.channelId = response.data.channelId;
					this.form1.isSecurity = response.data.isSecurity;
					this.form1.securityRate = response.data.securityRate;
					this.form1.securityPrice = response.data.securityPrice;
					this.form1.isMultiple = response.data.isMultiple;
					this.form1.securityRate1 = response.data.securityRate1;
					this.form1.multiplePrice = response.data.multiplePrice;
					this.form1.byStages = response.data.byStages;
					this.open1 = true
					Cookies.set('distributionChannel', response.data.distributionChannel)

				});
				this.queryParams.originalPrice = row.originalPrice
				Cookies.set('id', row.id)
				Cookies.set('goodsId', row.goodsId)
				Cookies.set('mainIndustry', row.mainIndustry)
			},
			// 申请结算
			handleUpdate2(row) {
				let pastTime = row.createTime
				let now = this.$moment(pastTime).format('YYYY-MM-DD')
				let days = this.$moment().format('YYYY-MM-DD')
				if (now != days) {
					if (row.settlementPrice == null || Number(row.settlementPrice) == 0 || row.settlementPrice == '' || row
						.settlementPrice == 'null') {
						this.$alert('无结算价格,请联系客服', '提示', {
							confirmButtonText: '确定',
						});
					} else if (row.paymentMethod=='pay_type_4'&&(!row.paymentVoucher || row.paymentVoucher === 'null')) {
						this.$alert('无付款凭证,请联系客服', '提示', {
							confirmButtonText: '确定',
						});
					} else {
						this.$confirm('您的结算金额是 ￥' + row.settlementPrice + '', '申请结算', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							type: 'warning'
						}).then(() => {
							let query = {
								id: row.id
							}
							applyForSettlement(query).then(res => {
								this.$message({
									type: 'success',
									message: '结算成功!'
								})
								this.getList()
							})

						}).catch(() => {
							this.$message({
								type: 'info',
								message: '已取消结算'
							});
						});
					}
				} else {
					this.$message.error('当天订单不能申请结算!');
				}







			},

			submitForm1() {
				this.$refs["form1"].validate(valid => {
					if (valid) {
						let goodsid = Cookies.get('id')
						let goodsId = Cookies.get('goodsId')
						let shopId = Cookies.get('shopId')
						let getdistributionChannel = Cookies.get('distributionChannel')
						if (typeof(this.form1.distributionChannel) == 'string') {
							if (getdistributionChannel != 'null') {
								this.form1.distributionChannel = getdistributionChannel
							} else {
								this.form1.distributionChannel = this.form1.distributionChannel
							}
						} else {
							this.form1.distributionChannel = this.form1.distributionChannel[1]
						}
						if (this.form1.isMultiple == '') {
							this.form1.isMultiple = null
						}
						if (this.form1.multiplePrice == '0.00') {
							this.form1.multiplePrice = null
						}
						let getmainIndustry = Cookies.get('mainIndustry')
						let query = {
							id: goodsid,
							// goodsId: this.form1.id,
							goodsId: goodsId,
							shopId: shopId,
							gameAccount: this.form1.gameAccount,
							originalPrice: this.form1.originalPrice,
							salesPrice: this.form1.price,
							paymentChannels: this.form1.paymentChannels,
							paidinPrice: this.form1.paidinPrice,
							distributionChannel: this.form1.distributionChannel,
							channelId: this.form1.channelId,
							isSecurity: this.form1.isSecurity,
							securityRate: this.form1.securityRate,
							securityPrice: this.form1.securityPrice,
							isMultiple: this.form1.isMultiple,
							securityRate1: this.form1.securityRate1,
							multiplePrice: this.form1.multiplePrice,
							byStages: this.form1.byStages,
						}
						if (this.form1.gameAccount == null || this.form1.gameAccount == '') {
							this.$message.error('请输入游戏账号!');
						} else {
							edit(query).then(response => {
								this.form1.byStages = null;
								this.form1.distributionChannel = null;
								this.dbbp = false;
								this.dbbp1 = false;
								this.channelid = false
								this.bp = false;
								this.bp2 = false;
								this.bp1 = false;
								this.open1 = false
								this.getList()
								this.$message({
									type: 'success',
									message: '编辑成功'
								})
							});
						}
					}
				})



			},
			submitForm2() {
				// console.log(this.form.electronicDataList.toString())
				let electronicDataList = this.form.electronicDataList.toString();
				let goodsid = Cookies.get('id')
				let getmainIndustry = Cookies.get('mainIndustry')
				let query = {
					mainIndustry: getmainIndustry,
					paymentVoucher: electronicDataList,
					paymentChannels: this.form1.paymentChannels,
					id: goodsid,
				}
				updatePic(query).then(response => {
					this.form.electronicDataList = []
					this.open2 = false
					this.getList()
				});
			},
			cancel() {
				this.dbbp = false;
				this.channelid = false
				this.bp = false;
				this.bp2 = false;
				this.bp1 = false;
				this.open1 = false;
				this.open2 = false;
				this.resetForm("form");
				this.resetForm("form1");
			},



		}
	};
</script>
<style>
	.lirunList {
		line-height: 30px;
	}

	.lirunList p {
		display: flex;
		justify-content: space-between;
	}

	.lirunList p span {
		font-weight: 700;
		width: 20%;
	}

	.el-table .warning-row {
		background: oldlace;
	}

	.el-table .success-row {
		background: #f0f9eb;
	}

	.father {
		height: 80px;
		line-height: 80px;
		font-size: 20px;
		display: flex;
		justify-content: space-between;
	}

	.father1 {
		height: 80px;
		line-height: 80px;
		font-size: 20px;
		display: flex;
		justify-content: space-between;
	}

	.el-icon-loading {
		color: green;
		margin-right: 5px;
	}

	.el-icon-message-solid {
		color: green;
		margin-right: 5px;
	}

	.el-icon-check {
		color: green;
		margin-right: 5px;
	}

	.el-icon-coin {
		color: green;
		margin-right: 5px;
	}
</style>
