Commit c7508c77 by Chao Sun

我的商机基本信息按钮

parent c7aa2080
......@@ -116,7 +116,8 @@
</div>
<div>
<div>跟进时间</div>
<div><input id="time" class="form-control" [(ngModel)]="opportunityRecordNoticeDate"></div>
<div><input style="-webkit-appearance: none;" id="time" class="form-control" type="date"
[(ngModel)]="opportunityRecordNoticeDate"></div>
</div>
<div class="add">
<i class="iconfont icon-jia" (click)="ownOpportunityRecordSave()"></i>
......@@ -124,9 +125,14 @@
</div>
<ul class="recordLists">
<li *ngFor="let opportunityRecordItem of opportunityRecordInfos">
<div class="opportunityRecordItem">{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</div>
<div style="display: flex;justify-content: space-between;">
<div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div>
<div class="opportunityRecordItem">{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</div>
</div>
<div class="salesNotice">{{opportunityRecordItem.salesNotice}}</div>
<div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div>
</li>
</ul>
......
......@@ -34,7 +34,7 @@
height: 45px;
line-height: 45px;
border-radius: 50%;
position: absolute;
position: fixed;
right: 10px;
font-size: 24px;
color: #fff;
......@@ -51,15 +51,20 @@
align-items: center;
// border-bottom: 1px #ddd solid;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
}
input.form-control {
display: inline-block;
width: 60%;
// width: 60%;
margin: 0 5px;
background: none;
outline: none;
border: none;
text-align: right;
box-shadow: none;
display: flex;
flex-wrap: wrap;
}
.sexWrapper {
......@@ -186,9 +191,9 @@
margin-bottom: 5px;
}
.updatedAt {
font-size: 12px;
color: #8a8a8a;
text-align: right;
// font-size: 12px;
// color: #8a8a8a;
// text-align: right;
}
}
......
......@@ -78,17 +78,17 @@ export class MyBusinessDetailComponent implements OnInit {
}
}
if (id === 3) {
setTimeout(() => {
var calendar = new LCalendar();
calendar.init({
'trigger': '#time', //标签id
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
'maxDate': (new Date().getFullYear()) + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() //最大日期
});
}, 300)
// if (id === 3) {
// setTimeout(() => {
// var calendar = new LCalendar();
// calendar.init({
// 'trigger': '#time', //标签id
// 'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
// 'maxDate': (new Date().getFullYear()) + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() //最大日期
// });
// }, 300)
}
// }
}
ownOpportunityDetailQuery() {
......@@ -177,14 +177,35 @@ export class MyBusinessDetailComponent implements OnInit {
tagName: item.tagName
}
})
const OVERZERO_REG = /^[0-9]*[1-9][0-9]*$/;
if (!OVERZERO_REG.test(this.editBusiness.age)) {
if (parseInt(this.editBusiness.age) > 100) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '年龄不能大于三位数!',
timeout: 3000,
align: 'center'
};
return;
} else {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '年龄只能输入正整数!',
timeout: 3000,
align: 'center'
};
return;
}
}
this.editBusiness = {
...this.editBusiness,
opportunityCustomerTags: newTag
}
console.log(this.editBusiness)
this.myService.ownOpportunityBasicInformationSave(this.editBusiness).subscribe((res) => {
console.log(res)
if (res['success']) {
this.toastDialog = true;
this.toastInfo = {
......@@ -193,17 +214,50 @@ export class MyBusinessDetailComponent implements OnInit {
timeout: 3000,
align: 'center'
};
this.readonlyFlag = true;
}
})
}
ownOpportunityRecordSave() {
if (this.opportunityRecordId == null && !this.salesNotice) {
const nowDate = new Date().getTime();
const oppDate = new Date(this.opportunityRecordNoticeDate).getTime();
if (nowDate < oppDate) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进时间不能大于当前时间!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.opportunityRecordId) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '请选择跟进状态!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.salesNotice) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '备注不能为空!',
timeout: 3000,
align: 'center'
};
return;
}
if (!this.opportunityRecordNoticeDate) {
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: '跟进状态和备注不能同时为空!',
msg: '跟进时间不能为空!',
timeout: 3000,
align: 'center'
};
......
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