Commit d0a378dc authored by 黄媛媛's avatar 黄媛媛

1

parent 1264d7dc
<template>
<div class="fxOrderProfitLossList">
<div class="el-card__header">
<span>损益核算</span>
<div style="display: flex;flex-direction: row;align-items: center">
<!---->
<el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<span>供应商</span>
<el-select class="w150" style="margin-left: 10px;" v-model="msg.SupplierId" filterable size="small"
placeholder="请选择" @change="msg.pageIndex=1,getDateList()">
<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>
</el-select>
<div class="block" style="margin-left: 10px;">
<el-date-picker style="padding: 3px 10px;width: 380px;height: 32px" v-model="value" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
@change="change" align="right">
</el-date-picker>
</div>
<span style="margin:0 10px">订单号</span>
<el-input v-model="msg.OrderNo" placeholder="请输入订单号" @blur='msg.pageIndex=1,getDateList()' style="width:200px"
@keyup.enter.native='msg.pageIndex=1,getDateList()' clearable></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>
<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>
</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>
<div><span class='Subtotal_t'>包装费摊销:</span>{{OrderProfitLoss.TotalPackingMoney }}</div>
<div><span class='Subtotal_t'>快递费:</span>{{OrderProfitLoss.TotalCostFreight }}</div>
<div><span class='Subtotal_t'>商品运费摊销:</span>{{OrderProfitLoss.TotalGoodsFreight }}</div>
<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>
</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="订单号" prop="OrderNo" width="180" :show-overflow-tooltip='true'></el-table-column>
<el-table-column label="规格" width="200" :show-overflow-tooltip='true'>
<template slot-scope="scope">
{{scope.row.GoodsName}}{{scope.row.Specification}}
<!--<p v-for="(item,index) in scope.row.Specification " :key="index">{{item}}</p>-->
</template>
</el-table-column>
<el-table-column label="单价" prop="Unit_Price" width="70"></el-table-column>
<el-table-column label="数量" prop="Number" width="70"></el-table-column>
<el-table-column label="供应商" prop="SupplierName" width="150" :show-overflow-tooltip='true'></el-table-column>
</el-table-column>
<el-table-column label="营业收入" align="center">
<el-table-column label="结算款" prop="Final_Price" width="70"></el-table-column>
<el-table-column label="运费" prop="FreightMoney" width="70"></el-table-column>
<el-table-column label="已收" prop="AllPrice" width="70"></el-table-column>
<el-table-column label="未收款" width="70">
<!--结算款-已收-->
<!--暂时写为0-->
<template slot-scope="scope">
<!--<p>{{scope.row.Final_Price - scope.row.FreightMoney}}</p>-->
<p>0</p>
</template>
</el-table-column>
<el-table-column label="合计数" prop="AllPrice" width="70"></el-table-column>
</el-table-column>
<el-table-column label="营业成本" align="center">
<el-table-column label="采购成本" prop="CostMoney"></el-table-column>
<el-table-column label="快递费" prop="CostFreight" ></el-table-column>
<el-table-column label="已付成本" prop="PaidCostMoney" ></el-table-column>
<el-table-column label="总返佣" prop="FXCommission" >
<template slot-scope="scope">
<span @click="showFXCommission(scope.row)" style=" color: #409EFF;cursor:pointer">{{scope.row.FXCommission}}</span>
</template>
</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>
<el-table-column prop="RemitFXCommission" label="已付佣金额"></el-table-column>
<el-table-column prop="NoPaid" label="应付" ></el-table-column>
<el-table-column prop="GrossProfit" label="毛利" ></el-table-column>
<el-table-column prop="GrossProfitRate" label="毛利率" ></el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="count">
</el-pagination>
<el-dialog title="查看返佣" :visible.sync="czjfDig" width="500px">
<div class="diaBox" style="">
<div class="diaBox" style='margin-top:15px' v-for="(item,index) in CommissionList" :key="index">
<div>{{item.GradeDescription}}{{' '}}¥{{item.Commission}}</div>
<div>昵称:{{item.UserName}}</div>
<div>姓名:{{item.Name}}</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="czjfDig = false">我知道了</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "fxOrderProfitLossList",
data() {
return {
value: '',
msg: {
pageIndex: 1,
pageSize: 10,
SupplierId: 0,
StartDate: '',
EndDate: '',
OrderNo: '', //订单号
GoodsID: 0,
OneUserId: 0,
IsFxCommission:1
},
CommissionList:[],
czjfDig:false,
options: [],
tableData: [],
searchList: [],
count: 0,
loading: false,
GoodsIDs: '', //商品id
OneUserId: '', //代理
OrderProfitLoss: {}, //小计
}
},
created() {
this.getDateList()
this.getSupplierList()
this.getTotalOrderProfitLoss()
},
methods: {
getDateList() {
if (this.value != '' && this.value != null) {
this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1];
}
this.loading = true;
this.mallapipost("/api/LiveHouse/GetOrderProfitLossList", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
getSupplierList() { //获取供应商接口
this.mallapipost("/api/LiveHouse/GetSupplierAllList", {}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.options = res.data.data;
}
});
},
showFXCommission(row){
this.mallapipost("/api/LiveHouse/GetOrderCommissionList", { TenantId :1,MallBaseId:1,OrderDetailId:row.Id}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.CommissionList = res.data.data;
}
});
this.czjfDig = true;
},
getTotalOrderProfitLoss() {
this.mallapipost("/api/LiveHouse/GetTotalOrderProfitLoss", {IsFxCommission:1}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.OrderProfitLoss = res.data.data;
}
});
},
Export() {
let msg = {
SupplierId: this.msg.SupplierId,
StartDate: this.msg.StartDate,
EndDate: this.msg.EndDate,
IsFxCommission: this.msg.IsFxCommission,
}
msg = JSON.parse(JSON.stringify(msg));
this.GetMallLocalFile(
"/api/LiveHouse/GetFXOrderProfitLossExcel",
msg,
"粉象损益核算.xls"
);
},
remoteMethod(query, cb) {
let results = []
if (query !== '' && query.length >= 2) {
this.mallapipost("/api/LiveHouse/GetGoodsList", {
Name: query
}, res => {
if (res.data.resultCode == 1) {
res.data.data.forEach(x => {
let obj = {
value: x.Name,
Id: x.Id
}
results.push(obj)
});
}
}, err => {});
} else {
this.msg.GoodsID = 0
this.msg.pageIndex = 1
this.getDateList();
}
cb(results);
},
forceUpdate(item) {
if (item) {
this.msg.GoodsID = item.Id;
} else {
this.msg.GoodsID = 0
}
this.msg.pageIndex = 1
this.getDateList();
},
spget() {
if (this.GoodsIDs == '') {
this.msg.GoodsID = 0
this.msg.pageIndex = 1
this.getDateList();
}
},
querySearchAsync(queryString, cb) {
let results = []
if (queryString !== '' && queryString.length >= 1) {
this.mallapipost("/api/LiveHouse/GetDistributorInfoList", {
Name: queryString
}, res => {
if (res.data.resultCode == 1) {
res.data.data.forEach((x) => {
let obj = {
value: x.Name,
UserId: x.UserId,
}
results.push(obj)
})
}
}, err => {});
} else {
this.msg.OneUserId = 0
this.msg.pageIndex = 1
this.getDateList();
}
cb(results);
},
handleSelect(item) {
if (item) {
this.msg.OneUserId = item.UserId;
} else {
this.msg.OneUserId = 0
}
this.msg.pageIndex = 1
this.getDateList();
},
dlget() {
if (this.OneUserId == '') {
this.msg.OneUserId = 0
this.msg.pageIndex = 1
this.getDateList();
}
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getDateList();
},
change(val) {
if (val == null) {
this.value = '';
this.msg.StartDate = '';
this.msg.EndDate = '';
}
this.msg.pageIndex = 1;
this.getDateList();
},
}
}
</script>
<style>
.fxOrderProfitLossList .el-card__header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 18px 20px;
}
.fxOrderProfitLossList .el-button--small {
padding: 9px 15px;
}
.fxOrderProfitLossList .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
margin-left: 20px;
}
.fxOrderProfitLossList .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.fxOrderProfitLossList .content .searchInput {
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.fxOrderProfitLossList .content {
background: #fff;
margin-top: 10px;
padding: 15px;
box-sizing: border-box;
}
.fxOrderProfitLossList .el-icon-date {
line-height: 24px;
}
.fxOrderProfitLossList .el-range-separator {
line-height: 24px;
}
.fxOrderProfitLossList .just {
color: rgb(104, 207, 61)
}
.fxOrderProfitLossList .negative {
color: red
}
.fxOrderProfitLossList .el-input__icon {
line-height: 24px;
}
.fxOrderProfitLossList .el-table td,
.el-table th {
padding: 3px 0;
}
.fxOrderProfitLossList .el-table {
font-size: 13px;
}
.fxOrderProfitLossList .el-select__tags-text {
display: inline-block;
width: 40px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fxOrderProfitLossList .el-select__tags {
max-width: 400px;
}
.fxOrderProfitLossList .Subtotal {
width: 100%;
margin: 10px 0;
display: flex;
flex-direction: row;
align-items: center;
background: #f2f2f2;
font-size: 12px;
}
.fxOrderProfitLossList .Subtotal_item {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-left: 50px;
background: #fff;
padding: 20px;
}
.fxOrderProfitLossList .Subtotal_item .Subtotal_t {
margin: 3px 0;
font-size: 12px;
width: 90px;
display: inline-block;
}
.fxOrderProfitLossList .ProfitLoss {
display: flex;
flex-direction: row;
align-items: center;
background: #fff;
}
.fxOrderProfitLossList .ProfitLoss_xbox {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
background: #fff;
}
.fxOrderProfitLossList .diaBox{
display: flex;
flex-direction: column;
align-items: center;
}
</style>
...@@ -3633,6 +3633,14 @@ export default { ...@@ -3633,6 +3633,14 @@ export default {
title: '损益核算' title: '损益核算'
}, },
}, },
{ //财务 粉象损益核算
path: '/fxOrderProfitLossList',
name: 'fxOrderProfitLossList',
component: resolve => require(['@/components/FinancialModule/ReportForm/fxOrderProfitLossList'], resolve),
meta: {
title: '粉象损益核算'
},
},
{ //财务 线路收客 { //财务 线路收客
path: '/LineReceiver', path: '/LineReceiver',
name: 'LineReceiver', name: 'LineReceiver',
......
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