提交 bbd0e115 authored 作者: 彭涛's avatar 彭涛

电客企业合同

上级 fa078dd6
......@@ -152,29 +152,29 @@
}).then(res => {
console.log('获取合同信息')
console.log(res.data)
// if (res.code == 200) {
// that.contractA = res.data.contractA
// that.companyValue = res.data.ename
// // console.log(that.companys)
// for (let i = 0; i < that.companys.length; i++) {
// if (that.companys[i].eName == that.companyValue) {
// console.log(that.companys[i].userId)
// that.userId = that.companys[i].userId
// }
// }
// console.log(that.userId)
// that.electricity = res.data.electricity
// that.contractStartTime = res.data.contractStartTime.replace(new RegExp('-', 'g'), '/')
// that.contractEndTime = res.data.contractEndTime.replace(new RegExp('-', 'g'), '/')
// that.contractType = res.data.contractType
// if (that.contractType == 1) {
// that.typeValue = '固定价差'
// that.fixedSpread = res.data.fixedSpread
// } else {
// that.typeValue = '月竞分成'
// that.shareRatio = res.data.shareRatio
// }
// }
if (res.code == 200) {
that.contractA = res.data.contractA
that.companyValue = res.data.ename
// console.log(that.companys)
for (let i = 0; i < that.companys.length; i++) {
if (that.companys[i].eName == that.companyValue) {
console.log(that.companys[i].userId)
that.userId = that.companys[i].userId
}
}
console.log(that.userId)
that.electricity = res.data.electricity
that.contractStartTime = res.data.contractStartTime.replace(new RegExp('-', 'g'), '/')
that.contractEndTime = res.data.contractEndTime.replace(new RegExp('-', 'g'), '/')
that.contractType = res.data.contractType
if (that.contractType == 1) {
that.typeValue = '固定价差'
that.fixedSpread = res.data.fixedSpread
} else {
that.typeValue = '月竞分成'
that.shareRatio = res.data.shareRatio
}
}
})
},
//选择合同类型
......
......@@ -287,31 +287,31 @@ var _default = { onLoad: function onLoad(options) {var that = this;that.contract
onSubmint: false // 是否正在上传
};}, computed: { startDate: function startDate() {var year = new Date().getFullYear();var month = new Date().getMonth() + 1;var day = new Date().getDay();if (month == 13) {year = year + 1;month = 1;}month = month > 9 ? month : '0' + month;day = day > 9 ? day : '0' + day;return year + '-' + month + '-' + day;}, endDate: function endDate() {var year = new Date().getFullYear() + 10;return year + '-12-31';} }, methods: { //数据回显
datashow: function datashow() {var that = this; // 编辑合同的数据回显
(0, _fun.get)(_api.default.contractDetail, { contractId: that.contractId }).then(function (res) {console.log('获取合同信息');console.log(res.data); // if (res.code == 200) {
// that.contractA = res.data.contractA
// that.companyValue = res.data.ename
// // console.log(that.companys)
// for (let i = 0; i < that.companys.length; i++) {
// if (that.companys[i].eName == that.companyValue) {
// console.log(that.companys[i].userId)
// that.userId = that.companys[i].userId
// }
// }
// console.log(that.userId)
// that.electricity = res.data.electricity
// that.contractStartTime = res.data.contractStartTime.replace(new RegExp('-', 'g'), '/')
// that.contractEndTime = res.data.contractEndTime.replace(new RegExp('-', 'g'), '/')
// that.contractType = res.data.contractType
// if (that.contractType == 1) {
// that.typeValue = '固定价差'
// that.fixedSpread = res.data.fixedSpread
// } else {
// that.typeValue = '月竞分成'
// that.shareRatio = res.data.shareRatio
// }
// }
});}, //选择合同类型
bindTypeChange: function bindTypeChange(event) {// console.log(event)
(0, _fun.get)(_api.default.contractDetail, { contractId: that.contractId }).then(function (res) {console.log('获取合同信息');console.log(res.data);if (res.code == 200) {that.contractA = res.data.contractA;that.companyValue = res.data.ename; // console.log(that.companys)
for (var i = 0; i < that.companys.length; i++) {
if (that.companys[i].eName == that.companyValue) {
console.log(that.companys[i].userId);
that.userId = that.companys[i].userId;
}
}
console.log(that.userId);
that.electricity = res.data.electricity;
that.contractStartTime = res.data.contractStartTime.replace(new RegExp('-', 'g'), '/');
that.contractEndTime = res.data.contractEndTime.replace(new RegExp('-', 'g'), '/');
that.contractType = res.data.contractType;
if (that.contractType == 1) {
that.typeValue = '固定价差';
that.fixedSpread = res.data.fixedSpread;
} else {
that.typeValue = '月竞分成';
that.shareRatio = res.data.shareRatio;
}
}
});
},
//选择合同类型
bindTypeChange: function bindTypeChange(event) {
// console.log(event)
var i = event.detail.value;
this.typeValue = this.typeOptions[i];
switch (this.typeValue) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论