|
@@ -234,29 +234,29 @@ export default {
|
234
|
234
|
},
|
235
|
235
|
methods: {
|
236
|
236
|
searchAction() {
|
237
|
|
- // let table_id = this.$store.getters.pagedata.list.table_id;
|
238
|
|
- // if (table_id == undefined) {
|
239
|
|
- // this.$store.commit("SET_PAGEDATA", {
|
240
|
|
- // table_id: 0,
|
241
|
|
- // type_id: this.id,
|
242
|
|
- // keywords: this.keywords,
|
243
|
|
- // start_time: this.chargeDate[0],
|
244
|
|
- // end_time: this.chargeDate[1],
|
245
|
|
- // patient_id: this.patient_id,
|
246
|
|
- // });
|
247
|
|
- // } else {
|
248
|
|
- // this.$store.commit("SET_PAGEDATA", {
|
249
|
|
- // table_id: table_id,
|
250
|
|
- // type_id: this.id,
|
251
|
|
- // keywords: this.keywords,
|
252
|
|
- // start_time: this.chargeDate[0],
|
253
|
|
- // end_time: this.chargeDate[1],
|
254
|
|
- // patient_id: this.patient_id,
|
255
|
|
- // });
|
256
|
|
- // }
|
|
237
|
+ let table_id = this.$store.getters.pagedata.list.table_id;
|
|
238
|
+ if (table_id == undefined) {
|
|
239
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
240
|
+ table_id: 0,
|
|
241
|
+ type_id: this.id,
|
|
242
|
+ keywords: this.keywords,
|
|
243
|
+ start_time: this.chargeDate[0],
|
|
244
|
+ end_time: this.chargeDate[1],
|
|
245
|
+ patient_id: this.patient_id,
|
|
246
|
+ });
|
|
247
|
+ } else {
|
|
248
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
249
|
+ table_id: table_id,
|
|
250
|
+ type_id: this.id,
|
|
251
|
+ keywords: this.keywords,
|
|
252
|
+ start_time: this.chargeDate[0],
|
|
253
|
+ end_time: this.chargeDate[1],
|
|
254
|
+ patient_id: this.patient_id,
|
|
255
|
+ });
|
|
256
|
+ }
|
257
|
257
|
this.tableList = [];
|
258
|
258
|
this.getGatherDetailList();
|
259
|
|
- console.log(this.tableList, "查看条约");
|
|
259
|
+ // console.log(this.tableList, "查看条约");
|
260
|
260
|
},
|
261
|
261
|
getPrice(val) {
|
262
|
262
|
var total_price = 0;
|
|
@@ -272,26 +272,26 @@ export default {
|
272
|
272
|
},
|
273
|
273
|
changeItem(id) {
|
274
|
274
|
this.id = id;
|
275
|
|
- // let table_id = this.$store.getters.pagedata.list.table_id;
|
276
|
|
- // if (table_id == undefined) {
|
277
|
|
- // this.$store.commit("SET_PAGEDATA", {
|
278
|
|
- // table_id: 0,
|
279
|
|
- // type_id: this.id,
|
280
|
|
- // keywords: this.keywords,
|
281
|
|
- // start_time: this.chargeDate[0],
|
282
|
|
- // end_time: this.chargeDate[1],
|
283
|
|
- // patient_id: this.patient_id,
|
284
|
|
- // });
|
285
|
|
- // } else {
|
286
|
|
- // this.$store.commit("SET_PAGEDATA", {
|
287
|
|
- // table_id: table_id,
|
288
|
|
- // type_id: this.id,
|
289
|
|
- // keywords: this.keywords,
|
290
|
|
- // start_time: this.chargeDate[0],
|
291
|
|
- // end_time: this.chargeDate[1],
|
292
|
|
- // patient_id: this.patient_id,
|
293
|
|
- // });
|
294
|
|
- // }
|
|
275
|
+ let table_id = this.$store.getters.pagedata.list.table_id;
|
|
276
|
+ if (table_id == undefined) {
|
|
277
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
278
|
+ table_id: 0,
|
|
279
|
+ type_id: this.id,
|
|
280
|
+ keywords: this.keywords,
|
|
281
|
+ start_time: this.chargeDate[0],
|
|
282
|
+ end_time: this.chargeDate[1],
|
|
283
|
+ patient_id: this.patient_id,
|
|
284
|
+ });
|
|
285
|
+ } else {
|
|
286
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
287
|
+ table_id: table_id,
|
|
288
|
+ type_id: this.id,
|
|
289
|
+ keywords: this.keywords,
|
|
290
|
+ start_time: this.chargeDate[0],
|
|
291
|
+ end_time: this.chargeDate[1],
|
|
292
|
+ patient_id: this.patient_id,
|
|
293
|
+ });
|
|
294
|
+ }
|
295
|
295
|
this.tableList = [];
|
296
|
296
|
this.getGatherDetailList();
|
297
|
297
|
},
|
|
@@ -440,26 +440,33 @@ export default {
|
440
|
440
|
this.medicalInsuranceLevelList =
|
441
|
441
|
response.data.data.medicalInsuranceLevelList;
|
442
|
442
|
|
443
|
|
- // let list_1 = this.$store.getters.pagedata.list;
|
444
|
|
- // if (list_1.keywords == undefined) {
|
445
|
|
- // this.keywords = "";
|
446
|
|
- // } else {
|
447
|
|
- // this.keywords = list_1.keywords;
|
448
|
|
- // }
|
449
|
|
- // this.id = list_1.type_id;
|
450
|
|
- // this.item_type = this.id
|
|
443
|
+ let list_1 = this.$store.getters.pagedata.list;
|
|
444
|
+ if (list_1.keywords == undefined) {
|
|
445
|
+ this.keywords = "";
|
|
446
|
+ } else {
|
|
447
|
+ this.keywords = list_1.keywords;
|
|
448
|
+ }
|
|
449
|
+ this.id = list_1.type_id;
|
|
450
|
+ this.item_type = this.id;
|
|
451
|
+ if(this.item_type == undefined){
|
|
452
|
+ this.item_type = "0"
|
|
453
|
+ }else{
|
|
454
|
+ this.item_type = this.id;
|
|
455
|
+ }
|
|
456
|
+ console.log(this.item_type,'this.item_type')
|
|
457
|
+
|
451
|
458
|
|
452
|
|
- if(this.keywords!=""){
|
453
|
|
- for(let i=0;i<this.tableList.length;i++){
|
454
|
|
- if(this.tableList[i].name.indexOf(this.keywords) >-1){
|
455
|
|
- new_arr.push(this.tableList[i])
|
|
459
|
+ if (this.keywords != "") {
|
|
460
|
+ for (let i = 0; i < this.tableList.length; i++) {
|
|
461
|
+ if (this.tableList[i].name.indexOf(this.keywords) > -1) {
|
|
462
|
+ new_arr.push(this.tableList[i]);
|
|
463
|
+ }
|
|
464
|
+ }
|
|
465
|
+ var obj = { index: "合计", is_total: 1, total: 0 };
|
|
466
|
+ obj.total = this.getPrice(new_arr);
|
|
467
|
+ this.tableList = [];
|
|
468
|
+ this.tableList = new_arr;
|
456
|
469
|
}
|
457
|
|
- }
|
458
|
|
- var obj ={index:"合计",is_total:1,total:0}
|
459
|
|
- obj.total = this.getPrice(new_arr)
|
460
|
|
- this.tableList = []
|
461
|
|
- this.tableList = new_arr
|
462
|
|
- }
|
463
|
470
|
if (this.id == 1) {
|
464
|
471
|
var new_arr = [];
|
465
|
472
|
for (let i = 0; i < this.tableList.length; i++) {
|
|
@@ -820,26 +827,26 @@ export default {
|
820
|
827
|
"&id=" +
|
821
|
828
|
this.id,
|
822
|
829
|
});
|
823
|
|
- // let table_id = this.$store.getters.pagedata.list.table_id;
|
824
|
|
- // if (table_id == undefined) {
|
825
|
|
- // this.$store.commit("SET_PAGEDATA", {
|
826
|
|
- // table_id: 0,
|
827
|
|
- // type_id: this.id,
|
828
|
|
- // keywords: this.keywords,
|
829
|
|
- // start_time: this.chargeDate[0],
|
830
|
|
- // end_time: this.chargeDate[1],
|
831
|
|
- // patient_id: this.patient_id,
|
832
|
|
- // });
|
833
|
|
- // } else {
|
834
|
|
- // this.$store.commit("SET_PAGEDATA", {
|
835
|
|
- // table_id: table_id,
|
836
|
|
- // type_id: this.id,
|
837
|
|
- // keywords: this.keywords,
|
838
|
|
- // start_time: this.chargeDate[0],
|
839
|
|
- // end_time: this.chargeDate[1],
|
840
|
|
- // patient_id: this.patient_id,
|
841
|
|
- // });
|
842
|
|
- // }
|
|
830
|
+ let table_id = this.$store.getters.pagedata.list.table_id;
|
|
831
|
+ if (table_id == undefined) {
|
|
832
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
833
|
+ table_id: 0,
|
|
834
|
+ type_id: this.id,
|
|
835
|
+ keywords: this.keywords,
|
|
836
|
+ start_time: this.chargeDate[0],
|
|
837
|
+ end_time: this.chargeDate[1],
|
|
838
|
+ patient_id: this.patient_id,
|
|
839
|
+ });
|
|
840
|
+ } else {
|
|
841
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
842
|
+ table_id: table_id,
|
|
843
|
+ type_id: this.id,
|
|
844
|
+ keywords: this.keywords,
|
|
845
|
+ start_time: this.chargeDate[0],
|
|
846
|
+ end_time: this.chargeDate[1],
|
|
847
|
+ patient_id: this.patient_id,
|
|
848
|
+ });
|
|
849
|
+ }
|
843
|
850
|
},
|
844
|
851
|
toPrintInvoice() {
|
845
|
852
|
this.$router.push({
|
|
@@ -1245,27 +1252,27 @@ export default {
|
1245
|
1252
|
return name;
|
1246
|
1253
|
},
|
1247
|
1254
|
},
|
1248
|
|
- created() {
|
1249
|
|
- // let list_1 = this.$store.getters.pagedata.list;
|
1250
|
|
- // if (list_1.start_time == "") {
|
1251
|
|
- // this.chargeDate[0] = moment(new Date()).add("year", 0).format("YYYY-MM-DD");
|
1252
|
|
- // } else {
|
1253
|
|
- // this.chargeDate[0] = list_1.start_time;
|
1254
|
|
- // }
|
1255
|
|
- // if (list_1.end_time == "") {
|
1256
|
|
- // this.chargeDate[1] = moment(new Date()).add("year", 0).format("YYYY-MM-DD");
|
1257
|
|
- // } else {
|
1258
|
|
- // this.chargeDate[1] = list_1.end_time;
|
1259
|
|
- // }
|
|
1255
|
+ created() {
|
|
1256
|
+ let list_1 = this.$store.getters.pagedata.list;
|
|
1257
|
+ if (!list_1.start_time || list_1.start_time == "") {
|
|
1258
|
+ this.chargeDate[0] = moment(new Date())
|
|
1259
|
+ .add("year", 0)
|
|
1260
|
+ .format("YYYY-MM-DD");
|
|
1261
|
+ } else {
|
|
1262
|
+ this.chargeDate[0] = list_1.start_time;
|
|
1263
|
+ }
|
|
1264
|
+ if (!list_1.end_time || list_1.end_time == "") {
|
|
1265
|
+ this.chargeDate[1] = moment(new Date())
|
|
1266
|
+ .add("year", 0)
|
|
1267
|
+ .format("YYYY-MM-DD");
|
|
1268
|
+ } else {
|
|
1269
|
+ this.chargeDate[1] = list_1.end_time;
|
|
1270
|
+ }
|
1260
|
1271
|
|
1261
|
|
- console.log(this.chargeDate[0],'测试测试')
|
1262
|
|
-
|
1263
|
1272
|
this.start_time = this.chargeDate[0];
|
1264
|
1273
|
this.end_time = this.chargeDate[1];
|
1265
|
1274
|
this.tableList = [];
|
1266
|
1275
|
this.getGatherDetailList();
|
1267
|
|
- // console.log(this.start_time,this.end_time,'ooooooo')
|
1268
|
|
-
|
1269
|
1276
|
},
|
1270
|
1277
|
watch: {
|
1271
|
1278
|
patient_id: function () {
|