ソースを参照

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

see999 3 年 前
コミット
510a833ca2

+ 8 - 0
src/api/stock.js ファイルの表示

@@ -641,3 +641,11 @@ export function getOrderDetailByOrderId(params) {
641 641
     params: params
642 642
   })
643 643
 }
644
+
645
+export function getOrderDetailById(params) {
646
+  return request({
647
+    url: '/api/good/getorderdetaibyid',
648
+    method: 'Get',
649
+    params: params
650
+  })
651
+}

+ 9 - 0
src/router/modules/drugs.js ファイルの表示

@@ -199,6 +199,15 @@ export default {
199 199
       hidden: true,
200 200
       is_menu: false,
201 201
       meta: { title: 'stockBatchNumber' }
202
+    },
203
+    {
204
+      path: '/drug/out/drugstockoutorderedit',
205
+      component: () => import('@/xt_pages/stock/drugs/drugStockOutOrderEdit'),
206
+      name: 'drugStockOutOrderEdit',
207
+      hidden: true,
208
+      is_menu: false,
209
+      meta: { title: 'drugStockOutOrderEdit' }
210
+
202 211
     }
203 212
 
204 213
   ]

+ 1 - 27
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue ファイルの表示

@@ -24,33 +24,7 @@
24 24
       </div>
25 25
 
26 26
 
27
-      <!--<el-table-->
28
-      <!--:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"-->
29
-      <!--:data="other_doctor_advices"-->
30
-      <!--border-->
31
-      <!--style="width: 100%"-->
32
-      <!--ref="advices_list"-->
33
-      <!--@row-click="cellMouseEnter"-->
34
-      <!--:row-class-name="tableRowClassName"-->
35
-      <!--:span-method="objectSpanMethod"-->
36
-      <!--:cell-class-name="adviceNameShow"-->
37
-      <!--:modal-append-to-body="false"-->
38
-      <!--highlight-current-row-->
39
-      <!--@current-change="handleCurrentChange"-->
40
-      <!--&gt;-->
41
-
42
-      <!--<el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">-->
43
-      <!--<template slot-scope="scope">-->
44
-      <!--<span class="el-dropdown-link">-->
45
-      <!--{{ getAdviceContent(scope.row, 1)-->
46
-      <!--}}-->
47
-      <!--<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
48
-      <!--</span>-->
49
-      <!--</template>-->
50
-      <!--</el-table-column>-->
51
-
52
-
53
-      <!--</el-table>-->
27
+      
54 28
       <el-form
55 29
         ref="adForm"
56 30
         :rules="adRules"

+ 7 - 2
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue ファイルの表示

@@ -693,13 +693,17 @@ export default {
693 693
             adviceNames: [],
694 694
             advice_doctor: this.groupForm.advice_doctor,
695 695
             remark: this.groupForm.remark,
696
-            parent_id: this.groupForm.parent_id
696
+            parent_id: this.groupForm.parent_id,
697
+            id:this.groupForm.id,
697 698
           };
698 699
          
699 700
           var adviceNames = [];
700 701
           for (const index in this.groupForm.adviceNames) {
701 702
             adviceNames.unshift(this.groupForm.adviceNames[index]);
702 703
           }
704
+          for(let i=0;i<adviceNames.length;i++){
705
+            adviceNames[i].template_id = "888888888"
706
+          }
703 707
           submitForm.adviceNames = adviceNames;
704 708
           let mode = "1";
705 709
           
@@ -729,7 +733,7 @@ export default {
729 733
              }
730 734
           }
731 735
           console.log("2222",submitForm)
732
-          
736
+  
733 737
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
734 738
             response => {
735 739
               if (response.data.state == 0) {
@@ -1684,6 +1688,7 @@ export default {
1684 1688
   created(){
1685 1689
     //获取自备药
1686 1690
     this.getSelfMedicalList()
1691
+    console.log("模板数据",this.adviceTemplates)
1687 1692
   }
1688 1693
 };
1689 1694
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue ファイルの表示

@@ -98,7 +98,7 @@
98 98
               <span>药品类型</span>
99 99
             </template>
100 100
              <template slot-scope="scope">
101
-               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
101
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请输入药品类型">
102 102
                 <el-option
103 103
                   v-for="(option, index) in drugTypeList"
104 104
                   :key="index"

+ 5 - 4
src/xt_pages/stock/drugs/drugStockOutOrder.vue ファイルの表示

@@ -667,10 +667,11 @@ export default {
667 667
     },
668 668
 
669 669
     handleEdit: function(index, row) {
670
-      this.$router.push({
671
-        name: "drugStockOutDetail",
672
-        query: { id: row.id, type: this.type }
673
-      });
670
+      // this.$router.push({
671
+      //   name: "drugStockOutDetail",
672
+      //   query: { id: row.id, type: this.type }
673
+      // });
674
+      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type})
674 675
     },
