XMLWAN 3 anos atrás
pai
commit
aaddf0b2b9

+ 8 - 0
src/api/stock.js Ver arquivo

922
     params: params
922
     params: params
923
   })
923
   })
924
 }
924
 }
925
+
926
+export function getGoodWarehouseList(params) {
927
+  return request({
928
+    url: '/api/stock/getgoodwarehouselist',
929
+    method: 'Get',
930
+    params: params
931
+  })
932
+}

+ 121 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Ver arquivo

440
            </template>
440
            </template>
441
           </el-table-column>
441
           </el-table-column>
442
 
442
 
443
+           <el-table-column
444
+            prop="heparin"
445
+            align="center"
446
+            label="累计血容量"
447
+            width="140"
448
+            v-if="isShow('累计血容量')"
449
+          >
450
+           <template slot-scope="scope">
451
+              {{scope.row.accumulated_blood_volume}}
452
+           </template>
453
+          </el-table-column>
454
+
455
+           <el-table-column
456
+            prop="heparin"
457
+            align="center"
458
+            label="血温监测"
459
+            width="140"
460
+            v-if="isShow('血温监测')"
461
+          >
462
+           <template slot-scope="scope">
463
+              {{scope.row.blood_temperature}}
464
+           </template>
465
+          </el-table-column>
466
+
467
+           <el-table-column
468
+            prop="heparin"
469
+            align="center"
470
+            label="尿素监测"
471
+            width="140"
472
+            v-if="isShow('尿素监测')"
473
+          >
474
+           <template slot-scope="scope">
475
+              {{scope.row.urea_monitoring}}
476
+           </template>
477
+          </el-table-column>
478
+
479
+          <el-table-column
480
+            prop="heparin"
481
+            align="center"
482
+            label="血浓量"
483
+            width="140"
484
+            v-if="isShow('血浓量')"
485
+          >
486
+           <template slot-scope="scope">
487
+              {{scope.row.blood_thickness}}
488
+           </template>
489
+          </el-table-column>
490
+
491
+         <el-table-column
492
+            prop="heparin"
493
+            align="center"
494
+            label="血压监测"
495
+            width="140"
496
+            v-if="isShow('血压监测')"
497
+          >
498
+           <template slot-scope="scope">
499
+              {{scope.row.blood_monitor}}
500
+           </template>
501
+          </el-table-column>
502
+
503
+
443
 
504
 
444
            <el-table-column
505
            <el-table-column
445
             prop="heparin"
506
             prop="heparin"
714
             </el-form-item>
775
             </el-form-item>
715
          </el-col>
776
          </el-col>
716
 
777
 
778
+          <el-col :span="8" v-if=" isShow('累计血容量')">
779
+            <el-form-item label="累计血容量:">
780
+              <el-input v-model="form.accumulated_blood_volume"></el-input>
781
+            </el-form-item>
782
+          </el-col>
783
+
784
+          <el-col :span="8" v-if=" isShow('血温监测')">
785
+            <el-form-item label="血温监测">
786
+              <el-input v-model="form.blood_temperature"></el-input>
787
+            </el-form-item>
788
+          </el-col>
789
+
790
+          <el-col :span="8" v-if=" isShow('尿素监测')">
791
+            <el-form-item label="尿素监测">
792
+              <el-input v-model="form.urea_monitoring"></el-input>
793
+            </el-form-item>
794
+          </el-col>
717
 
795
 
796
+          <el-col :span="8" v-if=" isShow('血浓量')">
797
+            <el-form-item label="血浓量">
798
+              <el-input v-model="form.blood_thickness"></el-input>
799
+            </el-form-item>
800
+          </el-col>
801
+
802
+          <el-col :span="8" v-if=" isShow('血压监测')">
803
+            <el-form-item label="血压监测">
804
+              <el-input v-model="form.blood_monitor"></el-input>
805
+            </el-form-item>
806
+          </el-col>
718
 
807
 
719
           <!-- </el-row>
808
           <!-- </el-row>
720
 
809
 
907
         monitor_anticoagulant:'',
996
         monitor_anticoagulant:'',
908
         monitor_anticoagulant_value:"",
997
         monitor_anticoagulant_value:"",
909
         blood_pressure_monitoring_site:"",
998
         blood_pressure_monitoring_site:"",
910
-        complication:""
999
+        complication:"",
1000
+        accumulated_blood_volume:"",
1001
+        blood_temperature:"",
1002
+        urea_monitoring:"",
1003
+        blood_thickness:"",
1004
+        blood_monitor:"",
911
       },
1005
       },
912
 
1006
 
913
       table_current_row: null,
1007
       table_current_row: null,
1126
         this.form.conductivity = resp.monitor.conductivity?resp.monitor.conductivity:'';
1220
         this.form.conductivity = resp.monitor.conductivity?resp.monitor.conductivity:'';
1127
         this.form.monitor_anticoagulant = resp.monitor.monitor_anticoagulant?resp.monitor.monitor_anticoagulant:"";
1221
         this.form.monitor_anticoagulant = resp.monitor.monitor_anticoagulant?resp.monitor.monitor_anticoagulant:"";
1128
         this.form.monitor_anticoagulant_value = resp.monitor.monitor_anticoagulant_value?resp.monitor.monitor_anticoagulant_value:""
