|
@@ -151,16 +151,24 @@ function init() {
|
|
|
* @param username
|
|
|
* @returns
|
|
|
*/
|
|
|
-function upCuring(name, _id, username) {
|
|
|
+function upCuring(name, _id, username,lock) {
|
|
|
$('#name').val(name);
|
|
|
$('#_id').val(_id);
|
|
|
+ $('#lock').val(lock);
|
|
|
var curingMobile = $('#curingMobile').val();
|
|
|
- var html = '<p>为用户 <b>' + curingMobile + ',' + username + '</b> 升级 <b>' + name + '</b></p>';
|
|
|
+ var lockHtml="";
|
|
|
+ if(lock==1){
|
|
|
+ lockHtml="借出";
|
|
|
+ }else if(lock==2){
|
|
|
+ lockHtml="销售";
|
|
|
+ }
|
|
|
+
|
|
|
+ var html = '<p>为用户 <b>' + curingMobile + ',' + username + '</b> '+lockHtml+' <b>' + name + '</b></p>';
|
|
|
html += '<div class="form-group"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" deadline id="customSwitch2" ><label class="custom-control-label" deadlineLabel for="customSwitch2">限期</label></div></div>';
|
|
|
|
|
|
html += '<div class="form-group"><label class="form-label" for="example-date">到期时间</label><input class="form-control" id="deadline" type="date" name="deadline" disabled value=""></div>';
|
|
|
|
|
|
- html += '<div class="form-group"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" smssend id="customSwitch22" ><label class="custom-control-label" for="customSwitch22">给客户发送短信通知</label></div></div>';
|
|
|
+ html += '<div class="form-group" style="display: none"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" smssend id="customSwitch22" ><label class="custom-control-label" for="customSwitch22">给客户发送短信通知</label></div></div>';
|
|
|
|
|
|
$('div[upCuring] span').html(html);
|
|
|
}
|
|
@@ -182,22 +190,24 @@ function downCuring(name, _id, username) {
|
|
|
// <label class="custom-control-label" for="customSwitch23">给客户发送短信通知</label>
|
|
|
// </div>
|
|
|
// </div>`;
|
|
|
- var html = '<p>为用户 <b>'+curingMobile+','+username+'</b> <span class="text-danger">降级</span> <b>'+name+'免费版</b></p><div class="form-group"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" downSmssend id="customSwitch23" ><label class="custom-control-label" for="customSwitch23">给客户发送短信通知</label></div></div>';
|
|
|
-
|
|
|
+ var html = '<p>为用户 <b>'+curingMobile+','+username+'</b> <span class="text-danger">降级</span> <b>'+name+'免费版</b></p><div class="form-group" style="display: none"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" downSmssend id="customSwitch23" ><label class="custom-control-label" for="customSwitch23">给客户发送短信通知</label></div></div>';
|
|
|
+
|
|
|
$('div[downCuring] span').html(html);
|
|
|
}
|
|
|
|
|
|
-function deadlineCuring(name, _id, username,deadline){
|
|
|
+function deadlineCuring(name, _id, username,deadline,lock){
|
|
|
$('#name').val(name);
|
|
|
$('#_id').val(_id);
|
|
|
+ $('#lock').val(lock);
|
|
|
var curingMobile = $('#curingMobile').val();
|
|
|
|
|
|
var html = '<p>为用户 <b>'+curingMobile+','+username+'</b> <b>'+name+'</b> 设置延期</p><p>当前限期为:'+deadline+'</p>';
|
|
|
|
|
|
html+='<div class="form-group"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" deadlineEver id="customSwitch2"><label class="custom-control-label" deadlinelabel="" for="customSwitch2">升级为永久版</label></div></div>';
|
|
|
|
|
|
- html +='<div class="form-group"><label class="form-label" for="example-date">到期时间</label><input class="form-control" id="deadlineInput" type="date" name="date" value=""></div><div class="form-group"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" deadlineSmssend id="customSwitch222" ><label class="custom-control-label" for="customSwitch222">给客户发送短信通知</label></div></div>';
|
|
|
-
|
|
|
+ html +='<div class="form-group"><label class="form-label" for="example-date">到期时间</label><input class="form-control" id="deadlineInput" type="date" name="date" value=""></div><div class="form-group" style="display: none"><div class="custom-control custom-switch"><input type="checkbox" class="custom-control-input" deadlineSmssend id="customSwitch222" ><label class="custom-control-label" for="customSwitch222">给客户发送短信通知</label></div></div>';
|
|
|
+
|
|
|
+ //
|
|
|
|
|
|
// let html = `<p>为用户 <b>${curingMobile},${username}</b> <b>${name}</b> 设置延期</p>
|
|
|
// <p>当前限期为:${deadline}</p>
|
|
@@ -215,13 +225,14 @@ function deadlineCuring(name, _id, username,deadline){
|
|
|
$('div[deadlineCuring] span').html(html);
|
|
|
}
|
|
|
|
|
|
-function curingDo(compilationId, name, curingSsoid, status, mobile, client_id, deadline, smssend) {
|
|
|
+function curingDo(compilationId, name, curingSsoid, status, mobile, client_id, deadline, smssend,lock) {
|
|
|
if (curingSsoid != '' && compilationId != '') {
|
|
|
$.ajax({
|
|
|
cache: false,
|
|
|
type: 'post',
|
|
|
url: '/cloud/curing/ajax/upCuringDo',
|
|
|
- data: { ssoid: curingSsoid, compilationId: compilationId, mobile: mobile, client_id: client_id, name: name, deadline: deadline, smssend: smssend, status: status },
|
|
|
+ data: { ssoid: curingSsoid, compilationId: compilationId, mobile: mobile, client_id: client_id, name: name,
|
|
|
+ deadline: deadline, smssend: smssend, status: status,lock:lock },
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
if (data.status == 1) {
|