675 676
     // handleSearch(id,time,warehouse_out_order_number){
676 677
     //   this.warehousingOutInfo.warehousingOutData = []

+ 6 - 47
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue ファイルの表示

@@ -25,13 +25,7 @@
25 25
     </div>
26 26
 
27 27
     <div class="app-container">
28
-    <!---->
29
-      <!--<stock-in-dialog-->
30
-        <!--ref="dialog" :propForm="propForm"-->
31
-        <!--:visibility="isVisibility"-->
32
-        <!--v-on:dialog-comfirm="comfirm"-->
33
-        <!--v-on:dialog-cancle="cancle"-->
34
-      <!--&gt;</stock-in-dialog>-->
28
+  
35 29
 
36 30
       <drugs-stock-dialog
37 31
         ref="dialog" :propForm="propForm"
@@ -57,7 +51,7 @@
57 51
         ></el-date-picker>
58 52
       </div>
59 53
 
60
-      <div class="cell clearfix">
54
+      <!-- <div class="cell clearfix">
61 55
         <label class="title"><span class="name">经销商</span> : </label>
62 56
         <el-select
63 57
           size="small"
@@ -75,9 +69,9 @@
75 69
           >
76 70
           </el-option>
77 71
         </el-select>
78
-      </div>
72
+      </div> -->
79 73
 
80
-      <div class="cell clearfix">
74
+      <!-- <div class="cell clearfix">
81 75
         <label class="title"><span class="name">厂商</span> : </label>
82 76
         <el-select
83 77
           size="small"
@@ -95,7 +89,7 @@
95 89
           >
96 90
           </el-option>
97 91
         </el-select>
98
-      </div>
92
+      </div> -->
99 93
 
100 94
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
101 95
         <el-table
@@ -216,47 +210,12 @@
216 210
             </template>
217 211
           </el-table-column>
218 212
 
219
-        
220
-         
221
-          
222
-          <!-- <el-table-column width="80" align="center">
223
-            <template slot="header" slot-scope="scope">
224
-              <span>单位<span style="color: red">*</span></span>
225
-            </template>
226
-            <template slot-scope="scope">
227
-              <el-select v-model="scope.row.min_unit" style="width:100px;" placeholder="请选择">
228
-                <el-option
229
-                  v-for="(item,index) in getDataConfig('hemodialysis','units')"
230
-                  :key="index"
231
-                  :label="item.name"
232
-                  :value="item.name">
233
-                </el-option>
234
-              </el-select>
235
-            </template>
236
-          </el-table-column>
237
-          -->
238
-
239
-          
240
-
241 213
           <el-table-column label="总价" width="80" align="center">
242 214
             <template slot-scope="scope">
243 215
               {{ calculate(scope.row.last_price * scope.row.count) }}
244 216
             </template>
245 217
           </el-table-column>
246
-
247
-
248
-          <!-- <el-table-column label="零售价" align="center" width="150">
249
-            <template slot-scope="scope">
250
-              {{ scope.row.retail_price }}
251
-            </template>
252
-          </el-table-column>
253
-
254
-          <el-table-column label="零价总价" align="center" width="150">
255
-            <template slot-scope="scope">
256
-              {{ calculate(scope.row.retail_price * scope.row.count) }}
257
-            </template>
258
-          </el-table-column> -->
259
-          
218
+   
260 219
           <el-table-column label="生产厂家" width="140" align="center">
261 220
             <template slot-scope="scope">
262 221
                <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">

+ 208 - 50
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue ファイルの表示

@@ -38,16 +38,16 @@
38 38
       >
39 39
       </drugs-stock-dialog>
40 40
 
41
-      <div class="cell clearfix">
41
+      <!-- <div class="cell clearfix">
42 42
         <label class="title"><span class="name">出库时间</span> : </label>
43 43
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
44 44
                         style="width: 196px;"
45 45
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
46 46
                         value-format="yyyy-MM-dd"></el-date-picker>
47
-      </div>
47
+      </div> -->
48 48
 
