|
@@ -37,10 +37,13 @@
|
37
|
37
|
</view>
|
38
|
38
|
</view>
|
39
|
39
|
<scroll-view scroll-y="true" class="Scanning_cont_list_scroll">
|
40
|
|
- <view class="Scanning_cont_list_item" @click="clickRow(item)" v-for="(item, j) in dataList" :key="item.id">
|
41
|
|
- <view class="name">
|
|
40
|
+ <view class="Scanning_cont_list_item" @click="clickRow(item)" v-for="(item, j) in dataList" :key="j">
|
|
41
|
+ <view class="name" v-if="type === 'patient'">
|
42
|
42
|
{{item.patientname}}
|
43
|
43
|
</view>
|
|
44
|
+ <view class="name" v-if="type === 'checkType'">
|
|
45
|
+ {{item.stype}}
|
|
46
|
+ </view>
|
44
|
47
|
<view class="value">
|
45
|
48
|
<view>
|
46
|
49
|
{{item.count}}
|
|
@@ -53,14 +56,15 @@
|
53
|
56
|
|
54
|
57
|
<view class="foot_btn">
|
55
|
58
|
<view class="btn" @click="goBack()"> 取消 </view>
|
56
|
|
- <view class="btn" @click="onClick()"> 汇总交接 </view>
|
|
59
|
+ <view class="btn" @click="onClick()" v-if="dataList.length"> 确认交接 </view>
|
57
|
60
|
</view>
|
58
|
|
- <!-- 填写数字弹窗 -->
|
59
|
|
- <selectNum v-if="numModels.disjunctor" :disjunctor="numModels.disjunctor" @ok="numOk" @cancel="numCancel" :content="numModels.content" :dataName="numModels.dataName">
|
60
|
|
- </selectNum>
|
|
61
|
+ <!-- 填写交接人工号弹窗 -->
|
|
62
|
+ <selectAccount @click.stop.native v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
|
|
63
|
+ @cancel="hosCancel" :content="hosModels.content">
|
|
64
|
+ </selectAccount>
|
61
|
65
|
<!-- 弹窗 -->
|
62
|
|
- <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
|
63
|
|
- @ok="ok1" @cancel="cancel1" :operate="models1.operate"></showModel>
|
|
66
|
+ <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
|
|
67
|
+ @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
|
64
|
68
|
</view>
|
65
|
69
|
</template>
|
66
|
70
|
<script>
|
|
@@ -76,10 +80,6 @@
|
76
|
80
|
hosId: uni.getStorageSync('userData').user.currentHospital.id,
|
77
|
81
|
type: 'patient',//patient|checkType
|
78
|
82
|
queryObj: {}, //路由传递过来的数据
|
79
|
|
- // 填写数字弹窗model
|
80
|
|
- numModels: {
|
81
|
|
- disjunctor: false,
|
82
|
|
- },
|
83
|
83
|
typeList: {
|
84
|
84
|
"patient": {
|
85
|
85
|
id: -1,
|
|
@@ -95,72 +95,69 @@
|
95
|
95
|
}
|
96
|
96
|
},
|
97
|
97
|
dataList: [],
|
98
|
|
- coopData: {},
|
|
98
|
+ // 填写交接人工号弹窗model
|
|
99
|
+ hosModels: {
|
|
100
|
+ disjunctor: false,
|
|
101
|
+ },
|
99
|
102
|
// 弹窗model
|
100
|
|
- models1: {
|
|
103
|
+ models: {
|
101
|
104
|
disjunctor: false,
|
102
|
105
|
},
|
103
|
106
|
};
|
104
|
107
|
},
|
105
|
108
|
methods: {
|
106
|
|
- goBack(){
|
107
|
|
- uni.navigateBack();
|
108
|
|
- },
|
109
|
|
- clickTab(key){
|
110
|
|
- this.type = key;
|
111
|
|
- this.initData();
|
112
|
|
- },
|
113
|
|
- //确定
|
114
|
|
- ok1() {
|
115
|
|
- this.models1.disjunctor = false;
|
116
|
|
- let bussList = this.dataList.map(v => v.children).flat().map(v => v.clothesWashingDTO).map(v => ({...v, exception: 0}));
|
|
109
|
+ ok(){
|
|
110
|
+ this.models.disjunctor = false;
|
117
|
111
|
uni.showLoading({
|
118
|
112
|
title: "加载中",
|
119
|
113
|
mask: true,
|
120
|
114
|
});
|
121
|
|
- post("/transflow/createOrTakeOrder", {
|
122
|
|
- type: 'clothingGet',
|
123
|
|
- id: 0,
|
124
|
|
- startDeptId: this.queryObj.startDeptId,
|
125
|
|
- hosId: this.hosId,
|
126
|
|
- bussList,
|
127
|
|
- orderId: this.queryObj.orderId,
|
128
|
|
- }).then((res) => {
|
129
|
|
- uni.hideLoading();
|
130
|
|
- if (res.state == 200) {
|
131
|
|
- uni.showModal({
|
132
|
|
- title: "提示",
|
133
|
|
- content: "交接成功",
|
134
|
|
- showCancel: false,
|
135
|
|
- success: (result) => {
|
136
|
|
- if (result.confirm) {
|
137
|
|
- console.log("用户点击确定");
|
138
|
|
- uni.navigateTo({
|
139
|
|
- url: `/pages/receiptpage/receiptpage`,
|
140
|
|
- });
|
141
|
|
- }
|
|
115
|
+ post("/simple/data/fetchDataList/taskType", {
|
|
116
|
+ "idx": 0,
|
|
117
|
+ "sum": 1,
|
|
118
|
+ "taskType": {
|
|
119
|
+ "hosId": {
|
|
120
|
+ "id": this.hosId
|
142
|
121
|
},
|
143
|
|
- });
|
144
|
|
- }else{
|
|
122
|
+ "associationType": {
|
|
123
|
+ "key": "association_types",
|
|
124
|
+ "value": "specimen"
|
|
125
|
+ }
|
|
126
|
+ }
|
|
127
|
+ }).then((result) => {
|
|
128
|
+ uni.hideLoading();
|
|
129
|
+ if (result.status == 200) {
|
|
130
|
+ if(result.list.length){
|
|
131
|
+ // 标本-运送过程-终点科室-是否填写交接人
|
|
132
|
+ if(result.list[0].carryingCourses[1].handoverSwitch){
|
|
133
|
+ this.showSelectAccount();
|
|
134
|
+ }else{
|
|
135
|
+ this.orderDeptHandler();
|
|
136
|
+ }
|
|
137
|
+ }else{
|
|
138
|
+ uni.showToast({
|
|
139
|
+ icon: "none",
|
|
140
|
+ title: "请配置标本配送任务类型!",
|
|
141
|
+ });
|
|
142
|
+ }
|
|
143
|
+ } else {
|
145
|
144
|
uni.showToast({
|
146
|
145
|
icon: "none",
|
147
|
|
- title: res.msg || "接口获取数据失败!",
|
|
146
|
+ title: result.msg || "接口获取数据失败!",
|
148
|
147
|
});
|
149
|
148
|
}
|
150
|
149
|
});
|
151
|
150
|
},
|
152
|
|
- //取消
|
153
|
|
- cancel1() {
|
154
|
|
- this.models1.disjunctor = false;
|
|
151
|
+ // 取消
|
|
152
|
+ cancel() {
|
|
153
|
+ this.models.disjunctor = false;
|
155
|
154
|
},
|
156
|
|
- // 被服回收弹窗
|
157
|
|
- showModel1() {
|
158
|
|
- let bussList = this.dataList.map(v => v.children).flat();
|
159
|
|
- let num = bussList.reduce((prev, current) => prev + current.clothesWashingDTO.recyclingNum, 0);
|
160
|
|
- this.models1 = {
|
|
155
|
+ //核对完成
|
|
156
|
+ allStart() {
|
|
157
|
+ this.models = {
|
161
|
158
|
disjunctor: true,
|
162
|
159
|
title: "提示",
|
163
|
|
- content: `<strong class="red">${this.queryObj.startDeptName}</strong>已与<strong class="red">${this.queryObj.name}</strong>交接<strong class="red">${num}件</strong>被服,交接人为<strong class="red">${this.queryObj.name}</strong>,您确认交接吗?`,
|
|
160
|
+ content: "是否确定交接?",
|
164
|
161
|
icon: "warn",
|
165
|
162
|
operate: {
|
166
|
163
|
ok: "确定",
|
|
@@ -168,32 +165,95 @@
|
168
|
165
|
},
|
169
|
166
|
};
|
170
|
167
|
},
|
171
|
|
- // 填写数量-确认
|
172
|
|
- numOk(data) {
|
|
168
|
+ // 填写交接人工号-确认
|
|
169
|
+ hosOk(data) {
|
173
|
170
|
console.log(data);
|
174
|
|
- this.numModels.disjunctor = false;
|
175
|
|
- this.updateNum(data);
|
176
|
|
- },
|
177
|
|
- // 填写数量-取消
|
178
|
|
- numCancel() {
|
179
|
|
- this.numModels.disjunctor = false;
|
|
171
|
+ const {
|
|
172
|
+ accountName,
|
|
173
|
+ account,
|
|
174
|
+ accountId
|
|
175
|
+ } = data;
|
|
176
|
+ if (!accountName && !account) {
|
|
177
|
+ //没有填写交接人
|
|
178
|
+ uni.showModal({
|
|
179
|
+ title: "提示",
|
|
180
|
+ content: "请填写交接人工号!",
|
|
181
|
+ showCancel: false,
|
|
182
|
+ success: function(res) {
|
|
183
|
+ if (res.confirm) {
|
|
184
|
+ console.log("用户点击确定");
|
|
185
|
+ } else if (res.cancel) {
|
|
186
|
+ console.log("用户点击取消");
|
|
187
|
+ }
|
|
188
|
+ },
|
|
189
|
+ });
|
|
190
|
+ return;
|
|
191
|
+ } else if ((!accountName && account) || (accountName && !account)) {
|
|
192
|
+ //没有填写交接人
|
|
193
|
+ uni.showModal({
|
|
194
|
+ title: "提示",
|
|
195
|
+ content: "请填写正确的交接人工号!",
|
|
196
|
+ showCancel: false,
|
|
197
|
+ success: function(res) {
|
|
198
|
+ if (res.confirm) {
|
|
199
|
+ console.log("用户点击确定");
|
|
200
|
+ } else if (res.cancel) {
|
|
201
|
+ console.log("用户点击取消");
|
|
202
|
+ }
|
|
203
|
+ },
|
|
204
|
+ });
|
|
205
|
+ return;
|
|
206
|
+ }
|
|
207
|
+ this.hosModels.disjunctor = false;
|
|
208
|
+ this.orderDeptHandler(data);
|
180
|
209
|
},
|
181
|
|
- onClick(){
|
182
|
|
- this.showModel1();
|
|
210
|
+ // 填写交接人工号-取消
|
|
211
|
+ hosCancel() {
|
|
212
|
+ this.hosModels.disjunctor = false;
|
183
|
213
|
},
|
184
|
|
- clickRow(data){
|
185
|
|
- this.coopData = data;
|
186
|
|
- this.numModels = {
|
|
214
|
+ // 填写交接人工号弹窗
|
|
215
|
+ showSelectAccount() {
|
|
216
|
+ this.hosModels = {
|
|
217
|
+ content: '确定交接完成,请输入交接人员工号',
|
187
|
218
|
disjunctor: true,
|
188
|
|
- content: `请输入被服数量`,
|
189
|
|
- dataName: data.name,
|
190
|
219
|
};
|
191
|
220
|
},
|
192
|
|
- updateNum(data){
|
193
|
|
- this.dataList.children.forEach(v => {
|
194
|
|
- if(v.id == this.coopData.id){
|
195
|
|
- v.clothesWashingDTO && (v.clothesWashingDTO.recyclingNum = data.num);
|
|
221
|
+ orderDeptHandler(accountObj){
|
|
222
|
+ uni.showLoading({
|
|
223
|
+ title: "加载中",
|
|
224
|
+ mask: true,
|
|
225
|
+ });
|
|
226
|
+ post("/workerOrder/ordersSpeSign", {
|
|
227
|
+ deptId: this.queryObj.deptId,
|
|
228
|
+ orderIds: JSON.parse(this.queryObj.ids).toString(),
|
|
229
|
+ handover: accountObj ? accountObj.accountId : undefined
|
|
230
|
+ }).then((result) => {
|
|
231
|
+ uni.hideLoading();
|
|
232
|
+ if (result.state == 200) {
|
|
233
|
+ uni.navigateTo({
|
|
234
|
+ url: `/pages/specimenOrderComplete/specimenOrderComplete?deptName=${this.queryObj.dept}&ids=${this.queryObj.ids}`
|
|
235
|
+ })
|
|
236
|
+ } else {
|
|
237
|
+ uni.showToast({
|
|
238
|
+ icon: "none",
|
|
239
|
+ title: result.msg || "接口获取数据失败!",
|
|
240
|
+ });
|
196
|
241
|
}
|
|
242
|
+ });
|
|
243
|
+ },
|
|
244
|
+ goBack(){
|
|
245
|
+ uni.navigateBack();
|
|
246
|
+ },
|
|
247
|
+ clickTab(key){
|
|
248
|
+ this.type = key;
|
|
249
|
+ this.initData();
|
|
250
|
+ },
|
|
251
|
+ onClick(){
|
|
252
|
+ this.allStart();
|
|
253
|
+ },
|
|
254
|
+ clickRow(data){
|
|
255
|
+ uni.navigateTo({
|
|
256
|
+ url: `/pages/specimenDetail/specimenDetail?speIds=${data.ids || ''}`
|
197
|
257
|
})
|
198
|
258
|
},
|
199
|
259
|
getInfo(type){
|
|
@@ -208,8 +268,8 @@
|
208
|
268
|
}).then((result) => {
|
209
|
269
|
uni.hideLoading();
|
210
|
270
|
if (result.state == 200) {
|
211
|
|
- this.typeList[type].count = result.count;
|
212
|
|
- this.typeList[type].titleCount = result.title;
|
|
271
|
+ this.typeList[type].count = result.count || 0;
|
|
272
|
+ this.typeList[type].titleCount = result.title || 0;
|
213
|
273
|
if(this.type === type){
|
214
|
274
|
this.dataList = result.data || [];
|
215
|
275
|
}
|