Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 4 years ago
parent
commit
2a965851e7
32 changed files with 2679 additions and 794 deletions
  1. 35 0
      src/api/config.js
  2. 10 0
      src/api/project/project.js
  3. 18 0
      src/api/stock.js
  4. 147 0
      src/xt_pages/components/DrugExcel/index.vue
  5. 147 0
      src/xt_pages/components/ProjectExcel/index.vue
  6. 88 2
      src/xt_pages/data/basicConfig.vue
  7. 535 464
      src/xt_pages/data/components/addDrugs.vue
  8. 456 16
      src/xt_pages/data/components/consumables.vue
  9. 389 7
      src/xt_pages/data/components/drugs.vue
  10. 2 1
      src/xt_pages/data/components/editInspection.vue
  11. 256 9
      src/xt_pages/data/components/project.vue
  12. 1 0
      src/xt_pages/data/components/tableson.vue
  13. 2 2
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  14. 1 1
      src/xt_pages/dialysis/dialysisDoctorAdvice.vue
  15. 19 3
      src/xt_pages/outpatientCharges/components/registerDialog.vue
  16. 1 1
      src/xt_pages/outpatientCharges/costComparison.vue
  17. 1 1
      src/xt_pages/outpatientCharges/newStatementPrint.vue
  18. 135 110
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  19. 1 1
      src/xt_pages/outpatientCharges/statementPrint.vue
  20. 1 1
      src/xt_pages/outpatientCharges/summary.vue
  21. 10 5
      src/xt_pages/outpatientCharges/summaryDetail.vue
  22. 10 0
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  23. 6 1
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  24. 177 20
      src/xt_pages/outpatientRecord/outpatientRecord.vue
  25. 31 13
      src/xt_pages/outpatientRegistration/index.vue
  26. 66 5
      src/xt_pages/stock/detail/print.vue
  27. 2 0
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  28. 12 1
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  29. 18 3
      src/xt_pages/stock/stockOutOrderDetailPrint.vue
  30. 1 1
      src/xt_pages/stock/stockQuery.vue
  31. 8 24
      src/xt_pages/user/patients.vue
  32. 93 102
      src/xt_pages/workforce/appointment.vue

+ 35 - 0
src/api/config.js View File

@@ -137,7 +137,42 @@ export function postXtHisIsOpen(params) {
137 137
 }
138 138
 
139 139
 
140
+export function postMonitorIsOpen(params){
141
+  console.log("params",params)
142
+  return request({
143
+    url:"/api/monitor/open",
144
+    method:"get",
145
+    params:params
146
+  })
147
+}
148
+
140 149
 
150
+export function getMonitorConfig(params){
151
+  
152
+  return request({
153
+    url:"/api/monitor/getmonitorconfig",
154
+    method:"Get",
155
+    params:params,
156
+  })
157
+}
141 158
 
142 159
 
160
+export function addOrderConfig(params){
161
+  
162
+  return request({
163
+    url:"/api/order/addorderconfig",
164
+    method:"Get",
165
+    params:params,
166
+
167
+  })
168
+}
169
+
170
+export function getOrderConfig(params){
171
+  
172
+  return request({
173
+    url:"/api/order/getorderconfig",
174
+    method:"get",
175
+    params:params,
176
+  })
177
+}
143 178
 

+ 10 - 0
src/api/project/project.js View File

@@ -524,3 +524,13 @@ export function getUnRegisterHisPatientList (params) {
524 524
     params:params,
525 525
   })
526 526
 }
527
+
528
+
529
+export function postProjectInformation(params){
530
+  
531
+  return request({
532
+    url:"/api/postprojectinformation",
533
+    method:"post",
534
+    data:params
535
+  })
536
+}

+ 18 - 0
src/api/stock.js View File

@@ -584,4 +584,22 @@ export function GetOutStockTotalCount(params){
584 584
     method:"get",
585 585
     params:params
586 586
   })
587
+}
588
+
589
+export function postGoodInformation(params){
590
+  console.log("PARMAS22",params)
591
+  return request({
592
+    url:"/api/good/postgoodinformation",
593
+    method:"Post",
594
+    data:params,
595
+  })
596
+}
597
+
598
+export function postDrugInformation(params){
599
+  
600
+  return request({
601
+    url:"/api/good/postdruginformation",
602
+    method:"post",
603
+    data:params
604
+  })
587 605
 }

+ 147 - 0
src/xt_pages/components/DrugExcel/index.vue View File

@@ -0,0 +1,147 @@
1
+<template>
2
+  <div>
3
+    <input id="excel-drug-input" ref="excel-drug-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
4
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="handleUpload">导入模板
5
+    </el-button>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+  import XLSX from 'xlsx'
11
+
12
+  export default {
13
+    props: {
14
+      beforeUpload: Function,
15
+      onSuccess: Function
16
+    },
17
+    data() {
18
+      return {
19
+        loading: false,
20
+        excelData: {
21
+          header: null,
22
+          results: null
23
+        }
24
+      }
25
+    },
26
+    methods: {
27
+      generateDate({ header, results }) {
28
+        this.excelData.header = header
29
+        this.excelData.results = results
30
+        this.onSuccess && this.onSuccess(this.excelData)
31
+      },
32
+      handleDrop(e) {
33
+        e.stopPropagation()
34
+        e.preventDefault()
35
+        if (this.loading) return
36
+        const files = e.dataTransfer.files
37
+        if (files.length !== 1) {
38
+          this.$message.error('Only support uploading one file!')
39
+          return
40
+        }
41
+        const rawFile = files[0] // only use files[0]
42
+
43
+        if (!this.isExcel(rawFile)) {
44
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
45
+          return false
46
+        }
47
+        this.upload(rawFile)
48
+        e.stopPropagation()
49
+        e.preventDefault()
50
+      },
51
+      handleDragover(e) {
52
+        e.stopPropagation()
53
+        e.preventDefault()
54
+        e.dataTransfer.dropEffect = 'copy'
55
+      },
56
+      handleUpload() {
57
+        document.getElementById('excel-drug-input').click()
58
+      },
59
+      handleClick(e) {
60
+        const files = e.target.files
61
+        const rawFile = files[0] // only use files[0]
62
+        if (!rawFile) return
63
+        this.upload(rawFile)
64
+      },
65
+      upload(rawFile) {
66
+        this.$refs['excel-drug-input'].value = null // fix can't select the same excel
67
+
68
+        if (!this.beforeUpload) {
69
+          this.readerData(rawFile)
70
+          return
71
+        }
72
+        const before = this.beforeUpload(rawFile)
73
+        if (before) {
74
+          this.readerData(rawFile)
75
+        }
76
+      },
77
+      readerData(rawFile) {
78
+        this.loading = true
79
+        return new Promise((resolve, reject) => {
80
+          const reader = new FileReader()
81
+          reader.onload = e => {
82
+            const data = e.target.result
83
+            const fixedData = this.fixdata(data)
84
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
85
+            const firstSheetName = workbook.SheetNames[0]
86
+            const worksheet = workbook.Sheets[firstSheetName]
87
+            const header = this.get_header_row(worksheet)
88
+            const results = XLSX.utils.sheet_to_json(worksheet)
89
+            this.generateDate({ header, results })
90
+            this.loading = false
91
+            resolve()
92
+          }
93
+          reader.readAsArrayBuffer(rawFile)
94
+        })
95
+      },
96
+      fixdata(data) {
97
+        let o = ''
98
+        let l = 0
99
+        const w = 10240
100
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
101
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
102
+        return o
103
+      },
104
+      get_header_row(sheet) {
105
+        if(sheet['!ref'] == undefined){
106
+          this.loading = false
107
+          return
108
+        }
109
+
110
+        const headers = []
111
+        const range = XLSX.utils.decode_range(sheet['!ref'])
112
+        let C
113
+        const R = range.s.r /* start in the first row */
114
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
115
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
116
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
117
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
118
+          headers.push(hdr)
119
+        }
120
+        return headers
121
+      },
122
+      isExcel(file) {
123
+        return /\.(xlsx|xls|csv)$/.test(file.name)
124
+      }
125
+    }
126
+  }
127
+</script>
128
+
129
+<style scoped>
130
+  #excel-project-input {
131
+    display: none;
132
+    z-index: -9999;
133
+  }
134
+
135
+  #drop {
136
+    border: 2px dashed #bbb;
137
+    width: 600px;
138
+    height: 160px;
139
+    line-height: 160px;
140
+    margin: 0 auto;
141
+    font-size: 24px;
142
+    border-radius: 5px;
143
+    text-align: center;
144
+    color: #bbb;
145
+    position: relative;
146
+  }
147
+</style>

+ 147 - 0
src/xt_pages/components/ProjectExcel/index.vue View File

@@ -0,0 +1,147 @@
1
+<template>
2
+  <div>
3
+    <input id="excel-project-input" ref="excel-project-input" type="file" accept=".xlsx, .xls, .xltx" @change="handleClick">
4
+    <el-button :loading="loading" style="margin-left:16px;" size="mini" type="primary" @click="handleUpload">导入模板
5
+    </el-button>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+  import XLSX from 'xlsx'
11
+
12
+  export default {
13
+    props: {
14
+      beforeUpload: Function,
15
+      onSuccess: Function
16
+    },
17
+    data() {
18
+      return {
19
+        loading: false,
20
+        excelData: {
21
+          header: null,
22
+          results: null
23
+        }
24
+      }
25
+    },
26
+    methods: {
27
+      generateDate({ header, results }) {
28
+        this.excelData.header = header
29
+        this.excelData.results = results
30
+        this.onSuccess && this.onSuccess(this.excelData)
31
+      },
32
+      handleDrop(e) {
33
+        e.stopPropagation()
34
+        e.preventDefault()
35
+        if (this.loading) return
36
+        const files = e.dataTransfer.files
37
+        if (files.length !== 1) {
38
+          this.$message.error('Only support uploading one file!')
39
+          return
40
+        }
41
+        const rawFile = files[0] // only use files[0]
42
+
43
+        if (!this.isExcel(rawFile)) {
44
+          this.$message.error('Only supports upload .xlsx, .xls, .csv suffix files')
45
+          return false
46
+        }
47
+        this.upload(rawFile)
48
+        e.stopPropagation()
49
+        e.preventDefault()
50
+      },
51
+      handleDragover(e) {
52
+        e.stopPropagation()
53
+        e.preventDefault()
54
+        e.dataTransfer.dropEffect = 'copy'
55
+      },
56
+      handleUpload() {
57
+        document.getElementById('excel-project-input').click()
58
+      },
59
+      handleClick(e) {
60
+        const files = e.target.files
61
+        const rawFile = files[0] // only use files[0]
62
+        if (!rawFile) return
63
+        this.upload(rawFile)
64
+      },
65
+      upload(rawFile) {
66
+        this.$refs['excel-project-input'].value = null // fix can't select the same excel
67
+
68
+        if (!this.beforeUpload) {
69
+          this.readerData(rawFile)
70
+          return
71
+        }
72
+        const before = this.beforeUpload(rawFile)
73
+        if (before) {
74
+          this.readerData(rawFile)
75
+        }
76
+      },
77
+      readerData(rawFile) {
78
+        this.loading = true
79
+        return new Promise((resolve, reject) => {
80
+          const reader = new FileReader()
81
+          reader.onload = e => {
82
+            const data = e.target.result
83
+            const fixedData = this.fixdata(data)
84
+            const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
85
+            const firstSheetName = workbook.SheetNames[0]
86
+            const worksheet = workbook.Sheets[firstSheetName]
87
+            const header = this.get_header_row(worksheet)
88
+            const results = XLSX.utils.sheet_to_json(worksheet)
89
+            this.generateDate({ header, results })
90
+            this.loading = false
91
+            resolve()
92
+          }
93
+          reader.readAsArrayBuffer(rawFile)
94
+        })
95
+      },
96
+      fixdata(data) {
97
+        let o = ''
98
+        let l = 0
99
+        const w = 10240
100
+        for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
101
+        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
102
+        return o
103
+      },
104
+      get_header_row(sheet) {
105
+        if(sheet['!ref'] == undefined){
106
+          this.loading = false
107
+          return
108
+        }
109
+
110
+        const headers = []
111
+        const range = XLSX.utils.decode_range(sheet['!ref'])
112
+        let C
113
+        const R = range.s.r /* start in the first row */
114
+        for (C = range.s.c; C <= range.e.c; ++C) { /* walk every column in the range */
115
+          var cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })] /* find the cell in the first row */
116
+          var hdr = 'UNKNOWN ' + C // <-- replace with your desired default
117
+          if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
118
+          headers.push(hdr)
119
+        }
120
+        return headers
121
+      },
122
+      isExcel(file) {
123
+        return /\.(xlsx|xls|csv)$/.test(file.name)
124
+      }
125
+    }
126
+  }
127
+</script>
128
+
129
+<style scoped>
130
+  #excel-project-input {
131
+    display: none;
132
+    z-index: -9999;
133
+  }
134
+
135
+  #drop {
136
+    border: 2px dashed #bbb;
137
+    width: 600px;
138
+    height: 160px;
139
+    line-height: 160px;
140
+    margin: 0 auto;
141
+    font-size: 24px;
142
+    border-radius: 5px;
143
+    text-align: center;
144
+    color: #bbb;
145
+    position: relative;
146
+  }
147
+</style>

+ 88 - 2
src/xt_pages/data/basicConfig.vue View File

@@ -25,6 +25,22 @@
25 25
           <el-switch v-model="is_open_xt_his" @change="changeFuncOne"></el-switch>
26 26
           </p>
27 27
         </div>
28
+
29
+        <!-- <div class="configBox">
30
+          <p style="font-size:18px;font-weight:bold">血压数据自动获取</p>
31
+          <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-血压数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
32
+          <p style="margin-top:20px;">透析监测-血压数据自动获取:
33
+          <el-switch v-model="is_open_monitor" @change="changeFuncTwo"></el-switch>
34
+          </p>
35
+        </div>
36
+
37
+        <div class="configBox">
38
+          <p style="font-size:18px;font-weight:bold">透析机数据自动获取</p>
39
+          <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-透析机数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
40
+          <p style="margin-top:20px;">透析监测-血压数据自动获取:
41
+          <el-switch v-model="is_open_order" @change="changeFuncThree"></el-switch>
42
+          </p>
43
+        </div> -->
28 44
         <!--<div class="configBox">-->
29 45
             <!--<p>药品,耗材出库</p>-->
30 46
             <!--<p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>-->
@@ -62,7 +78,7 @@
62 78
 
63 79
 <script>
64 80
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
65
-import { getAllIsOpenInit,postXtHisIsOpen } from '@/api/config'
81
+import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen} from '@/api/config'
66 82
 
67 83
 export default {
68 84
   name: "printTemplate",
@@ -76,6 +92,8 @@ export default {
76 92
       ],
77 93
       value:false,
78 94
       is_open_xt_his:false,
95
+      is_open_monitor:false,
96
+      is_open_order:false,
79 97
     };
80 98
   },
81 99
   methods: {
@@ -126,14 +144,82 @@ export default {
126 144
           }
127 145
         )
128 146
       }
147
+    },
129 148
 
149
+    changeFuncTwo(){
150
+      console.log("3333333",this.is_open_monitor)
151
+      var is_open = 0
152
+      if(this.is_open_monitor == true){
153
+          is_open = 1
154
+       }
155
+       if(this.is_open_monitor == false){
156
+         is_open = 2
157
+       }
158
+      let params = {
159
+         is_open:is_open,
160
+       }
161
+     console.log("params",params)
162
+      postMonitorIsOpen(params).then(response=>{
163
+         if(response.data.state == 1){
164
+            var config = response.data.data.config
165
+            this.$message.success("成功")
166
+            this.getMonitorConfig()
167
+         }
168
+      })
169
+    },
170
+    getMonitorConfig(){
171
+      getMonitorConfig().then(response=>{
172
+         if(response.data.state == 1){
173
+           var config =  response.data.data.config
174
+           console.log("config",config)
175
+           if (config.is_open == 1) {
176
+              this.is_open_monitor = true
177
+           }
178
+           if (config.is_open == 2) {
179
+              this.is_open_monitor = false
180
+           }
181
+         }
182
+      })
183
+    },
130 184
 