49 49
 
50
-      <div class="cell clearfix">
50
+      <!-- <div class="cell clearfix">
51 51
         <label class="title"><span class="name">经销商</span> : </label>
52 52
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
53 53
           <el-option
@@ -57,9 +57,9 @@
57 57
             :value="option.id">
58 58
           </el-option>
59 59
         </el-select>
60
-      </div>
61
-
60
+      </div> -->
62 61
 
62
+<!-- 
63 63
       <div class="cell clearfix">
64 64
         <label class="title"><span class="name">厂商</span> : </label>
65 65
 
@@ -71,7 +71,7 @@
71 71
             :value="option.id">
72 72
           </el-option>
73 73
         </el-select>
74
-      </div>
74
+      </div> -->
75 75
 
76 76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
77 77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
@@ -85,84 +85,168 @@
85 85
 
86 86
             <template slot-scope="scope">
87 87
               <el-form-item style="padding-top: 15px">
88
-                <el-input
89
-                  placeholder="请输入药品名称"
90
-                  v-model="scope.row.drug_id"
91
-                  :value="typeName(scope.row.drug_id)"
92
-                  @focus="showDialog(scope.$index, scope.row)"
93
-                ></el-input>
88
+                 <el-autocomplete
89
+                    class="checkSearch"
90
+                    popper-class="my-autocomplete"
91
+                    v-model="scope.row.drug_name"
92
+                    :fetch-suggestions="querySearchAsync"
93
+                    :trigger-on-focus="false"
94
+                    placeholder="请输入药品名称"
95
+                    @select="handleSelect"
96
+                    @input="changeDrugName(scope.$index)"
97
+                    style="width:160px;"
98
+                  >
99
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
100
+                  <template slot-scope="{ item }">
101
+                    <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
102
+                  </template>
103
+                 </el-autocomplete>
94 104
               </el-form-item>
95 105
             </template>
96 106
           </el-table-column>
97
-          <el-table-column align="center" width="200">
107
+          <el-table-column align="center" width="140">
98 108
             <template slot="header" slot-scope="scope">
99
-              <span>规格名称<span style="color: red">*</span></span>
109
+              <span>药品类型</span>
110
+            </template>
111
+             <template slot-scope="scope">
112
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
113
+                <el-option
114
+                  v-for="(option, index) in drugTypeList"
115
+                  :key="index"
116
+                  :label="option.name"
117
+                  :value="option.id">
118
+                </el-option>
119
+               </el-select>
120
+            </template>
121
+          </el-table-column>
122
+          <el-table-column align="center" width="140">
123
+            <template slot="header" slot-scope="scope">
124
+              <span>规格&单位</span>
100 125
             </template>
101 126
             <template slot-scope="scope">
102
-              <el-form-item style="padding-top: 15px">
127
+              <el-form-item style="padding-top: 20px">
103 128
                 <el-input
104
-                  placeholder="请输入规格名称"
105
-                  v-model="scope.row.drug_id"
106
-                  :value="specificationName(scope.row.drug_id)"
107
-                  @focus="showDialog(scope.$index, scope.row)"
129
+                  :disabled="true"
130
+                  placeholder="请输入规格&单位"
131
+                  v-model="scope.row.name"
108 132
                 ></el-input>
109 133
               </el-form-item>
110 134
             </template>
111 135
           </el-table-column>
112
-
113
-
114
-          <el-table-column min-width="23" align="center">
136
+         <el-table-column align="center" width="150">
137
+            <template slot="header" slot-scope="scope" >
138
+                  <span>批号</span>
139
+              </template>
140
+                <template slot-scope="scope">
141
+                  <el-form-item style="padding-top: 20px">
142
+                    <el-input
143
+                      placeholder="请输入批号"
144
+                      v-model="scope.row.batch_number"
145
+                    ></el-input>
146
+                  </el-form-item>
147
+              </template>
148
+          </el-table-column>
149
+           <el-table-column width="120" align="center">
115 150
             <template slot="header" slot-scope="scope">
116
-              <span>进价<span style="color: red">*</span></span>
151
+              <span>出库数量<span style="color: red">*</span></span>
117 152
             </template>
118 153
             <template slot-scope="scope">
