Commit 196ac7d2 authored by zhengke's avatar zhengke

修改

parent 2fadade9
<template>
<div class="CostManagement">
<div class="LiveOrder">
<div class="head-title">
直播订单
<el-button style="float:right;margin-top:-5px;" size="small" @click="creatDanju" type="primary">生成单据
......@@ -35,14 +35,21 @@
</div>
<el-table :data="tableData" ref="multipleTable" v-loading="loading" border style="width: 100%"
@select="selectSingle" @select-all="selectAll">
<el-table-column type="selection" width="55">
<el-table-column width="55">
<template slot="header" slot-scope="scope">
<el-checkbox v-model="isCheckAll" @change="getCheckdData(tableData,'')"></el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isChecked" @change="getCheckdData(tableData,scope.row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="OrderNo" label="订单号/订单Id" width="240">
<el-table-column prop="OrderNo" label="订单号/订单Id" width="200">
<template slot-scope="scope">
{{scope.row.OrderNo}}({{scope.row.OrderId}})
<div>{{scope.row.OrderId}}</div>
<div>{{scope.row.OrderNo}}</div>
</template>
</el-table-column>
<el-table-column prop="GoodsName" label="商品名称">
<el-table-column prop="GoodsName" label="商品名称" min-width="300">
</el-table-column>
<el-table-column prop="SpecificationList" label="规格" width="280">
<template slot-scope="scope">
......@@ -51,20 +58,21 @@
</el-table-column>
<el-table-column label="商品信息" width="150">
<template slot-scope="scope">
<div>总价:{{scope.row.Final_Price}}</div>
<div>数量:{{scope.row.Number}}</div>
<div>单价:{{scope.row.Unit_Price}}</div>
<div>数量:{{scope.row.Number}}</div>
<div>总价:{{scope.row.Final_Price}}</div>
</template>
</el-table-column>
<el-table-column prop="LiveCommission" label="直播返佣" width="80">
</el-table-column>
<el-table-column prop="LivePeopleNum" label="主播数量" width="80">
</el-table-column>
<el-table-column prop="LiveFinanceIds" label="绑定财务单据" width="120">
<el-table-column prop="LiveFinanceIds" label="绑定财务单据" width="150">
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<img @click="updateInfo(scope.row)" class="operatImg" src="../../assets/img/userman/edit.png" alt="">
<img @click="updateInfo(scope.row)" v-if="scope.row.LiveFinanceIds==''" class="operatImg"
src="../../assets/img/userman/edit.png" alt="">
</template>
</el-table-column>
</el-table>
......@@ -73,7 +81,7 @@
</el-pagination>
</div>
<!-- 选择是否公账 -->
<el-dialog title="请选择" :visible.sync="choiceFin" width="400px">
<el-dialog title="修改" :visible.sync="choiceFin" width="400px">
<el-form label-width="80px">
<el-form-item label="直播日期">
<el-date-picker v-model="finMsg.LiveTime" size="small" type="date" placeholder="选择日期">
......@@ -87,11 +95,12 @@
<el-select size="small" filterable placeholder="请选择" v-for="(item,index) in checkedDan" :key="index"
v-model="item.AccountIds">
<el-option label="请选择" :value="0"></el-option>
<el-option v-for="item in AccountList" :key="item.ID" :label="item.AccountHolder" :value="item.ID">
<el-option v-for="item in AccountList" :key="item.ID"
:label="item.AccountHolder+'('+item.AccountAlias+' '+item.CardNum+' '+item.OpenBankName+')'"
:value="item.ID">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="choiceFin=false">取消</el-button>
......@@ -99,7 +108,7 @@
</span>
</el-dialog>
<!-- 修改金额人数弹窗 -->
<el-dialog title="请选择" :visible.sync="updateDialog" width="400px">
<el-dialog title="修改" :visible.sync="updateDialog" width="400px">
<el-form label-width="50px">
<el-form-item label="数量" v-if="updateMsg.Type==1||updateMsg.Type==2">
<el-input size="small" v-model="updateMsg.LivePeopleNum"></el-input>
......@@ -146,6 +155,7 @@
ERPEmpId: 0,
updateDialog: false,
isCheckAll:false, //全选
//修改信息
updateMsg: {
Ids: '',
......@@ -191,6 +201,11 @@
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.tableData = res.data.data.pageData;
var data = JSON.parse(JSON.stringify(this.tableData));
data.forEach(x=>{
x.isChecked=false;
})
this.tableData = data;
} else {
this.Error(res.data.message);
}
......@@ -250,15 +265,24 @@
}
this.ComCheckedArr = selection;
},
getCheckdData(tabledata,row){
console.log(tabledata,'tabledata');
if(row){
row.isChecked=!row.isChecked;
}
// tabledata
},
//多选
selectAll(selection) {
console.log(this.firstPeoNum, 'ss');
//有过单选
this.$refs.multipleTable.clearSelection();
// this.$refs.multipleTable.toggleRowSelection(false);
this.ComCheckedArr = [];
if (this.isSingleCheck) {
selection.forEach(x => {
if (x.LivePeopleNum == this.firstPeoNum) {
this.$refs.multipleTable.toggleRowSelection(x, true);
this.ComCheckedArr.push(x);
}
});
} else {
......@@ -266,10 +290,10 @@
selection.forEach(x => {
if (x.LivePeopleNum == firstPeoNum) {
this.$refs.multipleTable.toggleRowSelection(x, true);
this.ComCheckedArr.push(x);
}
});
}
this.ComCheckedArr = selection;
},
//点击批量修改金额
batchUpMoney() {
......@@ -301,15 +325,17 @@
},
//设置单据
setFince() {
this.finMsg.OrderDetailIds=[];
this.finMsg.AccountIds=[];
this.finMsg.OrderDetailIds = [];
this.finMsg.AccountIds = [];
if (this.checkedDan.length > 0) {
this.checkedDan.forEach((x,index) => {
if(x.AccountIds>0){
this.finMsg.AccountIds.push(x.AccountIds);
}
this.checkedDan.forEach((x, index) => {
this.finMsg.AccountIds.push(x.AccountIds);
})
}
var _index = this.finMsg.AccountIds.indexOf(0);
if (_index > -1) {
this.Error('请选择第' + _index + '个账户');
}
if (this.ComCheckedArr.length > 0) {
this.ComCheckedArr.forEach(x => {
this.finMsg.OrderDetailIds.push(x.OrderDetailId);
......@@ -317,23 +343,23 @@
}
this.finMsg.ERPEmpId = this.ERPEmpId;
this.apipost("/api/order/SetLiveGoodsOrderFinance", this.finMsg, res => {
this.choiceFin = false;
this.$refs.multipleTable.clearSelection();
this.choiceFin = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.ComCheckedArr=[];
this.getList();
} else {
this.Error(res.data.message)
}
this.ComCheckedArr = [];
this.$refs.multipleTable.clearSelection();
})
},
//获取账户下拉
getAccountList() {
this.apipost("/api/Supplier/GetClientBankAccountList", {}, res => {
if (res.data.resultCode == 1) {
console.log(res, '账户下拉');
this.AccountList = res.data.data;
console.log(this.AccountList, 'AccountList');
} else {
this.Error(res.data.message)
}
......@@ -345,7 +371,7 @@
</script>
<style>
.CostManagement .content {
.LiveOrder .content {
background: #fff;
margin-top: 10px;
padding: 20px;
......@@ -353,4 +379,36 @@
box-sizing: border-box;
}
.LiveOrder .LiveOrderTable {
width: 100%;
border-collapse: collapse;
}
.LiveOrder .LiveOrderTable tr th {
height: 48px;
font-size: 14px;
color: #909399;
border: 1px solid #EBEEF5;
font-weight: bold;
}
.LiveOrder .LiveOrderTable tr {
background: #fff;
text-align: center;
height: 50px;
}
.LiveOrder .LiveOrderTable tr td {
font-size: 14px;
border: 1px solid #EBEEF5;
}
.LiveOrder .fx_inner:hover td {
background-color: #F5F7FA;
}
.LiveOrder .LiveOrderTable td {
transition: background-color .25s ease;
}
</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