|
@@ -5,11 +5,11 @@ import { requestMethodFactory } from '@/platform/request.ts';
|
|
|
import type { DecoctionModel, PackModel, SoakModel, StepModel } from '@/model/step.model.ts';
|
|
|
import { fromDecoctionModel, fromPackModel, fromSoakModel } from '@/model/step.model.ts';
|
|
|
|
|
|
-export function getDataMethod(no: string) {
|
|
|
+export function getDataMethod(no: string, mode?: string) {
|
|
|
return requestMethodFactory(
|
|
|
PharmacyHttpClient.Get<StepModel, ResponseData>(`/web/pda/detailInfo`, {
|
|
|
params: {
|
|
|
- orderNo: no,
|
|
|
+ mode, orderNo: no,
|
|
|
/**
|
|
|
* @deprecated 历史遗留
|
|
|
*/
|
|
@@ -88,10 +88,6 @@ export function getDataMethod(no: string) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-export function setDataMethod(url: string, data: ResponseData) {
|
|
|
- return requestMethodFactory(PharmacyHttpClient.Post(url, data));
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 调配节点保存
|
|
|
* @param data
|
|
@@ -109,16 +105,11 @@ export function setDeployRecheckDataMethod(data: ResponseData) {
|
|
|
}
|
|
|
|
|
|
export function getSoakDataMethod(id: string) {
|
|
|
- return PharmacyHttpClient.Get<SoakModel, ResponseData>(`/web/pda/steep/${id}`, { transform: fromSoakModel });
|
|
|
+ return PharmacyHttpClient.Get<SoakModel, ResponseData>(`/web/pda/steep/${id}`, { transform: fromSoakModel, hitSource: /^soak/ });
|
|
|
}
|
|
|
|
|
|
export function setSoakDataMethod(model: Partial<SoakModel>, picture?: string[]) {
|
|
|
- return requestMethodFactory(
|
|
|
- PharmacyHttpClient.Put('/web/pda/steep/edit', {
|
|
|
- ...model,
|
|
|
- image: picture?.join(',') ?? '',
|
|
|
- }),
|
|
|
- );
|
|
|
+ return requestMethodFactory(PharmacyHttpClient.Put('/web/pda/steep/edit', { ...model, image: picture?.join(',') ?? '' }, { name: 'soak-edit' }));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -126,7 +117,7 @@ export function setSoakDataMethod(model: Partial<SoakModel>, picture?: string[])
|
|
|
* @param id
|
|
|
*/
|
|
|
export function getDecoctionDataMethod(id: string) {
|
|
|
- return PharmacyHttpClient.Get<DecoctionModel, ResponseData>(`/web/pda/decoct/${id}`, { transform: fromDecoctionModel });
|
|
|
+ return PharmacyHttpClient.Get<DecoctionModel, ResponseData>(`/web/pda/decoct/${id}`, { transform: fromDecoctionModel, hitSource: /^decoction/ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -135,12 +126,7 @@ export function getDecoctionDataMethod(id: string) {
|
|
|
* @param picture
|
|
|
*/
|
|
|
export function setDecoctionDataMethod(model: Partial<DecoctionModel>, picture?: string[]) {
|
|
|
- return requestMethodFactory(
|
|
|
- PharmacyHttpClient.Put('/web/pda/decoct/edit', {
|
|
|
- ...model,
|
|
|
- image: picture?.join(',') ?? '',
|
|
|
- }),
|
|
|
- );
|
|
|
+ return requestMethodFactory(PharmacyHttpClient.Put('/web/pda/decoct/edit', { ...model, image: picture?.join(',') ?? '' }, { name: 'decoction-edit' }));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -148,7 +134,7 @@ export function setDecoctionDataMethod(model: Partial<DecoctionModel>, picture?:
|
|
|
* @param id
|
|
|
*/
|
|
|
export function getPackDataMethod(id: string) {
|
|
|
- return PharmacyHttpClient.Get<PackModel, ResponseData>(`/web/pda/Pack/${id}`, { transform: fromPackModel });
|
|
|
+ return PharmacyHttpClient.Get<PackModel, ResponseData>(`/web/pda/Pack/${id}`, { transform: fromPackModel, hitSource: /^pack/ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -157,12 +143,7 @@ export function getPackDataMethod(id: string) {
|
|
|
* @param picture
|
|
|
*/
|
|
|
export function setPackDataMethod(model: Partial<PackModel>, picture?: string[]) {
|
|
|
- return requestMethodFactory(
|
|
|
- PharmacyHttpClient.Put('/web/pda/Pack/edit', {
|
|
|
- ...model,
|
|
|
- image: picture?.join(',') ?? '',
|
|
|
- }),
|
|
|
- );
|
|
|
+ return requestMethodFactory(PharmacyHttpClient.Put('/web/pda/Pack/edit', { ...model, image: picture?.join(',') ?? '' }, { name: 'pack-edit' }));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -171,10 +152,5 @@ export function setPackDataMethod(model: Partial<PackModel>, picture?: string[])
|
|
|
* @param picture
|
|
|
*/
|
|
|
export function setPackRecheckDataMethod(model: Partial<PackModel>, picture?: string[]) {
|
|
|
- return requestMethodFactory(
|
|
|
- PharmacyHttpClient.Put('/web/pda/Pack/addPackReview', {
|
|
|
- ...model,
|
|
|
- image: picture?.join(',') ?? '',
|
|
|
- }),
|
|
|
- );
|
|
|
+ return requestMethodFactory(PharmacyHttpClient.Put('/web/pda/Pack/addPackReview', { ...model, image: picture?.join(',') ?? '' }, { name: 'pack-edit-recheck' }));
|
|
|
}
|