119
-              <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
120
-              <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
121
-                            style="padding-top: 17px">
122
-                <el-input type="number" v-model="scope.row.price"></el-input>
154
+              <el-form-item
155
+                :prop="'recordData.' + scope.$index + '.count'"
156
+                :rules="tableRules.count"
157
+                style="padding-top: 20px"
158
+              >
159
+                <div style="display:flex;">
160
+                  <el-input
161
+                    placeholder="请输入出库数量"
162
+                    type="number"
163
+                    v-model="scope.row.count"
164
+                  ></el-input>
165
+                  {{scope.row.packing_unit}}
166
+                </div>
123 167
               </el-form-item>
124
-
125
-
168
+              
126 169
             </template>
127 170
           </el-table-column>
128
-
129
-          <el-table-column min-width="23" align="center">
171
+         <el-table-column width="120" align="center">
130 172
             <template slot="header" slot-scope="scope">
131
-              <span>出库数量<span style="color: red">*</span></span>
173
+              <span>出货价<span style="color: red">*</span></span>
132 174
             </template>
133 175
             <template slot-scope="scope">
134
-              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
135
-                            style="padding-top: 17px">
136
-                <el-input type="number" v-model="scope.row.count"></el-input>
176
+            
177
+              <el-form-item
178
+                :prop="'recordData.' + scope.$index + '.last_price'"
179
+                :rules="tableRules.last_price"
180
+                style="padding-top: 20px"
181
+              >
182
+                <el-input
183
+                  placeholder="请输入出货价"
184
+                  type="number"
185
+                  v-model="scope.row.last_price"
186
+                ></el-input>
137 187
               </el-form-item>
138 188
             </template>
139 189
           </el-table-column>
140
-
141
-          <el-table-column label="进价总价" min-width="20" align="center">
190
+           <el-table-column label="总价" width="80" align="center">
142 191
             <template slot-scope="scope">
143
-              {{calculate(scope.row.price*scope.row.count)}}
192
+              {{ calculate(scope.row.last_price * scope.row.count) }}
144 193
             </template>
145 194
           </el-table-column>
146
-
147
-
148
-          <el-table-column label="零价" align="center" width="150">
195
+          <el-table-column label="生产厂家" width="140" align="center">
149 196
             <template slot-scope="scope">
150
-              {{ scope.row.retail_price }}
197
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
198
+                <el-option
199
+                  v-for="(option, index) in manufacturerList"
200
+                  :key="index"
201
+                  :label="option.manufacturer_name"
202
+                  :value="option.id">
203
+                </el-option>
204
+               </el-select>
151 205
             </template>
152 206
           </el-table-column>
153
-
154
-          <el-table-column label="零价总价" align="center" width="150">
207
+            <el-table-column label="生产日期" width="180" align="center">
155 208
             <template slot-scope="scope">
156
-              {{ calculate(scope.row.retail_price * scope.row.count) }}
209
+              <el-date-picker
210
+                prefix-icon="el-icon-date"
211
+                style="width: 145px"
212
+                v-model="scope.row.product_date"
213
+                type="date"
214
+                placeholder="选择日期时间"
215
+                format="yyyy-MM-dd"
216
+                value-format="yyyy-MM-dd"
217
+              ></el-date-picker>
218
+            </template>
219
+          </el-table-column>
220
+          <el-table-column label="有效日期" width="180" align="center">
221
+            <template slot-scope="scope">
222
+              <el-date-picker
223
+                prefix-icon="el-icon-date"
224
+                style="width: 145px"
225
+                v-model="scope.row.expiry_date"
226
+                type="date"
227
+                placeholder="选择日期时间"
228
+                format="yyyy-MM-dd"
229
+                value-format="yyyy-MM-dd"
230
+              ></el-date-picker>
231
+            </template>
232
+          </el-table-column>
233
+           <el-table-column align="center" width="150" label="批准文号">
234
+            <template slot-scope="scope">
235
+              <el-form-item style="padding-top: 20px">
236
+                <el-input
237
+                  placeholder="请输入批准文号"
238
+                  v-model="scope.row.number"
239
+                ></el-input>
240
+              </el-form-item>
157 241
             </template>
158 242
           </el-table-column>
159 243
 
160
-
161
-          <el-table-column label="备注" min-width="20" align="center">
244
+          <el-table-column label="备注" width="120" align="center">
162 245
             <template slot-scope="scope">
163 246
               <el-input v-model="scope.row.remark"></el-input>
164 247
             </template>
165 248
           </el-table-column>
249
+
166 250
           <el-table-column label="操作" align="center" min-width="20">
167 251
             <template slot-scope="scope">
168 252
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
@@ -200,7 +284,8 @@
200 284
   import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
