master
yulingwei 5 years ago
parent 4caa02a76b
commit 1e3533720b

@ -55,7 +55,7 @@ class WorkOrderController extends ThinkController
if ($list) { if ($list) {
foreach ($list as &$item) { foreach ($list as &$item) {
$item['status'] = $this->getOrderStatus($item['status']); $item['status_desc'] = $this->getOrderStatus($item['status']);
} }
} }
$page = set_pagination($count, $row); $page = set_pagination($count, $row);
@ -129,6 +129,8 @@ class WorkOrderController extends ThinkController
if (empty('handler_id')) { if (empty('handler_id')) {
$this->error('请选择处理人'); $this->error('请选择处理人');
} }
$user = M('user', 'tab_')->where(['account'=>I('user_account')])->find();
if (empty($user)) $this->error("账号不存在");
$data['attachment_url'] = I('attachment_url', ''); $data['attachment_url'] = I('attachment_url', '');
$data['user_account'] = I('user_account'); $data['user_account'] = I('user_account');
$data['role_name'] = I('role_name'); $data['role_name'] = I('role_name');

@ -167,7 +167,7 @@
<td>{$data.game_name}</td> <td>{$data.game_name}</td>
<td>{$data.server_name}</td> <td>{$data.server_name}</td>
<td><?php echo $data['type'] == 1 ? "资源" : "反馈";?></td> <td><?php echo $data['type'] == 1 ? "资源" : "反馈";?></td>
<td>{$data.status}</td> <td>{$data.status_desc}</td>
<td>{$data.user_account}</td> <td>{$data.user_account}</td>
<td>{:get_admin_nickname($data['creator_id'])}</td> <td>{:get_admin_nickname($data['creator_id'])}</td>
<td>{$data.created_time|date='Y-m-d H:i:s',###}</td> <td>{$data.created_time|date='Y-m-d H:i:s',###}</td>
@ -177,7 +177,7 @@
<a href="{:U('workOrder/modify',array('id'=>$data['id']))}">编辑 </a> <a href="{:U('workOrder/modify',array('id'=>$data['id']))}">编辑 </a>
<?php if ($data['type'] == 1):?><a href="{:U('workOrder/resourceApply',array('id'=>$data['id']))}">申请 </a><?php endif;?> <?php if ($data['type'] == 1):?><a href="{:U('workOrder/resourceApply',array('id'=>$data['id']))}">申请 </a><?php endif;?>
<?php if ($data['type'] == 2):?><a href="{:U('workOrder/feedbackProcessLogStore',array('id'=>$data['id']))}">更新 </a><?php endif;?> <?php if ($data['type'] == 2):?><a href="{:U('workOrder/feedbackProcessLogStore',array('id'=>$data['id']))}">更新 </a><?php endif;?>
<a class="ajax-get" href="{:U('workOrder/finish',array('id'=>$data['id']))}">完成 </a> <?php if ($data['status'] != 1):?><a class="ajax-get" href="{:U('workOrder/finish',array('id'=>$data['id']))}">完成</a><?php endif;?>
<a href="{:U('workOrder/evaluate',array('id'=>$data['id']))}">评价 </a> <a href="{:U('workOrder/evaluate',array('id'=>$data['id']))}">评价 </a>
<a class="ajax-get confirm" href="{:U('workOrder/delete',array('ids'=>$data['id']))}">删除 </a> <a class="ajax-get confirm" href="{:U('workOrder/delete',array('ids'=>$data['id']))}">删除 </a>
</td> </td>

@ -99,7 +99,7 @@
<if condition="$data['server_name'] neq ''"><option value="{$data['server_name']}">{$data['server_name']}</option></if> <if condition="$data['server_name'] neq ''"><option value="{$data['server_name']}">{$data['server_name']}</option></if>
</select> </select>
</div> </div>
<?php if (!empty($data['attachment_url'])):?> <?php if (!empty($data['attachment_url']) || $data['type'] == 2):?>
<div class="input-list"> <div class="input-list">
<div id="uploader" class="wu-example"> <div id="uploader" class="wu-example">
<div class="btns"> <div class="btns">
@ -107,9 +107,11 @@
</div> </div>
<!--用来存放文件信息--> <!--用来存放文件信息-->
<div id="thelist" class="uploader-list"> <div id="thelist" class="uploader-list">
<?php if (!empty($data['attachment_url'])):?>
<div id="beforeupload" class="item"> <div id="beforeupload" class="item">
<h4 class="info">已有附件<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;" onclick="$('#file_url').val('');$(this).parents('#beforeupload').remove()">删除</a><a href="{$data.attachment_url}" target="_blank" style="float:none;display:inline-block;margin-left:10px;">下载</a></h4> <h4 class="info">已有附件<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;" onclick="$('#file_url').val('');$(this).parents('#beforeupload').remove()">删除</a><a href="{$data.attachment_url}" target="_blank" style="float:none;display:inline-block;margin-left:10px;">下载</a></h4>
</div> </div>
<?php endif;?>
</div> </div>
<input type="hidden" id="file_url" name="attachment_url" value="{$data['attachment_url']}"/> <input type="hidden" id="file_url" name="attachment_url" value="{$data['attachment_url']}"/>
</div> </div>
@ -319,7 +321,7 @@
}, { }, {
beforeSendFile: function(file){ beforeSendFile: function(file){
//秒传验证 //秒传验证
if (file['source']['ext'] === 'zip' || file['source']['ext'] === 'rar') { if (true) {
var task = new $.Deferred(); var task = new $.Deferred();
var start = new Date().getTime(); var start = new Date().getTime();
(new WebUploader.Uploader()).md5File(file, 0, 10*1024*1024).progress(function(percentage){ (new WebUploader.Uploader()).md5File(file, 0, 10*1024*1024).progress(function(percentage){
@ -357,7 +359,7 @@
} }
, beforeSend: function(block){ , beforeSend: function(block){
//分片验证是否已传过,用于断点续传 //分片验证是否已传过,用于断点续传
if (block['file']['source']['ext'] === 'zip' || block['file']['source']['ext'] === 'rar') { if (true) {
var task = new $.Deferred(); var task = new $.Deferred();
$.ajax({ $.ajax({
type: "POST" type: "POST"
@ -384,7 +386,7 @@
} }
} }
, afterSendFile: function(file){ , afterSendFile: function(file){
if (file['source']['ext'] === 'zip' || file['source']['ext'] === 'rar') { if (true) {
var chunksTotal = 0; var chunksTotal = 0;
if((chunksTotal = Math.ceil(file.size/chunkSize)) > 1){ if((chunksTotal = Math.ceil(file.size/chunkSize)) > 1){
//合并请求 //合并请求
@ -431,11 +433,6 @@
pick: {id:'#picker'}, pick: {id:'#picker'},
//dnd: "#theList", //dnd: "#theList",
paste: document.body, paste: document.body,
accept: {
title: '压缩包',
extensions: 'rar,zip',
mimeTypes: '.rar,.zip',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传 // 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false, resize: false,
disableGlobalDnd: true, disableGlobalDnd: true,
@ -450,14 +447,14 @@
}); });
uploaderFile.on('beforeFileQueued',function(file){ uploaderFile.on('beforeFileQueued',function(file){
var mycars=new Array("zip","rar","tar","jar"); // var mycars=new Array("zip","rar","tar","jar");
if($.inArray(file.ext,mycars) == -1){ // if($.inArray(file.ext,mycars) == -1){
updateAlert('上传文件非法','tip_error'); // updateAlert('上传文件非法','tip_error');
setTimeout(function(){ // setTimeout(function(){
$('#tip').find('.tipclose').click(); // $('#tip').find('.tipclose').click();
},1500); // },1500);
return false; // return false;
} // }
if ($('#file_url').val()) { if ($('#file_url').val()) {
layer.msg('请先删除原文件后,再上传'); layer.msg('请先删除原文件后,再上传');
return false; return false;

@ -278,11 +278,6 @@
pick: {id:'#picker'}, pick: {id:'#picker'},
//dnd: "#theList", //dnd: "#theList",
paste: document.body, paste: document.body,
accept: {
title: '压缩包',
extensions: 'rar,zip',
mimeTypes: '.rar,.zip',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传 // 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false, resize: false,
disableGlobalDnd: true, disableGlobalDnd: true,
@ -297,14 +292,14 @@
}); });
uploaderFile.on('beforeFileQueued',function(file){ uploaderFile.on('beforeFileQueued',function(file){
var mycars=new Array("zip","rar","tar","jar"); // var mycars=new Array("zip","rar","tar","jar");
if($.inArray(file.ext,mycars) == -1){ // if($.inArray(file.ext,mycars) == -1){
updateAlert('上传文件非法','tip_error'); // updateAlert('上传文件非法','tip_error');
setTimeout(function(){ // setTimeout(function(){
$('#tip').find('.tipclose').click(); // $('#tip').find('.tipclose').click();
},1500); // },1500);
return false; // return false;
} // }
if ($('#file_url').val()) { if ($('#file_url').val()) {
layer.msg('请先删除原文件后,再上传'); layer.msg('请先删除原文件后,再上传');
return false; return false;

@ -433,11 +433,6 @@
pick: {id:'#picker'}, pick: {id:'#picker'},
//dnd: "#theList", //dnd: "#theList",
paste: document.body, paste: document.body,
accept: {
title: '压缩包',
extensions: 'rar,zip',
mimeTypes: '.rar,.zip',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传 // 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false, resize: false,
disableGlobalDnd: true, disableGlobalDnd: true,
@ -452,14 +447,14 @@
}); });
uploaderFile.on('beforeFileQueued',function(file){ uploaderFile.on('beforeFileQueued',function(file){
var mycars=new Array("zip","rar","tar","jar"); // var mycars=new Array("zip","rar","tar","jar");
if($.inArray(file.ext,mycars) == -1){ // if($.inArray(file.ext,mycars) == -1){
updateAlert('上传文件非法','tip_error'); // updateAlert('上传文件非法','tip_error');
setTimeout(function(){ // setTimeout(function(){
$('#tip').find('.tipclose').click(); // $('#tip').find('.tipclose').click();
},1500); // },1500);
return false; // return false;
} // }
//$.each(mycars,function(index,value){}); //$.each(mycars,function(index,value){});
}) })
// 当有文件被添加进队列的时候 // 当有文件被添加进队列的时候

@ -13,7 +13,7 @@ class ShardUpload extends Controller{
//要配置的内容 //要配置的内容
private $path = "./Uploads/SourcePack"; private $path = "./Uploads/SourcePack";
private $iospath = "./Uploads/GamePack"; private $iospath = "./Uploads/GamePack";
private $allowtype =array('apk','ipa','zip','rar','7z','mobileprovision','mp4','gif'); private $allowtype =array('apk','ipa','zip','rar','7z','mobileprovision','mp4','gif', 'xlsx', 'txt', 'doc', 'docx', 'xls', 'csv', 'pdf');
private $iosallowtype =array('ipa'); private $iosallowtype =array('ipa');
private $maxsize = 99999999; private $maxsize = 99999999;
private $israndname = true; private $israndname = true;

Loading…
Cancel
Save