1222
         this.form.monitor_anticoagulant_value = resp.monitor.monitor_anticoagulant_value?resp.monitor.monitor_anticoagulant_value:""
1129
-
1223
+        this.form.accumulated_blood_volume  = resp.monitor.accumulated_blood_volume?resp.monitor.accumulated_blood_volume:""
1224
+        this.form.blood_temperature = resp.monitor.blood_temperature?resp.monitor.blood_temperature:""
1225
+        this.form.urea_monitoring = resp.monitor.urea_monitoring?resp.monitor.urea_monitoring:""
1226
+        this.form.blood_thickness = resp.monitor.blood_thickness?resp.monitor.blood_thickness:""
1227
+        this.form.blood_monitor = resp.monitor.blood_monitor?resp.monitor.blood_monitor:""
1130
       })
1228
       })
1131
     },
1229
     },
1132
 
1230
 
1152
       // console.log("tableCurrentRowChange", currentRow)
1250
       // console.log("tableCurrentRowChange", currentRow)
1153
     },
1251
     },
1154
     setEditMonitor: function(monitor) {
1252
     setEditMonitor: function(monitor) {
1253
+      console.log("monitor23223322332",monitor)
1155
       if (monitor == null || monitor == undefined) {
1254
       if (monitor == null || monitor == undefined) {
1156
         this.form.id = 0;
1255
         this.form.id = 0;
1157
         // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
1256
         // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
1190
         this.form.blood_sugar = '';
1289
         this.form.blood_sugar = '';
1191
         this.form.monitor_anticoagulant = '';
1290
         this.form.monitor_anticoagulant = '';
1192
         this.form.monitor_anticoagulant_value = ''
1291
         this.form.monitor_anticoagulant_value = ''
1292
+        this.form.accumulated_blood_volume  = ""
1293
+        this.form.blood_temperature = ""
1294
+        this.form.urea_monitoring = ""
1295
+        this.form.blood_thickness = ""
1296
+        this.form.blood_monitor = ""
1193
       } else {
1297
       } else {
1194
         (this.form.id = monitor.id),
1298
         (this.form.id = monitor.id),
1195
         // this.form.operate_date = monitor.operate_date
1299
         // this.form.operate_date = monitor.operate_date
1227
         this.form.blood_sugar = monitor.blood_sugar?monitor.blood_sugar:'';
1331
         this.form.blood_sugar = monitor.blood_sugar?monitor.blood_sugar:'';
1228
         this.form.monitor_anticoagulant = monitor.monitor_anticoagulant?monitor.monitor_anticoagulant:'';
1332
         this.form.monitor_anticoagulant = monitor.monitor_anticoagulant?monitor.monitor_anticoagulant:'';
1229
         this.form.monitor_anticoagulant_value = monitor.monitor_anticoagulant_value?monitor.monitor_anticoagulant_value:"";
1333
         this.form.monitor_anticoagulant_value = monitor.monitor_anticoagulant_value?monitor.monitor_anticoagulant_value:"";
1334
+        this.form.accumulated_blood_volume  = monitor.accumulated_blood_volume?monitor.accumulated_blood_volume:""
1335
+        this.form.blood_temperature = monitor.blood_temperature?monitor.blood_temperature:""
1336
+        this.form.urea_monitoring = monitor.urea_monitoring?monitor.urea_monitoring:""
1337
+        this.form.blood_thickness = monitor.blood_thickness?monitor.blood_thickness:""
1338
+        this.form.blood_monitor = monitor.blood_monitor?monitor.blood_monitor:""
1230
         // 设置三个下拉框的值,直接调用事件偷懒
1339
         // 设置三个下拉框的值,直接调用事件偷懒
1231
         this.symptomTextareaBlur();
1340
         this.symptomTextareaBlur();
1232
         this.disposeTextareaBlur();
1341
         this.disposeTextareaBlur();
1269
       this.form.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value;
1378
       this.form.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value;
1270
       this.form.blood_pressure_monitoring_site = parseInt(this.form.blood_pressure_monitoring_site);
1379
       this.form.blood_pressure_monitoring_site = parseInt(this.form.blood_pressure_monitoring_site);
1271
       this.form.complication = parseInt(this.form.complication);
1380
       this.form.complication = parseInt(this.form.complication);
1381
+      this.form.blood_temperature = parseFloat(this.form.blood_temperature) == NaN ? 0 : parseFloat(this.form.blood_temperature);
1382
+      this.form.accumulated_blood_volume = parseFloat(this.form.accumulated_blood_volume) == NaN ? 0 : parseFloat(this.form.accumulated_blood_volume);
1383
+      this.form.urea_monitoring = parseFloat(this.form.urea_monitoring) == NaN ? 0 : parseFloat(this.form.urea_monitoring);
1384
+      this.form.blood_thickness = parseFloat(this.form.blood_thickness) == NaN ? 0 : parseFloat(this.form.blood_thickness);
1385
+      this.form.blood_monitor = parseFloat(this.form.blood_monitor) == NaN ? 0 : parseFloat(this.form.blood_monitor);
1272
       let mode = '1';
1386
       let mode = '1';
1273
       if (this.form.id > 0) {
1387
       if (this.form.id > 0) {
1274
         mode = '2';
1388
         mode = '2';
1329
             this.form.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value;
1443
             this.form.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value;
1330
             this.form.blood_pressure_monitoring_site = this.form.blood_pressure_monitoring_site;
1444
             this.form.blood_pressure_monitoring_site = this.form.blood_pressure_monitoring_site;
1331
             this.form.complication = this.form.complication;
1445
             this.form.complication = this.form.complication;
1446
+            this.form.blood_temperature = parseFloat(this.form.blood_temperature) == NaN ? 0 : parseFloat(this.form.blood_temperature);
1447
+            this.form.accumulated_blood_volume = parseFloat(this.form.accumulated_blood_volume) == NaN ? 0 : parseFloat(this.form.accumulated_blood_volume);
1448
+            this.form.urea_monitoring = parseFloat(this.form.urea_monitoring) == NaN ? 0 : parseFloat(this.form.urea_monitoring);
1449
+            this.form.blood_thickness = parseFloat(this.form.blood_thickness) == NaN ? 0 : parseFloat(this.form.blood_thickness);
1450
+            this.form.blood_monitor = parseFloat(this.form.blood_monitor) == NaN ? 0 : parseFloat(this.form.blood_monitor);
1332
             this.$message.error(resp.msg)
1451
             this.$message.error(resp.msg)
1333
           }
1452
           }
1334
         }
1453
         }

+ 10 - 0
src/xt_pages/dialysis/details/dialysisMonitoring.vue Ver arquivo

31
           <th v-if="isShow('透析液流量')" width="92px">透析液流量(ml/h)</th>
31
           <th v-if="isShow('透析液流量')" width="92px">透析液流量(ml/h)</th>
32
           <th v-if="isShow('肝素用量余量')" width="92px">肝素用量余量(ml)</th>
32
           <th v-if="isShow('肝素用量余量')" width="92px">肝素用量余量(ml)</th>
33
           <th v-if="isShow('抗凝剂')" width="92px">抗凝剂</th>
33
           <th v-if="isShow('抗凝剂')" width="92px">抗凝剂</th>
34
+          <th v-if="isShow('累计血容量')" width="92px">累计血容量</th>
35
+          <th v-if="isShow('血温监测')" width="92px">血温监测</th>
36
+          <th v-if="isShow('尿素监测')" width="92px">尿素监测</th>
37
+          <th v-if="isShow('血浓量')" width="92px">血浓量</th>
38
+          <th v-if="isShow('血压监测')" width="92px">血压监测</th>
34
           <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
39
           <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
35
           <th v-if="isShow('并发症')" width="92px">并发症</th> -->
40
           <th v-if="isShow('并发症')" width="92px">并发症</th> -->
36
           <th v-if="isShow('KT/V') && org_id == 9987" width="92px">KT/V</th>
41
           <th v-if="isShow('KT/V') && org_id == 9987" width="92px">KT/V</th>
74
           </td>
79
           </td>
75
           <!-- <th v-if="isShow('血压监测部位')">{{getBloodPressure(monitor.blood_pressure_monitoring_site)}}</th>
80
           <!-- <th v-if="isShow('血压监测部位')">{{getBloodPressure(monitor.blood_pressure_monitoring_site)}}</th>
76
           <th v-if="isShow('并发症')">{{getComplication(monitor.complication)}}</th> -->
81
           <th v-if="isShow('并发症')">{{getComplication(monitor.complication)}}</th> -->
82
+          <th v-if="isShow('累计血容量')" width="92px">{{monitor.accumulated_blood_volume ? monitor.accumulated_blood_volume : ""}}</th>
83
+          <th v-if="isShow('血温监测')" width="92px">{{monitor.blood_temperature ? monitor.blood_temperature : ""}}</th>
84
+          <th v-if="isShow('尿素监测')" width="92px">{{monitor.urea_monitoring ? monitor.urea_monitoring : ""}}</th>
85
+          <th v-if="isShow('血浓量')" width="92px">{{monitor.blood_thickness ? monitor.blood_thickness : ""}}</th>
86
+          <th v-if="isShow('血压监测')" width="92px">{{monitor.blood_monitor ? monitor.blood_monitor : ""}}</th>
77
           <td v-if="isShow('KT/V') && org_id == 9987">{{ monitor.ktv?monitor.ktv:""}}</td>
87
           <td v-if="isShow('KT/V') && org_id == 9987">{{ monitor.ktv?monitor.ktv:""}}</td>
78
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
88
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
79
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>
89
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>

+ 90 - 23
src/xt_pages/stock/stockDamaged.vue Ver arquivo

130
             <el-form-item label="规格">
130
             <el-form-item label="规格">
131
                 <el-input v-model="form.specification_name"></el-input>
131
                 <el-input v-model="form.specification_name"></el-input>
132
             </el-form-item>
132
             </el-form-item>
133
+            <el-form-item label="批号">
134
+                 <el-select v-model="form.number" filterable placeholder="请选择">
135
+                  <el-option
136
+                    v-for="(item,index) in numberList"
137
+                    :key="index"
138
+                    :label="item.number"
139
+                    :value="item.number">
140
+                  </el-option>
141
+                </el-select>
142
+            </el-form-item>
133
             <el-form-item label="单位">
143
             <el-form-item label="单位">
134
                 <el-input v-model="form.warehousing_unit"></el-input>
144
                 <el-input v-model="form.warehousing_unit"></el-input>
135
             </el-form-item>
145
             </el-form-item>
165
             </el-form-item>
175
             </el-form-item>
166
         </el-form>
176
         </el-form>
167
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
177
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
168
-            <el-table-column prop="date" label="耗材ID" width="100">
178
+            <el-table-column prop="date" label="耗材ID" width="100" align="center">
169
                <template  slot-scope="scope">
179
                <template  slot-scope="scope">
170
                  {{scope.row.good_id}}
180
                  {{scope.row.good_id}}
171
                </template>
181
                </template>
172
             </el-table-column>
182
             </el-table-column>
173
-            <el-table-column prop="date" label="耗材名称" width="100">
183
+            <el-table-column prop="date" label="耗材名称" width="100" align="center">
174
                <template  slot-scope="scope">
184
                <template  slot-scope="scope">
175
                 {{scope.row.good_name}}
185
                 {{scope.row.good_name}}
176
                </template>
186
                </template>
177
             </el-table-column>
187
             </el-table-column>
178
-            <el-table-column  prop="name" label="规格" width="100">
188
+            <el-table-column  prop="name" label="规格" width="100" align="center">
179
               <template  slot-scope="scope">
189
               <template  slot-scope="scope">
180
                 {{scope.row.specification_name}}
190
                 {{scope.row.specification_name}}
181
                </template>
191
                </template>
182
             </el-table-column>
192
             </el-table-column>
183
-            <el-table-column prop="name" label="单位" width="100">
193
+            <el-table-column prop="name" label="单位" width="100" align="center">
184
               <template  slot-scope="scope">
194
               <template  slot-scope="scope">
185
                 {{scope.row.warehousing_unit}}
195
                 {{scope.row.warehousing_unit}}
186
                </template>
196
                </template>
187
             </el-table-column>
197
             </el-table-column>
188
-            <el-table-column prop="name" label="报损数量" width="100">
198
+            <el-table-column prop="name" label="报损数量" width="100" align="center">
189
               <template  slot-scope="scope">
199
               <template  slot-scope="scope">
190
                 {{scope.row.count}}
200
                 {{scope.row.count}}
191
                </template>
201
                </template>
192
             </el-table-column>
202
             </el-table-column>
193
-            <el-table-column prop="name" label="原进货价" width="100">
203
+            <el-table-column prop="name" label="原进货价" width="100" align="center">
194
                <template  slot-scope="scope">
204
                <template  slot-scope="scope">
195
                 {{scope.row.buy_price}}
205
                 {{scope.row.buy_price}}
196
                </template>
206
                </template>
197
             </el-table-column>
207
             </el-table-column>
198
-            <el-table-column prop="name" label="原零售价" width="100">
208
+            <el-table-column prop="name" label="原零售价" width="100" align="center">
199
                <template  slot-scope="scope">
209
                <template  slot-scope="scope">
200
                 {{scope.row.packing_price}}
210
                 {{scope.row.packing_price}}
201
                </template>
211
                </template>
205
                 {{scope.row.new_price}}
215
                 {{scope.row.new_price}}
206
                </template>
216
                </template>
207
             </el-table-column> -->
217
             </el-table-column> -->
208
-            <el-table-column prop="name" label="生产厂商" width="100">
218
+            <el-table-column prop="name" label="生产厂商" width="100" align="center">
209
               <template  slot-scope="scope">
219
               <template  slot-scope="scope">
210
                 {{scope.row.manufacturer}}
220
                 {{scope.row.manufacturer}}
211
                </template>
221
                </template>
212
             </el-table-column>
222
             </el-table-column>
213
-            <el-table-column prop="name" label="产地" width="100">
223
+            <el-table-column prop="name" label="产地" width="100" align="center">
214
                <template  slot-scope="scope">
224
                <template  slot-scope="scope">
215
                 {{scope.row.good_origin_place}}
225
                 {{scope.row.good_origin_place}}
216
                </template>
226
                </template>
217
             </el-table-column>
227
             </el-table-column>
218
-            <el-table-column prop="name" label="批准文号" width="100">
228
+            <el-table-column prop="name" label="批准文号" width="100" align="center">
219
               <template  slot-scope="scope">
229
               <template  slot-scope="scope">
220
                 {{scope.row.license_number}}
230
                 {{scope.row.license_number}}
221
                </template>
231
                </template>
222
             </el-table-column>
232
             </el-table-column>
223
-            <el-table-column  prop="name" label="备注" width="100">
233
+            <el-table-column  prop="name" label="备注" width="100" align="center">
224
               <template  slot-scope="scope">
234
               <template  slot-scope="scope">
225
                 {{scope.row.remark}}
235
                 {{scope.row.remark}}
226
                </template>
236
                </template>
364
 <script>
374
 <script>
365
 import BreadCrumb from "../components/bread-crumb";
375
 import BreadCrumb from "../components/bread-crumb";
366
 import { uParseTime } from '@/utils/tools'
376
 import { uParseTime } from '@/utils/tools'
367
-import { postSearchGoodWarehouseList,saveReportStock,getReportStockList,SaveCheckedDamage,getStockDamageDetail,modifyPrice,deleteStockDamage} from "@/api/stock"
377
+import { postSearchGoodWarehouseList,saveReportStock,getReportStockList,SaveCheckedDamage,getStockDamageDetail,modifyPrice,deleteStockDamage,getStockBatchNumber,getGoodWarehouseList} from "@/api/stock"
368
 export default {
378
 export default {
369
     name: "stockModifyPrice",
379
     name: "stockModifyPrice",
370
     components:{
380
     components:{
401
                 good_origin_place:"",
411
                 good_origin_place:"",
402
                 report_count:"",
412
                 report_count:"",
403
                 total:"",
413
                 total:"",
414
+                number:"",
415
+                expiry_date:"",
416
+                product_date:"",
404
             },
417
             },
405
             currentIndex: 0,
418
             currentIndex: 0,
406
             manufacturerList:[],
419
             manufacturerList:[],
420
             editPriceDialogVisible:false,
433
             editPriceDialogVisible:false,
421
             modifyPriceDialogVisible:false,
434
             modifyPriceDialogVisible:false,
422
             id:0,
435
             id:0,
436
+            numberList:[]
423
         }
437
         }
424
     },
438
     },
425
     methods:{
439
     methods:{
484
          })
498
          })
485
         },
499
         },
486
         handleSelect(val){
500
         handleSelect(val){
487
-          console.log("val23232323",val)
501
+          //获取当前耗材的批号
502
+          this.getStockBatchNumber(val.good_id)
503
+          this.getGoodWarehouseList(val.good_id)
488
           this.form.id = val.id
504
           this.form.id = val.id
489
           this.form.good_id = val.good_id,
505
           this.form.good_id = val.good_id,
490
           this.form.good_name = val.good_name
506
           this.form.good_name = val.good_name
499
           this.form.warehousing_unit = val.packing_unit  
515
           this.form.warehousing_unit = val.packing_unit  
500
           this.form.total = val.total
516
           this.form.total = val.total
501
           this.form.new_price = val.new_price
517
           this.form.new_price = val.new_price
518
+          this.form.expiry_date = val.expiry_date
519
+          this.form.product_date = val.product_date
502
       },
520
       },
503
       addStock(){
521
       addStock(){
504
         var obj = {
522
         var obj = {
506
           good_name:this.form.good_name,
524
           good_name:this.form.good_name,
507
           specification_name:this.form.specification_name,
525
           specification_name:this.form.specification_name,
508
           warehousing_unit:this.form.warehousing_unit,
526
           warehousing_unit:this.form.warehousing_unit,
509
-          count:parseInt(this.form.count),
527
+          count:this.form.count,
510
           buy_price:this.form.buy_price.toString(),
528
           buy_price:this.form.buy_price.toString(),
511
           packing_price:this.form.packing_price.toString(),
529
           packing_price:this.form.packing_price.toString(),
512
           manufacturer:this.form.manufacturer,
530
           manufacturer:this.form.manufacturer,
513
           good_origin_place:this.form.good_origin_place,
531
           good_origin_place:this.form.good_origin_place,
514
           license_number:this.form.license_number,
532
           license_number:this.form.license_number,
515
           remark:this.form.remark,
533
           remark:this.form.remark,
516
-          // new_price:this.form.new_price.toString(),
517
           warehousing_order:this.form.warehousing_order,
534
           warehousing_order:this.form.warehousing_order,
518
           dealer:this.form.dealer,
535
           dealer:this.form.dealer,
519
           start_time:this.getTime(new Date()),
536
           start_time:this.getTime(new Date()),
537
+          number:this.form.number,
538
+          warehousing_info_id:0,
539
+          product_date:val.product_date,
540
+          expiry_date:val.expiry_date,
520
         } 
541
         } 
521
         this.tableData.push(obj)
542
         this.tableData.push(obj)
543
+        this.form.good_id = 0
544
+        this.form.good_name = ""
545
+        this.form.specification_name = ""
546
+        this.form.warehousing_unit = ""
547
+        this.form.count = ""
548
+        this.form.buy_price = ""
549
+        this.form.packing_price = ""
550
+        this.form.manufacturer = ""
551
+        this.form.good_origin_place = ""
552
+        this.form.license_number = ""
553
+        this.form.remark  = ""
554
+        this.form.warehousing_order = ""
555
+        this.form.dealer = ""
556
+        this.form.number = ""
557
+        this.form.good_id = ""
522
       },
558
       },
