After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 925 B |
After Width: | Height: | Size: 685 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.3 KiB |
@ -1,16 +1,55 @@
@@ -1,16 +1,55 @@
|
||||
const _app = getApp<IAppOption>() |
||||
const app = getApp<IAppOption>() |
||||
|
||||
Page({ |
||||
data: { |
||||
active: 1, |
||||
injectionFeel: '', |
||||
injectionRemark: '', |
||||
}, |
||||
onLoad() { |
||||
app.waitLogin().then(() => { |
||||
this.getDetail() |
||||
}) |
||||
}, |
||||
getDetail() { |
||||
wx.ajax({ |
||||
method: 'GET', |
||||
url: '?r=wtx/treatment/get-injection-feel', |
||||
data: {}, |
||||
}).then((res) => { |
||||
this.setData({ |
||||
...res, |
||||
}) |
||||
}) |
||||
}, |
||||
onLoad() {}, |
||||
handleSelect(e) { |
||||
const { active } = e.currentTarget.dataset |
||||
this.setData({ |
||||
active, |
||||
injectionFeel: active, |
||||
}) |
||||
}, |
||||
handleSubmit() { |
||||
const { injectionFeel, injectionRemark } = this.data |
||||
if (!injectionFeel && !injectionRemark) { |
||||
wx.showToast({ |
||||
title: '请选择注射感受或者填写备注', |
||||
icon: 'none', |
||||
}) |
||||
return |
||||
} |
||||
wx.ajax({ |
||||
method: 'POST', |
||||
url: '?r=wtx/treatment/save-injection-feel', |
||||
data: { |
||||
injectionFeel, |
||||
injectionRemark, |
||||
}, |
||||
}).then((res) => { |
||||
this.handleBack() |
||||
}) |
||||
}, |
||||
handleBack() { |
||||
wx.navigateBack() |
||||
}, |
||||
}) |
||||
|
||||
export {} |
||||
|
@ -1,8 +1,82 @@
@@ -1,8 +1,82 @@
|
||||
const _app = getApp<IAppOption>(); |
||||
const app = getApp<IAppOption>() |
||||
import { calc, fmt } from 'a-calc' |
||||
|
||||
Page({ |
||||
data: {}, |
||||
onLoad() {}, |
||||
}); |
||||
data: { |
||||
injectionDate: '', |
||||
injectionWeight: '', |
||||
|
||||
injectionDrugs: '', |
||||
injectionNum: '', |
||||
}, |
||||
onLoad() { |
||||
app.waitLogin().then(() => { |
||||
this.getDetail() |
||||
}) |
||||
}, |
||||
handleWeight(e) { |
||||
const value = e.detail.value |
||||
if (value) { |
||||
const injectionDrugs = calc(`${value} * 1.25 | =0 ~+`) |
||||
const injectionNum = calc(`${value} * 1.25 / 2 | =0 ~+`) |
||||
this.setData({ |
||||
injectionDrugs, |
||||
injectionNum, |
||||
}) |
||||
} |
||||
}, |
||||
handleChangeDate(e) { |
||||
const value = e.detail.value |
||||
wx.ajax({ |
||||
method: 'POST', |
||||
url: '?r=wtx/treatment/save-injection-date', |
||||
data: { |
||||
injectionDate: value, |
||||
}, |
||||
}).then((res) => { |
||||
console.log('res: ', res) |
||||
}) |
||||
}, |
||||
getDetail() { |
||||
wx.ajax({ |
||||
method: 'GET', |
||||
url: '?r=wtx/treatment/get-injection-info', |
||||
data: {}, |
||||
}).then((res) => { |
||||
this.setData({ |
||||
...res, |
||||
}) |
||||
}) |
||||
}, |
||||
handleBack() { |
||||
wx.navigateBack() |
||||
}, |
||||
handleSubmit() { |
||||
const { injectionDate, injectionWeight } = this.data |
||||
if (!injectionDate) { |
||||
wx.showToast({ |
||||
title: '请选择输注时间', |
||||
icon: 'none', |
||||
}) |
||||
return |
||||
} |
||||
if (!injectionWeight) { |
||||
wx.showToast({ |
||||
title: '请输入体重', |
||||
icon: 'none', |
||||
}) |
||||
return |
||||
} |
||||
wx.ajax({ |
||||
method: 'POST', |
||||
url: '?r=wtx/treatment/save-injection-info', |
||||
data: { |
||||
injectionWeight, |
||||
}, |
||||
}).then(() => { |
||||
wx.navigateBack() |
||||
}) |
||||
}, |
||||
}) |
||||
|
||||
export {} |
||||
|
@ -1,33 +1,40 @@
@@ -1,33 +1,40 @@
|
||||
<view class="page"> |
||||
<view class="empty" wx:if="{{false}}"> |
||||
<image class="none-img" src="{{imageUrl}}none1.png?t={{Timestamp}}"></image> |
||||
<view class="title">您还没有记录信息哦~</view> |
||||
<view class="add">录入我的免疫制剂信息</view> |
||||
</view> |
||||
<view class="list" wx:else> |
||||
<view class="list" wx:if="{{total>0}}"> |
||||
<view class="total"> |
||||
已用药 |
||||
<text class="red">2</text> |
||||
<text class="red">{{total}}</text> |
||||
次 |
||||
</view> |
||||
<view class="list-card" bind:tap="handleEdit" data-id="1"> |
||||
<view |
||||
class="list-card" |
||||
wx:for="{{list}}" |
||||
bind:tap="handleEdit" |
||||
data-id="{{item.recordId}}" |
||||
data-period="{{item.period}}" |
||||
> |
||||
<view class="item"> |
||||
<view class="item-title">用药时间</view> |
||||
<view class="item-content">2025-06-13</view> |
||||
<view class="item-content">{{item.recordDate}}</view> |
||||
</view> |
||||
<view class="item"> |
||||
<view class="item-title">药物名称</view> |
||||
<view class="item-content">2025-06-13</view> |
||||
<view class="item-content">{{item.drugName}}</view> |
||||
</view> |
||||
<view class="item"> |
||||
<view class="item-title">用药方式</view> |
||||
<view class="item-content">2025-06-13</view> |
||||
<view class="item-content">{{item.typeName}}</view> |
||||
</view> |
||||
<view class="item"> |
||||
<view class="item-title">用药剂量</view> |
||||
<view class="item-content">2025-06-13</view> |
||||
<view class="item-content">{{item.dosage}}{{item.dosageUnitName}}</view> |
||||
</view> |
||||
</view> |
||||
<pagination pagination="{{pagination}}"></pagination> |
||||
<image class="add" src="{{imageUrl}}icon53.png?t={{Timestamp}}" bind:tap="handleAdd"></image> |
||||
</view> |
||||
<view class="empty" wx:else> |
||||
<image class="none-img" src="{{imageUrl}}none1.png?t={{Timestamp}}"></image> |
||||
<view class="title">您还没有记录信息哦~</view> |
||||
<view class="add" bind:tap="handleAdd">录入我的免疫制剂信息</view> |
||||
</view> |
||||
</view> |
||||
|