201 285
   import BreadCrumb from '../../components/bread-crumb'
202 286
   import DrugsStockDialog from './drugsStockDialog/index'
203
-
287
+  import {postSearchDrugList } from "@/api/data"
288
+  import { getDictionaryDataConfig } from "@/utils/data";
204 289
   export default {
205 290
     components: { DrugsStockDialog, BreadCrumb},
206 291
     name: 'salesReturnEdit',
@@ -264,6 +349,8 @@
264 349
         dealer: [],
265 350
         goodType: [],
266 351
         goodInfo:[],
352
+        drugTypeList:[],
353
+        manufacturerList:[]
267 354
       }
268 355
     },
269 356
     methods: {
@@ -474,7 +561,8 @@
474 561
             return false
475 562
           }
476 563
         })
477
-      }, GetOrderDetail: function(order_id) {
564
+      }, 
565
+      GetOrderDetail: function(order_id) {
478 566
         const params = {
479 567
           'id': order_id
480 568
         }
@@ -483,12 +571,28 @@
483 571
             this.$message.error(response.data.msg)
484 572
             return false
485 573
           } else {
574
+             console.log("list222222",response.data.data.list)
575
+            var manulist = response.data.data.manulist
486 576
             for (let i = 0; i < response.data.data.list.length; i++) {
577
+              response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name,
578
+              response.data.data.list[i].drug_type = response.data.data.list[i].drug.drug_type
579
+              response.data.data.list[i].name = response.data.data.list[i].drug.dose + response.data.data.list[i].drug.dose_unit +"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit + "/" + response.data.data.list[i].drug.max_unit
580
+              response.data.data.list[i].last_price = response.data.data.list[i].drug.last_price.toString()
581
+              response.data.data.list[i].number = response.data.data.list[i].drug.number
582
+              response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
487 583
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
488 584
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
489 585
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
490 586
               this.recordInfo.recordData.push(response.data.data.list[i])
491 587
             }
588
+             for(let j=0;j<this.recordInfo.recordData.length;j++){
589
+               for(let i=0;i<manulist.length;i++){
590
+                  if(this.recordInfo.recordData[j].manufacturer == manulist[i].id){
591
+                     this.recordInfo.recordData[j].manufacturer = manulist[i].manufacturer_name
592
+                  }
593
+               }
594
+              }
595
+
492 596
             this.warehouseOut = response.data.data.info
493 597
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
494 598
             this.form.manufacturer = this.warehouseOut.manufacturer
@@ -517,9 +621,63 @@
517 621
         this.propForm.manufacturer = val
518 622
       }, changeDealer(val) {
519 623
         this.propForm.dealer = val
520
-      }
624
+      },
625
+      querySearchAsync(keyword, cb) {
626
+        let key = '';
627
+        if (keyword != undefined) {
628
+          key = keyword
629
+        }
630
+        let searchArray = [];
631
+        postSearchDrugList(key).then(response => {
632
+          if (response.data.state == 1) {
633
+            searchArray = response.data.data.list;
634
+            
635
+             var list = response.data.data.list
636
+             console.log("猎豹22222222222",list)
637
+
638
+             this.drugList = list
639
+             var manufacturerList = response.data.data.manufacturerList
640
+             this.manufacturerList = manufacturerList
641
+             for(let i=0;i<this.drugList.length;i++){
642
+             
643
+                for(let j=0;j<this.manufacturerList.length;j++){
644
+                  if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
645
+                     this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
646
+                  }
647
+                }
648
+             }
649
+           
650
+             cb(this.drugList)
651
+          } else {
652
+            cb([])
653
+          }
654
+        })
655
+      },
656
+     changeDrugName(val){
657
+        this.currentIndex = val
658
+      },
659
+      handleSelect(val){
660
+         for(let i=0;i<this.recordInfo.recordData.length;i++){
661
+           if(i == this.currentIndex){
662
+             this.recordInfo.recordData[i].drug_id  = val.id
663
+             this.recordInfo.recordData[i].drug_name = val.drug_name
664
+             this.recordInfo.recordData[i].drug_type = val.drug_type
665
+             this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
666
+             this.recordInfo.recordData[i].last_price = val.last_price
667
+             this.recordInfo.recordData[i].manufacturer =  val.manufacturer
668
+             this.recordInfo.recordData[i].batch_number = val.number
669
+             this.recordInfo.recordData[i].max_unit = val.max_unit
670
+             this.recordInfo.recordData[i].min_unit = val.min_unit
671
+           }
672
+        }
673
+        console.log("333333",this.recordInfo.recordData)
674
+      },
675
+      getDictionaryDataConfig(module, filed_name) {
676
+        return getDictionaryDataConfig(module, filed_name)
677
+      },
521 678
     },
