修改检查任务增加结束时间

This commit is contained in:
caoqianming 2021-08-26 08:11:29 +08:00
parent 836c76883f
commit d74cd4ae28
2 changed files with 29 additions and 29 deletions

View File

@ -7,38 +7,38 @@
<form id="wsff" method="post" name="wsff" enctype="multipart/form-data">
<table class="listTab">
<tr>
<td>任务名称</td>
<td>任务名称</td>
<td>
<input id="checktaskname" class="easyui-textbox" name="checktaskname" style="width:480px">
<input id="checktask__checktaskname" class="easyui-textbox" name="checktaskname" style="width:480px" disabled>
</td>
</tr>
<tr>
<td>检查人</td>
<td>检查人</td>
<td>
<input id="checktabtitle" class="easyui-textbox" name="checktabtitle" style="width:480px" />
<input id="checkname__name" class="easyui-textbox" name="checktabtitle" style="width:480px" disabled/>
</td>
</tr>
<tr>
<td>检查地点</td>
<td>检查地点</td>
<td>
<input id="checkplace" class="easyui-textbox" name="checkplace" style="width:480px" />
<input id="checkplace" class="easyui-textbox" name="checkplace" style="width:480px" disabled/>
</td>
</tr>
<tr>
<td>检查内容</td>
<td>检查内容</td>
<td>
<input id="checkcontent" class="easyui-textbox" name="checkcontent" style="width:480px;height:100px" data-options="multiline:true">
<input id="checkcontent" class="easyui-textbox" name="checkcontent" style="width:480px;height:100px" data-options="multiline:true" disabled>
</td>
</tr>
<tr>
<td>检查开始</td>
<td>检查开始</td>
<td>
<input id="jctime" editable="false" name="jctime" class="easyui-datetimebox" style="width:480px"
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" required=true/>
</td>
</tr>
<tr>
<td>检查结束</td>
<td>检查结束</td>
<td>
<input id="jctime2" editable="false" name="jctime2" class="easyui-datetimebox" style="width:480px"
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" required=true/>
@ -47,13 +47,13 @@
<tr>
<td>检查问题:</td>
<td>检查记录</td>
<td>
<input id="checkquestion" class="easyui-textbox" name="checkquestion" style="width:480px;height:100px" data-options="multiline:true" required=true>
</td>
</tr>
<tr>
<td>检查图片:</td>
<td>检查图片</td>
<td> <input type="file" id="file" name="" accept="image/*" style="margin-left:30px;" /></td>
</tr>
@ -73,7 +73,7 @@
<tr>
<td>整改期限</td>
<td>整改期限</td>
<td>
<input id="zgtime" editable="false" name="zgtime" class="easyui-datetimebox" style="width:480px"
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" required=true/>
@ -81,33 +81,33 @@
</tr>
<!--<tr>
<td>整改时间</td>
<td>整改时间</td>
<td>
<input id="zgtime" editable="false" name="zgtime" class="easyui-datetimebox" style="width:480px"
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" required=true />
</td>
</tr>
<tr>
<td>整改人</td>
<td>整改人</td>
<td>
<input id="zguser" class="easyui-textbox" name="zguser" style="width:480px" required=true />
</td>
</tr>
<tr>
<td>整改要求</td>
<td>整改要求</td>
<td>
<input id="zgyq" class="easyui-textbox" name="zgyq" style="width:480px;height:60px" data-options="multiline:true" required=true>
</td>
</tr></tr>-->
<tr>
<td>需要整改</td>
<td>需要整改</td>
<td>
<input id="zgjg" class="easyui-textbox" name="zgjg" style="width:480px;height:60px" data-options="multiline:true" required=true>
</td>
</tr>
<tr>
<td>整改图片:</td>
<td>整改图片</td>
<td> <input type="file" id="file2" name="" accept="image/*" style="margin-left:30px;" /></td>
</tr>
<tr>
@ -125,7 +125,7 @@
</tr>
<tr>
<td>检查状态</td>
<td>检查状态</td>
<td>
<input type="radio" name="taskstate" value="2">已整改完成</input>
@ -166,9 +166,8 @@
$.get('api/checkproject?a=jobdetail&id=' + jobid, function (res) {
var data = res.data
console.log(data.yhtp)
$('#checktaskname').textbox('setValue', data.checktask__checktaskname)
$('#checktabtitle').textbox('setValue', data.checkname__name)
$('#checktask__checktaskname').textbox('setValue', data.checktask__checktaskname)
$('#checkname__name').textbox('setValue', data.checkname__name)
$('#checkcontent').textbox('setValue', data.checktask__checktype__checkcontent)
$('#checkplace').textbox('setValue', data.checktask__checkplace)
$('#checkquestion').textbox('setValue', data.checkquestion)
@ -178,9 +177,10 @@
$('#zgtime').datetimebox('setValue', data.zgtime)
var yhtp = data.yhtp;
if(yhtp!=null){
for (var i = 0; i < yhtp.length; i++) {
$("#addImage").append('<li ><img title="点击放大" style="display:block;" onclick="bigger(this)" class = "yhtpimg" width="120" height="120" filepath="' + yhtp[i] + '" src="http://' + window.location.host + '/' + yhtp[i] + '"/></li>');
}
}}
if (yhtp == []) { $("#addImage").append('<b >无图片</b>') }
// if (data.taskstate == 1) {
@ -199,7 +199,7 @@
if (fileObj.size / 1024 > 500) { //大于500k进行压缩上传
$("#file").after('<span id="tip" style="color:blue">图片大于500k,正在压缩...</span>');
photoCompress(fileObj, {}, function (base64Codes) {
//console.log("压缩后" + base.length / 1024 + " " + base);
//console.log("压缩后" + base.length / 1024 + " " + base);
var bl = convertBase64UrlToBlob(base64Codes);
form.append("upfile", bl, fileObj.name); // 文件对象
xhr = new XMLHttpRequest(); // XMLHttpRequest 对象
@ -275,7 +275,7 @@
speed = speed.toFixed(1);
//剩余时间
var resttime = ((evt.total - evt.loaded) / bspeed).toFixed(1);
time.innerHTML = ',速度' + speed + units + ',剩余时间' + resttime + 's';
time.innerHTML = ',速度' + speed + units + ',剩余时间' + resttime + 's';
//if(bspeed==0) time.innerHTML = '上传已取消';
}
}
@ -287,7 +287,7 @@
if (fileObj.size / 1024 > 500) { //大于500k进行压缩上传
$("#file2").after('<span id="tip" style="color:blue">图片大于500k,正在压缩...</span>');
photoCompress(fileObj, {}, function (base64Codes) {//quality: 0.2
//console.log("压缩后" + base.length / 1024 + " " + base);
//console.log("压缩后" + base.length / 1024 + " " + base);
var bl = convertBase64UrlToBlob(base64Codes);
form.append("upfile", bl, fileObj.name); // 文件对象
xhr = new XMLHttpRequest(); // XMLHttpRequest 对象
@ -358,7 +358,7 @@
speed = speed.toFixed(1);
//剩余时间
var resttime = ((evt.total - evt.loaded) / bspeed).toFixed(1);
time.innerHTML = ',速度' + speed + units + ',剩余时间' + resttime + 's';
time.innerHTML = ',速度' + speed + units + ',剩余时间' + resttime + 's';
if (bspeed == 0) time.innerHTML = '上传已取消';
}

View File

@ -8731,9 +8731,9 @@ def checkprojects(req):
obj.taskstate =int(data['taskstate'])
obj.createuser = User.objects.get(userid=userid)
obj.content=data['content']
obj.jctime = datetime.now()
obj.jctime = data['jctime']
obj.jctim2 = data['jctime2']
obj.zgtime = datetime.now()
obj.zgtime = data['zgtime']
if yhtp:
obj.yhtp=yhtp
obj.zghtp=zghtp