Procházet zdrojové kódy

11月22日,打印单

yq1 před 3 dny
rodič
revize
4bb9deaa55

+ 25 - 91
src/pages/main/template/DialysisPrintOrderSixtyeight.vue Zobrazit soubor

@@ -828,31 +828,23 @@
828 828
                           <!-- <span v-else>&nbsp;<br/>&nbsp;</span> -->
829 829
                         </td>
830 830
                         <td height="35px" colspan="2" class="advice-name" style="padding-left:7px;" >
831
-                          <div v-if="org_id==10551 || org_id==0">
832
-                            <div :rowspan="advice.prescriptionChild.length"  v-for="(it,key)  in advice.prescriptionChild" style="border: none;">
833
-                              <div style="border: none;">
834
-                                <span>{{ it.advice_name }}</span>
835
-                                      <span v-if="it && it.advice_desc"
836
-                                        >({{ it.advice_desc
837
-                                        }}{{ it.drug_spec_unit }})</span
838
-                                      >
839
-                                      <span v-if="it.prescribing_number"
840
-                                        >&nbsp;&nbsp; {{ it.prescribing_number
841
-                                        }}{{ it.prescribing_number_unit }}</span
842
-                                      >
843
-                                       <span v-if="it.single_dose != 0"
844
-                                        >{{ it.single_dose
845
-                                        }}{{ it.single_dose_unit }}</span
846
-                                      >
847
-                                      <span>{{ it.delivery_way}}</span>
848
-                                      <span>{{
849
-                                        it.execution_frequency
850
-                                      }}</span>
851
-                                     <span v-if="it.remark!=''">({{ it.remark }})</span>
852
-                              </div> 
831
+                          <template v-if="advice.children!=undefined && (org_id==10551||org_id == 0)">
832
+                            <div v-for="(item,index) in advice.children" :key="index">
833
+                              {{ item.advice_name }}
834
+                              <span v-if="item.advice_desc">
835
+                                ({{ item.advice_desc}}{{ item.drug_spec_unit }})
836
+                              </span>
837
+                              <span v-if="item.prescribing_number">
838
+                                &nbsp;&nbsp; {{ item.prescribing_number}}
839
+                                {{ item.prescribing_number_unit }}
840
+                              </span>
841
+                              <span v-if="item.single_dose !=''">
842
+                                {{ item.single_dose}}{{ item.single_dose_unit }}
843
+                              </span>
844
+                              
853 845
                             </div>
854
-                          </div>
855
-                          <div v-else>
846
+                          </template>
847
+                          <div >
856 848
                             <span v-if="advice.parent_id > 0">---></span>
857 849
                             <span>{{ advice.advice_name }}</span>
858 850
                             <span v-if="advice && advice.advice_desc"
@@ -1820,7 +1812,13 @@ export default {
1820 1812
         for (let index = 0; index < this.doctor_advices.length; index++) {
1821 1813
           this.doctor_advices[index]['isShow'] = 2
1822 1814
         }
1823
-
1815
+        if(this.org_id ==10551 ||this.org_id ==0){
1816
+          for(let i in this.doctor_advices){
1817
+            if(this.doctor_advices[i].parent_id >0){
1818
+              this.doctor_advices.splice(i,1)
1819
+            }
1820
+          }
1821
+        }
1824 1822
         // if (this.doctor_advices.length > 0) {
1825 1823
         //   var group = this.newAdviceGroupObject()
1826 1824
         //   var initGroupBlock = function(group, advice) {
@@ -1917,72 +1915,8 @@ export default {
1917 1915
         }
1918 1916
         this.totollength = this.doctor_advices.length + this.monitors.length
1919 1917
         console.log(this.advice_groups)
1920
-        if(this.org_id ==10551 ||this.org_id ==0){
1921
-          var docArr = []
1922
-          if(this.doctor_advices!=null && this.doctor_advices.length>0){
1923
-            for(let i=0;i<this.doctor_advices.length;i++){
1924
-              if(this.doctor_advices[i].delivery_way!='口服'){
1925
-                  docArr.push(this.doctor_advices[i])
1926
-              }
1927
-            }
1928
-          }
1929
-          this.doctor_advices = []
1930
-          this.doctor_advices = docArr
1931
-
1932
-          if(this.doctor_advices!=null && this.doctor_advices.length>0 ){
1933
-
1934
-            for(let i=0;i<this.doctor_advices.length;i++){
1935
-              this.doctor_advices[i].groupPrescriptionId = this.doctor_advices[i].prescription_id + "_"  + this.doctor_advices[i].groupno
1936
-            }
1937
-            console.log("医嘱内容我我哦我我哦doctor_advices",this.doctor_advices)
1938
-
1939
-            let dataInfo = {}
1940
-            this.doctor_advices.forEach((item, index) => {
1941
-
1942
-            let { groupPrescriptionId } = item
1943
-            if (!dataInfo[groupPrescriptionId]) {
1944
-              dataInfo[groupPrescriptionId] = {
1945
-                groupPrescriptionId:item.groupPrescriptionId,
1946
-                start_time:item.start_time,
1947
-                advice_name:item.advice_name,
1948
-                advice_desc:item.advice_desc,
1949
-                parent_id:item.parent_id,
1950
-                drug_spec_unit:item.drug_spec_unit,
1951
-                prescribing_number:item.prescribing_number,
1952
-                prescribing_number_unit:item.prescribing_number_unit,
1953
-                single_dose:item.single_dose,
1954
-                single_dose_unit:item.single_dose_unit,
1955
-                delivery_way:item.delivery_way,
1956
-                execution_frequency:item.execution_frequency,
1957
-                remark:item.remark,
1958
-                execution_time:item.execution_time,
1959
-                execution_staff:item.execution_staff,
1960
-                prescriptionChild:[],
1961
-                advice_doctor:item.advice_doctor,
1962
-              }
1963
-            }
1964
-            })
1965
-            let newArr = Object.values(dataInfo)
1966
-
1967
-            if(newArr!=null && newArr.length >0){
1968
-              for(let i=0;i<newArr.length;i++){
1969
-                for(let j=0;j<this.doctor_advices.length;j++){
1970
-                  if(newArr[i].groupPrescriptionId == this.doctor_advices[j].groupPrescriptionId){
1971
-                      newArr[i].prescriptionChild.push(this.doctor_advices[j])
1972
-                  }
1973
-                }
1974
-              }
1975
-            }
1976
-            for(let i in newArr){
1977
-              if(newArr[i].parent_id == undefined){
1978
-                newArr.splice(i,1)
1979
-              }
1980
-            }
1981
-            this.doctor_advices = []
1982
-            this.doctor_advices = newArr
1983
-            console.log("newArr",this.doctor_advices)
1984
-          }
1985
-        }
1918
+        console.log("医嘱内容我我哦我我哦doctor_advices",this.doctor_advices)
1919
+        
1986 1920
       } else {
1987 1921
         this.loading = false
1988 1922
         this.$message.error('请求数据失败')