|
@@ -63,10 +63,13 @@
|
|
|
{if $project_five.project_record == 1}
|
|
|
<li data-id="6">工作记录</li>
|
|
|
{/if}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
{if $project_five.project_log == 1}
|
|
|
<li data-id="7">项目动态</li>
|
|
|
{/if}
|
|
|
+
|
|
|
+ <li data-id="8">预约看现场</li>
|
|
|
</ul>
|
|
|
|
|
|
<div class="layui-tab-content">
|
|
@@ -685,14 +688,96 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
{/if}
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 预约看现场 -->
|
|
|
+ <div class="layui-tab-item">
|
|
|
+
|
|
|
+ <div class="detail-report">
|
|
|
+ {volist name="appointmentList" id="vo"}
|
|
|
+ <div class="report-item">
|
|
|
+ <form class="layui-form" lay-filter="barsearchform">
|
|
|
+ <input type="hidden" value="{$vo.id}" name="id">
|
|
|
+ <input type="hidden" value="{$vo.project_id}" name="project_id">
|
|
|
+ <div class="report-top">
|
|
|
+ <span style="font-size: 2vh;width:70vw;"><b>发起人:{$vo.sponsor_name}</b></span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="report-content" style="margin-bottom: 1.5vw;">
|
|
|
+ <span class="report-overdue">
|
|
|
+ <span>审批人:{$vo.approval_name}</span>
|
|
|
+ <span>派遣人数:{$vo.dispatch_num}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="report-content"
|
|
|
+ style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 1.5vw;">
|
|
|
+ <span style="color: darkgray;"><b>预约时间:{$vo.appointment_time}</b></span>
|
|
|
+ <span style="color: darkgray;"><b>派遣人数:{$vo.dispatch_num}</b></span>
|
|
|
+ </div>
|
|
|
+ {switch $vo.audit_status}
|
|
|
+ {case 0}
|
|
|
+ {if $vo.operate}
|
|
|
+ <button type="button" class="layui-btn layui-btn-normal " lay-submit lay-filter="appointmentAgree" style="background-color:rgb(146,208,80);">通过</button>
|
|
|
+ <button type="button" class="layui-btn layui-bg-red layui-btn-normal" lay-submit lay-filter="appointmentDisagree">拒绝</button>
|
|
|
+ {else}
|
|
|
+ 待审核
|
|
|
+ {/if}
|
|
|
+ {/case}
|
|
|
+ {case 1}通过{/case}
|
|
|
+ {case 2}拒绝{/case}
|
|
|
+ {default /}未知
|
|
|
+ {/switch}
|
|
|
+
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ {/volist}
|
|
|
+ </div>
|
|
|
+ <div class="record-add">
|
|
|
+ <a href="{:url('mobile/index/record_add')}?project_id={$project_id}">
|
|
|
+ <img src="{__MOBILE__}/img/add.png" alt="">
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script src="{__MOBILE__}/layui-v2.8.18-rc.1/layui-v2.8.18-rc.1/layui/layui.js"></script>
|
|
|
<script src="{__MOBILE__}/js/jquery-3.4.1.min.js"></script>
|
|
|
<script>
|
|
|
- let form = layui.form,
|
|
|
- tool = layui.tool;
|
|
|
+ let form = layui.form;
|
|
|
+ let tool = {
|
|
|
+ ajax: function (options, callback) {
|
|
|
+ var format = 'json';
|
|
|
+ if (options.hasOwnProperty('data')) {
|
|
|
+ format = options.data.hasOwnProperty('format') ? options.data.format : 'json';
|
|
|
+ }
|
|
|
+ callback = callback || options.success;
|
|
|
+ callback && delete options.success;
|
|
|
+ var optsetting = { timeout: 10000 };
|
|
|
+ if (format == 'jsonp') {
|
|
|
+ optsetting = { timeout: 10000, dataType: 'jsonp', jsonp: 'callback' }
|
|
|
+ }
|
|
|
+ var opts = $.extend({}, optsetting, {
|
|
|
+ success: function (res) {
|
|
|
+ if (callback && typeof callback === 'function') {
|
|
|
+ callback(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, options);
|
|
|
+ $.ajax(opts);
|
|
|
+ },
|
|
|
+
|
|
|
+ post: function (url, data, callback) {
|
|
|
+ this.ajax({
|
|
|
+ url: url,
|
|
|
+ type: "POST",
|
|
|
+ data: data
|
|
|
+ }, callback);
|
|
|
+ },
|
|
|
+ }
|
|
|
+
|
|
|
var project_id = "{$project_id}"
|
|
|
layui.use(function () {
|
|
|
var upload = layui.upload;
|
|
@@ -743,10 +828,8 @@
|
|
|
|
|
|
} else if (index == 6) {
|
|
|
|
|
|
-
|
|
|
}else if (index == 7) {
|
|
|
eliminate(6,$(this))
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -857,7 +940,6 @@
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (e) {
|
|
|
-
|
|
|
call(e)
|
|
|
},
|
|
|
error: function () {
|
|
@@ -867,6 +949,56 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+ form.on('submit(appointmentAgree)', function (data) {
|
|
|
+ layer.prompt({
|
|
|
+ title: '请输入<span style="color: green">回执</span>',
|
|
|
+ formType: 2,
|
|
|
+ area: ['35vw', '15vw']
|
|
|
+ }, function (text, index) {
|
|
|
+ let callback = function (e) {
|
|
|
+ layer.msg(e.msg);
|
|
|
+ setTimeout(function () {
|
|
|
+ layer.close(index);
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
+ if (text !== "") {
|
|
|
+ if("{$unit_type}" == 2){
|
|
|
+ tool.post("/admin/project.appointment/agree_company", {id: data.field.id,audit_remark:text,project_id:data.field.project_id}, callback);// 项目id
|
|
|
+ }else{
|
|
|
+ tool.post("/admin/project.appointment/agree", {id: data.field.id,audit_remark:text,project_id:data.field.project_id}, callback);// 项目id
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ layer.msg("回执不能为空")
|
|
|
+ }
|
|
|
+ // console.log(data)
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ form.on('submit(appointmentDisagree)', function (data) {
|
|
|
+ layer.prompt({
|
|
|
+ title: '请输入<span style="color: green">回执</span>',
|
|
|
+ formType: 2,
|
|
|
+ area: ['35vw', '15vw']
|
|
|
+ }, function (text, index) {
|
|
|
+ let callback = function (e) {
|
|
|
+ layer.msg(e.msg);
|
|
|
+ setTimeout(function () {
|
|
|
+ layer.close(index);
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
+ if (text !== "") {
|
|
|
+ if("{$unit_type}" == 2){
|
|
|
+ tool.post("/admin/project.appointment/disagree_company", {id: data.field.id,audit_remark:text,project_id:data.field.project_id}, callback);// 项目id
|
|
|
+ }else{
|
|
|
+ tool.post("/admin/project.appointment/disagree", {id: data.field.id,audit_remark:text,project_id:data.field.project_id}, callback);// 项目id
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ layer.msg("回执不能为空")
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ });
|
|
|
|
|
|
</script>
|
|
|
|