131
-
185
+    changeFuncThree(){
186
+      var is_open = 0
187
+      if(this.is_open_order == true){
188
+          is_open = 1
189
+       }
190
+       if(this.is_open_order == false){
191
+         is_open = 2
192
+       }
193
+      let params = {
194
+         is_open:is_open,
195
+       } 
196
+      addOrderConfig(params).then(response=>{
197
+         if(response.data.state == 1){
198
+           var config = response.data.data.config
199
+           this.$message.success("成功")
200
+           this.getOrderConfig()
201
+         }
202
+      })
203
+    },
204
+    getOrderConfig(){
205
+      getOrderConfig().then(response=>{
206
+        if(response.data.state == 1){
207
+           var config =  response.data.data.config
208
+          if (config.is_open == 1) {
209
+              this.is_open_order = true
210
+           }
211
+           if (config.is_open == 2) {
212
+              this.is_open_order = false
213
+           }
214
+        }
215
+      })
132 216
     }
133 217
 
134 218
   },
135 219
   created() {
136 220
     this.getInitIsOpenConfig()
221
+    this.getMonitorConfig()
222
+    this.getOrderConfig()
137 223
 
138 224
   }
139 225
 };

File diff suppressed because it is too large
+ 535 - 464
src/xt_pages/data/components/addDrugs.vue


+ 456 - 16
src/xt_pages/data/components/consumables.vue View File

@@ -4,7 +4,7 @@
4 4
       <div class="cell clearfix" style="margin-bottom:0;">
5 5
         <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model="keywords"
6 6
                   class="filter-item"/>
7
-        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
7
+        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" 
8 8
                    @click="searchAction">搜索
9 9
         </el-button>
10 10
         <label class="title"><span class="name">是否启用</span> : </label>
@@ -59,14 +59,32 @@
59 59
       </div>
60 60
       <div>
61 61
         <el-button type="primary" @click="openForm()">新增</el-button>
62
-        <!--<el-button type="primary" @click="BatchDelete()">批量备案</el-button>-->
63
-
64
-
65
-        <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
66
-        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
67
-
68 62
       </div>
63
+     
69 64
     </div>
65
+    
66
+     <div style="display:flex; align-items:center;margin-bottom:10px;">
67
+        <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
68
+        <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
69
+        <!-- <el-link target="_blank" href="https://kuyi.shengws.com/stock_template.xlsx" :underline="false"
70
+                 style="margin-left:15px">
71
+          <el-button
72
+            class="filter-item"
73
+            type="primary"
74
+            size="small"
75
+          >下载模版
76
+          </el-button>
77
+        </el-link>
78
+        <upload-excel :on-success='handleSuccess'></upload-excel>
79
+        <el-button
80
+          style="margin-left:10px;"
81
+          @click="generateLog()"
82
+          class="filter-item"
83
+          type="primary"
84
+          size="small"
85
+        >下载日志
86
+        </el-button> -->
87
+      </div>
70 88
 
71 89
     <el-table
72 90
       border style="width: 100%" :row-style="{ color: '#303133' }"
@@ -168,6 +186,43 @@
168 186
     ></good-info-dailog>
169 187
     <self-payment ref='selfPayment'></self-payment>
170 188
 
189
+
190
+    <el-dialog
191
+      title="提示"
192
+      :visible.sync="dialogVisible"
193
+      width="40%"
194
+    >
195
+      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
196
+      <span slot="footer" class="dialog-footer">
197
+    <el-button @click="dialogVisible = false">取 消</el-button>
198
+    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
199
+      </span>
200
+    </el-dialog>
201
+
202
+
203
+     <el-dialog
204
+      title="提示"
205
+      :visible.sync="exportLogVisible"
206
+      width="40%"
207
+    >
208
+
209
+      <div v-for="(item,index) in logs" :key="index">
210
+        <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
211
+        <br/>
212
+        <br/>
213
+        <span>{{getContent(item)}}</span>
214
+        <span >点击</span>
215
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
216
+        <br/>
217
+        <br/>
218
+      </div>
219
+
220
+      <span slot="footer" class="dialog-footer">
221
+    <el-button @click="exportLogVisible = false">取 消</el-button>
222
+    <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
223
+    </span>
224
+    </el-dialog>
225
+
171 226
   </div>
172 227
 </template>
173 228
 
@@ -185,12 +240,16 @@
185 240
     GetGoodInfo,
186 241
     GetGoodInfoByGoodId,
187 242
     getGoodInfoList,
188
-    modifyGoodInfo
243
+    modifyGoodInfo,
244
+    postGoodInformation
189 245
   } from '@/api/stock'
246
+  import UploadExcel from '@/xt_pages/components/UploadExcel'
247
+  import { generateLog } from '@/api/config'
190 248
   export default {
191 249
     components: {
192 250
       GoodInfoDailog,
193
-      selfPayment
251
+      selfPayment,
252
+      UploadExcel,
194 253
     },
195 254
     data() {
196 255
       return {
@@ -267,8 +326,8 @@
267 326
               special_medical:"",
268 327
               production_type:""
269 328
             },
270
-
271
-            isVisibility: false
329
+            isVisibility: false,
330
+       
272 331
           }
273 332
         },
274 333
         selectDrug:[],
@@ -285,7 +344,12 @@
285 344
             label: '未备案'
286 345
         }],
287 346
         is_record:"",
288
-        manufacturer:""
347
+        manufacturer:"",
348
+        dialogVisible:false,
349
+        goodType:[],
350
+        dealers:[],
351
+        exportLogVisible:false,
352
+        logs: [],
289 353
       }
290 354
     },
291 355
     methods: {
@@ -797,6 +861,7 @@
797 861
               this.goodInfo.goodInfoDialog.formValue.dealers.push(
798 862
                 response.data.data.dealer[i]
799 863
               )
864
+              this.dealers.push(response.data.data.dealer[i])
800 865
             }
801 866
           }
802 867
         })
@@ -831,9 +896,8 @@
831 896
               if (response.data.data.goodType[i].type == 1) {
832 897
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
833 898
               }
834
-              this.goodInfo.goodInfoDialog.formValue.goodType.push(
835
-                response.data.data.goodType[i]
836
-              )
899
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
900
+              this.goodType.push(response.data.data.goodType[i]) 
837 901
             }
838 902
           }
839 903
         })
@@ -1012,7 +1076,383 @@
1012 1076
       changeRecord(){
1013 1077
          this.getList()
1014 1078
       },
