1
0
Fork 0
master
panliang 2023-09-25 11:52:37 +08:00
parent 499e76a613
commit be5dc58009
20 changed files with 26 additions and 16 deletions

View File

@ -93,7 +93,7 @@ class PatientRecordController extends AdminController
amisMake()->DateTimeControl()->name('next_treat_at')->label(__('patient-record.next_treat_at')),
amisMake()->SelectControl()->options($this->getAdminUserOptions())->searchable()->name('notify_user_id')->label(__('patient-record.notify_user_id')),
amisMake()->DateControl()->name('notify_at')->label(__('patient-record.notify_at')),
amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks')),
// amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks')),
amisMake()->TextControl()->label(__('patient-record.creator_id'))->value($this->user()->name)->readonly(),
]);
}
@ -114,7 +114,7 @@ class PatientRecordController extends AdminController
amisMake()->DateTimeControl()->name('next_treat_at')->label(__('patient-record.next_treat_at'))->static(),
amisMake()->TextControl()->name('notify_user.name')->label(__('patient-record.notify_user_id'))->static(),
amisMake()->DateControl()->name('notify_at')->label(__('patient-record.notify_at'))->static(),
amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks'))->static(),
// amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks'))->static(),
amisMake()->SelectControl()->options($this->getAdminUserOptions())->name('creator_id')->label(__('patient-record.creator_id'))->static(),
amisMake()->DateTimeControl()->name('created_at')->label(__('patient.created_at'))->static(),
]);

View File

@ -30,8 +30,9 @@ class PatientRecordNotify extends Command
public function handle()
{
$now = now();
$list = PatientRecord::where('is_notified', 0)
$list = PatientRecord::with(['patient'])->where('is_notified', 0)
->whereNotNull('notify_user_id')
->whereNotNull('next_treat_at')
->whereBetween('notify_at', [$now->copy()->startOfDay(), $now->copy()->endOfDay()])
->get();
$app = EasyWeChat::officialAccount();
@ -50,9 +51,16 @@ class PatientRecordNotify extends Command
if ($user) {
$response = $api->postJson('/cgi-bin/message/template/send', [
'touser' => $user->openid,
'template_id' => '',
'template_id' => 'zdkOoIk7bfyzpW9Tuu-pxmrVkSviFvpp1yjXBUT8nEY',
'url' => url('/h5/pages/record/detail?id=' . $item->id),
'data' => []
'data' => [
'thing1' => [
'value' => data_get($item->patient, 'name') .'-'. data_get($item->patient, 'phone')
],
'time3' => [
'value' => $item->next_treat_at->format('Y年m月d日 H:i:s')
],
]
]);
if ($response->isFailed()) {
logger('病历记录: 通知, 模板消息发送, 失败', $response->toArray(false));

View File

@ -1,2 +1,2 @@
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>宝芝堂</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/h5/static/index.5841170f.css"/><script defer="defer" src="/h5/static/js/chunk-vendors.7eabb1da.js"></script><script defer="defer" src="/h5/static/js/index.ae006a63.js"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/h5/static/index.5841170f.css"/><script defer="defer" src="/h5/static/js/chunk-vendors.7eabb1da.js"></script><script defer="defer" src="/h5/static/js/index.b9d0d66a.js"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(self["webpackChunkuniapp"]=self["webpackChunkuniapp"]||[]).push([[58],{2052:function(t,a,e){var n=e(4374);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.id,n,""]]),n.locals&&(t.exports=n.locals);var i=e(5472).Z;i("03310569",n,!0,{sourceMap:!1,shadowMode:!1})},2185:function(t,a,e){"use strict";e.r(a),e.d(a,{default:function(){return f}});var n,i={uButton:e(7344).Z},c=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{staticClass:"page"},[e("v-uni-view",{staticClass:"btns"},t._l(t.list,(function(a){return e("v-uni-view",{key:a.id,staticClass:"btn"},[e("u-button",{attrs:{icon:"../../static/"+a.key+".png",text:a.name,size:"large"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.itemClick(a.id)}}})],1)})),1)],1)},s=[],u={data:function(){return{list:[]}},onLoad:function(){var t=this,a={_action:"getData"};this.$ajax.get("/admin-api/category",{params:a}).then((function(a){0==a.status&&(t.list=a.data.items)}))},methods:{itemClick:function(t){uni.setStorageSync("medical_record_treat_type_id",t),uni.navigateTo({url:"/pages/patient/index"})}}},r=u,o=(e(2052),e(1503)),d=(0,o.Z)(r,c,s,!1,null,"ef0b7fcc",null,!1,i,n),f=d.exports},4374:function(t,a,e){"use strict";e.r(a);var n=e(2916),i=e.n(n),c=e(3282),s=e.n(c),u=s()(i());u.push([t.id,".page[data-v-ef0b7fcc] .u-grid{margin-top:%?400?%;background:#fff}.page[data-v-ef0b7fcc] .u-grid-item{padding:15px 0}.page[data-v-ef0b7fcc] .grid-text{margin-top:10px}.btns[data-v-ef0b7fcc]{margin-top:%?400?%;display:flex;flex-direction:column;align-items:center}.btns .btn[data-v-ef0b7fcc]{width:90%;margin-top:20px}",""]),a["default"]=u}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB