Преглед на файлове

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

csx преди 3 години
родител
ревизия
fc5f0e4b45

+ 1 - 1
src/api/his/his_config.js Целия файл

@@ -11,7 +11,7 @@ export function getPatientList(params) {
11 11
 }
12 12
 
13 13
 
14
-export function getPrescriptiontemplateList(params) {
14
+export function getPrescriptionTemplateList(params) {
15 15
   return request({
16 16
     url: "/api/his/prescriptiontemplate/list",
17 17
     method: "get",

+ 30 - 9
src/xt_pages/data/components/addInspection.vue Целия файл

@@ -46,16 +46,17 @@
46 46
                 </el-form-item>
47 47
 
48 48
                 <el-form-item label="组套明细" style="width:50%;">
49
-                    <el-select v-model="form.project_detail" placeholder="请选择">
50
-                        <el-option
51
-                                v-for="item in projectList"
52
-                                :key="item.id"
53
-                                :label="item.project_name"
54
-                                :value="item.id">
55
-                        </el-option>
56
-                    </el-select>
49
+                    <el-autocomplete
50
+                            class="inline-input"
51
+                            v-model="form.project_detail"
52
+                            :fetch-suggestions="querySearch"
53
+                            placeholder="请输入内容"
54
+                            @select="handleSelect"
55
+                    ></el-autocomplete>
57 56
 
58 57
                 </el-form-item>
58
+
59
+
59 60
                 <el-form-item label="数量" style="width:50%;">
60 61
                     <div style="display:flex;">
61 62
                         <el-input v-model="form.number" style="margin-right:10px;"></el-input>
@@ -131,6 +132,7 @@
131 132
   export default {
132 133
     data() {
133 134
       return {
135
+        project_name:"",
134 136
         visible: false,
135 137
         formTitle: '',
136 138
         activeName: 'first',
@@ -165,6 +167,21 @@
165 167
       }
166 168
     },
167 169
     methods: {
170
+      querySearch(queryString, cb) {
171
+        var restaurants = this.projectList;
172
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
173
+        // 调用 callback 返回建议列表的数据
174
+        cb(results);
175
+
176
+      }, createFilter(queryString) {
177
+        return (restaurant) => {
178
+          return (restaurant.project_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
179
+        };
180
+      },
181
+      handleSelect(val){
182
+        this.project_name = val.project_name
183
+        this.form.project_detail = val.id
184
+      },
168 185
       getDataConfig(module, filed_name) {
169 186
         return getDataConfig(module, filed_name)
170 187
       },
@@ -223,7 +240,11 @@
223 240
         })
224 241
       },
225 242
       getlist() {
226
-        getAllProjectList().then(response => {
243
+        let params = {
244
+          keyword: ""
245
+
246
+        }
247
+        getAllProjectList(params).then(response => {
227 248
           if (response.data.state == 1) {
228 249
             var projectList = response.data.data.projectList
229 250
             var goodInfos = response.data.data.good_info

+ 7 - 9
src/xt_pages/hospitalStation/components/deskPrescription.vue Целия файл

@@ -264,12 +264,7 @@
264 264
                       <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
265 265
                     </el-table-column>
266 266
                     <el-table-column label="库存" width="60">
267
-                      <template slot-scope="scope">{{
268
-                        stockInCount(scope.row) -
269
-                        salesReturnCount(scope.row) -
270
-                        stockOutCount(scope.row) +
271
-                        cancelStockCount(scope.row)
272
-                        }}
267
+                      <template slot-scope="scope">{{scope.row.total }}
273 268
                       </template>
274 269
                     </el-table-column>
275 270
                     <el-table-column label="单价" width="40">
@@ -279,6 +274,10 @@
279 274
                 </div>
280 275
 
281 276
               </el-tab-pane>
277
+              <!--// stockInCount(scope.row) - -->
278
+              <!--// salesReturnCount(scope.row) - -->
279
+              <!--// stockOutCount(scope.row) +-->
280
+              <!--// cancelStockCount(scope.row)-->
282 281
               <!--<el-tab-pane label="医嘱模板" name="2">-->
283 282
               <!--<div style="margin-bottom:5px;">-->
284 283
               <!--&lt;!&ndash;<el-input style="width:50%;" v-model="input" placeholder=""></el-input>&ndash;&gt;-->
@@ -2303,8 +2302,6 @@
2303 2302
       },
2304 2303
 
2305 2304
       comfirm() {
2306
-        console.log("222222222222",this.curPrescriptions);
2307
-
2308 2305
 
2309 2306
         if (this.curPrescriptions.order_status == 2) {
2310 2307
           this.$message.error('该处方已经结算,无法继续添加药品或者项目');
@@ -2488,7 +2485,8 @@
2488 2485
         this.preDrugs = [];
2489 2486
         this.teamList = []
2490 2487
 
2491
-      }, changeAllGoodInfoTableDataTwo(row) {
2488
+      },
2489
+      changeAllGoodInfoTableDataTwo(row) {
2492 2490
         this.teamList = row
2493 2491
       },
2494 2492
       selectChange(row) {

+ 2 - 0
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Целия файл

@@ -2048,6 +2048,8 @@
2048 2048
               if (response.data.state == 1) {
2049 2049
                 this.$emit('change', this.patientInfo.id)
2050 2050
                 this.$message.success('保存成功')
2051
+              }else{
2052
+                this.$message.error(response.data.msg)
2051 2053
               }
2052 2054
             })
2053 2055
           } else if (index == 2) {

+ 36 - 33
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue Целия файл

@@ -37,10 +37,10 @@
37 37
                           highlight-current-row
38 38
                           ref="tab"
39 39
                 >
40
-                    <el-table-column prop="name" label="模版名称" >
40
+                    <el-table-column prop="name" label="模版名称">
41 41
                         <template slot-scope="scope">{{scope.row.name}}</template>
42 42
                     </el-table-column>
43
-                    <el-table-column prop="name" label="透析模式" >
43
+                    <el-table-column prop="name" label="透析模式">
44 44
                         <template slot-scope="scope">{{getMode(scope.row.mode)}}</template>
45 45
                     </el-table-column>
46 46
                     <el-table-column prop="name" label="操作">
@@ -71,7 +71,7 @@
71 71
 
72 72
 <script>
73 73
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
74
-  import { getPatientList, getPrescriptiontemplateList,delHisPrescriptionTemplate } from '@/api/his/his_config'
74
+  import { delHisPrescriptionTemplate, getPatientList, getPrescriptionTemplateList } from '@/api/his/his_config'
75 75
   import { uParseTime } from '@/utils/tools'
76 76
 
77 77
   const moment = require('moment')
@@ -81,6 +81,10 @@
81 81
     },
82 82
     data() {
83 83
       return {
84
+        crumbs: [
85
+          { path: false, name: '门诊医生站' },
86
+          { path: false, name: '处方模版' }
87
+        ],
84 88
         templates: [],
85 89
         tableHeight: '',
86 90
         fullHeight: document.documentElement.clientHeight,
@@ -92,35 +96,33 @@
92 96
       }
93 97
     },
94 98
     methods: {
95
-      jumpDetail(row){
96
-        this.$router.push("/outpatientDoctorStation/prescriptionTemplatedetail?id="+row.id+"&patient_id="+this.patient_id)
97
-      },
98
-      deleteTemplate(row){
99
+      deleteTemplate(row) {
99 100
         this.$confirm('处方模版删除后不可恢复,是否确认删除', '删除', {
100 101
           confirmButtonText: '确 定',
101 102
           cancelButtonText: '取 消',
102 103
           type: 'warning'
103 104
         }).then(() => {
104
-          let params = {
105
-            id:row.id
106
-          }
107
-          delHisPrescriptionTemplate(params).then(response => {
108
-            if (response.data.state == 1) {
109
-              this.GetPrescriptiontemplateList()
110
-            }
111
-          })
105
+          // let params = {
106
+          //   id: row.id
107
+          // }
108
+          // delHisPrescriptionTemplate(params).then(response => {
109
+          //   if (response.data.state == 1) {
110
+          //     this.GetPrescriptiontemplateList()
111
+          //   }
112
+          // })
112 113
 
113 114
         }).catch(() => {
114 115
 
115 116
         })
116
-
117
-
118 117
       },
119
-      getMode(id){
118
+      jumpDetail(row) {
119
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + row.id + '&patient_id=' + this.patient_id)
120
+      },
121
+      getMode(id) {
120 122
         let name = ''
121 123
         this.treatment_mode = Object.values(this.$store.getters.treatment_mode)
122 124
         this.treatment_mode.map(item => {
123
-          if(item.id == id){
125
+          if (item.id == id) {
124 126
             name = item.name
125 127
           }
126 128
         })
@@ -128,19 +130,19 @@
128 130
       },
129 131
       handleSizeChange(val) {
130 132
         this.limit = val
131
-        this.GetPrescriptiontemplateList()
133
+        this.GetPrescriptionTemplateList()
132 134
       },
133 135
       handleCurrentChange(val) {
134 136
         this.page = val
135
-        this.GetPrescriptiontemplateList()
137
+        this.GetPrescriptionTemplateList()
136 138
       },
137
-      GetPrescriptiontemplateList() {
139
+      GetPrescriptionTemplateList() {
138 140
         let params = {
139 141
           patient_id: this.patient_id,
140 142
           page: this.page,
141 143
           limit: this.limit
142 144
         }
143
-        getPrescriptiontemplateList(params).then(response => {
145
+        getPrescriptionTemplateList(params).then(response => {
144 146
           if (response.data.state == 1) {
145 147
             this.templates = response.data.data.list
146 148
             this.total = response.data.data.total
@@ -150,15 +152,16 @@
150 152
       },
151 153
       searchAction() {
152 154
 
153
-      },choosePatient(val) {
154
-         this.page = 1,
155
-         this.limit = 10
155
+      }, choosePatient(val) {
156
+        this.page = 1
157
+        this.limit = 10
158
+        this.patient_id = val.id
156 159
         let params = {
157 160
           patient_id: val.id,
158 161
           page: this.page,
159 162
           limit: this.limit
160 163
         }
161
-        getPrescriptiontemplateList(params).then(response => {
164
+        getPrescriptionTemplateList(params).then(response => {
162 165
           if (response.data.state == 1) {
163 166
             this.templates = response.data.data.list
164 167
             this.total = response.data.data.total
@@ -170,8 +173,8 @@
170 173
           if (response.data.state == 1) {
171 174
             this.data = response.data.data.list
172 175
             this.$refs.tab.setCurrentRow(this.data[0])
173
-            this.patient_id = this.data[0].id
174
-            this.GetPrescriptiontemplateList()
176
+            // this.patient_id = this.data[0].id
177
+            // this.GetPrescriptionTemplateList()
175 178
 
176 179
           }
177 180
         })
@@ -182,12 +185,12 @@
182 185
         } else {
183 186
           return ''
184 187
         }
185
-      },add(){
186
-        if(this.patient_id == 0){
187
-          this.$message.error("请选择病人")
188
+      }, add() {
189
+        if (this.patient_id == 0) {
190
+          this.$message.error('请选择病人')
188 191
           return
189 192
         }
190
-        this.$router.push("/outpatientDoctorStation/prescriptionTemplatedetail?id="+0+"&patient_id="+this.patient_id)
193
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + 0 + '&patient_id=' + this.patient_id)
191 194
 
192 195
       }
193 196
     },

+ 183 - 182
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Целия файл

@@ -1,192 +1,196 @@
1 1
 <template>
2
-    <div style="height: calc(100% - 58px);display: flex;flex-direction: column;margin-top: 56px;">
3
-        <el-button size="small" @click="save" type="primary" style="margin-left:10px;">保存</el-button>
4
-        <div class="mainCenter" v-loading="loading">
5
-            <div class="centerLeft">
6
-                <el-form :model="tempForm" ref="tempForm" label-width="80px"
7
-                style="display: flex;flex-wrap: wrap;justify-content: space-between;">
8
-                <el-form-item label="模版名称:" prop="name" label-position="right">
9
-                <el-input v-model="tempForm.name" placeholder=""></el-input>
10
-                </el-form-item>
11
-
12
-                <el-form-item label="透析模式: " prop="mode_id" label-position="right">
13
-                <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择">
14
-                    <el-option
15
-                            v-for="item in modeOptions"
16
-                            :key="item.id"
17
-                            :label="item.name"
18
-                            :value="item.id"
19
-                    ></el-option>
20
-                </el-select>
21
-                </el-form-item>
22
-                </el-form>
23
-                <div class="tabsBox">
24
-                    <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
25
-                             closable
26
-                             @tab-remove="removeTab"
27
-                             :before-leave="moreState" @tab-click="tabclickEvent">
28
-                        <el-tab-pane
29
-                                v-for="(item, index) in prescriptions"
30
-                                :key="index"
31
-                                :label="item.name"
32
-                                :name="item.name"
33
-                        >
34
-                        </el-tab-pane>
2
+    <div class="main-contain new-main-contain">
3
+
4
+        <div style="height: calc(100% - 58px);display: flex;flex-direction: column;margin-top: 56px;">
5
+            <el-button size="small" @click="save" type="primary" style="margin-left:10px;width:60px;float: left">保存
6
+            </el-button>
7
+
8
+            <div class="mainCenter" v-loading="loading">
9
+                <div class="centerLeft">
10
+                    <el-form :model="tempForm" ref="tempForm" label-width="80px"
11
+                             style="display: flex;flex-wrap: wrap;justify-content: space-between;">
12
+                        <el-form-item label="模版名称:" prop="name" label-position="right">
13
+                            <el-input v-model="tempForm.name" placeholder=""></el-input>
14
+                        </el-form-item>
15
+
16
+                        <el-form-item label="透析模式: " prop="mode_id" label-position="right">
17
+                            <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择">
18
+                                <el-option
19
+                                        v-for="item in modeOptions"
20
+                                        :key="item.id"
21
+                                        :label="item.name"
22
+                                        :value="item.id"
23
+                                ></el-option>
24
+                            </el-select>
25
+                        </el-form-item>
26
+                    </el-form>
27
+                    <div class="tabsBox">
28
+                        <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
29
+                                 closable
30
+                                 @tab-remove="removeTab"
31
+                                 :before-leave="moreState" @tab-click="tabclickEvent">
32
+                            <el-tab-pane
33
+                                    v-for="(item, index) in prescriptions"
34
+                                    :key="index"
35
+                                    :label="item.name"
36
+                                    :name="item.name"
37
+                            >
38
+                            </el-tab-pane>
35 39
 
36
-                        <el-tab-pane name="more" closable><span slot="label"><i
37
-                                class="el-icon-plus"
38
-                                @click="addTab"></i></span>
39
-                        </el-tab-pane>
40
+                            <el-tab-pane name="more" closable><span slot="label"><i
41
+                                    class="el-icon-plus"
42
+                                    @click="addTab"></i></span>
43
+                            </el-tab-pane>
40 44
 
41
-                        <!--<prescription-table ref="prescription_tables"-->
42
-                                            <!--:prescription="curPrescriptions"-->
43
-                                            <!--:preDrugs="preDrugs"-->
44
-                                            <!--:activeType="customTabIndex"></prescription-table>-->
45
+                            <!--<prescription-table ref="prescription_tables"-->
46
+                            <!--:prescription="curPrescriptions"-->
47
+                            <!--:preDrugs="preDrugs"-->
48
+                            <!--:activeType="customTabIndex"></prescription-table>-->
45 49
 
46
-                        <prescription-template-table ref="prescription_tables"
47
-                                                     :prescription="curPrescriptions"
48
-                                                     :preDrugs="preDrugs"
49
-                                                     :activeType="customTabIndex"></prescription-template-table>
50
-                    </el-tabs>
50
+                            <prescription-template-table ref="prescription_tables"
51
+                                                         :prescription="curPrescriptions"
52
+                                                         :preDrugs="preDrugs"
53
+                                                         :activeType="customTabIndex"></prescription-template-table>
54
+                        </el-tabs>
55
+                    </div>
51 56
                 </div>
52
-            </div>
53
-            <div class='centerRight'>
54
-                <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab"
55
-                         :before-leave='beforeLeave'>
56
-                    <el-tab-pane label="药品" :name="1">
57
-
58
-                    </el-tab-pane>
59
-                    <el-tab-pane label="项目" :name="2">
60
-
61
-                    </el-tab-pane>
62
-                    <div style="height:100%;" v-show="showOne">
63
-                        <el-tabs class="rightTabs" v-model="drug_activeName">
64
-                            <el-tab-pane label="药品列表" name="1">
65
-                                <div style="margin-bottom:5px;display:flex;">
66
-                                    <el-input style="width:50%;" @input="searchAction"
67
-                                              @keyup.enter.native='searchAction'
68
-                                              v-model.trim="search_keyword"
69
-                                              placeholder="请输入药品名字"></el-input>
70
-                                    <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder=""
71
-                                               @change="changeKind">
72
-                                        <el-option
73
-                                                label="全部"
74
-                                                value="0">
75
-                                        </el-option>
76
-                                        <el-option
77
-                                                v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
78
-                                                :key="index"
79
-                                                :label="item.name"
80
-                                                :value="item.id">
81
-                                        </el-option>
82
-                                    </el-select>
83
-                                </div>
84
-                                <div style="width: 100%;flex:1;overflow: hidden;" ref="rightTable">
85
-                                    <el-table ref="multipleTable"
86
-                                              :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
87
-                                              :data="drugs" border @select='selectDrugs'
88
-                                              :row-style="{ color: '#303133' }"
89
-                                              @select-all="changeAllGoodInfoTableData"
90
-                                              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
91
-                                              highlight-current-row>
92
-                                        <el-table-column type="selection" width="40" align="center"></el-table-column>
93
-                                        <el-table-column label="名称">
94
-                                            <template slot-scope="scope">{{ scope.row.drug_name }}</template>
95
-                                        </el-table-column>
96
-                                        <el-table-column label="规格" width="60">
97
-                                            <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
98
-                                        </el-table-column>
99
-                                        <el-table-column label="单价" width="40">
100
-                                            <template slot-scope="scope">{{ scope.row.retail_price }}</template>
101
-                                        </el-table-column>
102
-                                    </el-table>
103
-                                </div>
57
+                <div class='centerRight'>
58
+                    <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab"
59
+                             :before-leave='beforeLeave'>
60
+                        <el-tab-pane label="药品" :name="1">
104 61
 
105
-                            </el-tab-pane>
62
+                        </el-tab-pane>
63
+                        <el-tab-pane label="项目" :name="2">
106 64
 
107
-                        </el-tabs>
108
-                    </div>
109
-                    <div style="height:100%;" v-show="showTwo">
110
-                        <el-tabs class="rightTabs" v-model="activeName">
111
-                            <el-tab-pane label="项目列表" name="1">
112
-                                <div style="margin-bottom:5px;">
113
-                                    <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
114
-                                    <el-input style="width:50%;" @input="searchProjectAction"
115
-                                              @keyup.enter.native='searchProjectAction'
116
-                                              v-model.trim="search_project_keyword"
117
-                                              placeholder="请输入项目名称"></el-input>
118
-                                    <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
119
-                                               @change="changeClass">
120
-                                        <el-option
121
-                                                label="全部"
122
-                                                value="0">
123
-                                        </el-option>
124
-                                        <el-option
125
-                                                v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
126
-                                                :key="index"
127
-                                                :label="item.name"
128
-                                                :value="item.id">
129
-                                        </el-option>
130
-                                    </el-select>
131
-                                </div>
132
-                                <div style="width: 100%;flex:1;overflow-y: auto;">
133
-                                    <el-table ref="tables"
134
-                                              :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
135
-                                              :data="tabProject" border @select='selectChange'
136
-                                              :row-style="{ color: '#303133' }"
137
-                                              @select-all="changeAllGoodInfoTableDataTwo"
138
-                                              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
139
-                                              highlight-current-row>
140
-                                        <el-table-column type="selection" width="40" align="center"></el-table-column>
141
-                                        <el-table-column prop="name" label="名称">
142
-                                            <template slot-scope="scope">{{ scope.row.project_name }}</template>
143
-                                        </el-table-column>
144
-                                        <el-table-column label="规格" width="60">
145
-                                            <template slot-scope="scope">{{ scope.row.single_dose }}</template>
146
-                                        </el-table-column>
147
-                                        <el-table-column label="单价" width="40">
148
-                                            <template slot-scope="scope">{{ scope.row.price }}</template>
149
-                                        </el-table-column>
150
-                                    </el-table>
151
-                                </div>
152
-                            </el-tab-pane>
153
-                            <el-tab-pane label="项目组套" name="2">
154
-                                <div style="width: 100%;flex:1;overflow-y: auto;">
155
-                                    <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
156
-                                              :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
157
-                                              :row-style="{ color: '#303133' }"
158
-                                              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
159
-                                              highlight-current-row
160
-                                              @select='selectTeam'>
161
-                                        <el-table-column type="selection" width="40" align="center"></el-table-column>
162
-                                        <el-table-column prop="name" label="名称">
163
-                                            <template slot-scope="scope">{{scope.row.project_team}}</template>
164
-                                        </el-table-column>
165
-                                    </el-table>
166
-                                </div>
167
-                            </el-tab-pane>
168
-                        </el-tabs>
169
-                    </div>
170
-                </el-tabs>
171
-                <template>
65
+                        </el-tab-pane>
66
+                        <div style="height:100%;" v-show="showOne">
67
+                            <el-tabs class="rightTabs" v-model="drug_activeName">
68
+                                <el-tab-pane label="药品列表" name="1">
69
+                                    <div style="margin-bottom:5px;display:flex;">
70
+                                        <el-input style="width:50%;" @input="searchAction"
71
+                                                  @keyup.enter.native='searchAction'
72
+                                                  v-model.trim="search_keyword"
73
+                                                  placeholder="请输入药品名字"></el-input>
74
+                                        <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder=""
75
+                                                   @change="changeKind">
76
+                                            <el-option
77
+                                                    label="全部"
78
+                                                    value="0">
79
+                                            </el-option>
80
+                                            <el-option
81
+                                                    v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
82
+                                                    :key="index"
83
+                                                    :label="item.name"
84
+                                                    :value="item.id">
85
+                                            </el-option>
86
+                                        </el-select>
87
+                                    </div>
88
+                                    <div style="width: 100%;flex:1;overflow: hidden;" ref="rightTable">
89
+                                        <el-table ref="multipleTable"
90
+                                                  :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
91
+                                                  :data="drugs" border @select='selectDrugs'
92
+                                                  :row-style="{ color: '#303133' }"
93
+                                                  @select-all="changeAllGoodInfoTableData"
94
+                                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
95
+                                                  highlight-current-row>
96
+                                            <el-table-column type="selection" width="40"
97
+                                                             align="center"></el-table-column>
98
+                                            <el-table-column label="名称">
99
+                                                <template slot-scope="scope">{{ scope.row.drug_name }}</template>
100
+                                            </el-table-column>
101
+                                            <el-table-column label="规格" width="60">
102
+                                                <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
103
+                                            </el-table-column>
104
+                                            <el-table-column label="单价" width="40">
105
+                                                <template slot-scope="scope">{{ scope.row.retail_price }}</template>
106
+                                            </el-table-column>
107
+                                        </el-table>
108
+                                    </div>
109
+
110
+                                </el-tab-pane>
111
+
112
+                            </el-tabs>
113
+                        </div>
114
+                        <div style="height:100%;" v-show="showTwo">
115
+                            <el-tabs class="rightTabs" v-model="activeName">
116
+                                <el-tab-pane label="项目列表" name="1">
117
+                                    <div style="margin-bottom:5px;">
118
+                                        <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
119
+                                        <el-input style="width:50%;" @input="searchProjectAction"
120
+                                                  @keyup.enter.native='searchProjectAction'
121
+                                                  v-model.trim="search_project_keyword"
122
+                                                  placeholder="请输入项目名称"></el-input>
123
+                                        <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
124
+                                                   @change="changeClass">
125
+                                            <el-option
126
+                                                    label="全部"
127
+                                                    value="0">
128
+                                            </el-option>
129
+                                            <el-option
130
+                                                    v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
131
+                                                    :key="index"
132
+                                                    :label="item.name"
133
+                                                    :value="item.id">
134
+                                            </el-option>
135
+                                        </el-select>
136
+                                    </div>
137
+                                    <div style="width: 100%;flex:1;overflow-y: auto;">
138
+                                        <el-table ref="tables"
139
+                                                  :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
140
+                                                  :data="tabProject" border @select='selectChange'
141
+                                                  :row-style="{ color: '#303133' }"
142
+                                                  @select-all="changeAllGoodInfoTableDataTwo"
143
+                                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
144
+                                                  highlight-current-row>
145
+                                            <el-table-column type="selection" width="40"
146
+                                                             align="center"></el-table-column>
147
+                                            <el-table-column prop="name" label="名称">
148
+                                                <template slot-scope="scope">{{ scope.row.project_name }}</template>
149
+                                            </el-table-column>
150
+                                            <el-table-column label="规格" width="60">
151
+                                                <template slot-scope="scope">{{ scope.row.single_dose }}</template>
152
+                                            </el-table-column>
153
+                                            <el-table-column label="单价" width="40">
154
+                                                <template slot-scope="scope">{{ scope.row.price }}</template>
155
+                                            </el-table-column>
156
+                                        </el-table>
157
+                                    </div>
158
+                                </el-tab-pane>
159
+                                <el-tab-pane label="项目组套" name="2">
160
+                                    <div style="width: 100%;flex:1;overflow-y: auto;">
161
+                                        <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
162
+                                                  :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
163
+                                                  :row-style="{ color: '#303133' }"
164
+                                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
165
+                                                  highlight-current-row
166
+                                                  @select='selectTeam'>
167
+                                            <el-table-column type="selection" width="40"
168
+                                                             align="center"></el-table-column>
169
+                                            <el-table-column prop="name" label="名称">
170
+                                                <template slot-scope="scope">{{scope.row.project_team}}</template>
171
+                                            </el-table-column>
172
+                                        </el-table>
173
+                                    </div>
174
+                                </el-tab-pane>
175
+                            </el-tabs>
176
+                        </div>
177
+                    </el-tabs>
178
+                    <template>
172 179
 
173 180
 
174
-                    <div class="comfirmBox">
175
-                        <el-button type="primary" style="width:100%;" @click="comfirm">确定添加</el-button>
176
-                    </div>
177
-                </template>
181
+                        <div class="comfirmBox">
182
+                            <el-button type="primary" style="width:100%;" @click="comfirm">确定添加</el-button>
183
+                        </div>
184
+                    </template>
185
+                </div>
178 186
             </div>
179 187
         </div>
180
-
181 188
     </div>
182 189
 </template>
183 190
 
184 191
 
185 192
 <script>
186
-  import {
187
-    createdTemplate,
188
-    delHisPrescriptionInfoTemplate,
189
-  } from '@/api/his/his_config'
193
+  import { createdTemplate, delHisPrescriptionInfoTemplate, getPrescriptionTemplateInfo } from '@/api/his/his_config'
190 194
   import {
191 195
     createHisPrescription,
192 196
     delHisPrescription,
@@ -207,7 +211,6 @@
207 211
     getHisProject,
208 212
     getPojectListById
209 213
   } from '@/api/project/project'
210
-  import { getPrescriptionTemplateInfo } from '@/api/his/his_config'
211 214
 
212 215
   import { uParseTime } from '@/utils/tools'
213 216
   import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
@@ -236,9 +239,9 @@
236 239
     },
237 240
     data() {
238 241
       return {
239
-        tempForm:{
242
+        tempForm: {
240 243
           name: '',
241
-          mode_id: '',
244
+          mode_id: ''
242 245
         },
243 246
         modeOptions: this.$store.getters.treatment_mode,
244 247
         start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
@@ -320,7 +323,7 @@
320 323
       }
321 324
     },
322 325
     methods: {
323
-      save(){
326
+      save() {
324 327
 
325 328
         if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
326 329
           this.$message.error('请先开处方')
@@ -370,16 +373,14 @@
370 373
         let data = {
371 374
           'prescriptions': this.prescriptions
372 375
         }
373
-        createdTemplate(params,data).then(response => {
376
+        createdTemplate(params, data).then(response => {
374 377
           if (response.data.state == 1) {
375
-            this.$emit('change', this.patientInfo.id)
376 378
             this.$message.success('保存成功')
379
+          }else{
380
+            this.$message.error(response.data.msg)
377 381
           }
378 382
         })
379 383
 
380
-
381
-
382
-
383 384
       },
384 385
       changeClass(id) {
385 386
         this.tabProject = []