|
@@ -31,13 +31,17 @@
|
31
|
31
|
</view>
|
32
|
32
|
<view class="orderList_listItem_item_btns">
|
33
|
33
|
<button type="primary" class="btn" @click.stop="toDetail(patient.patientCode)">患者详情</button>
|
34
|
|
- <button type="primary" class="btn" @click.stop="openRecallModal(patient.id)">一键建单</button>
|
|
34
|
+ <button type="primary" class="btn" @click.stop="buildOrder(patient)">一键建单</button>
|
35
|
35
|
</view>
|
36
|
36
|
</view>
|
37
|
37
|
</view>
|
38
|
38
|
</view>
|
39
|
39
|
<seiminFooterNav></seiminFooterNav>
|
40
|
40
|
<seiminModel ref="seiminModel"></seiminModel>
|
|
41
|
+ <seiminPicker ref="sPicker" :title="pickerTitle" titleColor="#808080" titleFontSize="28rpx" confirmColor="#333"
|
|
42
|
+ confirmFontSize="38rpx" confirmFontWeight="500" itemFontSize="28rpx" @onClose="closePicker"
|
|
43
|
+ @onConfirm="confirmPicker" :pickerList="taskTypeList">
|
|
44
|
+ </seiminPicker>
|
41
|
45
|
</view>
|
42
|
46
|
</template>
|
43
|
47
|
|
|
@@ -47,13 +51,20 @@
|
47
|
51
|
} from 'lodash/function';
|
48
|
52
|
import {
|
49
|
53
|
reqFetchDataList,
|
|
54
|
+ reqDeptTSPTaskType,
|
|
55
|
+ reqBuildTrip,
|
50
|
56
|
} from "../../request/api.js";
|
51
|
57
|
import {
|
52
|
58
|
mapState,
|
|
59
|
+ mapMutations,
|
53
|
60
|
} from "vuex";
|
54
|
61
|
export default {
|
55
|
62
|
data() {
|
56
|
63
|
return {
|
|
64
|
+ checkedShowMsg: {}, //当前选中的任务类型的buildtrip信息
|
|
65
|
+ selectedPatient: {}, //当前选中的患者
|
|
66
|
+ taskTypeList: [], //任务类型列表
|
|
67
|
+ pickerTitle: "", //一键建单picker的title
|
57
|
68
|
debounceInp: null,
|
58
|
69
|
keyword: "",
|
59
|
70
|
patientList: [],
|
|
@@ -66,6 +77,107 @@
|
66
|
77
|
...mapState('other', ["deptDisplay"]),
|
67
|
78
|
},
|
68
|
79
|
methods: {
|
|
80
|
+ ...mapMutations('other', ['changeQucikCreateOrderType']),
|
|
81
|
+ //关闭
|
|
82
|
+ closePicker() {
|
|
83
|
+ this.$refs.sPicker._close();
|
|
84
|
+ },
|
|
85
|
+ //打开
|
|
86
|
+ openPicker() {
|
|
87
|
+ this.$refs.sPicker._open();
|
|
88
|
+ },
|
|
89
|
+ //确定:接收子组件传来的参数
|
|
90
|
+ confirmPicker(checkedObj) {
|
|
91
|
+ console.log(checkedObj);
|
|
92
|
+ // 2,获取buildTrip信息
|
|
93
|
+ let postData = {
|
|
94
|
+ "taskTypeId": checkedObj.value,
|
|
95
|
+ "patientCode": this.selectedPatient.patientCode
|
|
96
|
+ };
|
|
97
|
+ uni.showLoading({
|
|
98
|
+ mask: true,
|
|
99
|
+ title: '加载中'
|
|
100
|
+ })
|
|
101
|
+ reqBuildTrip(postData).then(res => {
|
|
102
|
+ uni.hideLoading();
|
|
103
|
+ if (res.status == 200) {
|
|
104
|
+ this.checkedShowMsg = res.data;
|
|
105
|
+ this.changeQucikCreateOrderType({
|
|
106
|
+ type: "patient",
|
|
107
|
+ taskTypeId: checkedObj.value,
|
|
108
|
+ patientBuildTrip: res,
|
|
109
|
+ });
|
|
110
|
+ } else if (res.status == 100015) {
|
|
111
|
+ this.checkedShowMsg = res.data;
|
|
112
|
+ //需要选择起点科室和目标科室
|
|
113
|
+ uni.navigateTo({
|
|
114
|
+ url: "/pages/quickCreateOrder/quickCreateOrder",
|
|
115
|
+ });
|
|
116
|
+ this.changeQucikCreateOrderType({
|
|
117
|
+ type: "patient",
|
|
118
|
+ taskTypeId: checkedObj.value,
|
|
119
|
+ patientBuildTrip: res,
|
|
120
|
+ });
|
|
121
|
+ } else if (res.status == 100013) {
|
|
122
|
+ this.checkedShowMsg = res.data;
|
|
123
|
+ //需要选择起点科室
|
|
124
|
+ uni.navigateTo({
|
|
125
|
+ url: "/pages/quickCreateOrder/quickCreateOrder",
|
|
126
|
+ });
|
|
127
|
+ this.changeQucikCreateOrderType({
|
|
128
|
+ type: "patient",
|
|
129
|
+ taskTypeId: checkedObj.value,
|
|
130
|
+ patientBuildTrip: res,
|
|
131
|
+ });
|
|
132
|
+ } else if (res.status == 100014) {
|
|
133
|
+ this.checkedShowMsg = res.data;
|
|
134
|
+ //需要选择目标科室
|
|
135
|
+ uni.navigateTo({
|
|
136
|
+ url: "/pages/quickCreateOrder/quickCreateOrder",
|
|
137
|
+ });
|
|
138
|
+ this.changeQucikCreateOrderType({
|
|
139
|
+ type: "patient",
|
|
140
|
+ taskTypeId: checkedObj.value,
|
|
141
|
+ patientBuildTrip: res,
|
|
142
|
+ });
|
|
143
|
+ } else {
|
|
144
|
+ this.$refs.seiminModel.show({
|
|
145
|
+ skin: "toast",
|
|
146
|
+ icon: "error",
|
|
147
|
+ content: res.msg || "获取数据失败",
|
|
148
|
+ });
|
|
149
|
+ throw new Error(res.msg || "获取数据失败");
|
|
150
|
+ }
|
|
151
|
+ })
|
|
152
|
+ },
|
|
153
|
+ // 一键建单
|
|
154
|
+ buildOrder(patient) {
|
|
155
|
+ this.selectedPatient = patient;
|
|
156
|
+ // 1,请求任务类型列表
|
|
157
|
+ uni.showLoading({
|
|
158
|
+ mask: true,
|
|
159
|
+ title: '加载中'
|
|
160
|
+ })
|
|
161
|
+ reqDeptTSPTaskType().then(res => {
|
|
162
|
+ uni.hideLoading();
|
|
163
|
+ if (res.status == 200) {
|
|
164
|
+ res.data = res.data || [];
|
|
165
|
+ this.taskTypeList = res.data.map((v) => ({
|
|
166
|
+ value: v.id,
|
|
167
|
+ label: v.taskName,
|
|
168
|
+ }));
|
|
169
|
+ this.pickerTitle = `您选择了<b class="green">${patient.patientName}</b>患者,请选择下方具体服务项`;
|
|
170
|
+ this.openPicker();
|
|
171
|
+ } else {
|
|
172
|
+ this.$refs.seiminModel.show({
|
|
173
|
+ skin: "toast",
|
|
174
|
+ icon: "error",
|
|
175
|
+ content: res.msg || "获取数据失败",
|
|
176
|
+ });
|
|
177
|
+ throw new Error(res.msg || "获取数据失败");
|
|
178
|
+ }
|
|
179
|
+ })
|
|
180
|
+ },
|
69
|
181
|
// 跳转患者详情
|
70
|
182
|
toDetail(patientCode) {
|
71
|
183
|
uni.navigateTo({
|