Commit ad682332 authored by 罗超's avatar 罗超

1

parent c04c6242
...@@ -2,129 +2,228 @@ ...@@ -2,129 +2,228 @@
<div class="fxOrderProfitLossList"> <div class="fxOrderProfitLossList">
<div class="el-card__header"> <div class="el-card__header">
<span>损益核算</span> <span>损益核算</span>
<div style="display: flex;flex-direction: row;align-items: center"> <div style="display: flex; flex-direction: row; align-items: center">
<!----> <!---->
<el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button> <el-button type="primary" class="el-button--small" @click="Export"
>导出全部</el-button
>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div style="display: flex;flex-direction: row;align-items: center"> <div style="display: flex; flex-direction: row; align-items: center">
<span>供应商</span> <span>供应商</span>
<el-select class="w150" style="margin-left: 10px;" v-model="msg.SupplierId" filterable size="small" <el-select
placeholder="请选择" @change="msg.pageIndex=1,getTotalOrderProfitLoss()"> class="w150"
style="margin-left: 10px"
v-model="msg.SupplierId"
filterable
size="small"
placeholder="请选择"
@change="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
>
<el-option :key="0" :value="0" label="全部"></el-option> <el-option :key="0" :value="0" label="全部"></el-option>
<el-option v-for="item in options" :key="item.ID" :label="item.Name" :value="item.ID"> <el-option
v-for="item in options"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<div class="block" style="margin-left: 10px;"> <div class="block" style="margin-left: 10px">
<el-date-picker style="padding: 3px 10px;width: 380px;height: 32px" v-model="value" type="daterange" <el-date-picker
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" style="padding: 3px 10px; width: 380px; height: 32px"
@change="change" align="right"> v-model="value"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="change"
align="right"
>
</el-date-picker> </el-date-picker>
</div> </div>
<span style="margin:0 10px">订单号</span> <span style="margin: 0 10px">订单号</span>
<el-input v-model="msg.OrderNo" placeholder="请输入订单号" style="width:200px" <el-input
@keyup.enter.native='msg.pageIndex=1,getTotalOrderProfitLoss()' clearable v-model="msg.OrderNo"
@clear="msg.pageIndex=1,getTotalOrderProfitLoss()" placeholder="请输入订单号"
style="width: 200px"
@keyup.enter.native="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
clearable
@clear="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
></el-input> ></el-input>
<span style="margin:0 10px">商品名称</span> <!-- ------------ -->
<el-autocomplete style="width:350px" v-model="GoodsIDs" :fetch-suggestions="remoteMethod" placeholder="请输入" <span style="margin: 0 10px">单价</span>
@select="forceUpdate" @blur="spget()" :trigger-on-focus="false"></el-autocomplete> <el-input
<span style="margin:0 10px">代理</span> v-model.number="msg.Unit_Price"
<el-autocomplete v-model="OneUserId" :fetch-suggestions="querySearchAsync" placeholder="请输入" placeholder="请输入单价"
@select="handleSelect" @blur="dlget()" :trigger-on-focus="false"></el-autocomplete> style="width: 100px"
type="number"
:step="0.01"
@keyup.enter.native="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
@clear="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
></el-input
>-
<el-input
v-model.number="msg.EndUnit_Price"
placeholder="请输入单价"
style="width: 100px"
type="number"
:step="0.01"
@keyup.enter.native="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
@clear="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
></el-input>
<span style="margin: 0 10px">商品名称</span>
<el-autocomplete
style="width: 350px"
v-model="GoodsIDs"
:fetch-suggestions="remoteMethod"
placeholder="请输入"
@select="forceUpdate"
@blur="spget()"
:trigger-on-focus="false"
></el-autocomplete>
</div> </div>
<div style="margin:10px 0"> <div style="margin: 10px 0">
<span style="margin: 0 10px">代理</span>
<el-autocomplete
v-model="OneUserId"
:fetch-suggestions="querySearchAsync"
placeholder="请输入"
@select="handleSelect"
@blur="dlget()"
:trigger-on-focus="false"
></el-autocomplete>
<span>公司名称</span> <span>公司名称</span>
<el-select size="small" v-model="msg.CompanyId" :filter-method="ChangeListName" filterable placeholder="请选择" @change="msg.pageIndex=1,getTotalOrderProfitLoss()"> <el-select
size="small"
v-model="msg.CompanyId"
:filter-method="ChangeListName"
filterable
placeholder="请选择"
@change="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
>
<el-option label="不限" :value="0"></el-option> <el-option label="不限" :value="0"></el-option>
<el-option v-for="item in companyData" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option
v-for="item in companyData"
:key="item.Id"
:label="item.Name"
:value="item.Id"
>
</el-option> </el-option>
</el-select> </el-select>
<div style="float: right">
<span style="margin: 0 10px">平均毛利:</span>
<span style="color: #f00">{{ OrderProfitLoss.AvgGrossProfit }}</span>
</div> </div>
</div> </div>
<div style="padding: 10px 20px;background: #fff;margin-top: 10px">
<!-- <div class="Subtotal">-->
<!-- <div class="Subtotal_item" style="margin:15px">-->
<!-- <div style='width:100%;border-bottom:1px solid #f2f2f2'>-->
<!-- <i class="iconfont icon-qian groupTourOrder_count_green" style="font-size:12px"></i>-->
<!-- <span class='Subtotal_t'>营业收入</span>-->
<!-- </div>-->
<!-- <div><span class='Subtotal_t'>结算款:</span>{{OrderProfitLoss.TotalFinal_Price}}</div>-->
<!-- <div><span class='Subtotal_t'>运费收入:</span>{{OrderProfitLoss.TotalFreightMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>已收:</span>{{OrderProfitLoss.TotalAllPrice}}</div>-->
<!-- <div><span class='Subtotal_t'>未收款:</span>{{OrderProfitLoss.TotalNoAllPrice }}</div>-->
<!-- <div><span class='Subtotal_t'>合计数:</span>{{OrderProfitLoss.TotalPay}}</div>-->
<!-- </div>-->
<!-- <div class="Subtotal_item" style="margin:15px">-->
<!-- <div style='width:100%;border-bottom:1px solid #f2f2f2'>-->
<!-- <i class="iconfont icon-qian groupTourOrder_count_green" style="font-size:12px"></i>-->
<!-- <span class='Subtotal_t'>营业成本</span>-->
<!-- </div>-->
<!-- <div class="ProfitLoss">-->
<!-- <div class="ProfitLoss_xbox">-->
<!-- <div><span class='Subtotal_t'>采购成本:</span>{{OrderProfitLoss.TotalCostMoney }}</div>-->
<!--&lt;!&ndash; <div><span class='Subtotal_t'>包装费摊销:</span>{{OrderProfitLoss.TotalPackingMoney }}</div>&ndash;&gt;-->
<!-- <div><span class='Subtotal_t'>运费支出:</span>{{OrderProfitLoss.TotalGoodsFreight }}</div>-->
<!--&lt;!&ndash; <div><span class='Subtotal_t'>商品运费摊销:</span>{{OrderProfitLoss.TotalGoodsFreight }}</div>&ndash;&gt;-->
<!-- <div><span class='Subtotal_t'>其他:</span>{{OrderProfitLoss.TotalOneOtherPrice }}</div>-->
<!-- </div>-->
<!-- <div class="ProfitLoss_xbox" style="margin-left:60px">-->
<!-- <div><span class='Subtotal_t'>合计:</span>{{OrderProfitLoss.TotalALLCommission }}</div>-->
<!-- <div><span class='Subtotal_t'>已付:</span>{{OrderProfitLoss.TotalPaid }}</div>-->
<!-- <div><span class='Subtotal_t'>未付:</span>{{OrderProfitLoss.TotalNoPaid }}</div>-->
<!-- <div><span class='Subtotal_t'>毛利:</span>{{OrderProfitLoss.TotalGrossProfit }}</div>-->
<!-- <div><span class='Subtotal_t'>总返佣:</span>{{OrderProfitLoss.TotalFXCommission }}</div>-->
<!-- </div>-->
<!-- <div class="ProfitLoss_xbox" style="margin-left:60px">-->
<!-- <div><span class='Subtotal_t'>已返佣金额:</span>{{OrderProfitLoss.TotalRemitFXCommission }}</div>-->
<!-- <div><span class='Subtotal_t'>已付成本:</span>{{OrderProfitLoss.TotalPaidCostMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>其他实收:</span>{{OrderProfitLoss.TotalRealMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>其他实付:</span>{{OrderProfitLoss.TotalPayMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>优惠金额:</span>{{OrderProfitLoss.TotalCouponMoney }}</div>-->
<!-- </div>-->
<!-- <div class="ProfitLoss_xbox" style="margin-left:60px">-->
<!--&lt;!&ndash; <div><span class='Subtotal_t'>公司结算金额:</span>{{OrderProfitLoss.TotalCompanyProfit }}</div>&ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div> </div>
<el-table :data="tableData" v-loading="loading" header-cell-class-name="headClass" style="width: 100%" border> <div style="padding: 10px 20px; background: #fff; margin-top: 10px">
<!-- <div class="Subtotal">-->
<!-- <div class="Subtotal_item" style="margin:15px">-->
<!-- <div style='width:100%;border-bottom:1px solid #f2f2f2'>-->
<!-- <i class="iconfont icon-qian groupTourOrder_count_green" style="font-size:12px"></i>-->
<!-- <span class='Subtotal_t'>营业收入</span>-->
<!-- </div>-->
<!-- <div><span class='Subtotal_t'>结算款:</span>{{OrderProfitLoss.TotalFinal_Price}}</div>-->
<!-- <div><span class='Subtotal_t'>运费收入:</span>{{OrderProfitLoss.TotalFreightMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>已收:</span>{{OrderProfitLoss.TotalAllPrice}}</div>-->
<!-- <div><span class='Subtotal_t'>未收款:</span>{{OrderProfitLoss.TotalNoAllPrice }}</div>-->
<!-- <div><span class='Subtotal_t'>合计数:</span>{{OrderProfitLoss.TotalPay}}</div>-->
<!-- </div>-->
<!-- <div class="Subtotal_item" style="margin:15px">-->
<!-- <div style='width:100%;border-bottom:1px solid #f2f2f2'>-->
<!-- <i class="iconfont icon-qian groupTourOrder_count_green" style="font-size:12px"></i>-->
<!-- <span class='Subtotal_t'>营业成本</span>-->
<!-- </div>-->
<!-- <div class="ProfitLoss">-->
<!-- <div class="ProfitLoss_xbox">-->
<!-- <div><span class='Subtotal_t'>采购成本:</span>{{OrderProfitLoss.TotalCostMoney }}</div>-->
<!--&lt;!&ndash; <div><span class='Subtotal_t'>包装费摊销:</span>{{OrderProfitLoss.TotalPackingMoney }}</div>&ndash;&gt;-->
<!-- <div><span class='Subtotal_t'>运费支出:</span>{{OrderProfitLoss.TotalGoodsFreight }}</div>-->
<!--&lt;!&ndash; <div><span class='Subtotal_t'>商品运费摊销:</span>{{OrderProfitLoss.TotalGoodsFreight }}</div>&ndash;&gt;-->
<!-- <div><span class='Subtotal_t'>其他:</span>{{OrderProfitLoss.TotalOneOtherPrice }}</div>-->
<!-- </div>-->
<!-- <div class="ProfitLoss_xbox" style="margin-left:60px">-->
<!-- <div><span class='Subtotal_t'>合计:</span>{{OrderProfitLoss.TotalALLCommission }}</div>-->
<!-- <div><span class='Subtotal_t'>已付:</span>{{OrderProfitLoss.TotalPaid }}</div>-->
<!-- <div><span class='Subtotal_t'>未付:</span>{{OrderProfitLoss.TotalNoPaid }}</div>-->
<!-- <div><span class='Subtotal_t'>毛利:</span>{{OrderProfitLoss.TotalGrossProfit }}</div>-->
<!-- <div><span class='Subtotal_t'>总返佣:</span>{{OrderProfitLoss.TotalFXCommission }}</div>-->
<!-- </div>-->
<!-- <div class="ProfitLoss_xbox" style="margin-left:60px">-->
<!-- <div><span class='Subtotal_t'>已返佣金额:</span>{{OrderProfitLoss.TotalRemitFXCommission }}</div>-->
<!-- <div><span class='Subtotal_t'>已付成本:</span>{{OrderProfitLoss.TotalPaidCostMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>其他实收:</span>{{OrderProfitLoss.TotalRealMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>其他实付:</span>{{OrderProfitLoss.TotalPayMoney }}</div>-->
<!-- <div><span class='Subtotal_t'>优惠金额:</span>{{OrderProfitLoss.TotalCouponMoney }}</div>-->
<!-- </div>-->
<!-- <div class="ProfitLoss_xbox" style="margin-left:60px">-->
<!--&lt;!&ndash; <div><span class='Subtotal_t'>公司结算金额:</span>{{OrderProfitLoss.TotalCompanyProfit }}</div>&ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<el-table
:data="tableData"
v-loading="loading"
header-cell-class-name="headClass"
style="width: 100%"
border
>
<el-table-column label="商品信息" align="center"> <el-table-column label="商品信息" align="center">
<el-table-column label="订单号" prop="OrderNo" width="200" :show-overflow-tooltip='true'> <el-table-column
label="订单号"
prop="OrderNo"
width="200"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.OrderNo}} {{ scope.row.OrderNo }}
<el-tooltip class="item" effect="dark" content="已取消" placement="top" v-if="scope.row.OrderStatus==7" <el-tooltip
style=""> class="item"
<i class="el-tooltip el-icon-info" style="color: #FF4048"></i> effect="dark"
content="已取消"
placement="top"
v-if="scope.row.OrderStatus == 7"
style=""
>
<i class="el-tooltip el-icon-info" style="color: #ff4048"></i>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" width="200" :show-overflow-tooltip='true'> <el-table-column label="规格" width="200" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.GoodsName}}{{scope.row.Specification}} {{ scope.row.GoodsName }}{{ scope.row.Specification }}
<!--<p v-for="(item,index) in scope.row.Specification " :key="index">{{item}}</p>--> <!--<p v-for="(item,index) in scope.row.Specification " :key="index">{{item}}</p>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单价" prop="Unit_Price" ></el-table-column> <el-table-column label="单价" prop="Unit_Price"></el-table-column>
<el-table-column label="数量" prop="Number"></el-table-column> <el-table-column label="数量" prop="Number"></el-table-column>
<el-table-column label="供应商" prop="SupplierName" width="120" :show-overflow-tooltip='true'></el-table-column> <el-table-column
label="供应商"
prop="SupplierName"
width="120"
:show-overflow-tooltip="true"
></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="营业收入" align="center"> <el-table-column label="营业收入" align="center">
<el-table-column label="结算款" prop="Final_Price" ></el-table-column> <el-table-column label="结算款" prop="Final_Price"></el-table-column>
<el-table-column label="运费收入" prop="FreightMoney" ></el-table-column> <el-table-column label="运费收入" prop="FreightMoney"></el-table-column>
<el-table-column label="保险收入" prop="InsuranceMoney" ></el-table-column> <el-table-column
<el-table-column label="已收" prop="AllPrice" ></el-table-column> label="保险收入"
prop="InsuranceMoney"
></el-table-column>
<el-table-column label="已收" prop="AllPrice"></el-table-column>
<!--结算款-已收--> <!--结算款-已收-->
<!--暂时写为0--> <!--暂时写为0-->
<!--<p>{{scope.row.Final_Price - scope.row.FreightMoney}}</p>--> <!--<p>{{scope.row.Final_Price - scope.row.FreightMoney}}</p>-->
...@@ -133,42 +232,83 @@ ...@@ -133,42 +232,83 @@
<p>0</p> <p>0</p>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="其他收入" prop="YSMoney" width="80"></el-table-column> <el-table-column
label="其他收入"
prop="YSMoney"
width="80"
></el-table-column>
<el-table-column label="合计收入"> <el-table-column label="合计收入">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.AllPrice+scope.row.YSMoney}} {{ scope.row.AllPrice + scope.row.YSMoney }}
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="营业成本" align="center"> <el-table-column label="营业成本" align="center">
<el-table-column label="手续费" prop="ServiceCharge" width="80"> <el-table-column label="手续费" prop="ServiceCharge" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.OrderNo == '小计'"
<span v-if="scope.row.OrderNo=='小计' ">{{(scope.row.ServiceCharge-scope.row.ReturnServiceCharge).toFixed(2)}} </span> >{{
<span v-else >{{scope.row.ServiceCharge}}<span style=" color: #ff4544;" v-if="scope.row.ReturnServiceCharge>0">-{{scope.row.ReturnServiceCharge}}</span> </span> (
scope.row.ServiceCharge - scope.row.ReturnServiceCharge
).toFixed(2)
}}
</span>
<span v-else
>{{ scope.row.ServiceCharge
}}<span
style="color: #ff4544"
v-if="scope.row.ReturnServiceCharge > 0"
>-{{ scope.row.ReturnServiceCharge }}</span
>
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购成本" prop="CostMoney"></el-table-column> <el-table-column label="采购成本" prop="CostMoney"></el-table-column>
<el-table-column label="运费支出" prop="GoodsFreight" ></el-table-column> <el-table-column label="运费支出" prop="GoodsFreight"></el-table-column>
<el-table-column label="保险支出" prop="InsuranceCostMoney" ></el-table-column> <el-table-column
label="保险支出"
prop="InsuranceCostMoney"
></el-table-column>
<!-- <el-table-column label="已付成本" prop="PaidCostMoney" ></el-table-column> --> <!-- <el-table-column label="已付成本" prop="PaidCostMoney" ></el-table-column> -->
<el-table-column label="总返佣" prop="FXCommission" > <el-table-column label="总返佣" prop="FXCommission">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.OrderNo=='小计' || scope.row.OrderStatus==7 " >{{scope.row.FXCommission}}</span> <span
<span v-else @click="showFXCommission(scope.row)" style=" color: #409EFF;cursor:pointer">{{scope.row.FXCommission}}</span> v-if="scope.row.OrderNo == '小计' || scope.row.OrderStatus == 7"
>{{ scope.row.FXCommission }}</span
>
<span
v-else
@click="showFXCommission(scope.row)"
style="color: #409eff; cursor: pointer"
>{{ scope.row.FXCommission }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已返佣" prop="RemitFXCommission" width="70"></el-table-column> <el-table-column
<el-table-column label="订单优惠金额" prop="CouponMoney" width="70"></el-table-column> label="已返佣"
<el-table-column label="退款金额" prop="RefundActual" width="80"></el-table-column> prop="RemitFXCommission"
<el-table-column label="其他支出" prop="YFMoney" width="80"></el-table-column> width="70"
></el-table-column>
<el-table-column
label="订单优惠金额"
prop="CouponMoney"
width="70"
></el-table-column>
<el-table-column
label="退款金额"
prop="RefundActual"
width="80"
></el-table-column>
<el-table-column
label="其他支出"
prop="YFMoney"
width="80"
></el-table-column>
<!-- <el-table-column label="其他" prop="OtherPrice" width="70"></el-table-column> <!-- <el-table-column label="其他" prop="OtherPrice" width="70"></el-table-column>
<el-table-column label="合计" prop="ALLCommission" width="70"></el-table-column> --> <el-table-column label="合计" prop="ALLCommission" width="70"></el-table-column> -->
<el-table-column prop="NoPaid" label="应付" ></el-table-column> <el-table-column prop="NoPaid" label="应付"></el-table-column>
<el-table-column prop="Paid" label="已付"></el-table-column> <el-table-column prop="Paid" label="已付"></el-table-column>
</el-table-column> </el-table-column>
<!-- <el-table-column label="其他" align="center"> <!-- <el-table-column label="其他" align="center">
...@@ -178,65 +318,80 @@ ...@@ -178,65 +318,80 @@
<el-table-column label="实付" prop="PayMoney" width="70"></el-table-column> <el-table-column label="实付" prop="PayMoney" width="70"></el-table-column>
</el-table-column> --> </el-table-column> -->
<el-table-column prop="TotalDepositMoney" label="储值卡抵扣" ></el-table-column> <el-table-column
<el-table-column prop="CompanyName" label="公司名称" width="120"></el-table-column> prop="TotalDepositMoney"
label="储值卡抵扣"
<el-table-column prop="GrossProfit" label="毛利" ></el-table-column> ></el-table-column>
<!-- <el-table-column label="分公司结算" >--> <el-table-column
<!-- <template slot-scope="scope">--> prop="CompanyName"
<!-- <span >{{((scope.row.GrossProfit *scope.row.CompanyProfitRate)/100).toFixed(2)}}</span>--> label="公司名称"
<!-- </template>--> width="120"
<!-- </el-table-column>--> ></el-table-column>
<el-table-column prop="GrossProfit" label="毛利"></el-table-column>
<!-- <el-table-column label="分公司结算" >-->
<!-- <template slot-scope="scope">-->
<!-- <span >{{((scope.row.GrossProfit *scope.row.CompanyProfitRate)/100).toFixed(2)}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="GrossProfitRate" label="毛利率" width="100"> <el-table-column prop="GrossProfitRate" label="毛利率" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.GrossProfitRate}}% {{ scope.row.GrossProfitRate }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize" :current-page.sync="msg.pageIndex" <el-pagination
layout="prev, pager, next" :total="count"> style="text-align: right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
:current-page.sync="msg.pageIndex"
layout="prev, pager, next"
:total="count"
>
</el-pagination> </el-pagination>
<el-dialog title="查看返佣" :visible.sync="czjfDig" width="900px"> <el-dialog title="查看返佣" :visible.sync="czjfDig" width="900px">
<div class="diaBox" style=""> <div class="diaBox" style="">
<div v-if="itemData.LiveCommission>0"> <div v-if="itemData.LiveCommission > 0">
<span>直播总人数:{{itemData.LivePeopleNum}}人</span> <span>直播总人数:{{ itemData.LivePeopleNum }}人</span>
<span style="margin-left: 30px" >直播总佣金:{{itemData.LiveCommission}}元</span> <span style="margin-left: 30px"
>直播总佣金:{{ itemData.LiveCommission }}元</span
>
</div> </div>
<div class="diaBox" style='margin-top:15px' > <div class="diaBox" style="margin-top: 15px">
<el-table <el-table border :data="CommissionList" style="width: 800px">
border <el-table-column prop="Commission" label="返佣类型">
:data="CommissionList"
style="width: 800px">
<el-table-column prop="Commission" label="返佣类型" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.CommissionType==1">订单返佣:{{scope.row.Commission}}</span> <span v-if="scope.row.CommissionType == 1"
<span v-if="scope.row.CommissionType==2">供应商返佣:{{scope.row.Commission}}</span> >订单返佣:{{ scope.row.Commission }}</span
<span v-if="scope.row.CommissionType==3">微店返佣:{{scope.row.Commission}}</span>
<span v-if="scope.row.CommissionType==4">vip购买返佣:{{scope.row.Commission}}</span>
</template>
</el-table-column>
<el-table-column
prop="UserName"
label="昵称"
> >
<span v-if="scope.row.CommissionType == 2"
>供应商返佣:{{ scope.row.Commission }}</span
>
<span v-if="scope.row.CommissionType == 3"
>微店返佣:{{ scope.row.Commission }}</span
>
<span v-if="scope.row.CommissionType == 4"
>vip购买返佣:{{ scope.row.Commission }}</span
>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="UserName" label="昵称"> </el-table-column>
prop="Name" <el-table-column prop="Name" label="名称"> </el-table-column>
label="名称">
</el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="czjfDig = false">我知道了</el-button> <el-button type="primary" size="small" @click="czjfDig = false"
>我知道了</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "fxOrderProfitLossList", name: "fxOrderProfitLossList",
data() { data() {
return { return {
...@@ -245,57 +400,68 @@ ...@@ -245,57 +400,68 @@
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
SupplierId: 0, SupplierId: 0,
StartDate: '', StartDate: "",
EndDate: '', EndDate: "",
OrderNo: '', //订单号 OrderNo: "", //订单号
GoodsID: 0, GoodsID: 0,
OneUserId: 0, OneUserId: 0,
IsFxCommission:1, IsFxCommission: 1,
CompanyId:0, CompanyId: 0,
Unit_Price: 0, //单价
EndUnit_Price: 0, //单价
}, },
CommissionList:[], CommissionList: [],
czjfDig:false, czjfDig: false,
options: [], options: [],
tableData: [], tableData: [],
searchList: [], searchList: [],
companyData:[],//公司列表 companyData: [], //公司列表
count: 0, count: 0,
loading: false, loading: false,
GoodsIDs: '', //商品id GoodsIDs: "", //商品id
OneUserId: '', //代理 OneUserId: "", //代理
OrderProfitLoss: {}, //小计 OrderProfitLoss: {}, //小计
itemData:{}, itemData: {},
} };
}, },
created() { created() {
if(this.$route.query.year && this.$route.query.month) if (this.$route.query.year && this.$route.query.month) {
{ this.msg.StartDate =
this.msg.StartDate=this.$route.query.year+"-"+this.$route.query.month+"-01"; this.$route.query.year + "-" + this.$route.query.month + "-01";
var d1=new Date(this.msg.StartDate); var d1 = new Date(this.msg.StartDate);
var d2=new Date(d1); var d2 = new Date(d1);
d2.setMonth(d2.getMonth()+1); d2.setMonth(d2.getMonth() + 1);
d2.setDate(d2.getDate()-1); d2.setDate(d2.getDate() - 1);
var month = d2.getMonth()+1; var month = d2.getMonth() + 1;
var day = d2.getDate(); var day = d2.getDate();
this.msg.EndDate= d2.getFullYear()+'-'+month+'-'+day; this.msg.EndDate = d2.getFullYear() + "-" + month + "-" + day;
this.value[0]=this.msg.StartDate; this.value[0] = this.msg.StartDate;
this.value[1]= this.msg.EndDate; this.value[1] = this.msg.EndDate;
} }
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
this.getSupplierList() this.getSupplierList();
this.getCompanyUserList('') this.getCompanyUserList("");
}, },
methods: { methods: {
getDateList() { getDateList() {
if (this.value != '' && this.value != null) { if (this.value != "" && this.value != null) {
this.msg.StartDate = this.value[0]; this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1]; this.msg.EndDate = this.value[1];
} }
if (!this.msg.Unit_Price) {
this.msg.Unit_Price = 0;
}
if (!this.msg.EndUnit_Price) {
this.msg.EndUnit_Price = 0;
}
this.loading = true; this.loading = true;
this.mallapipost("/api/LiveHouse/GetOrderProfitLossList", this.msg, res => { this.mallapipost(
"/api/LiveHouse/GetOrderProfitLossList",
this.msg,
(res) => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if(res.data.data.pageData.length>0){ if (res.data.data.pageData.length > 0) {
res.data.data.pageData.push(this.OrderProfitLoss); res.data.data.pageData.push(this.OrderProfitLoss);
} }
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
...@@ -303,52 +469,65 @@ ...@@ -303,52 +469,65 @@
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}
}) );
}, },
getSupplierList() { //获取供应商接口 getSupplierList() {
this.mallapipost("/api/LiveHouse/GetSupplierAllList", {}, res => { //获取供应商接口
this.mallapipost("/api/LiveHouse/GetSupplierAllList", {}, (res) => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.options = res.data.data; this.options = res.data.data;
} }
}); });
}, },
showFXCommission(row){ showFXCommission(row) {
this.itemData = row this.itemData = row;
this.mallapipost("/api/LiveHouse/GetOrderCommissionList", { TenantId :1,MallBaseId:1,OrderDetailId:row.Id}, res => { this.mallapipost(
"/api/LiveHouse/GetOrderCommissionList",
{ TenantId: 1, MallBaseId: 1, OrderDetailId: row.Id },
(res) => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CommissionList = res.data.data; this.CommissionList = res.data.data;
} }
}); }
);
this.czjfDig = true; this.czjfDig = true;
}, },
getTotalOrderProfitLoss() { getTotalOrderProfitLoss() {
if (this.value != '' && this.value != null) { if (this.value != "" && this.value != null) {
this.msg.StartDate = this.value[0]; this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1]; this.msg.EndDate = this.value[1];
} }
// this.mallapipost("/api/LiveHouse/GetTotalOrderProfitLoss", this.msg, res => { // this.mallapipost("/api/LiveHouse/GetTotalOrderProfitLoss", this.msg, res => {
this.mallapipost("/api/LiveHouse/GetTotalOrderProfitLoss_V2", this.msg, res => { this.mallapipost(
"/api/LiveHouse/GetTotalOrderProfitLoss_V2",
this.msg,
(res) => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.OrderProfitLoss = res.data.data; this.OrderProfitLoss = res.data.data;
this.OrderProfitLoss.OrderNo ='小计' this.OrderProfitLoss.OrderNo = "小计";
this.getDateList() this.getDateList();
} }
}); }
);
}, },
getCompanyUserList(Name){ getCompanyUserList(Name) {
this.mallapipost("/api/LiveHouse/GetCompanyUserList", {Name:Name}, res => { this.mallapipost(
"/api/LiveHouse/GetCompanyUserList",
{ Name: Name },
(res) => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.companyData = res.data.data; this.companyData = res.data.data;
} }
}); }
);
}, },
Export() { Export() {
let msg = this.msg let msg = this.msg;
msg = JSON.parse(JSON.stringify(msg)); msg = JSON.parse(JSON.stringify(msg));
this.GetMallLocalFile( this.GetMallLocalFile(
"/api/LiveHouse/GetFXOrderProfitLossExcel", "/api/LiveHouse/GetFXOrderProfitLossExcel",
...@@ -357,26 +536,30 @@ ...@@ -357,26 +536,30 @@
); );
}, },
remoteMethod(query, cb) { remoteMethod(query, cb) {
let results = [] let results = [];
if (query !== '' && query.length >= 2) { if (query !== "" && query.length >= 2) {
this.mallapipost("/api/LiveHouse/GetGoodsList", { this.mallapipost(
Name: query "/api/LiveHouse/GetGoodsList",
}, res => { {
Name: query,
},
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
res.data.data.forEach(x => { res.data.data.forEach((x) => {
let obj = { let obj = {
value: x.Name, value: x.Name,
Id: x.Id Id: x.Id,
} };
results.push(obj) results.push(obj);
}); });
} }
}, err => {}); },
(err) => {}
);
} else { } else {
this.msg.GoodsID = 0 this.msg.GoodsID = 0;
this.msg.pageIndex = 1 this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
} }
cb(results); cb(results);
}, },
...@@ -384,39 +567,43 @@ ...@@ -384,39 +567,43 @@
if (item) { if (item) {
this.msg.GoodsID = item.Id; this.msg.GoodsID = item.Id;
} else { } else {
this.msg.GoodsID = 0 this.msg.GoodsID = 0;
} }
this.msg.pageIndex = 1 this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
}, },
spget() { spget() {
if (this.GoodsIDs == '') { if (this.GoodsIDs == "") {
this.msg.GoodsID = 0 this.msg.GoodsID = 0;
this.msg.pageIndex = 1 this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
} }
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
let results = [] let results = [];
if (queryString !== '' && queryString.length >= 1) { if (queryString !== "" && queryString.length >= 1) {
this.mallapipost("/api/LiveHouse/GetDistributorInfoList", { this.mallapipost(
Name: queryString "/api/LiveHouse/GetDistributorInfoList",
}, res => { {
Name: queryString,
},
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
res.data.data.forEach((x) => { res.data.data.forEach((x) => {
let obj = { let obj = {
value: x.Name, value: x.Name,
UserId: x.UserId, UserId: x.UserId,
};
results.push(obj);
});
} }
results.push(obj) },
}) (err) => {}
} );
}, err => {});
} else { } else {
this.msg.OneUserId = 0 this.msg.OneUserId = 0;
this.msg.pageIndex = 1 this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
} }
cb(results); cb(results);
}, },
...@@ -424,16 +611,16 @@ ...@@ -424,16 +611,16 @@
if (item) { if (item) {
this.msg.OneUserId = item.UserId; this.msg.OneUserId = item.UserId;
} else { } else {
this.msg.OneUserId = 0 this.msg.OneUserId = 0;
} }
this.msg.pageIndex = 1 this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
}, },
dlget() { dlget() {
if (this.OneUserId == '') { if (this.OneUserId == "") {
this.msg.OneUserId = 0 this.msg.OneUserId = 0;
this.msg.pageIndex = 1 this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -442,107 +629,105 @@ ...@@ -442,107 +629,105 @@
}, },
change(val) { change(val) {
if (val == null) { if (val == null) {
this.value = ''; this.value = "";
this.msg.StartDate = ''; this.msg.StartDate = "";
this.msg.EndDate = ''; this.msg.EndDate = "";
} }
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getTotalOrderProfitLoss() this.getTotalOrderProfitLoss();
}, },
ChangeListName(val){ ChangeListName(val) {
this.getCompanyUserList(val) this.getCompanyUserList(val);
} },
} },
} };
</script> </script>
<style> <style>
.fxOrderProfitLossList .el-card__header { .fxOrderProfitLossList .el-card__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: #fff; background: #fff;
padding: 18px 20px; padding: 18px 20px;
} }
.fxOrderProfitLossList .el-button--small { .fxOrderProfitLossList .el-button--small {
padding: 9px 15px; padding: 9px 15px;
} }
.fxOrderProfitLossList .content .searchInput { .fxOrderProfitLossList .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
border-radius: 4px; border-radius: 4px;
margin-left: 20px; margin-left: 20px;
} }
.fxOrderProfitLossList .content .searchInput .el-input__inner { .fxOrderProfitLossList .content .searchInput .el-input__inner {
border: none; border: none;
outline: none; outline: none;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.fxOrderProfitLossList .content .searchInput { .fxOrderProfitLossList .content .searchInput {
line-height: normal; line-height: normal;
display: inline-table; display: inline-table;
border-collapse: separate; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
width: 250px; width: 250px;
margin-right: 20px; margin-right: 20px;
}
} .fxOrderProfitLossList .content {
.fxOrderProfitLossList .content {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
padding: 15px; padding: 15px;
box-sizing: border-box; box-sizing: border-box;
} }
.fxOrderProfitLossList .el-icon-date { .fxOrderProfitLossList .el-icon-date {
line-height: 24px; line-height: 24px;
} }
.fxOrderProfitLossList .el-range-separator { .fxOrderProfitLossList .el-range-separator {
line-height: 24px; line-height: 24px;
} }
.fxOrderProfitLossList .just { .fxOrderProfitLossList .just {
color: rgb(104, 207, 61) color: rgb(104, 207, 61);
} }
.fxOrderProfitLossList .negative { .fxOrderProfitLossList .negative {
color: red color: red;
} }
.fxOrderProfitLossList .el-input__icon { .fxOrderProfitLossList .el-input__icon {
line-height: 24px; line-height: 24px;
} }
.fxOrderProfitLossList .el-table td, .fxOrderProfitLossList .el-table td,
.el-table th { .el-table th {
padding: 3px 0; padding: 3px 0;
} }
.fxOrderProfitLossList .el-table { .fxOrderProfitLossList .el-table {
font-size: 13px; font-size: 13px;
} }
.fxOrderProfitLossList .el-select__tags-text { .fxOrderProfitLossList .el-select__tags-text {
display: inline-block; display: inline-block;
width: 40px; width: 40px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.fxOrderProfitLossList .el-select__tags { .fxOrderProfitLossList .el-select__tags {
max-width: 400px; max-width: 400px;
} }
.fxOrderProfitLossList .Subtotal { .fxOrderProfitLossList .Subtotal {
width: 100%; width: 100%;
margin: 10px 0; margin: 10px 0;
display: flex; display: flex;
...@@ -550,42 +735,41 @@ ...@@ -550,42 +735,41 @@
align-items: center; align-items: center;
background: #f2f2f2; background: #f2f2f2;
font-size: 12px; font-size: 12px;
} }
.fxOrderProfitLossList .Subtotal_item { .fxOrderProfitLossList .Subtotal_item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
margin-left: 50px; margin-left: 50px;
background: #fff; background: #fff;
padding: 20px; padding: 20px;
} }
.fxOrderProfitLossList .Subtotal_item .Subtotal_t { .fxOrderProfitLossList .Subtotal_item .Subtotal_t {
margin: 3px 0; margin: 3px 0;
font-size: 12px; font-size: 12px;
width: 90px; width: 90px;
display: inline-block; display: inline-block;
} }
.fxOrderProfitLossList .ProfitLoss { .fxOrderProfitLossList .ProfitLoss {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
background: #fff; background: #fff;
} }
.fxOrderProfitLossList .ProfitLoss_xbox { .fxOrderProfitLossList .ProfitLoss_xbox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
align-items: flex-start; align-items: flex-start;
background: #fff; background: #fff;
} }
.fxOrderProfitLossList .diaBox{ .fxOrderProfitLossList .diaBox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment