From c264c5cc881131f01cc5dd27b1dfd00a56917f79 Mon Sep 17 00:00:00 2001 From: hdm Date: Wed, 3 Aug 2022 16:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=8A=B6=E6=80=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEbug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/contract/controller/Api.php | 2 +- app/contract/view/index/archive.html | 2 +- app/contract/view/index/index.html | 2 +- app/contract/view/index/view.html | 122 ++++++++++++------------- app/contract/view/index/view_set.html | 11 +-- app/contract/view/index/view_step.html | 20 ++-- 6 files changed, 75 insertions(+), 84 deletions(-) diff --git a/app/contract/controller/Api.php b/app/contract/controller/Api.php index 7570152..7eac074 100644 --- a/app/contract/controller/Api.php +++ b/app/contract/controller/Api.php @@ -83,7 +83,7 @@ class Api extends BaseController } } - //审核等操作 + //状态改变等操作 public function check() { if (request()->isPost()) { diff --git a/app/contract/view/index/archive.html b/app/contract/view/index/archive.html index 29e1aae..1da76bd 100644 --- a/app/contract/view/index/archive.html +++ b/app/contract/view/index/archive.html @@ -51,7 +51,7 @@ title: '编号', align: 'center', width: 80 - },{ field: 'status', title: '状态', align: 'center', width: 70, templet: function (d) { + },{ field: 'status', title: '状态', align: 'center', width: 80, templet: function (d) { var html = '' + d.status_name + ''; return html; } diff --git a/app/contract/view/index/index.html b/app/contract/view/index/index.html index 36a00ed..79eebb4 100644 --- a/app/contract/view/index/index.html +++ b/app/contract/view/index/index.html @@ -67,7 +67,7 @@ title: '编号', align: 'center', width: 80 - },{ field: 'check_status', title: '状态', align: 'center', width: 70, templet: function (d) { + },{ field: 'check_status', title: '状态', align: 'center', width: 80, templet: function (d) { var html = '' + d.status_name + ''; return html; } diff --git a/app/contract/view/index/view.html b/app/contract/view/index/view.html index 90b1837..b290adc 100644 --- a/app/contract/view/index/view.html +++ b/app/contract/view/index/view.html @@ -252,39 +252,41 @@ html{background-color:#fff;} {eq name="$detail.check_status" value="1" } {include file="/index/view_step" /} {/eq} - - {gt name="$auth" value="0"} - {eq name="$detail.check_status" value="2" } -
- {eq name="$detail.archive_status" value="1" } - 反确认归档 - {else/} - 合同归档 - 反确认审核 +
+ {gt name="$auth" value="0"} + {eq name="$detail.check_status" value="2" } + {eq name="$detail.archive_status" value="1" } + 反确认归档 + {else/} + 合同归档 + 反确认审核 + {/eq} {/eq} -
- {/eq} - - {eq name="$detail.check_status" value="5" } -
- 反中止合同 -
- {/eq} - - {eq name="$detail.check_status" value="6" } -
- 反作废合同 -
- {/eq} - {/gt} + {eq name="$detail.check_status" value="5" } +
+ 反中止合同 +
+ {/eq} + + {eq name="$detail.check_status" value="6" } +
+ 反作废合同 +
+ {/eq} + {/gt} + {if ( $detail.check_status eq 3) AND ( $is_create_admin eq 1) } + 撤回 + {/if} + {if ( $detail.check_status eq 4) AND ( $is_create_admin eq 1) } + 重新编辑 + {/if} +
{include file="/index/view_log" /}
- - {/block} @@ -364,19 +366,11 @@ const moduleInit = ['tool','employeepicker']; title = '确定要反确认该合同的审核?'; action = 'check_refue'; } - if(contract_status == 0 && status == 3){ - title = '确定要中止该合同?'; - action = 'stop_ok'; - } - if(contract_status == 3 && status == 0){ + if(contract_status == 5 && status == 0){ title = '确定要反中止该合同?'; action = 'stop_no'; } - if(contract_status == 0 && status == 4){ - title = '确定要作废该合同?'; - action = 'void_ok'; - } - if(contract_status == 4 && status == 0){ + if(contract_status == 6 && status == 0){ title = '确定要反作废该合同?'; action = 'void_no'; } @@ -391,37 +385,14 @@ const moduleInit = ['tool','employeepicker']; location.reload(); },2000) } - - if(status == 3 || status == 4){ - layer.open({ - type: 1, - title: '请输入原因或理由', - area: ['800px', '360px'], - content: '
', - btnAlign: 'c', - btn: ['提交保存'], - yes: function () { - let remark = $("#remarkTextarea").val(); - if (remark != '') { - tool.post("/contract/api/check", {id: contract_id,check_status:status,mark:remark}, callback); - } else { - layer.msg('请输入原因或理由'); - } - } - }) - } - else{ - tool.post("/contract/api/check", {id: contract_id,check_status:status,mark:''}, callback); - } - + tool.post("/contract/api/check", {id: contract_id,check_status:status,mark:''}, callback); layer.close(index); }); }); $('body').on('click','[data-event="archive"]',function(){ let status = $(this).data('status'); - let title = '合同归档后将不能进行任何数据操作,确定要提交归档?'; - layer.confirm(title, { + layer.confirm('合同归档后将不能进行任何数据操作,确定要提交归档?', { icon: 3, title: '提示' }, function(index) { @@ -438,6 +409,35 @@ const moduleInit = ['tool','employeepicker']; }) + $('body').on('click','.check_back',function(){ + layer.prompt({ + formType: 2, + title: '请输入撤回理由', + area: ['500px', '120px'] //自定义文本域宽高 + }, function(value, index, elem){ + $.ajax({ + url: "/api/index/flow_check", + type:'post', + data:{ + id:contract_id, + type:4, + check:3, + content:value + }, + success: function (e) { + layer.msg(e.msg); + if (e.code == 0) { + parent.layui.pageTable.reload(); + location.reload(); + } + } + }) + layer.close(index); + }); + }) + + + //删除附件 $('#fileList').on('click', '.btn-delete', function () { var _id = $(this).data('id'); diff --git a/app/contract/view/index/view_set.html b/app/contract/view/index/view_set.html index 606d9e0..c4a48d9 100644 --- a/app/contract/view/index/view_set.html +++ b/app/contract/view/index/view_set.html @@ -253,8 +253,8 @@ html{background-color:#fff;} 编辑合同 {/eq} {gt name="$auth" value="0"} - 中止合同 - 作废合同 + 中止合同 + 作废合同 {/gt} @@ -326,11 +326,11 @@ const moduleInit = ['tool','employeepicker']; let status = $(this).data('status'); let action = ''; let title = '' - if(contract_status == 0 && status == 3){ + if(status == 5){ title = '确定要中止该合同?'; action = 'stop_ok'; } - if(contract_status == 0 && status == 4){ + if(status == 6){ title = '确定要作废该合同?'; action = 'void_ok'; } @@ -360,8 +360,7 @@ const moduleInit = ['tool','employeepicker']; layer.msg('请输入原因或理由'); } } - }) - tool.post("/contract/api/check", {id: contract_id,check_status:status,mark:''}, callback); + }) layer.close(index); }); }); diff --git a/app/contract/view/index/view_step.html b/app/contract/view/index/view_step.html index 2d72dde..2032fd9 100644 --- a/app/contract/view/index/view_step.html +++ b/app/contract/view/index/view_step.html @@ -52,21 +52,13 @@
- {eq name="$detail.check_status" value='1'} - {eq name="$is_check_admin" value='1'} - 通过 - {$flows.flow_type == 5?'回退':'拒绝'} - {/eq} - {eq name="$is_create_admin" value='1'} - 撤回 - {/eq} + {eq name="$is_check_admin" value='1'} + 通过 + {$flows.flow_type == 5?'回退':'拒绝'} + {/eq} + {eq name="$is_create_admin" value='1'} + 撤回 {/eq} - {if ( $detail.check_status eq 3) AND ( $is_create_admin eq 1) } - 撤回 - {/if} - {if ( $detail.check_status eq 4) AND ( $is_create_admin eq 1) } - 重新编辑 - {/if}