Browse Source

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

huangyw 2 years ago
parent
commit
185705ced7

+ 8 - 0
src/router/modules/hisTool.js View File

@@ -18,6 +18,14 @@ export default {
18 18
       name: 'modeTemplate',
19 19
       meta: { title: 'modeTemplate', noCache: true }
20 20
     },
21
+    {
22
+      path: '/hisTool/batchTemplate',
23
+      component: () => import('@/xt_pages/outpatientDoctorStation/batch_mode_template'),
24
+      name: 'batchModeTemplate',
25
+      meta: { title: 'batchModeTemplate', noCache: true },
26
+      hidden: true,
27
+      is_menu: false
28
+    },
21 29
     {
22 30
       path: '/hisTool/modeTemplateDetail',
23 31
       component: () => import('@/xt_pages/outpatientDoctorStation/modeTemplateDetail'),

+ 326 - 0
src/xt_pages/outpatientDoctorStation/batch_mode_template.vue View File

@@ -0,0 +1,326 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="app-container">
4
+          <div style="margin-bottom:10px">
5
+                透析模式:
6
+                <el-select v-model="value" placeholder="请选择">
7
+                <el-option
8
+                v-for="item in options"
9
+                :key="item.value"
10
+                :label="item.label"
11
+                :value="item.value">
12
+                </el-option>
13
+                </el-select>
14
+               新增类型:
15
+                <el-select v-model="value" placeholder="请选择">
16
+                <el-option
17
+                v-for="item in options"
18
+                :key="item.value"
19
+                :label="item.label"
20
+                :value="item.value">
21
+                </el-option>
22
+                </el-select>
23
+              是否选择所有患者:
24
+                <el-select v-model="value" placeholder="请选择">
25
+                <el-option
26
+                v-for="item in options"
27
+                :key="item.value"
28
+                :label="item.label"
29
+                :value="item.value">
30
+                </el-option>
31
+                </el-select>
32
+            </div>
33
+         <el-container>
34
+               
35
+               <div style="width:27%">
36
+               
37
+                  <el-row>
38
+                    <el-table
39
+                        ref="singleTable"
40
+                        :data="patientList"
41
+                        highlight-current-row
42
+                        border
43
+                        @current-change="handleCurrentChange"
44
+                        height="440"
45
+                        :row-style="{ color: '#303133' }"
46
+                        :header-cell-style="{
47
+                        backgroundColor: 'rgb(245, 247, 250)',
48
+                        color: '#606266'
49
+                        }"
50
+                    >
51
+                     <el-table-column align="center" type="selection" width="55">
52
+                       <template slot-scope="scope">
53
+                      
54
+                      </template>
55
+                     </el-table-column>
56
+                     <el-table-column prop="date" label="患者姓名" align="center">
57
+                      <template slot-scope="scope">
58
+                        {{scope.row.name}}
59
+                      </template>
60
+                    </el-table-column>
61
+                   
62
+
63
+                     </el-table>
64
+                  </el-row>
65
+               </div>
66
+              <el-main>
67
+            <el-tabs v-model="editableTabsValue" type="border-card" editable @edit="handleTabsEdit">
68
+                <el-tab-pane
69
+                    :key="item.name"
70
+                    v-for="(item, index) in editableTabs"
71
+                    :label="item.title"
72
+                    :name="item.name"
73
+                >
74
+                    {{item.content}}
75
+                </el-tab-pane>
76
+            </el-tabs>
77
+             </el-main>
78
+                
79
+          </el-container>
80
+        </el-container>
81
+      </el-container>
82
+      </div>
83
+    </div>
84
+
85
+</template>
86
+<script>
87
+
88
+export default {
89
+  data(){
90
+    return{
91
+     patientList:[
92
+      {id:1,name:"张三"}
93
+     ],
94
+     tableList:[],
95
+     editableTabsValue: '2',
96
+     editableTabs: [{
97
+        title: 'Tab 1',
98
+        name: '1',
99
+        content: 'Tab 1 content'
100
+    }, {
101
+        title: 'Tab 2',
102
+        name: '2',
103
+        content: 'Tab 2 content'
104
+    }],
105
+    tabIndex: 2,
106
+     options: [{
107
+          value: '选项1',
108
+          label: '黄金糕'
109
+        }, {
110
+          value: '选项2',
111
+          label: '双皮奶'
112
+        }, {
113
+          value: '选项3',
114
+          label: '蚵仔煎'
115
+        }, {
116
+          value: '选项4',
117
+          label: '龙须面'
118
+        }, {
119
+          value: '选项5',
120
+          label: '北京烤鸭'
121
+        }],
122
+     value: ''
123
+    }
124
+  },
125
+  methods:{
126
+    handleTabsEdit(targetName, action) {
127
+        if (action === 'add') {
128
+          let newTabName = ++this.tabIndex + '';
129
+          this.editableTabs.push({
130
+            title: 'New Tab',
131
+            name: newTabName,
132
+            content: 'New Tab content'
133
+          });
134
+          this.editableTabsValue = newTabName;
135
+        }
136
+        if (action === 'remove') {
137
+          let tabs = this.editableTabs;
138
+          let activeName = this.editableTabsValue;
139
+          if (activeName === targetName) {
140
+            tabs.forEach((tab, index) => {
141
+              if (tab.name === targetName) {
142
+                let nextTab = tabs[index + 1] || tabs[index - 1];
143
+                if (nextTab) {
144
+                  activeName = nextTab.name;
145
+                }
146
+              }
147
+            });
148
+          }
149
+          
150
+          this.editableTabsValue = activeName;
151
+          this.editableTabs = tabs.filter(tab => tab.name !== targetName);
152
+        }
153
+    },
154
+    handleCurrentChange(){
155
+
156
+    }
157
+  },
158
+  created(){
159
+
160
+  },
161
+  
162
+}
163
+</script>
164
+
165
+
166
+   
167
+<style lang="scss" scoped> 
168
+
169
+    .zone{
170
+      //  margin-left: 30px;
171
+      //  text-align: left;
172
+       width: 70px;
173
+       display: inline-block;
174
+       color:#606266;
175
+    }
176
+    .disinfect{
177
+      position: relative;
178
+      .newButton{
179
+        // position: absolute;
180
+        // right: 2%;
181
+        // top:4px;
182
+        // z-index: 9;
183
+        margin-bottom: 10px;
184
+    margin-left: 90%;
185
+      }
186
+    }
187
+    .disinfectOne{
188
+      position: relative;
189
+      .newButtonOne{
190
+        position: absolute;
191
+         right: 0;
192
+         top: -10;
193
+         z-index: 18;
194
+      }
195
+    }
196
+    .but{
197
+      width: 200px;
198
+      height: 50px;
199
+      // border: solid 1px red;
200
+      margin-left: 77%;
201
+    }
202
+    .clearn{
203
+      width: 460px;
204
+      height: 50px;
205
+      // border:solid 1px red;
206
+      margin-left:650px;
207
+    }
208
+
209
+  .zClass{
210
+    width: 200px;
211
+    height: 200px;
212
+    // border:solid 1px red;
213
+    margin-left: 450px;
214
+    margin-top: 200px;
215
+  }
216
+  .warn{
217
+    color: red;
218
+    font-size: 14px;
219
+    width: 100%;
220
+    display: inline-block;
221
+    margin-left: 96px;
222
+  }
223
+
224
+  .userbutton{
225
+       margin-bottom: 10px;
226
+    margin-left: 82%
227
+  }
228
+
229
+</style>
230
+<style lang="scss" >
231
+
232
+   .a{
233
+     margin-bottom: 10px;
234
+      margin-top: 6px;
235
+
236
+   }
237
+
238
+   .b{
239
+    .el-button{
240
+      margin-left: 90%;
241
+      margin-bottom: 10px;
242
+    }
243
+   }
244
+
245
+   .stoppage{
246
+     .el-form-item__label{
247
+       width:190px;
248
+     }
249
+   }
250
+   .st{
251
+     .el-form-item__label{
252
+       width:-10px;
253
+     }
254
+   }
255
+   .main{
256
+     position: relative;
257
+     .newButtonOne{
258
+       position:absolute;
259
+       right: 0;
260
+       z-index: 2;
261
+     }
262
+   }
263
+
264
+    .elbutton{
265
+      // border: solid 1px red;
266
+      height: 50px;
267
+      width: 400px;
268
+      margin-left: 650px;
269
+    }
270
+  // .el-form-item__label {
271
+  //   width: 130px;
272
+  //   font-size: 14px;
273
+  // }
274
+  .el-form-item__error {
275
+    margin-left: 130px;
276
+  }
277
+
278
+ .el-upload-list__item-name {
279
+    color: #606266;
280
+    display: block;
281
+    margin-right: 40px;
282
+    overflow: hidden;
283
+    padding-left: 4px;
284
+    text-overflow: ellipsis;
285
+    transition: color .3s;
286
+    white-space: nowrap;
287
+}
288
+.el-main{
289
+  padding-top: 0px;
290
+}
291
+.newMain{
292
+  .el-form-item__label{
293
+    width: 104px;
294
+  }
295
+}
296
+.newDisinfectOne{
297
+  .el-input--prefix .el-input__inner{
298
+    padding-left: 15px
299
+  }
300
+}
301
+.stoppage{
302
+  .el-form-item__label{
303
+    width: 18%;
304
+  }
305
+}
306
+.newItem{
307
+  .el-form-item__label{
308
+    width: 130px;
309
+  }
310
+}
311
+.formItem{
312
+  .el-form-item__label{
313
+    width: 104px;
314
+    line-height: 30px;
315
+  }
316
+}
317
+.newname{
318
+  .el-form-item__label{
319
+    width: 60px;
320
+  }
321
+}
322
+::-webkit-scrollbar{
323
+  height: 20px;
324
+}
325
+
326
+</style>

+ 7 - 2
src/xt_pages/outpatientDoctorStation/modeTemplate.vue View File

@@ -2,8 +2,10 @@
2 2
     <div class="main-contain new-main-contain">
3 3
         <div class="position">
4 4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-            <el-button type="primary" @click="add">新增</el-button>
6
-
5
+            <div style="float:right">
6
+              <el-button type="primary" @click="add">新增</el-button>
7
+              <el-button type="primary" @click="batchAdd">批量新增</el-button>
8
+            </div>
7 9
         </div>
8 10
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
9 11
             <div class="mainLeft">
@@ -150,6 +152,9 @@
150 152
        jumpDetail(row) {
151 153
         this.$router.push('/hisTool/modeTemplateDetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name +"&modes="+this.mode_str)
152 154
       },
155
+      batchAdd(){
156
+        this.$router.push("/hisTool/batchTemplate")
157
+      }
153 158
     },
154 159
     created() {
155 160
       this.tablelist =  Object.values(this.$store.getters.treatment_mode)

+ 76 - 59
src/xt_pages/stock/query/purchaseStockQuery.vue View File

@@ -78,74 +78,49 @@
78 78
               </template>
79 79
             </el-table-column>
80 80
             <el-table-column label="期初结余" align="center">
81
-                 <el-table-column
82
-                    prop="province"
83
-                    label="数量"
84
-                    width="100">
81
+               
82
+                 <el-table-column prop="stockIn" label="数量" width="100">
83
+                   
85 84
                  </el-table-column>
86
-                <el-table-column
87
-                  prop="city"
88
-                  label="进货金额"
89
-                  width="100">
85
+              
86
+                <el-table-column prop="buy_price" label="进货金额" width="100">
87
+                   
90 88
                 </el-table-column>
91
-                <el-table-column
92
-                  prop="address"
93
-                  label="销售金额"
94
-                  width="100">
89
+                <el-table-column prop="stockMoney" label="销售金额" width="100">
90
+                 
95 91
                 </el-table-column>
92
+             
96 93
             </el-table-column>
97 94
             <el-table-column label="本期增加" align="center">
98
-              <el-table-column
99
-                    prop="province"
100
-                    label="数量"
101
-                    width="100">
102
-                 </el-table-column>
103
-                <el-table-column
104
-                  prop="city"
105
-                  label="进货金额"
106
-                  width="100">
95
+             
96
+                <el-table-column prop="stockAdd" label="数量" width="100">
97
+                
98
+                </el-table-column>
99
+             
100
+                <el-table-column prop="buy_price" label="进货金额" width="100">
101
+                  
107 102
                 </el-table-column>
108
-                <el-table-column
109
-                  prop="address"
110
-                  label="销售金额"
111
-                  width="100">
103
+                <el-table-column  prop="addStockMoney" label="销售金额"  width="100">
112 104
                 </el-table-column>
105
+              
113 106
             </el-table-column>
114
-        
107
+         
115 108
             <el-table-column label="本期减少" align="center">
116
-               <el-table-column
117
-                    prop="province"
118
-                    label="数量"
119
-                    width="100">
120
-                 </el-table-column>
121
-                <el-table-column
122
-                  prop="city"
123
-                  label="进货金额"
124
-                  width="100">
109
+               <el-table-column prop="outStock" label="数量" width="100">
125 110
                 </el-table-column>
126
-                <el-table-column
127
-                  prop="address"
128
-                  label="销售金额"
129
-                  width="100">
111
+                <el-table-column  prop="buy_price"  label="进货金额" width="100">
112
+                </el-table-column>
113
+                <el-table-column prop="stockOutMoney" label="销售金额" width="100">
130 114
                 </el-table-column>
131 115
             </el-table-column>
132 116
           
133 117
             <el-table-column label="期末结余" align="center">
134
-              <el-table-column
135
-                    prop="province"
136
-                    label="数量"
137
-                    width="100">
138
-                 </el-table-column>
139
-                <el-table-column
140
-                  prop="city"
141
-                  label="进货金额"
142
-                  width="100">
143
-                </el-table-column>
144
-                <el-table-column
145
-                  prop="address"
146
-                  label="销售金额"
147
-                  width="100">
148
-                </el-table-column>
118
+              <el-table-column prop="overStock" label="数量" width="100">
119
+              </el-table-column>
120
+              <el-table-column prop="buy_price" label="进货金额" width="100">
121
+              </el-table-column>
122
+              <el-table-column prop="oveMoney" label="销售金额" width="100">
123
+              </el-table-column>
149 124
             </el-table-column>
150 125
 
151 126
           
@@ -220,9 +195,6 @@ export default {
220 195
     },
221 196
     changeGoodTypeName(){
222 197
       this.getlist()
223
-    },
224
-    changeGoodName(){
225
-
226 198
     },
227 199
     getStorehouseList(){
228 200
       getStorehouseList().then(response=>{
@@ -256,6 +228,18 @@ export default {
256 228
       getPurchaseStockQuery(params).then(response=>{
257 229
          if(response.data.state == 1){
258 230
             var list = response.data.data.list
231
+            for(let i=0;i<list.length;i++){
232
+               list[i].stockIn = this.getWarehouseInfo(list[i].warehouse_info)
233
+               list[i].stockMoney = (this.getWarehouseInfo(list[i].warehouse_info) * list[i].buy_price).toFixed(2)
234
+               list[i].stockAdd = this.getWarehouseInfoOne(list[i].warehouse_info)
235
+               list[i].addStockMoney = (this.getWarehouseInfoOne(list[i].warehouse_info) *list[i].buy_price).toFixed(2)
236
+
237
+               list[i].outStock = this.getWarehouseOut(list[i].warehouse_out_info)
238
+               list[i].stockOutMoney = (this.getWarehouseOut(list[i].warehouse_out_info)*list[i].buy_price).toFixed(2)
239
+
240
+               list[i].overStock = this.getWarehouseInfo(list[i].warehouse_info)
241
+               list[i].oveMoney = (this.getWarehouseInfo(list[i].warehouse_info)*list[i].buy_price).toFixed(2)
242
+            }
259 243
             this.tableList = list
260 244
             this.total = response.data.data.total
261 245
 
@@ -495,10 +479,10 @@ export default {
495 479
    },
496 480
   
497 481
    startFirstTimeChange(){
498
-    
482
+     this.getlist()
499 483
    },
500 484
    endEndTimeChange(){
501
-
485
+     this.getlist()
502 486
    },
503 487
   getTime(val) {
504 488
     if(val < 0){
@@ -524,6 +508,39 @@ export default {
524 508
   },
525 509
   startTimeChange(){
526 510
 
511
+  },
512
+  getWarehouseInfo(val){
513
+    var count =0 
514
+    for(let i=0;i<val.length;i++){
515
+      count +=val[i].stock_count
516
+    }
517
+    if(count > 0 ){
518
+      return count
519
+    }else{
520
+      return count
521
+    }
522
+  },
523
+  getWarehouseInfoOne(val){
524
+    var count =0 
525
+    for(let i=0;i<val.length;i++){
526
+      count +=val[i].warehousing_count
527
+    }
528
+    if(count > 0 ){
529
+      return count
530
+    }else{
531
+      return count
532
+    }
533
+  },
534
+  getWarehouseOut(val){
535
+    var count = 0
536
+    for(let i=0;i<val.length;i++){
537
+      count +=val[i].count
538
+    }
539
+    if(count >0){
540
+     return count
541
+    }else{
542
+      return count
543
+    }
527 544
   }
528 545
   },
529 546
   created(){