522 679
     created() {
680
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
523 681
       this.GetConfigInfo()
524 682
       this.propForm.goodUnit = this.$store.getters.good_unit
525 683
       const order_id = this.$route.query.id

+ 8 - 26
src/xt_pages/stock/stockBatchNumber.vue ファイルの表示

@@ -166,15 +166,13 @@
166 166
       }
167 167
     },
168 168
     methods:{
169
-    
170
-     
171 169
        handleSizeChange(val) {
172 170
         this.limit = val
173
-        this.GetAllDrugStockQueryList()
171
+        this.getlist()
174 172
       },
175 173
       handleCurrentChange(val) {
176 174
         this.page = val
177
-        this.GetAllDrugStockQueryList()
175
+        this.getlist()
178 176
       },
179 177
         
180 178
     startTimeChange: function(val) {
@@ -184,7 +182,7 @@
184 182
         this.$message.error("开始时间不能大于结束时间");
185 183
         this.start_time = "";
186 184
       } else {
187
-        this.GetAllDrugStockQueryList();
185
+        this.getlist()
188 186
       }
189 187
     },
190 188
     endTimeChange: function(val) {
@@ -193,7 +191,7 @@
193 191
         this.$message.error("结束时间不能小于开始时间");
194 192
         this.end_time = "";
195 193
       } else {
196
-        this.GetAllDrugStockQueryList();
194
+       this.getlist()
197 195
       }
198 196
      },
199 197
      changeDrug(){},
@@ -238,26 +236,10 @@
238 236
          }
239 237
       })
240 238
      },
241
-    //  getOutList(){
242
-    //   var params= {
243
-    //       limit:this.limit,
244
-    //       page:this.page,
245
-    //       id:this.$route.query.id,
246
-    //       start_time:this.start_time,
247
-    //       end_time:this.end_time, 
248
-    //     } 
249
-    //    getStockOutList(params).then(response=>{
250
-    //       if(response.data.state == 1){
251
-    //          var outlist = response.data.data.outList
252
-    //          console.log("出库数据",outlist)
253
-    //          for(let i=0;i<outlist.length;i++){
254
-    //            outlist[i].stock_way = 2
255
-    //            this.tableList.push(outlist[i])
256
-    //          }
257
-    //          console.log("hhhhhhhhhhh",this.tableList)
258
-    //       }
259
-    //    })  
260
-    //  }
239
+     getTimestamp(time) {
240
+      // 把时间日期转成时间戳
241
+      return new Date(time).getTime() / 1000;
242
+     },
261 243
     }
262 244
   }
263 245
 </script>

+ 75 - 38
src/xt_pages/stock/stockFlow.vue ファイルの表示

@@ -6,8 +6,9 @@
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8 8
        耗材名称:{{this.$route.query.good_name}}
9
-       <!-- 库存:
10
-       厂家: -->
9
+       库存:{{getInCount(this.$route.query.id)}}
10
+       <!-- 厂家:{{this.$route.query.manufacturer}}
11
+       规格: -->
11 12
       </div>
12 13
       <div class="cell clearfix">
13 14
         <span>日期查询:</span>
@@ -38,15 +39,15 @@
38 39
               @change="endTimeChange"
39 40
           ></el-date-picker>
40 41
 
41
-        <span>出入库方式:</span>
42
-        <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
42
+        <!-- <span>出入库方式:</span> -->
43
+        <!-- <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43 44
             <el-option
44 45
               v-for="(item,index) in stockType"
45 46
               :key="index"
46 47
               :label="item.name"
47 48
               :value="item.id">
48 49
             </el-option>
49
-        </el-select>
50
+        </el-select> -->
50 51
         
51 52
         
52 53
       </div>
@@ -84,9 +85,10 @@
84 85
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85 86
            </template>
86 87
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量"  align="center">
88
+         <el-table-column prop="drug_name" label="剩余库存量"  align="center">
88 89
            <template slot-scope="scope">
89
-             <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span>
90
+             <!-- <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span> -->
91
+              {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
90 92
            </template>
91 93
         </el-table-column>
92 94
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
@@ -133,15 +135,15 @@
133 135
 <script>
134 136
   import { uParseTime } from '@/utils/tools'
135 137
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
136
-  import {getStockInList,getStockOutList} from "@/api/drug/drug_stock";
138
+  import {getStockInList} from "@/api/drug/drug_stock";
139
+  import {getStockDrugCount} from "@/api/stock"
137 140
   export default {
138 141
     name: 'stockIn',
139 142
     created() {
140
-    //   var drugCategory = getDictionaryDataConfig('system','drug_category')
141
-    //   this.drugCategory.push(...drugCategory)
142
-    //   this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
+     
143 144
       this.getlist()
144
-      this.getOutList()
145
+      this.getStockDrugCount()
146
+
145 147
     },
146 148
     components: {
147 149
       BreadCrumb
@@ -184,7 +186,11 @@
184 186
           {id:2,name:"自动出库"},
185 187
           {id:3,name:"入库"},
186 188
         ],
187
-      
189
+        countList:[],
190
+        outCountList:[],
191
+        autoCountList:[],
192
+        keywords:"",
193
+        obj:{},
188 194
       }
189 195
     },
190 196
     methods:{
@@ -192,11 +198,11 @@
192 198
      
193 199
        handleSizeChange(val) {
194 200
         this.limit = val
195
-        this.GetAllDrugStockQueryList()
201
+        this.getlist()
196 202
       },
197 203
       handleCurrentChange(val) {
198 204
         this.page = val
199
-        this.GetAllDrugStockQueryList()
205
+        this.getlist()
200 206
       },
201 207
         
202 208
     startTimeChange: function(val) {
@@ -206,7 +212,7 @@
206 212
         this.$message.error("开始时间不能大于结束时间");
207 213
         this.start_time = "";
208 214
       } else {
209
-        this.GetAllDrugStockQueryList();
215
+        this.getlist()
210 216
       }
211 217
     },
212 218
     endTimeChange: function(val) {
@@ -215,10 +221,9 @@
215 221
         this.$message.error("结束时间不能小于开始时间");
216 222
         this.end_time = "";
217 223
       } else {
218
-        this.GetAllDrugStockQueryList();
224
+       this.getlist()
219 225
       }
220 226
      },
221
-     changeDrug(){},
222 227
      getManufacturer(id){
223 228
        var name = ""
224 229
        for(let i=0;i<this.manufacturerList.length;i++){
@@ -262,26 +267,58 @@
262 267
          }
263 268
       })
264 269
      },
265
-    //  getOutList(){
266
-    //   var params= {
267
-    //       limit:this.limit,
268
-    //       page:this.page,
269
-    //       id:this.$route.query.id,
270
-    //       start_time:this.start_time,
271
-    //       end_time:this.end_time, 
272
-    //     } 
273
-    //    getStockOutList(params).then(response=>{
274
-    //       if(response.data.state == 1){
275
-    //          var outlist = response.data.data.outList
276
-    //          console.log("出库数据",outlist)
277
-    //          for(let i=0;i<outlist.length;i++){
278
-    //            outlist[i].stock_way = 2
279
-    //            this.tableList.push(outlist[i])
280
-    //          }
281
-    //          console.log("hhhhhhhhhhh",this.tableList)
282
-    //       }
283
-    //    })  
284
-    //  }
270
+    getStockDrugCount(){
271
+        var params ={
272
+          keywords: this.keywords,
273
+          start_time:this.start_time,
274
+          end_time:this.end_time,
275
+        }
276
+      getStockDrugCount(params).then(response=>{
277
+         if(response.data.state == 1){
278
+           var count = response.data.data.count
279
+           console.log("详情入库统计",count)
280
+           this.countList = count
281
+           var outlist = response.data.data.outList
282
+           console.log("详情出库数量",outlist)
283
+           this.outCountList = outlist
284
+           var autoCount = response.data.data.autoCount
285
+           console.log("详情自动出库",autoCount)
286
+           this.autoCountList = autoCount
287
+         }
288
+      })
289
+    },
290
+    getInCount(id){
291
+      var count= ""
292
+      for(let i=0;i<this.countList.length;i++){
293
+          if(id == this.countList[i].good_id){
294
+              count = this.countList[i].count
295
+          }
296
+        }
297
+        return count
298
+        },
299
+      getOutCount(id){
300
+        console.log("id222",id)
301
+        var count = ""
302
+        for(let i=0;i<this.outCountList.length;i++){
303
+          if(id == this.outCountList[i].good_id){
304
+            count = this.outCountList[i].count
305
+          }
306
+        }
307
+        return count
308
+      },
309
+      getAutoCount(id){
310
+        var count= ""
311
+        for(let i=0;i<this.autoCountList.length;i++){
312
+          if(id == this.autoCountList[i].good_id){
313
+            count = this.outCountList[i].count
314
+          }
315
+        }
316
+        return count
317
+      },
318
+     getTimestamp(time) {
319
+      // 把时间日期转成时间戳
320
+      return new Date(time).getTime() / 1000;
321
+     },
285 322
     }
