|
@@ -124,5 +124,111 @@ function init(){
|
|
|
refreshColumn(columnLength);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 用户升级专业版 弹框提示--用户详情界面
|
|
|
+ * @param name
|
|
|
+ * @param _id
|
|
|
+ * @param username
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+function upCuring(name, _id, username) {
|
|
|
+ $('#name').val(name);
|
|
|
+ $('#_id').val(_id);
|
|
|
+ var curingMobile = $('#curingMobile').val();
|
|
|
+ var html = '<p>为用户 <b>' + curingMobile + ',' + username + '</b> 升级 <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>`;
|
|
|
+
|
|
|
+ $('div[upCuring] span').html(html);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 养护产品降级
|
|
|
+ * @param {} name
|
|
|
+ * @param {*} _id
|
|
|
+ * @param {*} username
|
|
|
+ */
|
|
|
+function downCuring(name, _id, username) {
|
|
|
+ $('#name').val(name);
|
|
|
+ $('#_id').val(_id);
|
|
|
+ var curingMobile = $('#curingMobile').val();
|
|
|
+ let 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>`;
|
|
|
+ $('div[downCuring] span').html(html);
|
|
|
+}
|
|
|
|
|
|
+function deadlineCuring(name, _id, username,deadline){
|
|
|
+ $('#name').val(name);
|
|
|
+ $('#_id').val(_id);
|
|
|
+ var curingMobile = $('#curingMobile').val();
|
|
|
+ let html = `<p>为用户 <b>${curingMobile},${username}</b> <b>${name}</b> 设置延期</p>
|
|
|
+ <p>当前限期为:${deadline}</p>
|
|
|
+ <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>`;
|
|
|
+ $('div[deadlineCuring] span').html(html);
|
|
|
+}
|
|
|
+
|
|
|
+function curingDo(compilationId, name, curingSsoid, status, mobile, client_id, deadline, smssend) {
|
|
|
+ if (curingSsoid != '' && compilationId != '') {
|
|
|
+ $.ajax({
|
|
|
+ cache: false,
|
|
|
+ type: 'post',
|
|
|
+ url: '/cloud/build/ajax/upCuringDo',
|
|
|
+ data: { ssoid: curingSsoid, compilationId: compilationId, mobile: mobile, client_id: client_id, name: name, deadline: deadline, smssend: smssend, status: status },
|
|
|
+ dataType: 'json',
|
|
|
+ success: function (data) {
|
|
|
+ if (data.status == 1) {
|
|
|
+ refreshCuringPageDetail(curingSsoid, client_id);
|
|
|
+ } else {
|
|
|
+ alert(data.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ alert('请选择需要升级的版本');
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$(function () {
|
|
|
+
|
|
|
+ $('div[upcuring]').delegate('label[deadlineLabel]', 'click', function () {
|
|
|
+ $('#deadline').attr('disabled', 'disabled');
|
|
|
+
|
|
|
+ if($('input[deadline]').prop('checked')){
|
|
|
+ $('input[deadline]').prop("checked",false);
|
|
|
+ }else{
|
|
|
+ $('input[deadline]').prop("checked",true);
|
|
|
+ }
|
|
|
+ if ($('input[deadline]').get(0).checked) {
|
|
|
+ $('#deadline').removeAttr('disabled');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
+})
|