|
|
@@ -14,6 +14,7 @@ import AddHeabTemplate from './AddHeabTemplate'; // 添加模板
|
|
|
import AddHeabSetMeal from './AddHeabSetMeal'; // 添加套餐
|
|
|
import PublicModalQueryTable from 'pages/common/PublicModalQueryTable';
|
|
|
import PatientAdmOrderCharges from 'pages/Cashier/Report/PatientAdmOrderCharges';
|
|
|
+import PublicModalFormHooks from 'pages/common/PublicModalFormHooks';
|
|
|
import { Util } from 'tools/index';
|
|
|
import { base64Encode, SOFE_SignPKCS7Message } from '../../../tools/sccmPlugin';
|
|
|
|
|
|
@@ -110,6 +111,7 @@ class CMOrderSave extends React.Component {
|
|
|
diagActive: '1', // 当前诊断
|
|
|
isExistRecord: 'Y', // 病历录入标志
|
|
|
discountShow: false,
|
|
|
+ prePayAmtRowData: {}, // 修改押金金额弹窗回显数据(仅选中处方行时使用)
|
|
|
};
|
|
|
this.columns = [
|
|
|
{
|
|
|
@@ -808,7 +810,7 @@ class CMOrderSave extends React.Component {
|
|
|
userID: user.userID ? user.userID : '', // 登录用户id
|
|
|
locID: user.locID ? user.locID : '', // 登录科室id
|
|
|
docID: user.userID ? user.userID : '', // 登录医生id
|
|
|
- ...values,
|
|
|
+ ...values, // prePayAmt 通过表单字段绑定,required 校验由 Ant Design Form 处理
|
|
|
herbalFormID,
|
|
|
admReasonID: titleData?.patAdmReasonID || '', // 结算类型 - 绵阳骨科界面不展示,直接取titleData中的patAdmReasonID
|
|
|
orders: arr && arr.length > 0 ? arr : undefined,
|
|
|
@@ -1155,7 +1157,8 @@ class CMOrderSave extends React.Component {
|
|
|
let { defaultObj } = this.state;
|
|
|
this.clearDetailInput();
|
|
|
this.props.form.setFieldsValue({
|
|
|
- ...defaultObj
|
|
|
+ ...defaultObj,
|
|
|
+ prePayAmt: undefined, // 重置押金金额表单字段
|
|
|
})
|
|
|
this.setState({
|
|
|
orderSetDetailData: [],
|
|
|
@@ -1965,6 +1968,54 @@ class CMOrderSave extends React.Component {
|
|
|
this.setState({ discountShow: false });
|
|
|
}
|
|
|
|
|
|
+ // 打开修改押金金额弹窗
|
|
|
+ // 仅在选中处方行时可用:弹窗 rowData 为整行数据,PublicModalFormHooks 自动从 rowData.prePayAmt 回显
|
|
|
+ handleOpenPrePayAmtModal = () => {
|
|
|
+ const { recipeListRowId, rowData } = this.state;
|
|
|
+ if (!recipeListRowId) {
|
|
|
+ message.info("请先选中处方行", this.state.userData && this.state.userData.messageTime);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.setState({ prePayAmtRowData: { ...rowData } }, () => {
|
|
|
+ this.prePayAmtRef && this.prePayAmtRef.modifyVisible(true);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 修改押金金额提交
|
|
|
+ // 仅在选中处方行时调用:调用 03050296,传 { ...rowData, admID, prePayAmt },仅在成功后同步 rowData 与表单字段、关闭弹窗并刷新列表
|
|
|
+ handleSavePrePayAmt = (result) => {
|
|
|
+ if (result?.error) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const { recordData, rowData, recipeListRowId } = this.state;
|
|
|
+ if (!recipeListRowId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const newAmt = result.prePayAmt;
|
|
|
+ const data = {
|
|
|
+ params: [{
|
|
|
+ ...rowData,
|
|
|
+ admID: recordData?.admID || '',
|
|
|
+ prePayAmt: newAmt,
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ $http.post('urlADS', this, {
|
|
|
+ code: '03050296',
|
|
|
+ data: data,
|
|
|
+ success: (res) => {
|
|
|
+ if (+res.errorCode === 0) {
|
|
|
+ this.props.form.setFieldsValue({ prePayAmt: newAmt });
|
|
|
+ this.setState({
|
|
|
+ rowData: { ...rowData, prePayAmt: newAmt },
|
|
|
+ });
|
|
|
+ message.success("押金金额修改成功", this.state.userData && this.state.userData.messageTime);
|
|
|
+ this.prePayAmtRef && this.prePayAmtRef.modifyVisible(false);
|
|
|
+ this.getTableData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
// 获取医嘱套餐相关数据
|
|
|
loadLocPersonMsg = async () => {
|
|
|
try {
|
|
|
@@ -2593,6 +2644,13 @@ class CMOrderSave extends React.Component {
|
|
|
<li className='color333' onClick={this.discountOnClick}>
|
|
|
<span>优惠</span>
|
|
|
</li>
|
|
|
+ <Divider type="vertical" />
|
|
|
+ <li
|
|
|
+ className={recipeListRowId ? 'color333' : 'color999'}
|
|
|
+ onClick={recipeListRowId ? this.handleOpenPrePayAmtModal : null}
|
|
|
+ >
|
|
|
+ <span>修改押金金额</span>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<Form className="form-flex">
|
|
|
@@ -2674,7 +2732,11 @@ class CMOrderSave extends React.Component {
|
|
|
</Select>
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
- <Form.Item label={this.setMessage("CMOrderSavedecoction_way", "descripts")} className="rules-position">
|
|
|
+ <Form.Item
|
|
|
+ label={this.setMessage("CMOrderSavedecoction_way", "descripts")}
|
|
|
+ className="rules-position"
|
|
|
+ style={{ marginLeft: '18px' }}
|
|
|
+ >
|
|
|
{getFieldDecorator('cookTypeID', { // 煎药方式
|
|
|
initialValue: rowData.cookTypeID ? rowData.cookTypeID : undefined,
|
|
|
// rules: [{ required: true, message: this.setMessage("CMOrderSavedecoction_way", "message") }]
|
|
|
@@ -2684,6 +2746,18 @@ class CMOrderSave extends React.Component {
|
|
|
</Select>
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
+ <Form.Item
|
|
|
+ label="押金金额"
|
|
|
+ className="rules-position"
|
|
|
+ style={{ marginLeft: '20px' }}
|
|
|
+ >
|
|
|
+ {getFieldDecorator('prePayAmt', { // 押金金额
|
|
|
+ initialValue: rowData.prePayAmt !== undefined && rowData.prePayAmt !== null ? rowData.prePayAmt : undefined,
|
|
|
+ rules: [{ required: false, message: '押金金额不能为空' }],
|
|
|
+ })(
|
|
|
+ <InputNumber min={0} style={{ width: '150px' }} placeholder={this.setMessage("CMOrderSaveplease_enter", "descripts")} disabled={recipeListRowId ? true : false} />
|
|
|
+ )}
|
|
|
+ </Form.Item>
|
|
|
</Form>
|
|
|
<div>
|
|
|
<div style={{ background: 'rgba(240, 242, 245, 1)', height: '32px', lineHeight: '32px' }}><Icon className='doctor-table-title-splice' style={{ marginLeft: 0 }} />
|
|
|
@@ -2943,6 +3017,24 @@ class CMOrderSave extends React.Component {
|
|
|
closeModal={this.closeDiscountModal}
|
|
|
/>
|
|
|
</Modal>
|
|
|
+
|
|
|
+ {/* 修改押金金额弹窗 */}
|
|
|
+ <PublicModalFormHooks
|
|
|
+ title="修改押金金额"
|
|
|
+ width="400px"
|
|
|
+ onRef={ref => this.prePayAmtRef = ref}
|
|
|
+ formData={[{
|
|
|
+ dataIndex: 'prePayAmt',
|
|
|
+ typeCode: 'InputNumber',
|
|
|
+ title: '押金金额',
|
|
|
+ col: 24,
|
|
|
+ labelCol: 6,
|
|
|
+ wrapperCol: 16,
|
|
|
+ }]}
|
|
|
+ rowData={this.state.prePayAmtRowData}
|
|
|
+ formItemCol={{ labelCol: 8, wrapperCol: 16 }}
|
|
|
+ handleSave={this.handleSavePrePayAmt}
|
|
|
+ />
|
|
|
<AddHeabSetMeal onRef={this.handleSetMeal} />
|
|
|
|
|
|
{/* 处方确认 */}
|