1015
-    }, created() {
1079
+      handleSuccess({ results, header }) {
1080
+        console.log("header",header)
1081
+        var goods = []
1082
+        if (header != undefined && header.length > 0) {
1083
+            
1084
+          var isHasMedicalInsuranceLevel = header.includes('*医保等级')
1085
+          // console.log("医保等级",isHasMedicalInsuranceLevel)
1086
+          var isHasGoodUnit = header.includes('*单位')
1087
+          // console.log("单位",isHasGoodUnit)
1088
+          var isHasStockWarnCount = header.includes('*库存警戒')
1089
+          // console.log("库存警戒",isHasStockWarnCount)
1090
+          var isHasManuFacturer =  header.includes('*生产厂商')
1091
+          // console.log("生产厂商",isHasManuFacturer)
1092
+          var isHasDealer =  header.includes('*经销商')
1093
+          // console.log("经销商",isHasDealer)
1094
+          var isHasGoodName = header.includes('*耗材名称')
1095
+          // console.log("耗材名称",isHasGoodName)
1096
+          var isHasGoodKand = header.includes('*耗材种类')
1097
+          // console.log("耗材种类",isHasGoodKand)
1098
+          var isHasSpecificationName = header.includes('*规格型号')
1099
+          // console.log("规格型号",isHasSpecificationName)
1100
+          var isHasBuyPrice = header.includes('*零价')
1101
+          // console.log("零价",isHasBuyPrice)
1102
+         
1103
+          if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer && isHasDealer && isHasGoodName && isHasGoodKand && isHasSpecificationName &&  isHasBuyPrice)) {
1104
+            this.dialogVisible = true
1105
+            return
1106
+          }
1107
+        }else {
1108
+          this.dialogVisible = true
1109
+          return
1110
+        }
1111
+       
1112
+       var tableData = []
1113
+       for(let i=0;i<results.length;i++){
1114
+         let obj = {"good_kind_id":0,"good_type_id":0,"medical_insurance_id":0,"dealer_id":0,"statistic_id":0,"manufacturer_id":0,"unit_id":0}
1115
+         for (var key in results[i]) {
1116
+
1117
+           if (results[i]['*耗材名称'] === undefined) {
1118
+                obj['good_name'] = ''
1119
+              } else {
1120
+           if (key == '*耗材名称') {
1121
+               obj['good_name'] = results[i][key].replace(/\s/g,"")
1122
+              }
1123
+           }
1124
+           
1125
+           if (results[i]['*耗材种类'] === undefined) {
1126
+                obj['good_kind'] = ''
1127
+              } else {
1128
+           if (key == '*耗材种类') {
1129
+               obj['good_kind'] = results[i][key].replace(/\s/g,"")
1130
+              }
1131
+           }
1132
+
1133
+          if (results[i]['*耗材类型'] === undefined) {
1134
+                obj['type_name'] = ''
1135
+              } else {
1136
+           if (key == '*耗材类型') {
1137
+               obj['type_name'] = results[i][key].replace(/\s/g,"")
1138
+              }
1139
+           }
1140
+
1141
+           if (results[i]['*医保等级'] === undefined) {
1142
+                obj['medical_insurance_level'] = ''
1143
+              } else {
1144
+           if (key == '*医保等级') {
1145
+               obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
1146
+              }
1147
+           }
1148
+
1149
+           if (results[i]['*规格型号'] === undefined) {
1150
+                obj['specification_name'] = ''
1151
+              } else {
1152
+           if (key == '*规格型号') {
1153
+               obj['specification_name'] = results[i][key].replace(/\s/g,"")
1154
+              }
1155
+           }
1156
+
1157
+           if (results[i]['*生产厂商'] === undefined) {
1158
+                obj['manufacturer'] = ''
1159
+              } else {
1160
+           if (key == '*生产厂商') {
1161
+               obj['manufacturer'] = results[i][key].replace(/\s/g,"")
1162
+              }
1163
+           }
1164
+
1165
+           if (results[i]['*单位'] === undefined) {
1166
+                obj['good_unit'] = ''
1167
+              } else {
1168
+             if (key == '*单位') {
1169
+               obj['good_unit'] = results[i][key].replace(/\s/g,"")
1170
+              }
1171
+           }
1172
+
1173
+          if (results[i]['*零价'] === undefined) {
1174
+                obj['retail_price'] = ''
1175
+              } else {
1176
+             if (key == '*零价') {
1177
+               obj['retail_price'] = results[i][key].replace(/\s/g,"")
1178
+              }
1179
+           }
1180
+
1181
+            if (results[i]['*库存警戒'] === undefined) {
1182
+                obj['stock_warn_count'] = ''
1183
+              } else {
1184
+             if (key == '*库存警戒') {
1185
+               obj['stock_warn_count'] = results[i][key].replace(/\s/g,"")
1186
+              }
1187
+           }
1188
+
1189
+           if (results[i]['*经销商'] === undefined) {
1190
+                obj['dealer'] = ''
1191
+              } else {
1192
+             if (key == '*经销商') {
1193
+               obj['dealer'] = results[i][key].replace(/\s/g,"")
1194
+              }
1195
+           }
1196
+
1197
+           if (results[i]['拼音'] === undefined) {
1198
+                obj['pinyin'] = ''
1199
+              } else {
1200
+             if (key == '拼音') {
1201
+               obj['pinyin'] = results[i][key].replace(/\s/g,"")
1202
+              }
1203
+           }
1204
+
1205
+           if (results[i]['五笔'] === undefined) {
1206
+                obj['wubi'] = ''
1207
+              } else {
1208
+             if (key == '五笔') {
1209
+               obj['wubi'] = results[i][key].replace(/\s/g,"")
1210
+              }
1211
+           }
1212
+
1213
+           if (results[i]['最新进价'] === undefined) {
1214
+                obj['buy_price'] = ''
1215
+              } else {
1216
+             if (key == '最新进价') {
1217
+               obj['buy_price'] = results[i][key].replace(/\s/g,"")
1218
+              }
1219
+           }
1220
+
1221
+           if (results[i]['医保编码'] === undefined) {
1222
+                obj['medical_insurance_number'] = ''
1223
+              } else {
1224
+             if (key == '医保编码') {
1225
+               obj['medical_insurance_number'] = results[i][key].replace(/\s/g,"")
1226
+              }
1227
+           }
1228
+
1229
+          if (results[i]['是否特病目录'] === undefined) {
1230
+                obj['is_special_diseases'] = ''
1231
+              } else {
1232
+             if (key == '是否特病目录') {
1233
+               obj['is_special_diseases'] = results[i][key].replace(/\s/g,"")
1234
+              }
1235
+           }
1236
+          
1237
+           if (results[i]['是否备案'] === undefined) {
1238
+                obj['is_record'] = ''
1239
+              } else {
1240
+             if (key == '是否备案') {
1241
+               obj['is_record'] = results[i][key].replace(/\s/g,"")
1242
+              }
1243
+           }
1244
+
1245
+          if (results[i]['统计分类'] === undefined) {
1246
+                obj['statistics_category'] = ''
1247
+              } else {
1248
+             if (key == '统计分类') {
1249
+               obj['statistics_category'] = results[i][key].replace(/\s/g,"")
1250
+              }
1251
+           }
1252
+          
1253
+          if (results[i]['状态'] === undefined) {
1254
+                obj['good_status'] = ''
1255
+              } else {
1256
+             if (key == '状态') {
1257
+               obj['good_status'] = results[i][key].replace(/\s/g,"")
1258
+              }
1259
+           }
1260
+           
1261
+
1262
+          if (results[i]['社保目录编码'] === undefined) {
1263
+                obj['social_security_directory_code'] = ''
1264
+              } else {
1265
+             if (key == '社保目录编码') {
1266
+               obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
1267
+              }
1268
+           }
1269
+
1270
+          if (results[i]['生产地类别'] === undefined) {
1271
+                obj['production_type'] = ''
1272
+              } else {
1273
+             if (key == '生产地类别') {
1274
+               obj['production_type'] = results[i][key].replace(/\s/g,"")
1275
+              }
1276
+           }
1277
+
1278
+           if (results[i]['特殊医用材料标志'] === undefined) {
1279
+                obj['special_medical'] = ''
1280
+              } else {
1281
+             if (key == '特殊医用材料标志') {
1282
+               obj['special_medical'] = results[i][key].replace(/\s/g,"")
1283
+              }
1284
+           }
1285
+
1286
+           if (results[i]['备注'] === undefined) {
1287
+                obj['is_mark'] = ''
1288
+              } else {
1289
+             if (key == '备注') {
1290
+               obj['is_mark'] = results[i][key].replace(/\s/g,"")
1291
+              }
1292
+           }
1293
+
1294
+
1295
+         }
1296
+         tableData.push(obj)
1297
+         console.log("表哥2222",tableData)
1298
+         var goodKind  =  this.getDictionaryDataConfig('system','good_kind')
1299
+         
1300
+        //  console.log("耗材种类",goodKind)
1301
+        //  console.log("耗材类型",this.goodType)
1302
+        var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
1303
+        // console.log("医保等级",medicalInsuranceLevel)
1304
+        // console.log("生产厂商",this.manufacturers)
1305
+        // console.log("经销商",this.dealers)
1306
+        var statisticsCategory = getDictionaryDataConfig('system','statistics_category')
1307
+        // console.log("统计分类",statisticsCategory)
1308
+       
1309
+        var goodUnit =  this.$store.getters.good_unit
1310
+       
1311
+
1312
+        for(let i=0;i<tableData.length;i++){ 
1313
+          for(let j=0;j<goodKind.length;j++){
1314
+             
1315
+             if(tableData[i].good_kind == goodKind[j].name){
1316
+                tableData[i].good_kind_id = goodKind[j].id
1317
+             }    
1318
+          }
1319
+
1320
+       for(let z=0;z<this.goodType.length;z++){
1321
+          if(tableData[i].type_name == this.goodType[z].type_name){
1322
+             tableData[i].good_type_id = this.goodType[z].id
1323
+           }
1324
+        }
1325
+        
1326
+        for(let y=0;y<medicalInsuranceLevel.length;y++){
1327
+           if(tableData[i].medical_insurance_level == medicalInsuranceLevel[y].name){
1328
+               tableData[i].medical_insurance_id = medicalInsuranceLevel[y].id
1329
+           }
1330
+        }
1331
+
1332
+        
1333
+        for(let a=0;a<this.manufacturers.length;a++){
1334
+           if(tableData[i].manufacturer == this.manufacturers[a].manufacturer_name){
1335
+               tableData[i].manufacturer_id = this.manufacturers[a].id
1336
+           }
1337
+        }
1338
+       
1339
+        for(let s=0;s<this.dealers.length;s++){
1340
+           if(tableData[i].dealer == this.dealers[s].dealer_name){
1341
+               tableData[i].dealer_id = this.dealers[s].id
1342
+           }
1343
+        }
1344
+        
1345
+        for(let h=0;h<statisticsCategory.length;h++){
1346
+           if(tableData[i].statistics_category == statisticsCategory[h].name){
1347
+               tableData[i].statistic_id = statisticsCategory[h].id
1348
+           }
1349
+         }
1350
+
1351
+         for(let c=0;c<goodUnit.length;c++){
1352
+            if(tableData[i].good_unit == goodUnit[c].name){
1353
+               tableData[i].unit_id = goodUnit[c].id
1354
+            }
1355
+         }
1356
+
1357
+        }
1358
+       }
1359
+       
1360
+       for(let i=0;i<tableData.length;i++){
1361
+          tableData[i].stock_warn_count = parseInt(tableData[i].stock_warn_count)
1362
+
1363
+          if(tableData[i].is_special_diseases == "是"){
1364
+              tableData[i].is_special_diseases = 1
1365
+          }
1366
+          if(tableData[i].is_special_diseases == "否"){
1367
+              tableData[i].is_special_diseases = 2
1368
+          }
1369
+
1370
+          if(tableData[i].is_record == "是"){
1371
+             tableData[i].is_record = 1
1372
+          }
1373
+          if(tableData[i].is_record == "否"){
1374
+             tableData[i].is_record = 2
1375
+          }
1376
+
1377
+         
1378
+
1379
+          if(tableData[i].special_medical == "是"){
1380
+             tableData[i].special_medical = 1
1381
+          }
1382
+          if(tableData[i].special_medical == "否"){
1383
+             tableData[i].special_medical = 2
1384
+          }
1385
+       }
1386
+     
1387
+       
1388
+       let params = {
1389
+          'goods':tableData 
1390
+        }
1391
+       console.log("params2222",params)
1392
+       
1393
+       
1394
+        postGoodInformation(params).then(response=>{
1395
+           if(response.data.state == 1){
1396
+             var msg =  response.data.data.msg
1397
+             this.$message.success("导入成功!")
1398
+           }else{
1399
+             this.$message.error("导入失败")
1400
+           }
1401
+        })
1402
+      },
1403
+      generateTxt: function(log) {
1404
+        var content = ''
1405
+        var errlog = log.err_logs
1406
+        content = this.getContent(log)
1407
+        for (let i = 0; i < errlog.length; i++) {
1408
+          if (content.length == 0) {
1409
+            content = errlog[i].err_msg
1410
+          } else {
1411
+            content = content + '\n' + errlog[i].err_msg
1412
+          }
1413
+        }
1414
+
1415
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
1416
+        if (typeof url === 'object' && url instanceof Blob) {
1417
+          url = URL.createObjectURL(url) // 创建blob地址
1418
+        }
1419
+        const aLink = document.createElement('a')
1420
+        aLink.href = url
1421
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
1422
+        aLink.click()
1423
+
1424
+      },
1425
+      getContent(log) {
1426
+        return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1427
+      },
1428
+      timestampToTime(timestamp) {
1429
+        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1430
+        var Y = date.getFullYear() + '年'
1431
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
1432
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
1433
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
1434
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
1435
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
1436
+        return Y + M + D + h + m + s
1437
+      },
1438
+       generateLog() {
1439
+        let params = {
1440
+          'log_type': 5
1441
+        }
1442
+        generateLog(params).then(
1443
+          response => {
1444
+            if (response.data.state === 1) {
1445
+              this.logs = response.data.data.logs
1446
+              this.exportLogVisible = true
1447
+            } else {
1448
+              this.$message.error(response.data.msg)
1449
+            }
1450
+          }
1451
+        )
1452
+
1453
+      },
1454
+    }, 
1455
+    created() {
1016 1456
       this.getList()
1017 1457
       this.getAllDealer()
1018 1458
       this.getAllManufacturer()

+ 389 - 7
src/xt_pages/data/components/drugs.vue View File

@@ -56,10 +56,33 @@
56 56
       </div>
57 57
       <div>
58 58
         <el-button type="primary" @click="openForm(0)">新增</el-button>
59
+        <!-- <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
60
+        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button> -->
61
+      </div>
62
+      
63
+    </div>
64
+    <div style="display:flex; align-items:center;margin-bottom:10px;">
59 65
         <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
60 66
         <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
67
+        <!-- <el-link target="_blank" href="https://kuyi.shengws.com/drug_template.xlsx" :underline="false"
68
+                 style="margin-left:15px">
69
+          <el-button
70
+            class="filter-item"
71
+            type="primary"
72
+            size="small"
73
+          >下载模版
74
+          </el-button>
75
+        </el-link>
76
+        <upload-excel :on-success='handleSuccessTwo'></upload-excel>
77
+        <el-button
78
+          style="margin-left:10px;"
79
+          @click="generateLog()"
80
+          class="filter-item"
81
+          type="primary"
82
+          size="small"
83
+        >下载日志
84
+        </el-button> -->
61 85
       </div>
62
-    </div>
63 86
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
64 87
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
65 88
              @selection-change="handleSelectionChange">
@@ -176,7 +199,43 @@
176 199
       :total="total"
177 200
     >
178 201
     </el-pagination>
202
+   
179 203
 
204
+    <el-dialog
205
+      title="提示"
206
+      :visible.sync="dialogVisible"
207
+      width="40%"
208
+    >
209
+      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
210
+      <span slot="footer" class="dialog-footer">
211
+    <el-button @click="dialogVisible = false">取 消</el-button>
212
+    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
213
+      </span>
214
+    </el-dialog>
215
+
216
+
217
+     <el-dialog
218
+      title="提示"
219
+      :visible.sync="exportLogVisible"
220
+      width="40%"
221
+    >
222
+
223
+      <div v-for="(item,index) in logs" :key="index">
224
+        <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
225
+        <br/>
226
+        <br/>
227
+        <span>{{getContent(item)}}</span>
228
+        <span >点击</span>
229
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
230
+        <br/>
231
+        <br/>
232
+      </div>
233
+
234
+      <span slot="footer" class="dialog-footer">
235
+    <el-button @click="exportLogVisible = false">取 消</el-button>
236
+    <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
237
+    </span>
238
+    </el-dialog>
180 239
   </div>
181 240
 </template>
182 241
 
@@ -185,8 +244,8 @@
185 244
   import selfPayment from './selfPayment'
186 245
   import maintain from './maintain'
187 246
   import addDrugs from './addDrugs'
188
-  import { GetAllManufacturer } from '@/api/stock'
189
-  import { getDataConfig } from "@/utils/data";
247
+  import { GetAllManufacturer,postDrugInformation } from '@/api/stock'
248
+  import { getDataConfig,getDictionaryDataConfig } from "@/utils/data";
190 249
   import { uParseTime } from '@/utils/tools'
191 250
   import {
192 251
     createBaseDrugLib,
@@ -198,11 +257,14 @@
198 257
     deleteDurg
199 258
   } from '@/api/data'
200 259
  import {GetAllConfig } from "@/api/stock";
260
+ import { generateLog } from '@/api/config'
261
+ import UploadExcel from '@/xt_pages/components/UploadExcel'
201 262
   export default {
202 263
     components: {
203 264
       selfPayment,
204 265
       maintain,
205
-      addDrugs
266
+      addDrugs,
267
+      UploadExcel
206 268
     },
207 269
     data() {
208 270
       return {
@@ -264,8 +326,9 @@
264 326
           is_charge_predict: '',//是否收费预估项
265 327
           is_statistics_work: '',//是否统计工作量
266 328
           is_charge_use: '',//是否收费常用项
267
-          drug_code: ''
268
-
329
+          drug_code: '',
330
+          hosp_appr_flag:'',
331
+          lmt_used_flag:'',
269 332
         },
270 333
         tempFormValue: {
271 334
           drug_name: '',//药品名称
@@ -316,6 +379,8 @@
316 379
           social_security_directory_code:'',
317 380
           is_mark:'',
318 381
           prescription_mark:'',
382
+          hosp_appr_flag:'',
383
+          lmt_used_flag:'',
319 384
 
320 385
         },
321 386
 
@@ -338,6 +403,9 @@
338 403
 
339 404
         dealer:[],
340 405
         selectDrug:[],
406
+        dialogVisible:false,
407
+        exportLogVisible:false,
408
+        logs:[]
341 409
       }
342 410
     },
343 411
     methods: {
@@ -602,6 +670,9 @@
602 670
               if(this.formValue.prescription_mark == 0){
603 671
                   this.formValue.prescription_mark = ""
604 672
               }
673
+              if(this.formValue.hosp_appr_flag == 0){
674
+                this.formValue.hosp_appr_flag = ""
675
+              }
605 676
               this.$refs.addDrugs.show(id, this.formValue)
606 677
 
607 678
             }
@@ -655,7 +726,7 @@
655 726
           } else {
656 727
             this.total = response.data.data.total
657 728
             this.list = []
658
-            console.log("333333333",response.data.data.list)
729
+           
659 730
             for (let i = 0; i < response.data.data.list.length; i++) {
660 731
               this.list.push(response.data.data.list[i])
661 732
             }
@@ -832,6 +903,317 @@
832 903
         })
833 904
        });
834 905
      },
906
+
907
+      handleSuccessTwo({ results, header }) {
908
+       console.log("hhhhhhhh",results)
909
+        if (header != undefined && header.length > 0) {
910
+            
911
+          var isHasDrugName = header.includes('*药品名称')
912
+         
913
+          var isHasDrugAlias = header.includes('*药品别名')
914
+          
915
+          var isHasDrugSpec = header.includes('*药品规格')
916
+        
917
+          var isHasDrugType =  header.includes('*药品类型')
918
+        
919
+          var isHasDrugStockLimit =  header.includes('*库存警戒')
920
+         
921
+          var isHasDrugOriginPlace= header.includes('*产地')
922
+         
923
+          var isHasDrugDosageForm = header.includes('*药品剂型')
924
+        
925
+          var isHasMaxUnit= header.includes('*最大单位')
926
+
927
+          var isHasMinUnit= header.includes('*最小单位')
928
+
929
+          var isHasUnitMatrixing= header.includes("*单位换算")
930
+        
931
+          var isHasRetailPrice = header.includes('*单零售价')
932
+        
933
+          var isHasLastPrice = header.includes('*上次进价')
934
+
935
+          var isHasDrugClassifye = header.includes('*药物分类')
936
+
937
+         var isHasManufacturer = header.includes('*生产厂商')
938
+
939
+          var isHasDealer =  header.includes('*经销商')
940
+          if (!(isHasDrugName && isHasDrugAlias && isHasDrugSpec && isHasDrugType && isHasDrugStockLimit && isHasDrugOriginPlace && isHasDrugDosageForm && isHasMaxUnit &&  isHasMinUnit && isHasUnitMatrixing &&  isHasRetailPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDealer)) {
941
+            this.dialogVisible = true
942
+            return
943
+          }
944
+        }else {
945
+          this.dialogVisible = true
946
+          return
947
+        }
948
+       
949
+       var tableData = []
950
+       for(let i=0;i<results.length;i++){
951
+         let obj = {"drug_type_id":0,"drug_dosage_form_id":0,"medical_insurance_level_id":0,"drug_classify_id":0,"manufacturer_id":0,"dealer_id":0}
952
+         for (var key in results[i]) {
953
+
954
+           if (results[i]['*药品名称'] === undefined) {
955
+                obj['drug_name'] = ''
956
+              } else {
957
+           if (key == '*药品名称') {
958
+               obj['drug_name'] = results[i][key].replace(/\s/g,"")
959
+              }
960
+           }
961
+
962
+
963
+           if (results[i]['*药品别名'] === undefined) {
964
+                obj['drug_alias'] = ''
965
+              } else {
966
+           if (key == '*药品别名') {
967
+               obj['drug_alias'] = results[i][key].replace(/\s/g,"")
968
+              }
969
+           }
970
+
971
+            if (results[i]['*药品规格'] === undefined) {
972
+                obj['drug_spec'] = ''
973
+              } else {
974
+           if (key == '*药品规格') {
975
+               obj['drug_spec'] = results[i][key].replace(/\s/g,"")
976
+              }
977
+           }
978
+
979
+            if (results[i]['*药品类型'] === undefined) {
980
+                obj['drug_type'] = ''
981
+              } else {
982
+           if (key == '*药品类型') {
983
+               obj['drug_type'] = results[i][key].replace(/\s/g,"")
984
+              }
985
+           }
986
+           
987
+
988
+           if (results[i]['*库存警戒'] === undefined) {
989
+                obj['drug_stock_limit'] = ''
990
+              } else {
991
+           if (key == '*库存警戒') {
992
+               obj['drug_stock_limit'] = results[i][key].replace(/\s/g,"")
993
+              }
994
+           }
995
+
996
+           if (results[i]['*产地'] === undefined) {
997
+                obj['drug_origin_place'] = ''
998
+              } else {
999
+           if (key == '*产地') {
1000
+               obj['drug_origin_place'] = results[i][key].replace(/\s/g,"")
1001
+              }
1002
+           }
1003
+
1004
+           if (results[i]['*药品剂型'] === undefined) {
1005
+                obj['drug_dosage_form'] = ''
1006
+              } else {
1007
+           if (key == '*药品剂型') {
1008
+               obj['drug_dosage_form'] = results[i][key].replace(/\s/g,"")
1009
+              }
1010
+           }
1011
+
1012
+
1013
+            if (results[i]['*医保等级'] === undefined) {
1014
+                obj['medical_insurance_level'] = ''
1015
+              } else {
1016
+           if (key == '*医保等级') {
1017
+               obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
1018
+              }
1019
+           }
1020
+
1021
+           if (results[i]['*最大单位'] === undefined) {
1022
+                obj['max_unit'] = ''
1023
+              } else {
1024
+           if (key == '*最大单位') {
1025
+               obj['max_unit'] = results[i][key].replace(/\s/g,"")
1026
+              }
1027
+           }
1028
+
1029
+           if (results[i]['*最小单位'] === undefined) {
1030
+                obj['min_unit'] = ''
1031
+              } else {
1032
+           if (key == '*最小单位') {
1033
+               obj['min_unit'] = results[i][key].replace(/\s/g,"")
1034
+              }
1035
+           }
1036
+
1037
+
1038
+            if (results[i]['*单位换算'] === undefined) {
1039
+                obj['unit_matrixing'] = ''
1040
+              } else {
1041
+           if (key == '*单位换算') {
1042
+               obj['unit_matrixing'] = results[i][key].replace(/\s/g,"")
1043
+              }
1044
+           }
1045
+
1046
+            if (results[i]['*单零售价'] === undefined) {
1047
+                obj['retail_price'] = ''
1048
+              } else {
1049
+           if (key == '*单零售价') {
1050
+               obj['retail_price'] = results[i][key].replace(/\s/g,"")
1051
+              }
1052
+           }
1053
+           
1054
+
1055
+         if (results[i]['*上次进价'] === undefined) {
1056
+                obj['last_price'] = ''
1057
+              } else {
1058
+           if (key == '*上次进价') {
1059
+               obj['last_price'] = results[i][key].replace(/\s/g,"")
1060
+              }
1061
+           }
1062
+
1063
+            if (results[i]['*药物分类'] === undefined) {
1064
+                obj['drug_classify'] = ''
1065
+              } else {
1066
+           if (key == '*药物分类') {
1067
+               obj['drug_classify'] = results[i][key].replace(/\s/g,"")
1068
+              }
1069
+           }
1070
+
1071
+
1072
+            if (results[i]['*生产厂商'] === undefined) {
1073
+                obj['manufacturer'] = ''
1074
+              } else {
1075
+           if (key == '*生产厂商') {
1076
+               obj['manufacturer'] = results[i][key].replace(/\s/g,"")
1077
+              }
1078
+           }
1079
+
1080
+            if (results[i]['*经销商'] === undefined) {
1081
+                obj['dealer'] = ''
1082
+              } else {
1083
+           if (key == '*经销商') {
1084
+               obj['dealer'] = results[i][key].replace(/\s/g,"")
1085
+              }
1086
+          
1087
+           }
1088
+         }
1089
+         tableData.push(obj)
1090
+         console.log("表哥2222",tableData)
1091
+      
1092
+        var drugType =  this.getDictionaryDataConfig('system','drug_type')
1093
+       
1094
+       
1095
+        var drugDosageForm = this.getDictionaryDataConfig('system','drug_dosage_form')
1096
+       
1097
+        var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
1098
+        
1099
+
1100
+        var drugClassify =  this.getDictionaryDataConfig('system','drug_classify')
1101
+       
1102
+
1103
+        var goodUnit =  this.$store.getters.good_unit
1104
+       
1105
+
1106
+        for(let i=0;i<tableData.length;i++){ 
1107
+          for(let j=0;j<drugType.length;j++){
1108
+            if(tableData[i].drug_type == drugType[j].name){
1109
+                tableData[i].drug_type_id = drugType[j].id
1110
+             }    
1111
+          }
1112
+
1113
+          for(let j=0;j<drugDosageForm.length;j++){
1114
+            if(tableData[i].drug_dosage_form == drugDosageForm[j].name){
1115
+                tableData[i].drug_dosage_form_id = drugDosageForm[j].id
1116
+            }
1117
+          }
1118
+
1119
+          for(let j=0;j<medicalInsuranceLevel.length;j++){
1120
+            if(tableData[i].medical_insurance_level == medicalInsuranceLevel[j].name){
1121
+                tableData[i].medical_insurance_level_id = medicalInsuranceLevel[j].id
1122
+            }
1123
+          }
1124
+
1125
+          for(let j=0;j<drugClassify.length;j++){
1126
+             if(tableData[i].drug_classify == drugClassify[j].name){
1127
+                tableData[i].drug_classify_id = drugClassify[j].id
1128
+             }
1129
+          } 
1130
+         
1131
+          console.log("生产",this.manufacturers)
1132
+          for(let j=0;j<this.manufacturers.length;j++){
1133
+            if(tableData[i].manufacturer == this.manufacturers[j].manufacturer_name){
1134
+               tableData[i].manufacturer_id = this.manufacturers[j].id
1135
+            }
1136
+          }
1137
+          console.log("经销商",this.dealer)
1138
+          for(let j=0;j<this.dealer.length;j++){
1139
+            if(tableData[i].dealer == this.dealer[j].dealer_name){
1140
+               tableData[i].dealer_id = this.dealer[j].id
1141
+            }
1142
+          }
1143
+          
1144
+        }
1145
+       }
1146
+       for(let i=0;i<tableData.length;i++){
1147
+          tableData[i].retail_price = parseInt(tableData[i].retail_price)
1148
+          tableData[i].last_price = parseInt(tableData[i].last_price)
1149
+       }
1150
+       
1151
+       let params = {
1152
+          'drugs':tableData 
1153
+        }
1154
+       console.log("params2222",params)
1155
+        postDrugInformation(params).then(response=>{
1156
+           if(response.data.state == 1){
1157
+             var msg =  response.data.data.msg
1158
+             this.$message.success("导入成功!")
1159
+           }else{
1160
+             this.$message.error("导入失败")
1161
+           }
1162
+        })
1163
+      },
1164
+      generateTxt: function(log) {
1165
+        var content = ''
1166
+        var errlog = log.err_logs
1167
+        content = this.getContent(log)
1168
+        for (let i = 0; i < errlog.length; i++) {
1169
+          if (content.length == 0) {
1170
+            content = errlog[i].err_msg
1171
+          } else {
1172
+            content = content + '\n' + errlog[i].err_msg
1173
+          }
1174
+        }
1175
+
1176
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
1177
+        if (typeof url === 'object' && url instanceof Blob) {
1178
+          url = URL.createObjectURL(url) // 创建blob地址
1179
+        }
1180
+        const aLink = document.createElement('a')
1181
+        aLink.href = url
1182
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
1183
+        aLink.click()
1184
+
1185
+      },
1186
+      getContent(log) {
1187
+        return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
1188
+      },
1189
+      timestampToTime(timestamp) {
1190
+        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
1191
+        var Y = date.getFullYear() + '年'
1192
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
1193
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
1194
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
1195
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
1196
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
1197
+        return Y + M + D + h + m + s
1198
+      },
1199
+       generateLog() {
1200
+        let params = {
1201
+          'log_type': 4
1202
+        }
1203
+        generateLog(params).then(
1204
+          response => {
1205
+            if (response.data.state === 1) {
1206
+              this.logs = response.data.data.logs
1207
+              this.exportLogVisible = true
1208
+            } else {
1209
+              this.$message.error(response.data.msg)
1210
+            }
1211
+          }
1212
+        )
1213
+      },
1214
+      getDictionaryDataConfig(module,filed_name){
1215
+        return getDictionaryDataConfig(module,filed_name)
1216
+      },
835 1217
     },