286 323
   }
287 324
 </script>

+ 34 - 5
src/xt_pages/stock/stockOutOrder.vue ファイルの表示

@@ -232,7 +232,8 @@
232 232
         
233 233
         <el-table-column label="出库数量" align="center">
234 234
           <template slot-scope="scope">
235
-            {{ scope.row.count}}
235
+           <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}</span> 
236
+           <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}</span> 
236 237
           </template>
237 238
         </el-table-column>
238 239
 
@@ -277,7 +278,7 @@
277 278
         </el-table-column>
278 279
         <el-table-column label="操作" align="center">
279 280
           <template slot-scope="scope">
280
-            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetail(scope.row.id)">使用明细</span>
281
+            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetailById(scope.row)">使用明细</span>
281 282
           </template>
282 283
         </el-table-column>
283 284
       </el-table>  
@@ -697,7 +698,8 @@ import {
697 698
   deleteWarehouseOutInfo,
698 699
   GetAllGoodInfoByID,
699 700
   editWarehouseoutInfo,
700
-  getOrderDetailByOrderId
701
+  getOrderDetailByOrderId,
702
+  getOrderDetailById
701 703
 } from "@/api/stock";
702 704
 import BreadCrumb from "../components/bread-crumb";
703 705
 import StockInDialog from './Dialog/stockInDialog'
@@ -1521,8 +1523,35 @@ export default {
1521 1523
         })
1522 1524
       }, 
1523 1525
      
1524
-     
1525
-
1526
+      GetOrderDetailById(val){
1527
+         this.userList =[]
1528
+         var params = {
1529
+           good_id:val.good_id,
1530
+           record_time:val.sys_record_time,
1531
+          }
1532
+         getOrderDetailById(params).then(response=>{
1533
+            if(response.data.state == 1){
1534
+              var total = 0
1535
+              var list = response.data.data.list
1536
+              var arrList =  this.unique(list)
1537
+              for (let i = 0; i < arrList.length; i++) {
1538
+                var obj = arrList[i]
1539
+                obj['is_total'] = 0
1540
+                this.userList.push(obj)
1541
+                total = total + arrList[i].count
1542
+              }
1543
+              this.userList.push({
1544
+                is_total: 1,
1545
+                total: total,
1546
+              })
1547
+              // this.type_name = this.userList[0].type.type_name
1548
+              // this.specification_name = this.userList[0].info.specification_name
1549
+              console.log("详情数据区",this.userList)
1550
+              this.editdialogVisibleThree = true
1551
+            }
1552
+         })
1553
+      },
1554
+    
1526 1555
   }
1527 1556
 };
1528 1557
 </script>

+ 10 - 3
src/xt_pages/stock/stockQuery.vue ファイルの表示

@@ -108,7 +108,7 @@
108 108
        </el-table-column>
109 109
        <el-table-column label="出库数量" align="center">
110 110
          <template slot-scope="scope">
111
-           <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
111
+           <span>{{getOutCount(scope.row.good_id) + getAutoCount(scope.row.good_id)}}</span>
112 112
 
113 113
          </template>
114 114
        </el-table-column>
@@ -261,7 +261,7 @@ export default {
261 261
 
262 262
          }
263 263
 
264
-        console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
264
+       
265 265
       });
266 266
     },
267 267
 
@@ -455,7 +455,14 @@ export default {
455 455
        return name
456 456
     },
457 457
     toClick(val){
458
-      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name})
458
+       var manufacturer_name = ""
459
+       for(let i=0;i<this.manufacturerList.length;i++){
460
+          if(val.manufacturer == this.manufacturerList[i].id){
461
+            manufacturer_name = this.manufacturerList[i].manufacturer_name  
462
+          }
463
+       }
464
+      console.log("厂家22222",manufacturer_name)
465
+      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name})
459 466
     },
460 467
     toClickOne(val){
461 468
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})