523
       saveReportStock(){
559
       saveReportStock(){
524
          for(let i = 0;i<this.tableData.length;i++){
560
          for(let i = 0;i<this.tableData.length;i++){
528
            if(this.tableData[i].dealer == 0){
564
            if(this.tableData[i].dealer == 0){
529
               this.tableData[i].dealer = ""   
565
               this.tableData[i].dealer = ""   
530
            }
566
            }
567
+         }
568
+         console.log("比阿哥",this.tableData)
569
+         console.log("numberlist",this.numberList)
570
+         for(let i=0;i<this.tableData.length;i++){
571
+           this.tableData[i].count =  parseInt(this.tableData[i].count)
572
+           this.tableData[i].expiry_date = parseInt(this.tableData[i].expiry_date)
573
+           this.tableData[i].product_date = parseInt(this.tableData[i].product_date)
574
+           this.tableData[i].total = parseInt(this.tableData[i].total)
575
+           for(let j=0;j<this.numberList.length;j++){
576
+              if(this.tableData[i].number == this.numberList[j].number){
577
+                this.tableData[i].warehousing_info_id = this.numberList[j].id
578
+              }
579
+           }
531
          }
580
          }
532
           var params = {
581
           var params = {
533
             tableData:this.tableData,
582
             tableData:this.tableData,
550
             this.form.buy_price = ""
599
             this.form.buy_price = ""
551
             this.form.warehousing_unit = ""
600
             this.form.warehousing_unit = ""
552
             this.form.total = ""
601
             this.form.total = ""
602
+            this.form.number = ""
553
            
603
            
554
            }
604
            }
555
         })