836 1218
     created() {
837 1219
       this.getList()

+ 2 - 1
src/xt_pages/data/components/editInspection.vue View File

@@ -146,7 +146,8 @@ export default {
146 146
               team_type: [{ required:true,message:'请填写组套类型',trigger:'change' }]
147 147
            },
148 148
            tableData:[],
149
-           item_id:[]
149
+           item_id:[],
150
+           projectList:[]
150 151
         }
151 152
     },
152 153
     methods:{

+ 256 - 9
src/xt_pages/data/components/project.vue View File

@@ -34,11 +34,34 @@
34 34
             </div>
35 35
             <div>
36 36
              <el-button type="primary" @click="openForm(0)">新增</el-button>
37
-             <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
38
-                <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
39
-
37
+             <!-- <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
38
+             <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button> -->
40 39
             </div>
41 40
         </div>
41
+        <div style="display:flex; align-items:center;margin-bottom:10px;">
42
+        <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
43
+        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
44
+        <!-- <el-link target="_blank" href="https://kuyi.shengws.com/project_template.xlsx" :underline="false"
45
+                 style="margin-left:15px">
46
+          <el-button
47
+            class="filter-item"
48
+            type="primary"
49
+            size="small"
50
+          >下载模版
51
+          </el-button>
52
+        </el-link>
53
+
54
+        <project-excel :on-success='handleSuccessOne'></project-excel>
55
+     
56
+        <el-button
57
+          style="margin-left:10px;"
58
+          @click="generateLog()"
59
+          class="filter-item"
60
+          type="primary"
61
+          size="small"
62
+        >下载日志
63
+        </el-button> -->
64
+      </div>
42 65
         <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"  @selection-change="handleSelectionChange">
43 66
             <el-table-column
44 67
               align="center"
@@ -118,19 +141,59 @@
118 141
 
119 142
         <add-project ref="addProject"></add-project>
120 143
         <editProject ref="editProject"></editProject>
144
+
145
+
146
+    <el-dialog
147
+      title="提示"
148
+      :visible.sync="dialogVisible"
149
+      width="40%"
150
+    >
151
+      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
152
+      <span slot="footer" class="dialog-footer">
153
+    <el-button @click="dialogVisible = false">取 消</el-button>
154
+    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
155
+      </span>
156
+    </el-dialog>
157
+
158
+
159
+     <el-dialog
160
+      title="提示"
161
+      :visible.sync="exportLogVisible"
162
+      width="40%"
163
+    >
164
+
165
+      <div v-for="(item,index) in logs" :key="index">
166
+        <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
167
+        <br/>
168
+        <br/>
169
+        <span>{{getContent(item)}}</span>
170
+        <span >点击</span>
171
+        <span style="color:blue" @click="generateTxt(item)">查看详情</span>
172
+        <br/>
173
+        <br/>
174
+      </div>
175
+
176
+      <span slot="footer" class="dialog-footer">
177
+    <el-button @click="exportLogVisible = false">取 消</el-button>
178
+    <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
179
+    </span>
180
+    </el-dialog>
121 181
     </div>
122 182
 </template>
123 183
 
124 184
 <script>
125 185
 import addProject from './addProject'
126 186
 import editProject from './editProject'
127
-import { getProjectList,deleteHisProject,getDePartmentList } from "@/api/project/project"
187
+import { getProjectList,deleteHisProject,getDePartmentList,postProjectInformation } from "@/api/project/project"
128 188
 import { getDictionaryDataConfig } from "@/utils/data";
129 189
 import axios from 'axios'
190
+import ProjectExcel from '@/xt_pages/components/ProjectExcel'
191
+import { generateLog } from '@/api/config'
130 192
 export default {
131 193
     components:{
132 194
         addProject,
133
-        editProject
195
+        editProject,
196
+        ProjectExcel
134 197
     },
135 198
     data(){
136 199
         return{
@@ -165,9 +228,13 @@ export default {
165 228
               label: '未备案'
166 229
           }],
167 230
           is_mark:"",
168
-           limit:100,
169
-           page:1,
170
-           departMentList:[]
231
+          limit:100,
232
+          page:1,
233
+          departMentList:[],
234
+           dialogVisible:false,
235
+           exportLogVisible:false,
236
+           logs:[]
237
+          
171 238
         }
172 239
     },
173 240
     methods:{
@@ -449,7 +516,187 @@ export default {
449 516
             this.departMentList = department
450 517
             }
451 518
         })
452
-     }
519
+     },
520
+      handleSuccessOne({ results, header }) {
521
+       
522
+        if (header != undefined && header.length > 0) {
523
+            
524
+          var isHasProjectName = header.includes('*项目名称')
525
+        
526
+          var isHasProjectPrice = header.includes('*零价')
527
+
528
+          var isHasProjectUnit = header.includes('*单位')
529
+
530
+          var isHasProjectCostClassify = header.includes('*费用类别')
531
+
532
+          var isHasProjectExecutiveSection = header.includes('*执行科室')
533
+         
534
+          var isHasProjectMedicalCoverage = header.includes('*医保等级')
535
+         
536
+          if (!(isHasProjectName && isHasProjectPrice && isHasProjectUnit && isHasProjectCostClassify && isHasProjectExecutiveSection && isHasProjectMedicalCoverage )) {
537
+            this.dialogVisible = true
538
+            return
539
+          }
540
+        }else {
541
+          this.dialogVisible = true
542
+          return
543
+        }
544
+       
545
+       var tableData = []
546
+       for(let i=0;i<results.length;i++){
547
+         let obj = {"cost_classify_id":0,"medical_insurance_level_id":0,"executive_section_id":0}
548
+         for (var key in results[i]) {
549
+           if (results[i]['*项目名称'] === undefined) {
550
+                obj['project_name'] = ''
551
+              } else {
552
+           if (key == '*项目名称') {
553
+               obj['project_name'] = results[i][key].replace(/\s/g,"")
554
+              }
555
+           }
556
+
557
+          if (results[i]['*零价'] === undefined) {
558
+                obj['price'] = ''
559
+              } else {
560
+           if (key == '*零价') {
561
+               obj['price'] = results[i][key].replace(/\s/g,"")
562
+              }
563
+           }
564
+
565
+         if (results[i]['*单位'] === undefined) {
566
+                obj['unit'] = ''
567
+              } else {
568
+         if (key == '*单位') {
569
+               obj['unit'] = results[i][key].replace(/\s/g,"")
570
+              }
571
+          }
572
+
573
+         if (results[i]['*费用类别'] === undefined) {
574
+                obj['cost_classify'] = ''
575
+              } else {
576
+         if (key == '*费用类别') {
577
+               obj['cost_classify'] = results[i][key].replace(/\s/g,"")
578
+              }
579
+          }
580
+
581
+        if (results[i]['*执行科室'] === undefined) {
582
+                obj['executive_section'] = ''
583
+              } else {
584
+         if (key == '*执行科室') {
585
+               obj['executive_section'] = results[i][key].replace(/\s/g,"")
586
+              }
587
+          }
588
+
589
+         if (results[i]['*医保等级'] === undefined) {
590
+                obj['medical_coverage'] = ''
591
+              } else {
592
+         if (key == '*医保等级') {
593
+               obj['medical_coverage'] = results[i][key].replace(/\s/g,"")
594
+              }
595
+          }
596
+         }
597
+         tableData.push(obj)
598
+         console.log("项目列表",tableData)
599
+        
600
+        var costClassify =  this.getDictionaryDataConfig('system','cost_classify')
601
+        console.log("费用类别",costClassify)
602
+        var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
603
+        console.log("医保等级",medicalInsuranceLevel)
604
+      
605
+        for(let i=0;i<tableData.length;i++){ 
606
+          for(let j=0;j<costClassify.length;j++){
607
+            console.log("222222",costClassify[j].name)
608
+             if(tableData[i].cost_classify === costClassify[j].name){
609
+                 tableData[i].cost_classify_id = costClassify[j].id
610
+             }
611
+          }  
612
+
613
+          for(let j=0;j<medicalInsuranceLevel.length;j++){
614
+             if(tableData[i].medical_coverage == medicalInsuranceLevel[j].name ){
615
+                 tableData[i].medical_insurance_level_id = medicalInsuranceLevel[j].id
616
+             }
617
+          }
618
+
619
+         
620
+          
621
+          for(let j=0;j<this.departMentList.length;j++){
622
+             if(tableData[i].executive_section == this.departMentList[j].name){
623
+                tableData[i].executive_section_id = this.departMentList[j].id
624
+             }
625
+          }
626
+        }
627
+       }
628
+
629
+       for(let i=0;i<tableData.length;i++){
630
+          tableData[i].price = parseInt(tableData[i].price)
631
+       }
632
+       
633
+       let params = {
634
+          'projects':tableData 
635
+        }
636
+       console.log("params2222",params)
637
+        postProjectInformation(params).then(response=>{
638
+           if(response.data.state == 1){
639
+             var msg =  response.data.data.msg
640
+             this.$message.success("导入成功!")
641
+           }else{
642
+             this.$message.error("导入失败")
643
+           }
644
+        })
645
+      },
646
+      generateTxt: function(log) {
647
+        var content = ''
648
+        var errlog = log.err_logs
649
+        content = this.getContent(log)
650
+        for (let i = 0; i < errlog.length; i++) {
651
+          if (content.length == 0) {
652
+            content = errlog[i].err_msg
653
+          } else {
654
+            content = content + '\n' + errlog[i].err_msg
655
+          }
656
+        }
657
+
658
+        var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
659
+        if (typeof url === 'object' && url instanceof Blob) {
660
+          url = URL.createObjectURL(url) // 创建blob地址
661
+        }
662
+        const aLink = document.createElement('a')
663
+        aLink.href = url
664
+        aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt'
665
+        aLink.click()
666
+
667
+      },
668
+      getContent(log) {
669
+         console.log("日志",log)
670
+        return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
671
+      },
672
+      timestampToTime(timestamp) {
673
+        var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
674
+        var Y = date.getFullYear() + '年'
675
+        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
676
+        var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
677
+        var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
678
+        var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
679
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
680
+        return Y + M + D + h + m + s
681
+      },
682
+       generateLog() {
683
+        let params = {
684
+          'log_type': 6
685
+        }
686
+        generateLog(params).then(
687
+          response => {
688
+            if (response.data.state === 1) {
689
+              this.logs = response.data.data.logs
690
+              this.exportLogVisible = true
691
+            } else {
692
+              this.$message.error(response.data.msg)
693
+            }
694
+          }
695
+        )
696
+      },
697
+      getDictionaryDataConfig(module, filed_name) {
698
+          return getDictionaryDataConfig(module, filed_name)
699
+      },
453 700
     },
