提交 81469c43 编写于 作者: doc_wei's avatar doc_wei

delete: 删除待派工功能

上级 a6535e8b
//工单接收人信息
var serviceUser = {};
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'tagEditor'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var cooperationUser = new Array();//工单协助人集合
showGrid({
id: "showForm",
url: flowableBasePath + "sealseservice013",
params: {rowId: parent.rowId},
pagination: false,
template: getFileContent('tpl/stateisstayworker/dispatchedworkerTemplate.tpl'),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter: function (json) {
matchingLanguage();
form.render();
form.on('submit(dispatchedWorker)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
rowId: parent.rowId,
serviceUserId: isNull(serviceUser.userId) ? "" : serviceUser.userId,
cooperationUserId: systemCommonUtil.tagEditorGetAllData('cooperationUserId', cooperationUser),//工单协助人,可为空
};
// 接收人
if(isNull(params.serviceUserId)){
winui.window.msg('请选择工单接收人', {icon: 2, time: 2000});
return false;
}
AjaxPostUtil.request({url: flowableBasePath + "sealseservice014", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
//工单接收人选择
$("body").on("click", "#serviceUserIdSelPeople", function (e) {
_openNewWindows({
url: "../../tpl/serviceworker/serviceworkershowlist.html",
title: "选择接收人",
pageId: "serviceworkershowlist",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
$("#serviceUserId").val(serviceUser.userName);
}});
});
//工单协助人
$('#cooperationUserId').tagEditor({
initialTags: [],
placeholder: '请选择工单协助人',
beforeTagDelete: function(field, editor, tags, val) {
cooperationUser = [].concat(arrayUtil.removeArrayPointName(cooperationUser, val));
}
});
//工单协助人选择
$("body").on("click", "#cooperationUserIdSelPeople", function (e) {
systemCommonUtil.userReturnList = [].concat(cooperationUser);
systemCommonUtil.chooseOrNotMy = "1"; // 人员列表中是否包含自己--1.包含;其他参数不包含
systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil.checkType = "1"; // 人员选择类型,1.多选;其他。单选
systemCommonUtil.openSysUserStaffChoosePage(function (userReturnList) {
// 重置数据
cooperationUser = [].concat(systemCommonUtil.tagEditorResetData('cooperationUserId', userReturnList));
});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
var rowId = "";
var startTime = "";
var endTime = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
table = layui.table;
// 售后服务类型
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["amsServiceType"]["key"], 'select', "typeId", '', form);
// 跟单时间
laydate.render({elem: '#declarationTime', range: '~'});
initTable();
// 待派工表格渲染
function initTable(){
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'sealseservice002',
where: {orderNum: $("#orderNum").val(), typeId: $("#typeId").val(), customerName: $("#customerName").val(), firstTime: '', lastTime: ''},
even: true,
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'orderNum', title: '工单号', align: 'center', width: 220, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.orderNum + '</a>';
}},
{ field: 'serviceTypeName', title: '服务类型', align: 'left', width: 120 },
{ field: 'declarationTime', title: '报单时间', align: 'center', width: 140 },
{ field: 'customerName', title: '客户名称', align: 'left', width: 120 },
{ field: 'productName', title: '商品名称', align: 'left', width: 120 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'stayWork') { //派工
stayWork(data);
} else if (layEvent === 'details'){ //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'delete'){ //删除
deleteRow(data);
}
});
}
form.render();
$("body").on("click", "#formSearch", function() {
refreshTable();
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
if(isNull($("#declarationTime").val())) {
startTime = "";
endTime = "";
} else {
startTime = $("#declarationTime").val().split('~')[0].trim();
endTime = $("#declarationTime").val().split('~')[1].trim();
}
table.reloadData("messageTable", {where: {orderNum: $("#orderNum").val(), typeId: $("#typeId").val(), customerName: $("#customerName").val(), firstTime: startTime, lastTime: endTime}});
}
function refreshTable(){
if(isNull($("#declarationTime").val())) {
startTime = "";
endTime = "";
} else {
startTime = $("#declarationTime").val().split('~')[0].trim();
endTime = $("#declarationTime").val().split('~')[1].trim();
}
table.reloadData("messageTable", {page: {curr: 1}, where: {orderNum: $("#orderNum").val(), typeId: $("#typeId").val(), customerName: $("#customerName").val(), firstTime: startTime, lastTime: endTime}});
}
//派工
function stayWork(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/stateisstayworker/dispatchedworker.html",
title: "派工",
pageId: "dispatchedworker",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/sealseservice/sealseserviceedit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "sealseserviceedit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/sealseservice/sealseservicedetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "sealseservicedetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
//删除
function deleteRow(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "sealseservice020", params: {rowId: data.id}, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
exports('stateisstayworkerlist', {});
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/stateisstayworker/'}).use('dispatchedworker');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工单号:</label>
<div class="layui-input-block ver-center">
{{orderNum}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">服务类型:</label>
<div class="layui-input-block ver-center">
{{serviceTypeName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">报单时间:</label>
<div class="layui-input-block ver-center">
{{declarationTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系人:</label>
<div class="layui-input-block ver-center">
{{contacts}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系电话:</label>
<div class="layui-input-block ver-center">
{{phone}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">邮箱:</label>
<div class="layui-input-block ver-center">
{{email}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">QQ:</label>
<div class="layui-input-block ver-center">
{{qq}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">详细地址:</label>
<div class="layui-input-block ver-center">
{{addressProvince}} {{addressCity}} {{addressArea}} {{addressTownship}} {{addressDetailed}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">工单接收人<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="serviceUserId" name="serviceUserId" placeholder="请选择工单接收人" disabled class="layui-input"/>
<i class="fa fa-user-plus input-icon" id="serviceUserIdSelPeople"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工单协助人</label>
<div class="layui-input-block">
<input type="text" id="cooperationUserId" name="cooperationUserId" placeholder="请选择工单协助人" class="layui-input"/>
<i class="fa fa-user-plus input-icon" id="cooperationUserIdSelPeople"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="dispatchedWorker">提交</button>
</div>
</div>
{{/bean}}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">工单号</label>
<div class="layui-input-inline">
<input type="text" id="orderNum" name="orderNum" placeholder="请输入工单号" class="layui-input" />
</div>
<label class="layui-form-label">服务类型</label>
<div class="layui-input-inline">
<select id="typeId">
</select>
</div>
<label class="layui-form-label">客户名称</label>
<div class="layui-input-inline">
<input type="text" id="customerName" name="customerName" placeholder="请输入客户名称" class="layui-input" />
</div>
<label class="layui-form-label">报单时间</label>
<div class="layui-input-inline">
<input type="text" id="declarationTime" name="declarationTime" placeholder="请选择报单时间范围" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1582380716553')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="stayWork">派工</a>
{{# } }}
{{# if(auth('1582380676253')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1582380695711')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/stateisstayworker/'}).use('stateisstayworkerlist');
</script>
</body>
</html>
\ No newline at end of file
......@@ -917,7 +917,7 @@ var dsFormTableUtil = {
var array = bean.value.split(',');
condition.push(`$.inArray(d.${bean.attrKey}, ` + JSON.stringify(array) + `) !== -1`);
} else {
condition.push(`d.${bean.attrKey} ${bean.symbolsMark} ${bean.value}`);
condition.push(`d.${bean.attrKey} ${bean.symbolsMark} '${bean.value}'`);
}
});
var conditionStr = condition.join('&&');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册