Commit b17dbe21 by Jie Feng

assign limit bug fix

parent 7472809e
...@@ -16,7 +16,7 @@ jQuery(document).ready(function ($) { ...@@ -16,7 +16,7 @@ jQuery(document).ready(function ($) {
woId: '', woId: '',
operateName: '新增', operateName: '新增',
displayForm: false, displayForm: false,
displayAuditTrace: true, displayAuditTrace: false,
addWoType: 0, addWoType: 0,
woTypes: [ woTypes: [
{value: 0, text: "请选择"}, {value: 0, text: "请选择"},
...@@ -45,9 +45,29 @@ jQuery(document).ready(function ($) { ...@@ -45,9 +45,29 @@ jQuery(document).ready(function ($) {
auditTraceList: [], auditTraceList: [],
sysCfgId: 0 sysCfgId: 0
}, },
mounted: function () {
// 初始化加载回访工单列表
var url = "/work/sysWoCfg/list?page=1&limit=10";
var data = JSON.stringify({
"woType": "revisit"
});
$.ajax({
url: url,
dataType: "json",
data: data,
type: 'post',
contentType: "application/json; charset=utf-8",
success: function (res) {
if (res.data) {
app.sysCfgList = res.data;
}
}
});
},
methods: { methods: {
sysCfgDetail: function (sysCfg) { sysCfgDetail: function (sysCfg) {
app.displayForm = true; app.displayForm = true;
app.displayAuditTrace = false;
// 获取工单详情 // 获取工单详情
var data = JSON.stringify( var data = JSON.stringify(
{ {
...@@ -72,9 +92,10 @@ jQuery(document).ready(function ($) { ...@@ -72,9 +92,10 @@ jQuery(document).ready(function ($) {
app.duringTimeMin = duringTime % 60 ; app.duringTimeMin = duringTime % 60 ;
} }
app.duringTimeHour = Math.floor(duringTime / 60); app.duringTimeHour = Math.floor(duringTime / 60);
app.assignLimit = res.data.assignLimit; app.assignLimit = parseInt(res.data.assignLimit);
app.remindTime = res.data.remindTime; app.remindTime = res.data.remindTime;
app.sysCfgId = res.data.id; app.sysCfgId = res.data.id;
app.operateName = '编辑';
} }
} }
...@@ -85,10 +106,13 @@ jQuery(document).ready(function ($) { ...@@ -85,10 +106,13 @@ jQuery(document).ready(function ($) {
}, },
queryAuditTrace: function (sysCfg) { queryAuditTrace: function (sysCfg) {
console.log('queryAuditTrace: ' + sysCfg.id); console.log('queryAuditTrace: ' + sysCfg.id);
app.displayAuditTrace = true;
app.displayForm = false;
}, },
addSysCfg: function () { addSysCfg: function () {
app.displayForm = true; app.displayForm = true;
console.log('addSysCfg'); console.log('addSysCfg');
app.operateName = '新增';
}, },
saveOrUpdateSysCfg: function () { saveOrUpdateSysCfg: function () {
...@@ -103,7 +127,8 @@ jQuery(document).ready(function ($) { ...@@ -103,7 +127,8 @@ jQuery(document).ready(function ($) {
"deptName": app.deptNames[app.addDeptId].text, "deptName": app.deptNames[app.addDeptId].text,
"duringTime": parseInt(app.duringTimeMin) + parseInt(app.duringTimeHour * 60), "duringTime": parseInt(app.duringTimeMin) + parseInt(app.duringTimeHour * 60),
"remindTime": app.remindTime, "remindTime": app.remindTime,
"assignLimit": app.assignLimit "assignLimit": parseInt(app.assignLimit),
"urgentLevel":app.addUrgentLevel
} }
); );
console.log("Request data..."); console.log("Request data...");
...@@ -117,6 +142,7 @@ jQuery(document).ready(function ($) { ...@@ -117,6 +142,7 @@ jQuery(document).ready(function ($) {
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
success: function (res) { success: function (res) {
console.log(res); console.log(res);
app.displayForm = false;
} }
}); });
// app.displayForm = true; // app.displayForm = true;
...@@ -125,27 +151,9 @@ jQuery(document).ready(function ($) { ...@@ -125,27 +151,9 @@ jQuery(document).ready(function ($) {
}) })
function initLoadWoSysConfig() { function initLoadWoSysConfig() {
var url = "/work/sysWoCfg/list?page=1&limit=10";
var data = JSON.stringify({
"id": 1,
"woType": "revisit"
});
$.ajax({
url: url,
dataType: "json",
data: data,
type: 'post',
contentType: "application/json; charset=utf-8",
success: function (res) {
if (res.data) {
app.sysCfgList = res.data;
}
}
});
} }
// 初始化加载回访工单列表
initLoadWoSysConfig(); initLoadWoSysConfig();
}); });
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