This commit is contained in:
commit
4418289bbe
|
@ -899,7 +899,7 @@ class Trainuser(models.Model): # 培训人员记录
|
|||
checked = models.IntegerField(default=0)
|
||||
qdsj = models.DateTimeField(null=True, blank=True)
|
||||
jsqd = models.DateTimeField(verbose_name='结束签到时间',null=True,blank=True)
|
||||
isnew = models.IntegerField(default=0)
|
||||
isnew = models.IntegerField(default=0, verbose_name='是否新参加')
|
||||
opinion = models.TextField('建议想法', null=True, blank=True)
|
||||
score = models.IntegerField('评价总体打分', null=True, blank=True)
|
||||
|
||||
|
@ -1381,7 +1381,8 @@ class Checkjob(models.Model):
|
|||
checkname=models.ForeignKey(User,related_name='jianchas',on_delete=models.CASCADE)#检查人员
|
||||
checkquestion=models.TextField(null=True)#检查发现的问题
|
||||
zgtime=models.DateTimeField(null=True, blank=True)#整改时间
|
||||
jctime=models.DateTimeField(null=True, blank=True)#检查时间
|
||||
jctime=models.DateTimeField(null=True, blank=True)#检查开始时间
|
||||
jctim2 = models.DateTimeField('检查结束时间', null=True, blank=True)
|
||||
zguser=models.ForeignKey(User,on_delete=models.CASCADE,null=True,)#整改人
|
||||
createuser = models.ForeignKey(User,related_name='chuangjian',on_delete=models.CASCADE,null=True)#创建人
|
||||
createdate = models.DateTimeField(default = timezone.now)#创建时间
|
||||
|
|
|
@ -7,47 +7,53 @@
|
|||
<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>
|
||||
<input id="jctime2" editable="false" name="jctime2" class="easyui-datetimebox" style="width:480px"
|
||||
data-options="currentText:'今天',closeText:'关闭',showSeconds:false" required=true/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
@ -67,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/>
|
||||
|
@ -75,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>
|
||||
|
@ -119,7 +125,7 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>检查状态:</td>
|
||||
<td>检查状态</td>
|
||||
<td>
|
||||
|
||||
<input type="radio" name="taskstate" value="2">已整改完成</input>
|
||||
|
@ -160,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)
|
||||
|
@ -172,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) {
|
||||
|
@ -193,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 对象
|
||||
|
@ -269,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 = '上传已取消';
|
||||
}
|
||||
}
|
||||
|
@ -281,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 对象
|
||||
|
@ -352,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 = '上传已取消';
|
||||
}
|
||||
|
||||
|
|
|
@ -8731,8 +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.zgtime=datetime.now()
|
||||
obj.jctime = data['jctime']
|
||||
obj.jctim2 = data['jctime2']
|
||||
obj.zgtime = data['zgtime']
|
||||
if yhtp:
|
||||
obj.yhtp=yhtp
|
||||
obj.zghtp=zghtp
|
||||
|
|
Loading…
Reference in New Issue