454 701
     created(){
455 702
       this.getlist()

+ 1 - 0
src/xt_pages/data/components/tableson.vue View File

@@ -405,6 +405,7 @@ export default {
405 405
       this.$refs["dataForm"].validate(valid => {
406 406
         if (valid) {
407 407
           this.temp.field_type = parseInt(this.temp.field_type)
408
+         
408 409
           console.log("2222",this.temp.field_name)
409 410
           createChildConfig(this.temp).then(response => {
410 411
             if (!response.data) {

+ 2 - 2
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -295,7 +295,7 @@
295 295
         >
296 296
           <template slot-scope="scope">
297 297
             <span v-if="scope.row.execution_time != 0">
298
-              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
298
+              {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
299 299
             </span>
300 300
             <span v-else></span>
301 301
           </template>
@@ -385,7 +385,7 @@
385 385
         >
386 386
           <template slot-scope="scope">
387 387
             <span v-if="scope.row.execution_time != 0">
388
-              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
388
+              {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
389 389
             </span>
390 390
             <span v-else></span>
391 391
           </template>

+ 1 - 1
src/xt_pages/dialysis/dialysisDoctorAdvice.vue View File

@@ -149,7 +149,7 @@
149 149
         >
150 150
           <template slot-scope="scope">
151 151
             <span v-if="scope.row.execution_time != 0">
152
-              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
152
+              {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
153 153
             </span>
154 154
             <span v-else></span>
155 155
           </template>

+ 19 - 3
src/xt_pages/outpatientCharges/components/registerDialog.vue View File

@@ -182,7 +182,7 @@
182 182
 </template>
183 183
 
184 184
 <script>
185
-  import {uParseTime} from "@/utils/tools";
185
+  import {uParseTime,jsGetAge} from "@/utils/tools";
186 186
   import axios from 'axios'
187 187
   import {PostSearch} from '@/api/patient'
188 188
 
@@ -394,10 +394,23 @@
394 394
         this.form.id = val.id
395 395
         this.form.name = val.name
396 396
         this.form.gender = val.gender
397
-        this.form.age = val.age
398 397
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
399 398
         this.form.phone = val.phone
400 399
         this.form.id_card = val.id_card_no
400
+        var thisLen =  this.form.id_card.length;
401
+        var birth = "";
402
+        if (thisLen == 15) {
403
+          birth = "19" + this.form.id_card.substr(6, 6);
404
+        } else {
405
+          birth = this.form.id_card.substr(6, 8);
406
+        }
407
+        var births =
408
+                birth.substr(0, 4) +
409
+                "-" +
410
+                birth.substr(4, 2) +
411
+                "-" +
412
+                birth.substr(6, 2);
413
+        this.form.age = jsGetAge(births, "-");
401 414
       },
402 415
       querySearchAsync(keyword, cb) {
403 416
         let key = ''
@@ -468,6 +481,10 @@
468 481
       },
469 482
       show: function () {
470 483
         this.form = Object.assign({}, this.resetForm)
484
+        this.form.p_type = 14
485
+        this.form.sick_type = this.sick[0].id
486
+        this.form.diagnosis = this.diagnoses[0].id
487
+
471 488
         // this.form.name = patientInfo.name
472 489
         // this.form.gender = patientInfo.gender
473 490
         // this.form.age = patientInfo.age
@@ -479,7 +496,6 @@
479 496
         // this.form.id_card_type = 1
480 497
         // if( this.form.social_type == 0){
481 498
         //   this.form.social_type = ""
482
-        //
483 499
         // }
484 500
         this.visibility = true
485 501
 

+ 1 - 1
src/xt_pages/outpatientCharges/costComparison.vue View File

@@ -213,7 +213,7 @@
213 213
 
214 214
           var that = this
215 215
 
216
-          if (this.$store.getters.xt_user.org_id == 9919) {
216
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
217 217
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
218 218
               params: params
219 219
             })

+ 1 - 1
src/xt_pages/outpatientCharges/newStatementPrint.vue View File

@@ -152,7 +152,7 @@
152 152
 
153 153
       },
154 154
       getInfo(order_id) {
155
-        if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919) {
155
+        if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4  || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106) {
156 156
 
157 157
           var that = this
158 158
 

+ 135 - 110
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -65,10 +65,10 @@
65 65
                         </el-button>
66 66
 
67 67
                         <el-button
68
-                                   v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
69
-                                   size="small"
70
-                                   @click="sz_open(3)"
71
-                                   type="primary">收费
68
+                                v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
69
+                                size="small"
70
+                                @click="sz_open(3)"
71
+                                type="primary">收费
72 72
                         </el-button>
73 73
 
74 74
                         <el-button size="small" @click="sz_open(11)" type="primary"
@@ -86,7 +86,7 @@
86 86
                         <el-button size="small" @click="sz_open(10)" type="primary">打印</el-button>
87 87
 
88 88
                         <!--<el-button-->
89
-                                <!--size="small" @click="sz_open(7)" type="primary"-->
89
+                        <!--size="small" @click="sz_open(7)" type="primary"-->
90 90
                         <!--&gt;撤销明细-->
91 91
                         <!--</el-button>-->
92 92
                     </div>
@@ -103,13 +103,10 @@
103 103
                     <!--</el-button>-->
104 104
 
105 105
 
106
-
107
-
108 106
                     <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
109 107
                     <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
110 108
 
111 109
 
112
-
113 110
                     <div v-if="this.$store.getters.xt_user.org_id != 9504 && this.$store.getters.xt_user.org_id != 10028">
114 111
                         <el-button size="small" @click="open(3)" type="primary">打印</el-button>
115 112
                         <el-button v-loading="loadingone" size="small"
@@ -136,16 +133,16 @@
136 133
                         </el-button>
137 134
 
138 135
                         <el-button
139
-                                v-if="this.$store.getters.xt_user.org_id == 9919 "
136
+                                v-if="this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4  || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106"
140 137
                                 size="small" @click="open(10)" type="primary"
141 138
                         >退号
142 139
                         </el-button>
143 140
 
144
-                        <el-button
145
-                                v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"
146
-                                size="small" @click="open(11)" type="primary"
147
-                        >撤销明细
148
-                        </el-button>
141
+                        <!--<el-button-->
142
+                        <!--v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919  || this.$store.getters.xt_user.org_id == 9671  || this.$store.getters.xt_user.org_id == 10106"-->
143
+                        <!--size="small" @click="open(11)" type="primary"-->
144
+                        <!--&gt;撤销明细-->
145
+                        <!--</el-button>-->
149 146
 
150 147
                     </div>
151 148
                     <!--<el-button size="small" @click="query" type="primary"-->
@@ -340,7 +337,8 @@
340 337
         <register-dialog ref='register' :doctors="doctors" :department="department" :sick="sick" :diagnoses="diagnoses"
341 338
                          v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
342 339
 
343
-        <register-dialog9504 ref='register9504' :doctors="doctors" :departments="department" :sick="sick" :diagnoses="diagnoses"
340
+        <register-dialog9504 ref='register9504' :doctors="doctors" :departments="department" :sick="sick"
341
+                             :diagnoses="diagnoses"
344 342
                              v-on:confirm="registerConfirm" v-on:cancel="registerCancel"></register-dialog9504>
345 343
 
346 344
         <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
@@ -496,7 +494,7 @@
496 494
         treatVisible: false,
497 495
         orderObj: {},
498 496
         paramsObj: {},
499
-        newOrderObj:{},
497
+        newOrderObj: {},
500 498
         statementVisible: false,
501 499
         newStatementVisible: false,
502 500
 
@@ -527,7 +525,7 @@
527 525
     },
528 526
     methods: {
529 527
       query() {
530
-        if (this.$store.getters.xt_user.org_id == 9919) {
528
+        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106) {
531 529
           var that = this
532 530
           axios.get('http://127.0.0.1:9532/api/org/info', {
533 531
             params: {}
@@ -645,7 +643,7 @@
645 643
 
646 644
             })
647 645
 
648
-        } else if (this.$store.getters.xt_user.org_id == 9919) {
646
+        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106) {
649 647
           var that = this
650 648
           axios.get('http://127.0.0.1:9532/api/upload/get', {
651 649
             params: form,
@@ -660,17 +658,23 @@
660 658
                 that.$refs.charge.hide()
661 659
                 return false
662 660
               } else {
663
-                that.changeRadio(2)
664
-                that.radio = 2
661
+                if (response.data.data.failed_code == -10) {
665 662
 
666
-                that.$refs.charge.hide()
667
-                that.loadingtwo = false
668
-                that.state = '已收费'
669
-                that.$message({ message: '收费成功', type: 'success' })
670
-                that.loadingtwo = false
671
-                that.cal_one = this.cal_one - 1
672
-                that.cal_two = this.cal_two + 1
673
-                that.patientTableData.splice(this.current_index, 1)
663
+                  that.$message.error(response.data.data.msg)
664
+
665
+                } else {
666
+                  that.changeRadio(2)
667
+                  that.radio = 2
668
+
669
+                  that.$refs.charge.hide()
670
+                  that.loadingtwo = false
671
+                  that.state = '已收费'
672
+                  that.$message({ message: '收费成功', type: 'success', duration: 5000 })
673
+                  that.loadingtwo = false
674
+                  that.cal_one = this.cal_one - 1
675
+                  that.cal_two = this.cal_two + 1
676
+                  that.patientTableData.splice(this.current_index, 1)
677
+                }
674 678
               }
675 679
             })
676 680
             .catch(function(error) {
@@ -698,11 +702,10 @@
698 702
         }
699 703
       }, chargeCancel() {
700 704
         this.$refs.charge.hide()
701
-      },registerCancel(){
705
+      }, registerCancel() {
702 706
         this.$refs.register9504.hide()
703 707
 
704
-
705
-      },registerConfirm(forms){
708
+      }, registerConfirm(forms) {
706 709
         forms['record_time'] = this.record_date
707 710
         forms['admin_user_id'] = this.$store.getters.xt_user.user.id
708 711
         forms['org_id'] = this.$store.getters.xt_user.org_id
@@ -710,7 +713,7 @@
710 713
         this.loadingone = true
711 714
 
712 715
         var that = this
713
-        if ( this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
716
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
714 717
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
715 718
             params: forms,
716 719
             headers: {
@@ -794,7 +797,7 @@
794 797
 
795 798
         var that = this
796 799
 
797
-        if ( this.$store.getters.xt_user.org_id == 10028 ||  this.$store.getters.xt_user.org_id == 9504) {
800
+        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504) {
798 801
 
799 802
           axios.get('http://127.0.0.1:9532/sz/api/register/get', {
800 803
             params: forms,
@@ -867,7 +870,7 @@
867 870
 
868 871
             })
869 872
 
870
-        } else if (this.$store.getters.xt_user.org_id == 9919 ) {
873
+        } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106) {
871 874
 
872 875
           axios.get('http://127.0.0.1:9532/api/register/get', {
873 876
             params: forms,
@@ -882,53 +885,58 @@
882 885
                 that.$refs.register.hide()
883 886
                 return false
884 887
               } else {
885
-                that.$refs.register.hide()
886
-                let params = {
887
-                  'record_date': that.record_date
888
-                }
889
-                getChargeHisPatientList(params).then(response => {
890
-                  if (response.data.state == 0) {
891
-                    that.$message.error(response.data.msg)
892
-                    return false
893
-                  } else {
894
-                    that.loadingone = false
895
-
896
-                    that.patientTableData = []
897
-                    that.all_table_data = []
898
-                    that.hisPatientDatas = []
899
-
900
-                    let one_count = 0
901
-                    let two_count = 0
902
-                    let three_count = 0
903
-                    for (let i = 0; i < response.data.data.list.length; i++) {
904
-                      that.all_table_data.push(response.data.data.list[i])
905
-                      if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
906
-                        one_count = one_count + 1
907
-                        that.patientTableData.push(response.data.data.list[i])
908
-                      }
909
-                      if (response.data.data.list[i].order.order_status == 2) {
910
-                        two_count = two_count + 1
911
-                        that.patientTableData.push(response.data.data.list[i])
888
+                if (response.data.data.failed_code == -10) {
889
+                  that.$message.error(response.data.data.msg)
890
+                  return
891
+                } else {
892
+                  that.$refs.register.hide()
893
+                  let params = {
894
+                    'record_date': that.record_date
895
+                  }
896
+                  getChargeHisPatientList(params).then(response => {
897
+                    if (response.data.state == 0) {
898
+                      that.$message.error(response.data.msg)
899
+                      return false
900
+                    } else {
901
+
902
+                      that.loadingone = false
903
+                      that.$message({ message: '挂号成功', type: 'success' })
904
+
905
+                      that.patientTableData = []
906
+                      that.all_table_data = []
907
+                      that.hisPatientDatas = []
908
+                      let one_count = 0
909
+                      let two_count = 0
910
+                      let three_count = 0
911
+                      for (let i = 0; i < response.data.data.list.length; i++) {
912
+                        that.all_table_data.push(response.data.data.list[i])
913
+                        if (response.data.data.list[i].order.order_status == 0 || response.data.data.list[i].order.order_status == 1 || response.data.data.list[i].order.order_status == 3) {
914
+                          one_count = one_count + 1
915
+                          that.patientTableData.push(response.data.data.list[i])
916
+                        }
917
+                        if (response.data.data.list[i].order.order_status == 2) {
918
+                          two_count = two_count + 1
919
+                          that.patientTableData.push(response.data.data.list[i])
920
+                        }
912 921
                       }
913
-                    }
914
-                    that.hisPatientDatas = response.data.data.list_two
915
-                    that.cal_one = one_count
916
-                    that.cal_two = two_count
917
-                    that.cal_three = three_count
918
-                    that.current_index = 0
919
-
920
-                    for (let i = 0; i < that.patientTableData.length; i++) {
921
-                      if (this.patientTableData[i].id == this.patientInfo.id) {
922
-                        that.$refs.tab.setCurrentRow(that.patientTableData[i])
923
-                        that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
922
+                      that.hisPatientDatas = response.data.data.list_two
923
+                      that.cal_one = one_count
924
+                      that.cal_two = two_count
925
+                      that.cal_three = three_count
926
+                      that.current_index = 0
927
+                      for (let i = 0; i < that.patientTableData.length; i++) {
928
+                        if (this.patientTableData[i].id == this.patientInfo.id) {
929
+                          that.$refs.tab.setCurrentRow(that.patientTableData[i])
930
+                          that.getPatientInformation(that.patientTableData[i].id, that.patientTableData[i].order.number)
931
+                        }
924 932
                       }
933
+                      var his_info = response.data.data.his_info
934
+                      that.hisPatientInfo = his_info
935
+
925 936
                     }
926
-                    that.$message({ message: '挂号成功', type: 'success' })
927
-                    that.loadingone = false
928
-                    var his_info = response.data.data.his_info
929
-                    that.hisPatientInfo = his_info
930
-                  }
931
-                })
937
+
938
+                  })
939
+                }
932 940
               }
933 941
             })
934 942
             .catch(function(error) {
@@ -943,7 +951,7 @@
943 951
               return false
944 952
             } else {
945 953
               this.getPatientList()
946
-              this.$message({ message: '挂号成功', type: 'success' })
954
+              this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
947 955
               this.$refs.register.hide()
948 956
               this.loadingone = false
949 957
               var his_info = response.data.data.his_info
@@ -1487,7 +1495,7 @@
1487 1495
           }
1488 1496
 
1489 1497
         } else if (index == 5) {
1490
-          if (this.$store.getters.xt_user.org_id == 9919 ) {
1498
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106) {
1491 1499
 
1492 1500
             var that = this
1493 1501
             this.$confirm('是否退费', '退费', {
@@ -1513,9 +1521,13 @@
1513 1521
                     that.loadingtwo = false
1514 1522
                     return false
1515 1523
                   } else {
1516
-                    that.changeRadio(1)
1517
-                    that.$message({ message: '退费成功', type: 'success' })
1518
-                    that.loadingtwo = false
1524
+                    if (response.data.data.failed_code == -10) {
1525
+                      that.$message.error(response.data.data.msg)
1526
+                    } else {
1527
+                      that.changeRadio(1)
1528
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
1529
+                      that.loadingtwo = false
1530
+                    }
1519 1531
 
1520 1532
                   }
1521 1533
                 })
@@ -1582,7 +1594,7 @@
1582 1594
 
1583 1595
           var that = this
1584 1596
 
1585
-          if (this.$store.getters.xt_user.org_id == 9919) {
1597
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1586 1598
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
1587 1599
               params: params
1588 1600
             })
@@ -1632,27 +1644,40 @@
1632 1644
           // this.$refs.print.getInfo(this.order.id)
1633 1645
 
1634 1646
         } else if (index == 10) {
1635
-          let params = {
1647
+          var that = this
1648
+          this.$confirm('是否退号', '退号', {
1649
+            confirmButtonText: '确 定',
1650
+            cancelButtonText: '取 消',
1651
+            type: 'warning'
1652
+          }).then(() => {
1653
+            let params = {
1654
+              'patient_id': this.patientInfo.id,
1655
+              'record_time': this.record_date,
1656
+              'org_id': this.$store.getters.xt_user.org_id,
1657
+              'admin_user_id': this.$store.getters.xt_user.user.id
1658
+            }
1659
+            axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1660
+              params: params
1661
+            })
1662
+              .then(function(response) {
1663
+                if (response.data.state == 0) {
1664
+                  that.$message.error(response.data.msg)
1665
+                  return false
1666
+                } else {
1667
+                  if (response.data.data.failed_code == -10) {
1668
+                    that.$message.error(response.data.data.msg)
1669
+                  } else {
1670
+                    that.radio = 1
1671
+                    that.changeRadio(1)
1672
+                    that.$message({ message: '退号成功', type: 'success', duration: 5000 })
1673
+                  }
1636 1674
 
1637
-            'patient_id': this.patientInfo.id,
1638
-            'record_time': this.record_date,
1639
-            'org_id': this.$store.getters.xt_user.org_id
1640
-          }
1641
-          axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
1642
-            params: params
1675
+                }
1676
+              })
1677
+              .catch(function(error) {
1678
+              })
1679
+          }).catch(() => {
1643 1680
           })
1644
-            .then(function(response) {
1645
-              if (response.data.state == 0) {
1646
-                that.$message.error(response.data.msg)
1647
-                that.loadingtwo = false
1648
-                return false
1649
-              } else {
1650
-                that.$message({ message: '退号成功', type: 'success' })
1651
-                that.loadingtwo = false
1652
-              }
1653
-            })
1654
-            .catch(function(error) {
1655
-            })
1656 1681
         } else if (index == 11) {
1657 1682
           let params = {
1658 1683
             'order_id': this.order.id,
@@ -1670,7 +1695,8 @@
1670 1695
                 that.loadingtwo = false
1671 1696
                 return false
1672 1697
               } else {
1673
-                that.$message({ message: '退号成功', type: 'success' })
1698
+                // that.$message({ message: '退号成功', type: 'success' })
1699
+                that.$message({ message: '退明细成功', type: 'success', duration: 5000 })
1674 1700
                 that.loadingtwo = false
1675 1701
               }
1676 1702
             })
@@ -1719,7 +1745,7 @@
1719 1745
             })
1720 1746
         } else if (index == 15) {
1721 1747
           var that = this
1722
-          if (this.$store.getters.xt_user.org_id == 9919) {
1748
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106) {
1723 1749
 
1724 1750
             if (this.diagnosis.length || this.diagnosis == 0) {
1725 1751
               that.$message.error('诊断不能为空,请选择诊断内容')
@@ -1828,7 +1854,7 @@
1828 1854
 
1829 1855
           }
1830 1856
           this.loadingtwo = true
1831
-          if (this.$store.getters.xt_user.org_id == 9919 ) {
1857
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1832 1858
             var that = this
1833 1859
             axios.get('http://127.0.0.1:9532/api/pre_upload/get', {
1834 1860
               params: form
@@ -2528,7 +2554,7 @@
2528 2554
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
2529 2555
               params: params,
2530 2556
               headers: {
2531
-                'Permission': 5,
2557
+                'Permission': 5
2532 2558
               }
2533 2559
             })
2534 2560
               .then(function(response) {
@@ -2640,8 +2666,7 @@
2640 2666
 
2641 2667
                   } else {
2642 2668
 
2643
-                      that.$message({ message: '明细撤销成功', type: 'success' })
2644
-
2669
+                    that.$message({ message: '明细撤销成功', type: 'success' })
2645 2670
 
2646 2671
                   }
2647 2672
                 }
@@ -2657,7 +2682,7 @@
2657 2682
               patient_id: this.patient_id,
2658 2683
               prescription_id: this.prescription_id,
2659 2684
               order_id: this.order.id,
2660
-              admin_user_id: this.$store.getters.xt_user.user.id,
2685
+              admin_user_id: this.$store.getters.xt_user.user.id
2661 2686
 
2662 2687
             }
2663 2688
             this.newOrderObj = obj

+ 1 - 1
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -150,7 +150,7 @@ export default {
150 150
 
151 151
     },
152 152
     getInfo(order_id) {
153
-      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919) {
153
+      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4) {
154 154
 
155 155
         var that = this
156 156
 

+ 1 - 1
src/xt_pages/outpatientCharges/summary.vue View File

@@ -96,7 +96,7 @@
96 96
         <el-table-column align="center" prop="name" label="操作">
97 97
           <template slot-scope="scope">
98 98
             <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
99
-            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="(scope.row.order_status == 2 || $store.getters.xt_user.org_id == 9504) && (scope.row.order_status == 2 || $store.getters.xt_user.org_id == 9919)">结算单</el-button>
99
+            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4)">结算单</el-button>
100 100
           </template>
101 101
         </el-table-column>
102 102
       </el-table>

+ 10 - 5
src/xt_pages/outpatientCharges/summaryDetail.vue View File

@@ -29,11 +29,6 @@
29 29
                         </el-table-column>
30 30
 
31 31
 
32
-                        <el-table-column align="center" prop="statistical_classification" width="100" label="组">
33
-                          <template slot-scope="scope">
34
-                            {{getGroup(scope.row.statistical_classification)}}
35
-                          </template>
36
-                        </el-table-column>
37 32
                         <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
38 33
                           <template slot-scope="scope">{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</template>
39 34
 
@@ -65,6 +60,16 @@
65 60
 
66 61
                           </template>
67 62
                         </el-table-column>
63
+
64
+                          <el-table-column align="center" prop="name" width="60" label="总价">
65
+                              <template slot-scope="scope">
66
+                                  <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
67
+                                  {{scope.row.price}}元
68
+
69
+                              </template>
70
+                          </el-table-column>
71
+
72
+
68 73
                         <el-table-column align="center" prop="name" width="80" label="备注">
69 74
                           <template slot-scope="scope">
70 75
                             <!--<el-input v-model="scope.row.remark" readonly></el-input>-->

+ 10 - 0
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -1584,6 +1584,11 @@
1584 1584
             this.allDrugs = response.data.data.drugs
1585 1585
             this.advices_template = response.data.data.advices_template
1586 1586
             this.doctors = response.data.data.doctors
1587
+            for (let i = 0; i < this.doctors.length; i++){
1588
+              if(this.doctors[i].user_type == 1){
1589
+                this.doctors.splice(i,1)
1590
+              }
1591
+            }
1587 1592
             this.department = response.data.data.department
1588 1593
             this.sick = response.data.data.sick
1589 1594
             this.diagnoses = response.data.data.diagnose
@@ -1699,6 +1704,11 @@
1699 1704
 
1700 1705
       },
1701 1706
       setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
1707
+        for (let i = 0; i < doctors.length; i++){
1708
+          if(doctors[i].user_type == 1){
1709
+            doctors.splice(i,1)
1710
+          }
1711
+        }
1702 1712
 
1703 1713
         this.curMonthPrescriptions = {}
1704 1714
         this.curPrescriptions = {}

+ 6 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -748,6 +748,11 @@
748 748
             this.doctors = response.data.data.doctors
749 749
             this.department = response.data.data.department
750 750
 
751
+            for (let i = 0; i < this.doctors.length; i++){
752
+              if(this.doctors[i].user_type == 1){
753
+                this.doctors.splice(i,1)
754
+              }
755
+            }
751 756
 
752 757
             var month_prescriptions = response.data.data.month_prescriptions
753 758
             this.setMonthPrescription(month_prescriptions)
@@ -898,7 +903,7 @@
898 903
       },
899 904
 
900 905
       choosePatient(val) {
901
-        
906
+
902 907
         var nowDate = new Date()
903 908
         var nowYear = nowDate.getFullYear()
904 909
         var nowMonth = nowDate.getMonth() + 1

+ 177 - 20
src/xt_pages/outpatientRecord/outpatientRecord.vue View File

@@ -12,8 +12,16 @@
12 12
                                @click="searchAction">
13 13
                         搜索
14 14
                     </el-button>
15
+                    <!--<el-select v-model="is_put_on_record" style="width:160px;" placeholder="请选择" @change="changeStatus">-->
16
+                        <!--<el-option-->
17
+                                <!--v-for="item,index in datas"-->
18
+                                <!--:key="index"-->
19
+                                <!--:label="item.name"-->
20
+                                <!--:value="item.id">-->
21
+                        <!--</el-option>-->
22
+                    <!--</el-select>-->
15 23
                 </div>
16
-                <el-button size="small" type="primary" @click="dialogFormVisible = true">医保对账</el-button>
24
+                <!--<el-button size="small" type="primary" @click="dialogFormVisible = true">医保对账</el-button>-->
17 25
             </div>
18 26
             <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
19 27
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
@@ -28,17 +36,17 @@
28 36
                 >
29 37
                 </el-table-column>
30 38
                 <el-table-column align="center" prop="name" label="流水号">
31
-                    <template slot-scope="scope">{{scope.row.trt_dcla_detl_sn}}</template>
39
+                    <template slot-scope="scope">{{scope.row.record.trt_dcla_detl_sn}}</template>
32 40
                 </el-table-column>
33 41
                 <el-table-column align="center" prop="name" label="时间">
34
-                    <template slot-scope="scope" v-if="scope.row.ctime > 0">{{getTimes(scope.row.ctime)}}</template>
42
+                    <template slot-scope="scope" v-if="scope.row.record.ctime > 0">{{getTimes(scope.row.record.ctime)}}</template>
35 43
                 </el-table-column>
36 44
                 <el-table-column align="center" prop="name" label="姓名">
37 45
                     <template slot-scope="scope">{{scope.row.name}}</template>
38 46
                 </el-table-column>
39 47
                 <el-table-column align="center" prop="name" label="人员编号">
40 48
                     <template slot-scope="scope">
41
-                        <div>{{scope.row.psn_no}}</div>
49
+                        <div>{{scope.row.record.psn_no}}</div>
42 50
                     </template>
43 51
                 </el-table-column>
44 52
                 <el-table-column align="center" prop="name" label="联系电话">
@@ -84,19 +92,19 @@
84 92
 
85 93
                 <el-table-column align="center" prop="name" label="险种类型">
86 94
                     <template slot-scope="scope">
87
-                        <div v-if="scope.row.insutype == '310'">职工基本医疗保险</div>
88
-                        <div v-if="scope.row.insutype == '320'">公务员医疗补助</div>
89
-                        <div v-if="scope.row.insutype == '330'">大额医疗费用补助</div>
90
-                        <div v-if="scope.row.insutype == '340'">离休人员医疗保障</div>
91
-                        <div v-if="scope.row.insutype == '390'">城乡居民基本医疗保险</div>
92
-                        <div v-if="scope.row.insutype == '392'">城乡居民大病医疗保险</div>
93
-                        <div v-if="scope.row.insutype == '510'">生育保险</div>
95
+                        <div v-if="scope.row.record.insutype == '310'">职工基本医疗保险</div>
96
+                        <div v-if="scope.row.record.insutype == '320'">公务员医疗补助</div>
97
+                        <div v-if="scope.row.record.insutype == '330'">大额医疗费用补助</div>
98
+                        <div v-if="scope.row.record.insutype == '340'">离休人员医疗保障</div>
99
+                        <div v-if="scope.row.record.insutype == '390'">城乡居民基本医疗保险</div>
100
+                        <div v-if="scope.row.record.insutype == '392'">城乡居民大病医疗保险</div>
101
+                        <div v-if="scope.row.record.insutype == '510'">生育保险</div>
94 102
                     </template>
95 103
                 </el-table-column>
96 104
 
97 105
                 <el-table-column align="center" prop="name" label="疾病类型">
98 106
                     <template slot-scope="scope">
99
-                        <el-select style="width:100%;" v-model="scope.row.sick_type" placeholder="请选择">
107
+                        <el-select style="width:100%;" v-model="scope.row.record.sick_type" placeholder="请选择">
100 108
                             <el-option
101 109
                                     v-for="(item,index) in sick"
102 110
                                     :key="index"
@@ -109,9 +117,12 @@
109 117
 
110 118
                 <el-table-column prop="date" label="操作" width="80" align="center" fixed="right">
111 119
                     <template slot-scope="scope">
112
-                        <el-button type="primary" size="small" icon="el-icon-refresh-left">
113
-                            <span v-if="scope.row.record.is_cancel == 0 ||scope.row.record.is_cancel == 2" @click="putOnRecord(1,scope.row)">备案</span>
114
-                            <span v-if="scope.row.record.is_cancel == 1" @click="putOnRecord(2,scope.row)">撤消</span>
120
+                        <el-button type="primary" size="small" icon="el-icon-tickets" v-if="scope.row.record.is_cancel == 0 ||scope.row.record.is_cancel == 2" >
121
+                            <span @click="putOnRecord(1,scope.row)">备案</span>
122
+                        </el-button>
123
+
124
+                        <el-button type="danger" size="small" icon="el-icon-tickets" v-if="scope.row.record.is_cancel == 1" >
125
+                            <span @click="putOnRecord(2,scope.row)">撤消</span>
115 126
                         </el-button>
116 127
                     </template>
117 128
                 </el-table-column>
@@ -120,7 +131,7 @@
120 131
             <el-dialog title="备案" :visible.sync="dialogFormVisible">
121 132
                 <el-form :model="form" label-width="100px">
122 133
                     <el-form-item label="险种类型" :label-width="formLabelWidth">
123
-                        <el-select v-model="insutype" placeholder="请选择" style="width: 200px;">
134
+                        <el-select v-model="insutype_value" placeholder="请选择" style="width: 200px;">
124 135
                             <el-option
125 136
                                     v-for="item in insutypes"
126 137
                                     :key="item.value"
@@ -166,6 +177,19 @@
166 177
     },
167 178
     data() {
168 179
       return {
180
+        is_put_on_record:0,
181
+        datas: [
182
+          {
183
+            id: 0,
184
+            name: '全部'
185
+          }, {
186
+            id: 1,
187
+            name: '已备案'
188
+          }, {
189
+            id: 2,
190
+            name: '未备案'
191
+          }
192
+        ],
169 193
         currentObject: null,
170 194
         crumbs: [
171 195
           { path: false, name: '门诊收费' },
@@ -177,6 +201,8 @@
177 201
         patientLoading: false,
178 202
         sick: [],
179 203
         limit: 10,
204
+        insutype_value:"",
205
+        psn_no:"",
180 206
         page: 1,
181 207
         dialogFormVisible: false,
182 208
         total: 0,
@@ -195,6 +221,32 @@
195 221
             label: '明细'
196 222
           }
197 223
         ],
224
+        insutype_arr: [
225
+          {
226
+            value: '310',
227
+            label: '职工基本医疗保险'
228
+          }, {
229
+            value: '320',
230
+            label: '公务员医疗补助'
231
+          }, {
232
+            value: '330',
233
+            label: '大额医疗费用补助'
234
+          }, {
235
+            value: '340',
236
+            label: '离休人员医疗保障'
237
+          },
238
+          {
239
+            value: '390',
240
+            label: '城乡居民基本医疗保险'
241
+          }, {
242
+            value: '392',
243
+            label: '城乡居民大病医疗保险'
244
+          }, {
245
+            value: '510',
246
+            label: '生育保险'
247
+          }
248
+
249
+        ],
198 250
 
199 251
         insutypes: [
200 252
           {
@@ -226,10 +278,74 @@
226 278
       }
227 279
     },
228 280
     methods: {
281
+      changeStatus(id){
282
+        this.keywords = ""
283
+        this.getList()
284
+      },
285
+      getName(value){
286
+        console.log(value)
287
+        for(let i = 0; i < this.insutype_arr.length; i++){
288
+          console.log(this.insutype_arr[i].value)
289
+          if(this.insutype_arr[i].value == value){
290
+            return this.insutype_arr[i].label
291
+          }
292
+        }
293
+        return "未知"
294
+      },
295
+      getGdybPatientInfo(){
296
+        let params ={
297
+          id_card_no:this.currentObject.id_card_no,
298
+          admin_user_id:  this.$store.getters.xt_user.user.id,
299
+        }
300
+        var that = this
301
+        axios.get('http://127.0.0.1:9532/api/patient/info', {
302
+          params: params
303
+        })
304
+          .then(function(response) {
305
+            if (response.data.state == 0) {
306
+              that.$message.error(response.data.msg)
307
+              return false
308
+            } else {
309
+
310
+              if(response.data.data.failed_code == -10){
311
+                that.$message.error(response.data.data.msg)
312
+              }else{
313
+                that.dialogFormVisible = true
314
+                that.insutypes = []
315
+                that.psn_no =  response.data.data.info.output.baseinfo.psn_no
316
+                for (let i =0; i < response.data.data.info.output.insuinfo.length; i++){
317
+                  let obj = {
318
+                    value:response.data.data.info.output.insuinfo[i].insutype,
319
+                    label:""
320
+                  }
321
+                  for(let b = 0; b < that.insutype_arr.length; b++){
322
+                    if(that.insutype_arr[b].value == response.data.data.info.output.insuinfo[i].insutype){
323
+                      obj.label = that.insutype_arr[b].label
324
+                    }
325
+                  }
326
+                  if(response.data.data.info.output.insuinfo[i].psn_insu_stas == 1){
327
+                    obj.label =  obj.label
328
+
329
+                  }else{
330
+                    obj.label =  obj.label +"(已暂停)"
331
+                  }
332
+
333
+                  that.insutypes.push(obj)
334
+
335
+                }
336
+              }
337
+            }
338
+          })
339
+          .catch(function(error) {
340
+
341
+          })
342
+      },
229 343
       putOnRecord(type, row) {
230 344
         if (type == 1) {
231
-          this.dialogFormVisible = true
232 345
           this.currentObject = row
346
+
347
+          this.getGdybPatientInfo()
348
+
233 349
         } else {
234 350
           this.$confirm('是否撤销备案', '撤销备案', {
235 351
             confirmButtonText: '确 定',
@@ -237,7 +353,7 @@
237 353
             type: 'warning'
238 354
           }).then(() => {
239 355
             let params = {
240
-              'id': row.id,
356
+              'id': row.record.id,
241 357
               'admin_user_id': this.$store.getters.xt_user.user.id
242 358
 
243 359
             }
@@ -299,9 +415,34 @@
299 415
 
300 416
       },
301 417
       confirm() {
418
+        if(this.currentObject.record.doctor_id == '' || this.currentObject.record.doctor_id  == 0){
419
+          this.$message.error("请选择医生")
420
+          return
421
+        }
422
+
423
+        if(this.currentObject.record.department_id == '' || this.currentObject.record.department_id  == 0){
424
+          this.$message.error("请选择科室")
425
+          return
426
+        }
427
+
428
+        if(this.currentObject.record.sick_type == '' || this.currentObject.record.sick_type  == 0){
429
+          this.$message.error("请选择疾病类型")
430
+          return
431
+        }
432
+
433
+        if(this.currentObject.record.insutype_value == '' || this.currentObject.record.insutype_value  == 0){
434
+          this.$message.error("请选择险种")
435
+          return
436
+        }
437
+
302 438
         let params = {
303 439
           record_type: 0,
304 440
           patient_id: this.currentObject.id,
441
+          insutype: this.insutype_value,
442
+          psn_no: this.psn_no,
443
+          sick_id: this.currentObject.record.sick_type,
444
+          doctor_id: this.currentObject.record.doctor_id,
445
+          department_id:this.currentObject.record.department_id,
305 446
           admin_user_id: this.$store.getters.xt_user.user.id
306 447
         }
307 448
 
@@ -317,9 +458,20 @@
317 458
               if(response.data.data.failed_code == -10){
318 459
                 that.$message.error(response.data.data.msg)
319 460
               }else{
461
+                that.$message.success("备案成功")
462
+                that.dialogFormVisible = false
320 463
                 for (let i = 0; i < that.tableData.length; i++) {
321 464
                   if (that.tableData[i].id == that.currentObject.id) {
322
-                    that.tableData[i].record.is_cancel == 1
465
+                    that.tableData[i].record.is_cancel =response.data.data.result.is_cancel
466
+                    that.tableData[i].record.id = response.data.data.result.id
467
+                    that.tableData[i].record.trt_dcla_detl_sn = response.data.data.result.trt_dcla_detl_sn
468
+                    that.tableData[i].record.psn_no = response.data.data.result.psn_no
469
+                    that.tableData[i].record.doctor_id = response.data.data.result.doctor_id
470
+                    that.tableData[i].record.department_id = response.data.data.result.department_id
471
+                    that.tableData[i].record.ctime = response.data.data.result.ctime
472
+                    that.tableData[i].record.insutype = response.data.data.result.insutype
473
+                    that.tableData[i].record.sick_type = response.data.data.result.sick_type
474
+
323 475
                   }
324 476
                 }
325 477
               }
@@ -356,7 +508,8 @@
356 508
         let params = {
357 509
           'page': this.page,
358 510
           'limit': this.limit,
359
-          'keywords': this.keywords
511
+          'keywords': this.keywords,
512
+          'is_put_on_record':this.is_put_on_record
360 513
         }
361 514
         this.tableData = []
362 515
         this.patientLoading = true
@@ -381,6 +534,10 @@
381 534
                 this.tableData[i].record.department_id = ''
382 535
               }
383 536
 
537
+              if (this.tableData[i].record.sick_type == 0) {
538
+                this.tableData[i].record.sick_type = ''
539
+              }
540
+
384 541
             }
385 542
 
386 543
           }

+ 31 - 13
src/xt_pages/outpatientRegistration/index.vue View File

@@ -427,7 +427,7 @@
427 427
     saveHisPatient
428 428
   } from '@/api/project/project'
429 429
   import { getDictionaryDataConfig } from '@/utils/data'
430
-  import { uParseTime } from '@/utils/tools'
430
+  import { uParseTime,jsGetAge } from '@/utils/tools'
431 431
   import { getInitData } from '@/api/his/his'
432 432
   import axios from 'axios'
433 433
 
@@ -655,6 +655,21 @@
655 655
         this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
656 656
         this.form.phone = val.phone
657 657
         this.form.idCard = val.id_card_no
658
+
659
+        var thisLen =  this.form.idCard.length;
660
+        var birth = "";
661
+        if (thisLen == 15) {
662
+          birth = "19" + this.form.idCard.substr(6, 6);
663
+        } else {
664
+          birth = this.form.idCard.substr(6, 8);
665
+        }
666
+        var births =
667
+          birth.substr(0, 4) +
668
+          "-" +
669
+          birth.substr(4, 2) +
670
+          "-" +
671
+          birth.substr(6, 2);
672
+        this.form.age = jsGetAge(births, "-");
658 673
       },
659 674
       querySearchAsync(keyword, cb) {
660 675
         let key = ''
@@ -900,11 +915,6 @@
900 915
           return
901 916
         }
902 917
 
903
-        // if (this.form.p_type == '') {
904
-        //   this.$message.error('处方类型不能为空')
905
-        //   this.is_Name = true
906
-        //   return
907
-        // }
908 918
 
909 919
         this.$refs[formName].validate((valid) => {
910 920
           if (valid) {
@@ -965,7 +975,7 @@
965 975
                 .catch(function(error) {
966 976
 
967 977
                 })
968
-            } else if (this.$store.getters.xt_user.org_id == 9919) {
978
+            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
969 979
               var that = this
970 980
 
971 981
               axios.get('http://127.0.0.1:9532/api/register/get', {
@@ -981,11 +991,15 @@
981 991
                     that.$refs.register.hide()
982 992
                     return false
983 993
                   } else {
984
-                    that.$refs.register.hide()
985
-                    that.getPatientList()
986
-                    that.$message({ message: '挂号成功', type: 'success' })
987
-                    that.loadingone = false
988
-
994
+                    if (response.data.data.failed_code == -10) {
995
+                      that.$message.error(response.data.data.msg)
996
+                      return
997
+                    } else {
998
+                      that.$refs.register.hide()
999
+                      that.getPatientList()
1000
+                      that.$message({ message: '挂号成功', type: 'success' })
1001
+                      that.loadingone = false
1002
+                    }
989 1003
                     // var his_info = response.data.data.his_info
990 1004
                     // that.hisPatientInfo = his_info
991 1005
                   }
@@ -1172,7 +1186,7 @@
1172 1186
                 .catch(function(error) {
1173 1187
 
1174 1188
                 })
1175
-            } else if (this.$store.getters.xt_user.org_id == 9919) {
1189
+            } else if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106) {
1176 1190
               var that = this
1177 1191
 
1178 1192
               axios.get('http://127.0.0.1:9532/api/register/get', {
@@ -1302,6 +1316,10 @@
1302 1316
             this.sick = response.data.data.sick
1303 1317
             this.diagnoses = response.data.data.diagnose
1304 1318
 
1319
+            this.form.p_type = 14
1320
+            this.form.sick_type = this.sick[0].id
1321
+            this.form.diagnosis = this.diagnoses[0].id
1322
+
1305 1323
           }
1306 1324
         })
1307 1325
 

+ 66 - 5
src/xt_pages/stock/detail/print.vue View File

@@ -53,13 +53,24 @@
53 53
                 <span v-if="stock.type && stock.type.type_name.length > 0">{{stock.type.type_name}}</span>
54 54
               </td> -->
55 55
               <td style="line-height: 50px">
56
-                <span v-if="type == 3">{{getStockCount(stock.id)}}</span>
57
-                 <span v-else>{{calCount(stock)}}</span> 
56
+                <span v-if="type == 3">
57
+                  <span v-if="org_id == 10090">{{getWareOut(stock.id)}}</span>
58
+                  <span else>{{getStockCount(stock.id)}}</span>
59
+                </span>
60
+                <span v-else>{{calCount(stock)}}</span> 
58 61
               </td>
59 62
               <td style="line-height:50px" v-if="type == 1 && stock.query_warehousing_info.length > 0">{{stock.query_warehousing_info[0].price}}</td>
60
-              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">{{stock.query_warehouseout_info[0].price}}</td>
63
+              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">
64
+                <!-- {{stock.query_warehouseout_info[0].price}} -->
65
+                {{getReailPrice(stock.id)}}
66
+              </td>
61 67
               <td style="line-height: 50px" v-if="type == 1">{{calTotal(stock)}}</td>
62
-              <td style="line-height: 50px" v-if="type == 3">{{(getStockCount(stock.id) * stock.query_warehouseout_info[0].price).toFixed(2)}}</td>
68
+              <td style="line-height: 50px" v-if="type == 3">
69
+                
70
+                  <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
71
+                  <span v-else>{{(getStockCount(stock.id) * getPrice(stock.id)).toFixed(2)}}</span> 
72
+               
73
+             </td>
63 74
               <td style="line-height: 50px"></td>
64 75
             </tr>
65 76
             </tbody>
@@ -124,7 +135,10 @@
124 135
         type: this.$route.query.type,
125 136
         start_time: this.$route.query.start_time,
126 137
         end_time: this.$route.query.end_time,
127
-        stockTotal:[]
138
+        stockTotal:[],
139
+        wareOutInfo:[],
140
+        org_id:0,
141
+        informationList:[]
128 142
       }
129 143
     },
130 144
     methods: {
@@ -172,6 +186,16 @@
172 186
             console.log("stocktOTl",stockTotal)
173 187
             this.stockTotal = stockTotal
174 188
             console.log("导出数据",response.data.data.list)
189
+            var info = response.data.data.info
190
+            console.log("infor2222222",info)
191
+            this.wareOutInfo = info
192
+            var org_id = response.data.data.orgid
193
+            console.log("org_id",org_id)
194
+            this.org_id = org_id
195
+
196
+            var informationlist = response.data.data.infomationList
197
+            console.log('数据列表',informationlist)
198
+            this.informationList = informationlist
175 199
             for (let i = 0; i < response.data.data.list.length; i++) {
176 200
               if (this.type == 1) {
177 201
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
@@ -323,6 +347,43 @@
323 347
           }
324 348
        }
325 349
        return count
350
+     },
351
+     getWareOut(id){
352
+      var count = ""
353
+      for(let i=0;i<this.wareOutInfo.length;i++){
354
+         if(id == this.wareOutInfo[i].good_id){
355
+            count = this.wareOutInfo[i].count
356
+         }
357
+      }
358
+      return count
359
+     },
360
+     getPrice(id){
361
+       var sum = ""
362
+       for(let i=0;i<this.informationList.length;i++){
363
+        for(let j=0;j<this.wareOutInfo.length;j++){
364
+           if(this.informationList[i].id == this.wareOutInfo[j].good_id){
365
+             this.wareOutInfo[j].retail_price =  this.informationList[i].retail_price 
366
+           }
367
+        }
368
+       }
369
+      
370
+       for(let j=0;j<this.wareOutInfo.length;j++){
371
+         if(id == this.wareOutInfo[j].good_id){
372
+            sum += (this.wareOutInfo[j].retail_price * this.wareOutInfo[j].count).toFixed(2)
373
+         }
374
+       }
375
+       
376
+       return sum
377
+       
378
+     },
379
+     getReailPrice(id){
380
+       var price = 0
381
+       for(let i=0;i<this.informationList.length;i++){
382
+          if(id == this.informationList[i].id){
383
+             price = this.informationList[i].retail_price
384
+          }
385
+       }
386
+       return price
326 387
      }
327 388
     },
328 389
     created() {

+ 2 - 0
src/xt_pages/stock/drugs/drugStockInOrder.vue View File

@@ -397,6 +397,7 @@ export default {
397 397
           for (let i = 0; i < response.data.data.list.length; i++) {
398 398
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
399 399
           }
400
+          
400 401
         }
401 402
       });
402 403
     },
@@ -421,6 +422,7 @@ export default {
421 422
           for (let i = 0; i < response.data.data.list.length; i++) {
422 423
             this.Warehouse.warehouseDate.push(response.data.data.list[i]);
423 424
           }
425
+          console.log("列表",this.warehouse.warehouseDate)
424 426
         }
425 427
       });
426 428
     },

+ 12 - 1
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue View File

@@ -586,10 +586,21 @@ export default {
586 586
               return;
587 587
             }
588 588
           }
589
+          for(let i=0;i<this.recordInfo.recordData.length;i++){
590
+             if(this.recordInfo.recordData[i].dealer == ""){
591
+                this.recordInfo.recordData[i].dealer = 0
592
+             }
593
+             
594
+             if(this.recordInfo.recordData[i].manufacturer == ""){
595
+               this.recordInfo.recordData[i].manufacturer = 0
596
+             }
597
+            
598
+          }
589 599
           const params = {
590 600
             stockIn: this.recordInfo.recordData
591 601
           };
592
-
602
+          console.log("params",params)
603
+         
593 604
           EditDrugWarehouse(
594 605
             params,
595 606
             this.warehousing_time,

+ 18 - 3
src/xt_pages/stock/stockOutOrderDetailPrint.vue View File

@@ -35,8 +35,8 @@
35 35
                                     <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
36 36
                                     <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
37 37
                                     <td>{{item.price}}</td>
38
-                                    <td>{{getOutStockCount(item.good_id)}}</td> 
39
-                                    <td>{{(getOutStockCount(item.good_id)*item.price).toFixed(2)}}</td>
38
+                                    <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td> 
39
+                                    <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
40 40
                                 </tr>
41 41
                                 <tr>
42 42
                                   <td>合计</td>
@@ -98,7 +98,8 @@ export default {
98 98
             is_use:"",
99 99
             good_kind:"",
100 100
             is_charge:"",
101
-            list:[]
101
+            list:[],
102
+            wareoutList:[],
102 103
         }
103 104
     },
104 105
     methods:{
@@ -147,6 +148,10 @@ export default {
147 148
               total_price += this.getOutStockCount(this.warehousingOutInfo.warehousingOutData[i].good_id)*this.warehousingOutInfo.warehousingOutData[i].price
148 149
             }
149 150
            this.allPrice = total_price
151
+
152
+           var wareoutList =  response.data.data.wareoutList
153
+           console.log("出库数据",wareoutList)
154
+           this.wareoutList = wareoutList
150 155
           }
151 156
         })
152 157
       },
