From 37c5326dc4731f3bb4f6f5533f43be650c499f15 Mon Sep 17 00:00:00 2001 From: hdm Date: Sat, 19 Nov 2022 14:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=A8=A1=E5=9D=97=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=8E=A7=E4=BB=B6=E5=8F=8A=E5=85=B3=E8=81=94=E5=90=88?= =?UTF-8?q?=E5=90=8C=E9=80=89=E6=8B=A9=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/finance/controller/Api.php | 6 +- app/finance/controller/Invoice.php | 5 + app/finance/model/Invoice.php | 2 +- app/finance/view/invoice/add.html | 166 ++++---------------- app/finance/view/invoice/view.html | 50 +++++- app/install/data/gouguoa.sql | 15 +- public/static/assets/gougu/module/oaTool.js | 163 +++++++++++++++++++ 7 files changed, 263 insertions(+), 144 deletions(-) create mode 100644 public/static/assets/gougu/module/oaTool.js diff --git a/app/finance/controller/Api.php b/app/finance/controller/Api.php index 5481f1d..dfd0a4a 100644 --- a/app/finance/controller/Api.php +++ b/app/finance/controller/Api.php @@ -78,8 +78,10 @@ class Api extends BaseController $param['check_status'] = 5; $param['open_admin_id'] = $this->uid; } - $param['open_time'] = isset($param['open_time']) ? strtotime(urldecode($param['open_time'])) : 0; - $res = Invoice::where('id', $param['id'])->strict(false)->field('code,check_status,open_time,open_admin_id,delivery')->update($param); + if(isset($param['open_time'])){ + $param['open_time'] = strtotime(urldecode($param['open_time'])); + } + $res = Invoice::where('id', $param['id'])->strict(false)->field('code,check_status,open_time,open_admin_id,delivery,other_file_ids')->update($param); if ($res !== false) { add_log('open', $param['id'],$param,'发票'); return to_assign(); diff --git a/app/finance/controller/Invoice.php b/app/finance/controller/Invoice.php index 6a081c9..7b830c0 100644 --- a/app/finance/controller/Invoice.php +++ b/app/finance/controller/Invoice.php @@ -378,6 +378,11 @@ class Invoice extends BaseController $fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select(); $detail['fileArray'] = $fileArray; } + + if($detail['other_file_ids'] !=''){ + $fileArrayOther = Db::name('File')->where('id','in',$detail['other_file_ids'])->select(); + $detail['fileArrayOther'] = $fileArrayOther; + } $is_check_admin = 0; $is_create_admin = 0; diff --git a/app/finance/model/Invoice.php b/app/finance/model/Invoice.php index 0a6d3a9..58efead 100644 --- a/app/finance/model/Invoice.php +++ b/app/finance/model/Invoice.php @@ -86,7 +86,7 @@ class Invoice extends Model $detail['create_user'] = Db::name('Admin')->where(['id' => $detail['admin_id']])->value('name'); $detail['department'] = Db::name('Department')->where(['id' => $detail['did']])->value('title'); if ($detail['open_time'] > 0) { - $detail['open_time'] = empty($detail['open_time']) ? '0' : date('Y-m-d H:i', $detail['open_time']); + $detail['open_time'] = empty($detail['open_time']) ? '0' : date('Y-m-d', $detail['open_time']); $detail['open_admin'] = Db::name('Admin')->where(['id' => $detail['open_admin_id']])->value('name'); } else{ diff --git a/app/finance/view/invoice/add.html b/app/finance/view/invoice/add.html index 35737b1..f11f56d 100644 --- a/app/finance/view/invoice/add.html +++ b/app/finance/view/invoice/add.html @@ -66,24 +66,29 @@ 关联合同 - + {/gt} + + +
关联附件
+
+ +
+ + +
+ +
+ + 备注信息 -
附件
- -
- -
- - - 审批流程* + {/gt} - 备注信息 - - - -
附件
+ +
关联附件
+
+ +
+ -
- +
+ {notempty name="$detail.file_ids"} {volist name="$detail.fileArray" id="vo"} -
+
{$vo.name}
@@ -193,6 +199,10 @@
+ + 备注信息 + + 审批流程* @@ -231,26 +241,9 @@ {block name="script"} {/block} diff --git a/app/finance/view/invoice/view.html b/app/finance/view/invoice/view.html index 55d2386..6dc18ac 100644 --- a/app/finance/view/invoice/view.html +++ b/app/finance/view/invoice/view.html @@ -115,7 +115,7 @@ {/notempty} {notempty name="$detail.file_ids"} - 相关附件 + 关联附件
{volist name="$detail.fileArray" id="vo"} @@ -220,6 +220,33 @@ 物流单号 {$detail.delivery} + + +
其他附件
+
+ +
+ + +
+ + {notempty name="$detail.other_file_ids"} + {volist name="$detail.fileArrayOther" id="vo"} +
+
+ +
{$vo.name}
+
+ + +
+
+
+ {/volist} + {/notempty} +
+ + {/if} @@ -250,9 +277,26 @@ {block name="script"}