Commit bd083919 authored by zhengke's avatar zhengke

修改

parent afd0720b
......@@ -3,7 +3,8 @@
<template>
<div class="head-title">
推荐账单
<el-button @click="choiceOrder=true,getUserId()" style="float:right;margin: -5px 0 0 5px;" size="small" type="primary">
<el-button @click="choiceOrder=true,getUserId()" style="float:right;margin: -5px 0 0 5px;" size="small"
type="primary">
新增
</el-button>
<el-button @click="msg.pageIndex=1,getList()" style="float:right;margin-top: -5px;" size="small" type="primary">
......@@ -45,28 +46,38 @@
</el-form>
</div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="Periods" label="期数" width="150"></el-table-column>
<el-table-column prop="Id" label="id" width="100">
<el-table-column prop="Periods" label="期数" width="100"></el-table-column>
<el-table-column prop="Id" label="id" width="80">
</el-table-column>
<el-table-column prop="Money" label="总金额" width="100"></el-table-column>
<el-table-column prop="SupplierName" label="供应商名称" width="150"></el-table-column>
<el-table-column prop="UserName" label="用户名称" width="180"></el-table-column>
<el-table-column prop="Remark" label="备注"></el-table-column>
<el-table-column prop="BillState" width="120" label="状态">
<el-table-column prop="SupplierName" label="供应商名称" width="130"></el-table-column>
<el-table-column prop="UserName" label="用户名称" width="150"></el-table-column>
<el-table-column prop="Remark" label="备注" min-width="200"></el-table-column>
<el-table-column prop="BillState" width="100" label="状态">
<template slot-scope="scope">
<span v-if="scope.row.BillState==1">待打款</span>
<span v-if="scope.row.BillState==2">已打款</span>
<span v-if="scope.row.BillState==3">取消</span>
<span style="color:#409EFF;" v-if="scope.row.BillState==1">待打款</span>
<span style="color:green;" v-if="scope.row.BillState==2">已打款</span>
<span style="color:red;" v-if="scope.row.BillState==3">取消</span>
</template>
</el-table-column>
<el-table-column prop="UpdateDate" label="操作时间" width="120"></el-table-column>
<el-table-column label="操作" width="120">
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="修改账单备注" placement="top">
<img @click="updateRemark(scope.row)" style="margin-right:9px" src="../../assets/img/userman/edit.png" alt="">
<img @click="updateRemark(scope.row)" style="margin-right:9px" src="../../assets/img/userman/edit.png"
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="账单明细" placement="top">
<img @click="goOrderDetail(scope.row)" style="margin-right:9px" src="../../assets/img/userman/order.png" alt="">
<img @click="goOrderDetail(scope.row)" style="margin-right:9px" src="../../assets/img/userman/order.png"
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="账单打款" placement="top">
<img @click="OrderDakuan(scope.row)" v-if="scope.row.BillState==1" style="margin-right:9px" src="../../assets/img/userman/balance.png"
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="取消账单" placement="top">
<img @click="cancelOrder(scope.row)" v-if="scope.row.BillState!=3" style="margin-right:9px" src="../../assets/img/userman/nopass.png"
alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -80,7 +91,8 @@
<el-dialog title="新增账单" :visible.sync="choiceOrder" width="1240px">
<el-form label-width="80px">
<el-form-item label="用户" style="display:inline-block;">
<el-select size="small" v-model="orderMsg.UserId" :filter-method="ChangeListName" filterable placeholder="请选择">
<el-select size="small" v-model="orderMsg.UserId" :filter-method="ChangeListName" filterable
placeholder="请选择">
<el-option label="不限" :value="0"></el-option>
<el-option v-for="item in searchUserTable" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
......@@ -104,7 +116,7 @@
<el-table-column prop="OrderNo" label="订单号" width="120"></el-table-column>
<el-table-column prop="CoverImage" label="封面图" width="100">
<template slot-scope="scope">
<img :src="scope.row.CoverImage" style="width:50px;height:50px;" alt=""/>
<img :src="scope.row.CoverImage" style="width:50px;height:50px;" alt="" />
</template>
</el-table-column>
<el-table-column prop="GoodsName" label="商品名称"></el-table-column>
......@@ -116,7 +128,7 @@
<el-table-column prop="ProductCode" label="货号" width="120"></el-table-column>
<el-table-column prop="Final_Price" label="最终价格" width="100"></el-table-column>
<el-table-column prop="Number" label="数量" width="80"></el-table-column>
<el-table-column prop="OrderIntroduction" label="返佣信息">
<el-table-column prop="OrderIntroduction" label="返佣信息" width="220">
<template slot-scope="scope">
<div class="OrderInformation">
<div>返佣id:{{scope.row.OrderIntroduction.IntroductionId}}</div>
......@@ -142,7 +154,7 @@
</el-dialog>
<!-- 修改备注 -->
<el-dialog title="修改备注" :visible.sync="upRemarkDialog" width="800px">
<el-form label-width="80px">
<el-form label-width="80px">
<el-form-item label="备注">
<el-input type="textarea" v-model="remarkMsg.Remark" :rows="4"></el-input>
</el-form-item>
......@@ -151,7 +163,7 @@
<el-button size="small" @click="upRemarkDialog = false">取消</el-button>
<el-button type="primary" size="small" @click="saveRemark">确定</el-button>
</span>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
......@@ -199,20 +211,20 @@
//弹窗数据源
orderData: [],
//新增账单保存msg
addOrderMsg:{
IntroductionIds:[],
SupplierId:0,
UserId:0
addOrderMsg: {
IntroductionIds: [],
SupplierId: 0,
UserId: 0
},
//公用IntroductionIds
IntroductionIds:[],
IntroductionIds: [],
//修改备注弹窗
upRemarkDialog:false,
upRemarkDialog: false,
//修改备注msg
remarkMsg:{
BillId:0,
Remark:''
remarkMsg: {
BillId: 0,
Remark: ''
}
};
},
......@@ -232,7 +244,6 @@
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
console.log(res, 'res');
} else {
this.Error(res.data.message);
}
......@@ -242,9 +253,9 @@
getUserId() {
this.apipost("/api/user/GetMemberUserDropDownList", this.UserMsg, res => {
if (res.data.resultCode == 1) {
if(this.choiceOrder){
this.searchUserTable=res.data.data.pageData;
}else{
if (this.choiceOrder) {
this.searchUserTable = res.data.data.pageData;
} else {
this.tableData = res.data.data.pageData;
}
}
......@@ -265,70 +276,101 @@
},
getOrderTable() {
this.apipost("/api/order/GetRecommendOrdersCommissionPageList", this.orderMsg, res => {
console.log(res, '弹窗数据');
if (res.data.resultCode == 1) {
this.orderData=res.data.data.pageData;
this.orderData = res.data.data.pageData;
}
});
},
handleSelectionChange(val) {
this.IntroductionIds=val;
this.IntroductionIds = val;
},
//保存选择
saveOrderChoice(){
this.addOrderMsg.IntroductionIds=[];
this.IntroductionIds.forEach(x=>{
saveOrderChoice() {
this.addOrderMsg.IntroductionIds = [];
this.IntroductionIds.forEach(x => {
this.addOrderMsg.IntroductionIds.push(x.OrderIntroduction.IntroductionId);
})
this.addOrderMsg.SupplierId=this.orderMsg.SupplierId;
this.addOrderMsg.UserId=this.orderMsg.UserId;
if(this.addOrderMsg.SupplierId==0){
this.addOrderMsg.SupplierId = this.orderMsg.SupplierId;
this.addOrderMsg.UserId = this.orderMsg.UserId;
if (this.addOrderMsg.SupplierId == 0) {
this.Error('请选择供应商');
return;
}
if(this.addOrderMsg.IntroductionIds.length==0){
if (this.addOrderMsg.IntroductionIds.length == 0) {
this.Error('请选择返佣订单');
return;
}
this.apipost("/api/user/SetRecommendOrdersBillInfo", this.addOrderMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.choiceOrder=false;
this.choiceOrder = false;
this.getList();
}else{
} else {
this.Error(res.data.message);
}
});
},
//修改备注
updateRemark(item){
this.upRemarkDialog=true;
this.remarkMsg.BillId=item.Id;
this.remarkMsg.Remark=item.Remark;
updateRemark(item) {
this.upRemarkDialog = true;
this.remarkMsg.BillId = item.Id;
this.remarkMsg.Remark = item.Remark;
},
//保存修改备注
saveRemark(){
saveRemark() {
this.apipost("/api/user/SetRecommendOrdersBillRemark", this.remarkMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.upRemarkDialog=false;
this.upRemarkDialog = false;
this.getList();
}else{
} else {
this.Error(res.data.message)
}
});
},
//跳转至账单明细
goOrderDetail(item){
goOrderDetail(item) {
this.$router.push({
name: 'RecomBillDetail',
query: {
BillId:item.Id,
BillId: item.Id,
blank: "y"
}
});
},
//取消账单
cancelOrder(item) {
let that = this;
that.Confirm("是否确认起取消?", function () {
that.apipost("/api/user/CancalRecommendOrdersBill", {
BillId: item.Id,
}, res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
})
});
},
//账单打款
OrderDakuan(item){
let that = this;
that.Confirm("是否确认打款?", function () {
that.apipost("/api/user/SetRecommendOrdersBillRemit", {
BillId: item.Id,
}, res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
})
});
}
},
mounted() {
......@@ -346,8 +388,13 @@
padding: 20px;
box-sizing: border-box;
}
.OrderInformation{
.OrderInformation {
display: flex;
justify-content: space-between;
}
.OrderInformation>div{
width:50%;
}
</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