@@ -241,6 +246,16 @@ export default {
241 246
         }
242 247
         return ""
243 248
       },
249
+
250
+      getWarehouseOutInfoCount(warehouse_out_id,good_id){
251
+        var count = 0 
252
+         for(let i=0;i<this.wareoutList.length;i++){
253
+            if(warehouse_out_id == this.wareoutList[i].warehouse_out_id && good_id == this.wareoutList[i].good_id){
254
+                count = this.wareoutList[i].count
255
+            }
256
+         }
257
+        return count
258
+      }
244 259
       
245 260
     },
246 261
     created(){

+ 1 - 1
src/xt_pages/stock/stockQuery.vue View File

@@ -383,7 +383,7 @@ export default {
383 383
     },
384 384
 
385 385
     exportList(){
386
-         console.log("2222222",this.WarehouseInfo.warehouseInfoDate)
386
+      
387 387
          import('@/vendor/Export2Excel').then(excel => {
388 388
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
389 389
          const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 

+ 8 - 24
src/xt_pages/user/patients.vue View File

@@ -134,7 +134,7 @@
134 134
         </el-button>
135 135
       </div>
136 136
 
137
-      <el-button  type="primary" plain style="float:right;" icon="el-icon-download" @click="putOnRecord(2,{})" >备案</el-button>
137
+      <!-- <el-button  type="primary" plain style="float:right;" icon="el-icon-download" @click="putOnRecord(2,{})" >备案</el-button> -->
138 138
 
139 139
     </div>
140 140
     <div class="app-container">
@@ -453,21 +453,6 @@
453 453
               ></el-button>
454 454
             </el-tooltip>
455 455
 
456
-            <el-tooltip
457
-                    class="item"
458
-                    effect="dark"
459
-                    content="备案"
460
-                    placement="top"
461
-            >
462
-              <el-button
463
-                      type="danger"
464
-                      icon="el-icon-tickets"
465
-                      size="small"
466
-                      @click="
467
-                  putOnRecord(1,scope.row)
468
-                "
469
-              ></el-button>
470
-            </el-tooltip>
471 456
           </template>
472 457
         </el-table-column>
473 458
       </el-table>
@@ -861,9 +846,7 @@
861 846
 
862 847
       },
863 848
       handleSuccess({ results, header }) {
864
-        console.log("999999999")
865
-
866
-        console.log(results)
849
+        console.log("header22222",results)
867 850
         if (header != undefined && header.length > 0) {
868 851
           var isHasName = header.includes('*姓名')
869 852
           var isHasGender = header.includes('*性别')
@@ -888,8 +871,7 @@
888 871
           this.dialogVisible = true
889 872
           return
890 873
         }
891
-        getMaxDialysisNo().then(
892
-          response => {
874
+        getMaxDialysisNo().then(response => {
893 875
             if (response.data.state === 1) {
894 876
               this.max_dialysis_no = response.data.data.dialysis_no
895 877
               if (this.max_dialysis_no == 0) {
@@ -1080,7 +1062,7 @@
1080 1062
                     }
1081 1063
                   }
1082 1064
 
1083
-                  // console.log(obj)
1065
+                  console.log("2222222",obj)
1084 1066
 
1085 1067
                   if (results[i]['家庭住址'] === undefined) {
1086 1068
                     obj['home_address'] = ''
@@ -1090,12 +1072,12 @@
1090 1072
                     }
1091 1073
                   }
1092 1074
                 }
1093
-
1075
+               
1094 1076
                 this.export_date.push(obj)
1095 1077
               }
1096 1078
 
1097 1079
               let index = 0
1098
-
1080
+             
1099 1081
               for (let i = 0; i < this.export_date.length; i++) {
1100 1082
                 if (this.export_date[i].dialysis_no == '') {
1101 1083
                   let new_dialysis_no = this.max_dialysis_no + index
@@ -1186,6 +1168,8 @@
1186 1168
               let params = {
1187 1169
                 'patients': this.export_date
1188 1170
               }
1171
+              console.log("export2222",this.export_date)
1172
+              
1189 1173
               postExportPatients(params).then(
1190 1174
                 response => {
1191 1175
                   if (response.data.state === 1) {

+ 93 - 102
src/xt_pages/workforce/appointment.vue View File

@@ -215,6 +215,7 @@
215 215
         clen:7,
216 216
         nowYear: new Date().getFullYear(),
217 217
         schedule_week:0,
218
+        newDay:[]
218 219
 
219 220
       }
220 221
     },
@@ -478,6 +479,8 @@
478 479
             '区号',
479 480
             '机号'
480 481
           ]
482
+        if(this.export_type == 0){
483
+             
481 484
           const multiHeader = [['区号', '机号', '周一'+"("+this.days[0]+")" , '', '', '周二'+"("+this.days[1]+")", '', '', '周三'+"("+this.days[2]+")" , '', '', '周四'+"("+this.days[3]+")" , '', '', '周五'+"("+this.days[4]+")" , '', '', '周六'+"("+this.days[5]+")" , '', '', '周日'+"("+this.days[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
482 485
           const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
483 486
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
@@ -502,13 +505,11 @@
502 505
               obj['机号'] = jihaos[b].number.toString()
503 506
               list.push(obj)
504 507
             }
505
-
506 508
             i++
507 509
           }
508 510
           console.log("listw22222222",list)
509 511
             var data = []
510
-          // const data = this.formatJson(filterVal, this.tableList)
511
-        
512
+
512 513
           this.tableList.map(item=>{
513 514
             data.push(Object.values(item))
514 515
 
@@ -516,6 +517,7 @@
516 517
           console.log("data",data)
517 518
           
518 519
           const filename = '排班模版'
520
+        
519 521
           excel.export_json_to_excel({
520 522
             multiHeader,
521 523
             header,
@@ -524,6 +526,55 @@
524 526
             filename
525 527
           })
526 528
           this.downloadLoading = false
529
+          }
530
+          
531
+          if(this.export_type == 1){
532
+            console.log("333333",this.newDay)
533
+             const multiHeader = [['区号', '机号', '周一'+"("+this.newDay[0]+")" , '', '', '周二'+"("+this.newDay[1]+")", '', '', '周三'+"("+this.newDay[2]+")" , '', '', '周四'+"("+this.newDay[3]+")" , '', '', '周五'+"("+this.newDay[4]+")" , '', '', '周六'+"("+this.newDay[5]+")" , '', '', '周日'+"("+this.newDay[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
534
+             const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
535
+             const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
536
+            var list = []
537
+            let i = 0
538
+            for (let key  in this.partitions) {
539
+              var tempValue
540
+              var jihaos = this.partitions[key].jihaos
541
+
542
+              if (i == 0) {
543
+                let m = 'A3' + ':' + 'A' + (2 + jihaos.length)
544
+                tempValue = (2 + jihaos.length)
545
+                merges.push(m)
546
+              } else {
547
+                let m = 'A' + (tempValue + 1) + ':' + 'A' + ((tempValue + 1) + jihaos.length - 1)
548
+                tempValue = ((tempValue + 1) + jihaos.length - 1)
549
+                merges.push(m)
550
+              }
551
+              for (let b = 0; b < jihaos.length; b++) {
552
+                let obj = {}
553
+                obj['区号'] = this.partitions[key].name
554
+                obj['机号'] = jihaos[b].number.toString()
555
+                list.push(obj)
556
+              }
557
+              i++
558
+            }
559
+          
560
+            var data = []
561
+            this.tableList.map(item=>{
562
+              data.push(Object.values(item))
563
+
564
+            })
565
+            console.log("data",data)
566
+            
567
+            const filename = '排班模版'
568
+           
569
+            excel.export_json_to_excel({
570
+              multiHeader,
571
+              header,
572
+              merges,
573
+              data,
574
+              filename
575
+            })
576
+            this.downloadLoading = false
577
+          }
527 578
         })
528 579
       },
529 580
       export_fileTwo:function(){
@@ -1115,6 +1166,7 @@
1115 1166
             return false
1116 1167
           }
1117 1168
           this.days = response.data.data.days
1169
+          console.log("日期22222222",this.days)
1118 1170
         })
1119 1171
       },
1120 1172
       getWeekByResultsStr(key) {
@@ -2016,100 +2068,7 @@
2016 2068
                 for (let b = 0; b < jihaos.length; b++) {
2017 2069
                  var obj = {}
2018 2070
 
2019
-                  // obj['区号'] = partitions[key].name
2020
-                  // obj['机号'] = jihaos[b].number.toString()
2021
-
2022
-
2023
-                  // obj['上午'] = ''
2024
-                  // obj['下午'] = ''
2025
-                  // obj['晚上'] = ''
2026
-
2027
-                  // obj['上午1'] = ''
2028
-                  // obj['下午1'] = ''
2029
-                  // obj['晚上1'] = ''
2030
-
2031
-                  // obj['上午2'] = ''
2032
-                  // obj['下午2'] = ''
2033
-                  // obj['晚上2'] = ''
2034
-
2035
-                  // obj['上午3'] = ''
2036
-                  // obj['下午3'] = ''
2037
-                  // obj['晚上3'] = ''
2038
-
2039
-                  // obj['上午4'] = ''
2040
-                  // obj['下午4'] = ''
2041
-                  // obj['晚上4'] = ''
2042
-
2043
-
2044
-                  // obj['上午5'] = ''
2045
-                  // obj['下午5'] = ''
2046
-                  // obj['晚上5'] = ''
2047
-
2048
-                  // obj['上午6'] = ''
2049
-                  // obj['下午6'] = ''
2050
-                  // obj['晚上6'] = ''
2051
-
2052
-                  // obj['上午7'] = ''
2053
-                  // obj['下午7'] = ''
2054
-                  // obj['晚上7'] = ''
2055
-
2056
-                  // obj['上午8'] = ''
2057
-                  // obj['下午8'] = ''
2058
-                  // obj['晚上8'] = ''
2059
-
2060
-                  // obj['上午9'] = ''
2061
-                  // obj['下午9'] = ''
2062
-                  // obj['晚上9'] = ''
2063
-
2064
-                  // obj['上午10'] = ''
2065
-                  // obj['下午10'] = ''
2066
-                  // obj['晚上10'] = ''
2067
-
2068
-                  // obj['上午11'] = ''
2069
-                  // obj['下午11'] = ''
2070
-                  // obj['晚上11'] = ''
2071
-
2072
-
2073
-                  // obj['上午12'] = ''
2074
-                  // obj['下午12'] = ''
2075
-                  // obj['晚上12'] = ''
2076
-
2077
-                  // obj['上午13'] = ''
2078
-                  // obj['下午13'] = ''
2079
-                  // obj['晚上13'] = ''
2080
-
2081
-
2082
-                  // obj['上午14'] = ''
2083
-                  // obj['下午14'] = ''
2084
-                  // obj['晚上14'] = ''
2085
-
2086
-
2087
-                  // obj['上午15'] = ''
2088
-                  // obj['下午15'] = ''
2089
-                  // obj['晚上15'] = ''
2090
-
2091
-                  // obj['上午16'] = ''
2092
-                  // obj['下午16'] = ''
2093
-                  // obj['晚上16'] = ''
2094
-
2095
-                  // obj['上午17'] = ''
2096
-                  // obj['下午17'] = ''
2097
-                  // obj['晚上17'] = ''
2098
-
2099
-                  // obj['上午18'] = ''
2100
-                  // obj['下午18'] = ''
2101
-                  // obj['晚上18'] = ''
2102
-
2103
-                  // obj['上午19'] = ''
2104
-                  // obj['下午19'] = ''
2105
-                  // obj['晚上19'] = ''
2106
-
2107
-
2108
-                  // obj['上午20'] = ''
2109
-                  // obj['下午20'] = ''
2110
-                  // obj['晚上20'] = ''
2111
-
2112
-
2071
+                
2113 2072
                   obj['区号'] = partitions[key].name
2114 2073
                   obj['机号'] = jihaos[b].number.toString()
2115 2074
 
@@ -2233,7 +2192,7 @@
2233 2192
               console.log("下下周数据时间",laststart)
2234 2193
               var lastend = this.getTimestamp(last_end) - 28800
2235 2194
               console.log("下下周数据时间",lastend)
2236
-
2195
+               
2237 2196
               if(this.export_type == 0){
2238 2197
                 for(let i = 0;i<scheduleList.length;i++){
2239 2198
                  if(scheduleList[i].schedule_date >= start && scheduleList[i].schedule_date<=end){
@@ -2246,7 +2205,7 @@
2246 2205
                  if(scheduleList[i].schedule_date>=laststart && scheduleList[i].schedule_date<=lastend){
2247 2206
                    lastWeek.push(scheduleList[i])
2248 2207
                  }
2249
-              }
2208
+               }
2250 2209
               }
2251 2210
 
2252 2211
             if(this.export_type == 1){
@@ -2346,7 +2305,7 @@
2346 2305
                   }
2347 2306
 
2348 2307
                }
2349
-             }
2308
+              }
2350 2309
              }
2351 2310
 
2352 2311
              console.log("list5555555555",list)
@@ -2576,12 +2535,44 @@
2576 2535
        },
2577 2536
 
2578 2537
        changeWeek(val){
2579
-         console.log("Val",val)
2538
+       
2580 2539
          var start = this.getTimestamp(val) - 57600
2581
-         console.log("start",start)
2540
+        //  console.log("第一天时间错",start)
2582 2541
          this.start_time = this.getTime(start)
2542
+        //  console.log("第一天",this.start_time)
2543
+         this.newDay.push(this.start_time)  
2544
+         var next = start + 86400
2545
+         var nest_day = this.getTime(next)
2546
+        //  console.log("第二天",nest_day)
2547
+         this.newDay.push(nest_day)
2548
+         var last_days = start + 172800
2549
+         
2550
+         var last_day = this.getTime(last_days)
2551
+        //  console.log("第三天",last_day)
2552
+         this.newDay.push(last_day)
2553
+         
2554
+         var tuesdays = start + 259200
2555
+        //  console.log("tuesdays",tuesdays)
2556
+         var tuesday =  this.getTime(tuesdays)
2557
+        //  console.log("第四天",tuesday)
2558
+         this.newDay.push(tuesday)
2559
+         var fivdays = start + 345600
2560
+         var fiveday = this.getTime(fivdays)
2561
+        //  console.log("第五天",fiveday)
2562
+         this.newDay.push(fiveday)
2563
+         var sixday =  start + 432000
2564
+         var sixdays = this.getTime(sixday)
2565
+        //  console.log("第六天",sixdays)
2566
+         this.newDay.push(sixdays)
2583 2567
          var end = this.getTimestamp(val) + 460800
2568
+       
2584 2569
          this.end_time = this.getTime(end)
2570
+        //  console.log("第七天",this.end_time)
2571
+         this.newDay.push(this.end_time)
2572
+      
2573
+     
2574
+
2575
+         console.log("33333333",this.newDay)
2585 2576
          this.export_type = 1
2586 2577
          this.getThreeWeekList()
2587 2578
        },