Commit adb35b28 authored by zhengke's avatar zhengke

修改车资分摊

parent 3712fc36
<style>
.edHeight {
.BusedHeight {
display: block !important;
height: 300px;
height: 450px;
}
.FinaceItem span{
display: inline-block;
......@@ -75,13 +75,14 @@
:total="total"
:pageSize="msg.pageSize"
:pageIndex="msg.pageIndex"
:handleCurrentChange="handleCurrentChanges"
:multiple-sort="multipleSort"
:is-loading="loading"
sort-always
@sort-change="sortChange"
@on-custom-comp='customCompFunc'
></v-table>
<div class="_bus_edit _scrollbar" v-if="addShow" :class="addShow==true?'edHeight':''">
<div class="_bus_edit _scrollbar" v-if="addShow" :class="addShow==true?'BusedHeight':''">
<el-row>
<el-col :span="20">
<p class="_tit">添加分摊</p>
......@@ -159,7 +160,7 @@
</el-row>
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item label="车配号" prop="CarNum">
<el-form-item label="车配号">
<el-date-picker class="w200"
v-model="Year"
type="year"
......@@ -168,7 +169,7 @@
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item>
<el-form-item prop="CarNum">
<el-input v-model="addMsg.CarNum" maxlength="20"></el-input>
</el-form-item>
</el-col>
......@@ -245,7 +246,7 @@
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
<el-form-item label="到期结算日">
<el-form-item label="到期结算日" prop="PayDate">
<el-date-picker type="date" class="w200" v-model="addMsg.PayDate" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
......@@ -253,7 +254,7 @@
<el-row>
<el-col :span="4" :gutter="35">
<el-form-item label="团队编号">
<el-input placeholder="请输入" v-model="TCIDList.TCID"></el-input>
<el-input placeholder="请输入" v-model="TCIDS"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" :gutter="35">
......@@ -319,7 +320,7 @@ export default {
loading: true,
outerVisible:false,
msg: {
pageSize:20,
pageSize:15,
pageIndex:1,
CarDistribution:'',
StartTime:'',
......@@ -353,6 +354,8 @@ export default {
rules:{
f_UnitPrice: [{ required: true, message: "请输入金额", trigger: "blur" }],
CarNumber: [{ required: true, message: "请输入数量", trigger: "blur" }],
PayDate: [{ required: true, message: "请选择到期结算日", trigger: "blur" }],
CarNum: [{ required: true, message: "请填写车配号", trigger: "blur" }],
},
isCked:'1',
//供应商下拉
......@@ -373,6 +376,8 @@ export default {
TotalMoney:'',
//全部团队编号
allTeamList:[],
//TCID
TCIDS:'',
//团队编号
TCIDList:{
TCID:'',
......@@ -404,16 +409,16 @@ export default {
this.isReady = false;
let that = this;
let License = {
title: "车号",
title: "车号",
field: "CarDistribution",
width: 80,
titleAlign: "left",
columnAlign: "left",
isResize: true,
// result: "",
// filterMultiple: false,
// filters: [{}],
// type: "text"
result: "",
filterMultiple: false,
filters: [{}],
type: "text"
};
let ShareDate = {
field: "CreateTime",
......@@ -422,10 +427,10 @@ export default {
titleAlign: "left",
columnAlign: "left",
isResize: true,
// filterMultiple: false,
// filters: [{}],
// result: "",
// type: "select"
result:{},
filterMultiple:false,
filters: [{}],
type:'datetime'
};
let Details = {
field: "Description",
......@@ -465,50 +470,86 @@ export default {
// filters: [{}],
// type: "text"
};
let opera = {
title: "操作",
let operaler = {
title: "操作人员",
field: "CreateByName",
titleAlign: "left",
columnAlign: "left",
width: 80,
isResize: true,
};
let Operate = {
title: "操作",
titleAlign: "left",
columnAlign: "left",
width: 80,
isResize: false,
componentName:'table-operation'
}
this.columns = [];
this.columns.push(License);
this.columns.push(ShareDate);
this.columns.push(Details);
this.columns.push(ShareTeam);
this.columns.push(ProductDoc);
this.columns.push(opera);
this.columns.push(operaler);
this.columns.push(Operate);
this.isReady = true;
},
customCompFunc(params){
// if (params.type === 'delete'){
// this.financeinfoRemove(params.id,params.alias)
// }else if (params.type === 'edit'){
// this.editCurency(params.id)
// this.text='修改'
// this.addShow=true
// this.addCuren=true
// }
this.financeinfoRemove(params.id,params.text)
},
financeinfoRemove(id, text) {
this.$confirm(
"是否对" + "“" + text + "”" + "进行删除操作?删除后不可恢复!",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}
)
.then(() => {
this.apipost(
"bus_post_DelCarfareApportion",
{ CarId: id },
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
this.getList();
},
err => {}
);
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
},
sortChange(param) {
// if (param.Royalty != "") {
// this.msg.OrderBy = `Royalty ${param.Royalty}`;
// } else if (param.Initialbalance != "") {
// this.msg.OrderBy = `Initialbalance ${param.Initialbalance}`;
// }
//this.getList();
},
filterMethod() {
// this.msg.License = filters.License;
//this.msg.Details = filters.Details;
filterMethod(filters) {
this.msg.CarDistribution = filters.CarDistribution;
this.msg.StartTime = filters.CreateTime.beginDate;
this.msg.EndTime = filters.CreateTime.endDate;
if(this.msg.StartTime==null){
this.msg.StartTime='';
}
if(this.msg.EndTime==null){
this.msg.EndTime='';
}
this.msg.pageIndex = 1;
this.getList();
},
handleCurrentChanges(val) {
//this.msg.pageIndex = val;
// this.getList();
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.loading = true;
......@@ -518,18 +559,15 @@ export default {
res => {
this.loading = false;
if (res.data.resultCode == 1) {
console.log(res,'resssss');
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
console.log(this.dataList,'dataList');
} else {
this.Error(res.data.message);
}
},
null
);
},
cancelEdit(){
},
initAddMsg() {
//初始化添加、修改数据
......@@ -547,8 +585,11 @@ export default {
f_currency:1,
f_rate:'',
ClientID:0,
PayDate:''
PayDate:'',
};
this.Year = '';
this.TCIDS ='';
this.allTeamList = [];
this.addMsg = newMsg;
},
......@@ -641,6 +682,7 @@ export default {
this.addShow = true;
var rate = this.addMsg.f_currency;
this.getRate(rate);
this.initAddMsg();
},
//输入金额得到总价
getTotalMoney(){
......@@ -682,6 +724,7 @@ export default {
this.apipost('bus_get_ScreeningTravelForCarNum',msg, res => {
if(res.data.resultCode == 1) {
this.allTeamList = res.data.data;
console.log(this.allTeamList,'allTeamList');
}else{
this.Error(res.data.message);
}
......@@ -694,14 +737,20 @@ export default {
//根据团号 验证该团号是否可以
checkIsUse(){
let msg = {
TCID:this.TCIDList.TCID
TCID:this.TCIDS
}
this.apipost('bus_get_ValidataTravelState',msg, res => {
if(res.data.resultCode == 1) {
this.allTeamList.push(this.TCIDList);
var obj = {
TCID:'',
TCNUM:""
}
obj.TCID = this.TCIDS
this.allTeamList.push(obj);
}else{
this.Error(res.data.message);
}
this.TCIDS = '';
}, err => {})
},
//保存
......@@ -742,6 +791,7 @@ export default {
if(res.data.resultCode == 1) {
this.addShow = false;
this.Success(res.data.message);
this.getList();
}else{
this.Error(res.data.message);
}
......@@ -783,7 +833,7 @@ export default {
created(){
Vue.component('table-docment',{ //产生单据样式
template:`<div class='FinaceItem'>
<span v-for='item in rowData.FinanceIdList'>{{item}}</span>
<span style='cursor:pointer;' @click='goDocment("FinancialDocumentsDetail",item)' v-for='item in rowData.FinanceIdList'>{{item}}</span>
</div>`,
props:{
rowData:{
......@@ -797,12 +847,15 @@ export default {
}
},
methods:{
//跳转财务单据
goDocment(path, id) {
this.$router.push({ name: path, query: { id: id, blank: 'y', tab: '单据详情'} });
}
}
})
Vue.component('table-teamList',{ //分摊的团样式
template:`<div class='FinaceItem'>
<span v-for='item in rowData.TCIDList'>{{item}}</span>
<span style='cursor:pointer;' @click='goUrlX("productQuery",item)' v-for='item in rowData.TCIDList'>{{item}}</span>
</div>`,
props:{
rowData:{
......@@ -816,8 +869,37 @@ export default {
}
},
methods:{
goUrlX (path, id) {
this.$router.push({
name: path,
query: {id: id, blank: 'y', tab: '产品查询'}
})
},
}
})
//操作按钮
Vue.component('table-operation',{
template:`<div style='width:80px;height:40px;background:#fff;text-align:center;position: relative;
left:-5px;padding-top: 6px;padding-top:6px;'></el-button><el-button type="danger" size='mini' icon="el-icon-delete" circle @click="deleteRow(rowData,index)"></el-button>
</div>`,
props:{
rowData:{
type:Object
},
field:{
type:String
},
index:{
type:Number
}
},
methods:{
deleteRow(){
let params = {type:'delete',id:this.rowData.ID,text:this.rowData.CarDistribution};
this.$emit('on-custom-comp',params);
}
}
})
}
}
......
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