605
         })
593
        }
643
        }
594
      },
644
      },
595
     changePrice(val){
645
     changePrice(val){
596
-       console.log("val23232322323",val)
597
-      
598
        var arr = []
646
        var arr = []
599
-      
600
        for(let i=0;i<val.length;i++){
647
        for(let i=0;i<val.length;i++){
601
          arr.push(val[i].id)
648
          arr.push(val[i].id)
602
        }
649
        }
603
       var str = arr.join(",")
650
       var str = arr.join(",")
604
-    
605
-      console.log("str",str)
606
-      this.ids = str
607
-     
651
+      this.ids = str 
608
      },
652
      },
609
      SaveCheckedDamage(){
653
      SaveCheckedDamage(){
610
          var params = {
654
          var params = {
681
        modifyPrice(params).then(response=>{
725
        modifyPrice(params).then(response=>{
682
          if(response.data.state ==1){
726
          if(response.data.state ==1){
683
            var adjust = response.data.data.adjust
727
            var adjust = response.data.data.adjust
684
-
685
            this.modifyPriceDialogVisible = false
728
            this.modifyPriceDialogVisible = false
686
            this.$message.success("保存成功")
729
            this.$message.success("保存成功")
687
            this.getlist()
730
            this.getlist()
742
        formatJson(filterVal, jsonData) {
785
        formatJson(filterVal, jsonData) {
743
         return jsonData.map(v => filterVal.map(j => v[j]));
786
         return jsonData.map(v => filterVal.map(j => v[j]));
744
       },
787
       },
788
+     getStockBatchNumber(id){
789
+       var params = {
790
+         id:id
791
+       }
792
+      getStockBatchNumber(params).then(response=>{
793
+        if(response.data.state == 1){
794
+          var list = response.data.data.list
795
+          console.log("批号列表",list)
796
+          this.numberList = list
797
+        }
798
+      })
799
+     },
800
+     getGoodWarehouseList(id){
801
+       var params = {
802
+          id:id,
803
+       }
804
+      getGoodWarehouseList(params).then(response=>{
805
+         if(response.data.state == 1){
806
+           var list = response.data.data.list
807
+           this.form.total =  list.stock_count
808
+           console.log("list23232",list)
809
+         }
810
+      })
811
+     }
745
     },
812
     },
746
     created(){
813
     created(){
747
         // var nowDate = new Date();
814
         // var nowDate = new Date();

+ 73 - 98
src/xt_pages/stock/stockModifyPrice.vue Ver arquivo

39
         <div>
39
         <div>
40
             <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
40
             <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
41
             <el-button size="small" type="primary" @click="toCheck">核对</el-button>
41
             <el-button size="small" type="primary" @click="toCheck">核对</el-button>
42
-            <el-button size="small" type="primary" @click="print">打印</el-button>
43
-            <el-button size="small" type="primary" @click="toExport">导出</el-button>
42
+            <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
43
+            <el-button size="small" type="primary" @click="toExport">导出</el-button> -->
44
         </div>
44
         </div>
45
       </div>
45
       </div>
46
       <div>
46
       <div>
67
                          {{scope.row.packing_unit}}
67
                          {{scope.row.packing_unit}}
68
                       </template>
68
                       </template>
69
                     </el-table-column>
69
                     </el-table-column>
70
-                    <el-table-column label="调价数量" width="100" align="center">
70
+                    <!-- <el-table-column label="调价数量" width="100" align="center">
71
                       <template slot-scope="scope">
71
                       <template slot-scope="scope">
72
                        {{scope.row.count}}
72
                        {{scope.row.count}}
73
                       </template>
73
                       </template>
74
-                    </el-table-column>
74
+                    </el-table-column> -->
75
                     <el-table-column label="原进货价" width="100" align="center">
75
                     <el-table-column label="原进货价" width="100" align="center">
76
                       <template slot-scope="scope">
76
                       <template slot-scope="scope">
77
                        {{scope.row.buy_price}}
77
                        {{scope.row.buy_price}}
142
                   :total="total">
142
                   :total="total">
143
                </el-pagination>
143
                </el-pagination>
144
             </div>
144
             </div>
145
-                <!-- <el-table :data="tableData" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
146
-                    <el-table-column
147
-                    fixed="left"
148
-                    prop="date"
149
-                    label="药品ID"
150
-                    width="80">
151
-                    </el-table-column>
152
-                    <el-table-column
153
-                    prop="date"
154
-                    label="药品名称"
155
-                    width="100">
156
-                    </el-table-column>
157
-                    <el-table-column
158
-                    prop="name"
159
-                    label="规格"
160
-                    width="100">
161
-                    </el-table-column>
162
-                    <el-table-column
163
-                    prop="name"
164
-                    label="生产厂家"
165
-                    width="100">
166
-                    </el-table-column>
167
-                    <el-table-column
168
-                    prop="name"
169
-                    label="批准文书"
170
-                    width="100">
171
-                    </el-table-column>
172
-                    <el-table-column
173
-                    prop="name"
174
-                    label="经销商"
175
-                    width="100">
176
-                    </el-table-column>
177
-                    <el-table-column
178
-                    prop="name"
179
-                    label="数量"
180
-                    width="100">
181
-                    </el-table-column>
182
-                    <el-table-column
183
-                    prop="name"
184
-                    label="原零价"
185
-                    width="100">
186
-                    </el-table-column>
187
-                    <el-table-column
188
-                    prop="name"
189
-                    label="现零价"
190
-                    width="100">
191
-                    </el-table-column>
192
-                    <el-table-column
193
-                    prop="name"
194
-                    label="进货价"
195
-                    width="100">
196
-                    </el-table-column>
197
-                    <el-table-column
198
-                    prop="name"
199
-                    label="零售总价"
200
-                    width="100">
201
-                    </el-table-column>
202
-                    <el-table-column
203
-                    prop="name"
204
-                    label="批号"
205
-                    width="100">
206
-                    </el-table-column>
207
-                    <el-table-column
208
-                    prop="name"
209
-                    label="生产日期"
210
-                    width="100">
211
-                    </el-table-column>
212
-                    <el-table-column
213
-                    prop="name"
214
-                    label="有效日期"
215
-                    width="100">
216
-                    </el-table-column>
217
-                </el-table> -->
218
-         
219
         </div>
145
         </div>
220
     </div>
146
     </div>
221
     <el-dialog
147
     <el-dialog
248
             <el-form-item label="现价格">
174
             <el-form-item label="现价格">
249
                 <el-input v-model="form.new_price"></el-input>
175
                 <el-input v-model="form.new_price"></el-input>
250
             </el-form-item>
176
             </el-form-item>
251
-            <el-form-item label="调价数量">
252
-                <el-input v-model="form.count"></el-input>
253
-            </el-form-item>
177
+            <!-- <el-form-item label="调价数量">
178
+                <el-input v-model="form.count" type="number"></el-input>
179
+            </el-form-item> -->
254
             <el-form-item label="备注" style="width:66%;">
180
             <el-form-item label="备注" style="width:66%;">
255
                 <div style="display:flex;">
181
                 <div style="display:flex;">
256
                     <el-input v-model="form.remark"></el-input>
182
                     <el-input v-model="form.remark"></el-input>
279
                {{scope.row.warehousing_unit}}
205
                {{scope.row.warehousing_unit}}
280
                </template>
206
                </template>
281
             </el-table-column>
207
             </el-table-column>
282
-            <el-table-column prop="name" label="调价数量" width="100" align="center">
208
+            <!-- <el-table-column prop="name" label="调价数量" width="100" align="center">
283
               <template slot-scope="scope">
209
               <template slot-scope="scope">
284
                 {{scope.row.count}}
210
                 {{scope.row.count}}
285
               </template> 
211
               </template> 
286
-            </el-table-column>
212
+            </el-table-column> -->
287
             <el-table-column prop="name" label="原进货价" width="100" align="center">
213
             <el-table-column prop="name" label="原进货价" width="100" align="center">
288
                <template slot-scope="scope">
214
                <template slot-scope="scope">
289
                 {{scope.row.buy_price}}
215
                 {{scope.row.buy_price}}
370
                 </el-form-item>
296
                 </el-form-item>
371
              </el-col> 
297
              </el-col> 
372
             </el-row>
298
             </el-row>
373
-            <el-row>
299
+            <!-- <el-row>
374
              <el-col>
300
              <el-col>
375
                <el-form-item label="调价数量:">
301
                <el-form-item label="调价数量:">
376
                     <el-input v-model="form.count"  style="width:200px"></el-input>
302
                     <el-input v-model="form.count"  style="width:200px"></el-input>
381
                     </div>
307
                     </div>
382
                 </el-form-item>
308
                 </el-form-item>
383
               </el-col>  
309
               </el-col>  
384
-            </el-row>
310
+            </el-row> -->
385
           </el-form>
311
           </el-form>
386
         </span>
312
         </span>
387
         <span slot="footer" class="dialog-footer">
313
         <span slot="footer" class="dialog-footer">
435
 
361
 
436
 
362
 
437
     <el-dialog
363
     <el-dialog
438
-        title="耗材调价核对"
364
+        title="耗材调价编辑"
439
         :visible.sync="modifyDialogVisible"
365
         :visible.sync="modifyDialogVisible"
440
         width="30%"
366
         width="30%"
441
         >
367
         >
442
         <span>
368
         <span>
443
           <el-form :model="form">
369
           <el-form :model="form">
444
-            <el-row>
445
-              <el-col>
446
-                <el-form-item label="现价格">
447
-                  <el-input v-model="form.new_price" style="width:100px"></el-input>
448
-                </el-form-item>  
449
-              </el-col>
450
-            </el-row>  
370
+         <el-row>
371
+               <el-col>
372
+                <el-form-item label="耗材名称:">
373
+                    <el-autocomplete
374
+                        class="checkSearch"
375
+                        popper-class="my-autocomplete"
376
+                        v-model="form.good_name"
377
+                        :fetch-suggestions="querySearchAsync"
378
+                        :trigger-on-focus="true"
379
+                        placeholder="请输入耗材名称"
380
+                        @select="handleSelect"
381
+                        @input="changeGoodName(scope.$index)"
382
+                        :disabled="true"
383
+                        style="width:160px;"
384
+                    >
385
+                        <i class="el-icon-search el-input__icon" slot="suffix"></i>
386
+                    <template slot-scope="{ item }">
387
+                        <div class="name">{{ item.good_name +"  " +item.specification_name + "  "+item.manufacturer }}</div>
388
+                    </template>
389
+                    </el-autocomplete>
390
+                </el-form-item>
391
+               <el-form-item label="原价格:">
392
+                 <el-input v-model="form.packing_price" style="width:200px"></el-input>
393
+               </el-form-item>
394
+               <el-form-item label="现价格:">
395
+                    <el-input v-model="form.new_price" style="width:200px"></el-input>
396
+                </el-form-item>
397
+                <el-form-item label="备注:">
398
+                    <el-input v-model="form.remark" style="width:200px"></el-input>
399
+                </el-form-item>
400
+             </el-col> 
401
+            </el-row>
451
           </el-form>  
402
           </el-form>  
452
         </span>
403
         </span>
453
         <span slot="footer" class="dialog-footer">
404
         <span slot="footer" class="dialog-footer">
578
           this.form.packing_price = val.packing_price
529
           this.form.packing_price = val.packing_price
579
           this.form.warehousing_order = val.warehousing_order
530
           this.form.warehousing_order = val.warehousing_order
580
           this.form.license_number = val.license_number
531
           this.form.license_number = val.license_number
581
-          this.form.dealer = val.dealer
582
-          this.form.manufacturer = val.manufacturer
532
+          if(val.dealer == 0){
533
+            this.form.dealer = ""
534
+          }else{
535
+            this.form.dealer = val.dealer
536
+          }
537
+          if(this.form.manufacturer == 0){
538
+            this.form.manufacturer = ""
539
+          }else{
540
+            this.form.manufacturer = val.manufacturer
541
+          }
583
           this.form.specification_name = val.specification_name
542
           this.form.specification_name = val.specification_name
584
           this.form.remark = val.remark
543
           this.form.remark = val.remark
585
           this.form.buy_price = val.buy_price
544
           this.form.buy_price = val.buy_price
666
            this.tableData[i].buy_price = this.tableData[i].buy_price.toString()
625
            this.tableData[i].buy_price = this.tableData[i].buy_price.toString()
667
            this.tableData[i].packing_price = this.tableData[i].packing_price.toString()
626
            this.tableData[i].packing_price = this.tableData[i].packing_price.toString()
668
            this.tableData[i].new_price = this.tableData[i].new_price.toString()
627
            this.tableData[i].new_price = this.tableData[i].new_price.toString()
669
-           this.tableData[i].count =  parseInt(this.tableData[i].count)
628
+          //  this.tableData[i].count =  parseInt(this.tableData[i].count)
629
+            this.tableData[i].count = 0
670
            if(this.tableData[i].dealer == 0){
630
            if(this.tableData[i].dealer == 0){
671
              this.tableData[i].dealer = ""
631
              this.tableData[i].dealer = ""
672
            }
632
            }
677
          var params= {
637
          var params= {
678
            tableData:this.tableData,
638
            tableData:this.tableData,
679
          }
639
          }
640
+      
680
       console.log("parasm222",params)
641
       console.log("parasm222",params)
681
       saveAdjustPrice(params).then(response=>{
642
       saveAdjustPrice(params).then(response=>{
682
         if(response.data.state == 1){
643
         if(response.data.state == 1){
684
           console.log("msg",msg)
645
           console.log("msg",msg)
685
           this.$message.success("保存成功!")
646
           this.$message.success("保存成功!")
686
           this.dialogVisible = false
647
           this.dialogVisible = false
648
+          this.tableData = []
687
           this.getAllStockPrice()
649
           this.getAllStockPrice()
688
         }
650
         }
689
       })  
651
       })  
800
            var info =  response.data.data.detail
762
            var info =  response.data.data.detail
801
            console.log("info",info)
763
            console.log("info",info)
802
            this.id = info.id
764
            this.id = info.id
803
-           this.form.new_price = info.new_price
765
+           this.good_id = info.good_id,
766
+           this.form.good_name = info.good_name
767
+           if(info.new_price == 0){
768
+            this.form.new_price = ""
769
+           }else{
770
+             this.form.new_price = info.new_price
771
+           }
772
+          
773
+           this.form.packing_price = info.packing_price
774
+           this.form.remark = info.remark
804
            this.modifyDialogVisible = true
775
            this.modifyDialogVisible = true
805
          }
776
          }
806
        })
777
        })
808
      updateStockPrice(){
779
      updateStockPrice(){
809
          var params = {
780
          var params = {
810
            new_price:this.form.new_price.toString(),
781
            new_price:this.form.new_price.toString(),
811
-           id:this.id
782
+           id:this.id,
783
+           packing_price:this.form.packing_price.toString(),
784
+           remark:this.form.remark,
785
+           good_id:this.form.good_id,
786
+           good_name:this.form.good_name,
812
          }
787
          }
813
          console.log("params",params)
788
          console.log("params",params)
814
        updateStockPrice(params).then(response=>{
789
        updateStockPrice(params).then(response=>{