Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
a1902ea2d2

+ 4 - 4
src/views/layout/Layout.vue View File

@@ -16,10 +16,10 @@
16 16
           <i class="iconfont icon-computer_fill navIcon"></i>
17 17
           <p>透析管理</p>
18 18
         </div>
19
-        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
-         <i class="iconfont icon-kccx navIcon"></i>
21
-          <p>采购管理</p>
22
-        </div>
19
+<!--        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">-->
20
+<!--         <i class="iconfont icon-kccx navIcon"></i>-->
21
+<!--          <p>采购管理</p>-->
22
+<!--        </div>-->
23 23
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
24 24
           <i class="iconfont icon-kccx navIcon"></i>
25 25
           <p>库房管理</p>

+ 9 - 3
src/xt_pages/data/components/consumables.vue View File

@@ -558,6 +558,7 @@
558 558
             this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
559 559
               response.data.data.goodInfo.stock_warn_count;
560 560
             this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString();
561
+
561 562
             this.goodInfo.goodInfoDialog.formValue.remark =
562 563
               response.data.data.goodInfo.remark;
563 564
             this.goodInfo.goodInfoDialog.isCreated = 2;
@@ -729,6 +730,12 @@
729 730
             this.goodInfo.goodInfoDialog.formValue.packing_price = response.data.data.goodInfo.packing_price
730 731
             this.goodInfo.goodInfoDialog.formValue.default_count_unit = response.data.data.goodInfo.default_count_unit
731 732
             this.goodInfo.goodInfoDialog.formValue.register_number = response.data.data.goodInfo.register_number
733
+
734
+            if (response.data.data.goodInfo.is_user <= 0) {
735
+              this.goodInfo.goodInfoDialog.formValue.is_user = ''
736
+            } else {
737
+              this.goodInfo.goodInfoDialog.formValue.is_user = response.data.data.goodInfo.is_user.toString()
738
+            }
732 739
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
733 740
 
734 741
           }
@@ -1010,9 +1017,7 @@
1010 1017
               if (response.data.data.goodType[i].type == 1) {
1011 1018
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
1012 1019
               }
1013
-              this.goodInfo.goodInfoDialog.formValue.goodType.push(
1014
-                response.data.data.goodType[i]
1015
-              )
1020
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
1016 1021
             }
1017 1022
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
1018 1023
               this.$message.error('请先新增商品类型');
@@ -1058,6 +1063,7 @@
1058 1063
         this.goodInfo.goodInfoDialog.formValue.agent = '';
1059 1064
         this.goodInfo.goodInfoDialog.formValue.good_number = '';
1060 1065
         this.goodInfo.goodInfoDialog.formValue.register_number = '';
1066
+        this.goodInfo.goodInfoDialog.formValue.is_user = "2"
1061 1067
 
1062 1068
 
1063 1069
         this.$refs.addConsumable.show(0)

+ 25 - 5
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

@@ -198,7 +198,18 @@
198 198
             <el-form-item label="注册编码:" >
199 199
               <el-input v-model="form.register_number" style="width:180px"></el-input>
200 200
             </el-form-item>
201
+            
202
+            <el-form-item label="是否零用:">
201 203
 
204
+              <el-select v-model="form.is_user" style="width:160px" filterable placeholder="请选择">
205
+                  <el-option
206
+                          v-for="(item,index) in userList"
207
+                          :key="index"
208
+                          :label="item.name"
209
+                          :value="item.id">
210
+                  </el-option>
211
+              </el-select>
212
+             </el-form-item>
202 213
 
203 214
 
204 215
             <el-form-item label="备注 : " prop="name" style="width:100%;">
@@ -371,6 +382,7 @@
371 382
           min_unit:"",
372 383
           total:"",
373 384
           register_number:"",
385
+          is_user:"2",
374 386
         },
375 387
 
376 388
         rules: {
@@ -410,6 +422,10 @@
410 422
         statisticsCategoryList:[],
411 423
         unitList:[],
412 424
         showMinNumber:false,
425
+        userList: [
426
+         {id: "1",name: "是"},
427
+         {id: "2",name: "否"}
428
+        ],
413 429
       }
414 430
     },
415 431
     props: {
@@ -424,7 +440,6 @@
424 440
       isCreated: {
425 441
         type: Number,
426 442
         default: 1
427
-
428 443
       }
429 444
 
430 445
     },
@@ -436,8 +451,8 @@
436 451
         return getDataConfig(module, filed_name)
437 452
       },
438 453
       show(id,form) {
439
-        console.log("form",form)
440
-
454
+         console.log("form",this.form)
455
+        this.form.is_user = "2"
441 456
         if(form!=undefined){
442 457
           this.unitList = []
443 458
           var arr =  getDataConfig('hemodialysis','units')
@@ -480,7 +495,7 @@
480 495
               good_unit: '',
481 496
               retail_price: '',
482 497
               medical_insurance_number: '',
483
-            provinces_code:'',
498
+              provinces_code:'',
484 499
               is_special_diseases: '',
485 500
               is_record: '',
486 501
               statistics_category: '',
@@ -501,11 +516,13 @@
501 516
               default_count_unit:"",
502 517
               min_unit:"",
503 518
               total:"",
519
+              is_user:"2",
504 520
             }
505 521
           this.good_status = []
506 522
           for (let key in tempform) {
507 523
             this.form[key] = tempform[key]
508 524
           }
525
+          console.log("iser23232322323233223",this.form)
509 526
         } else {
510 527
           for (let key in form) {
511 528
             this.form[key] = form[key]
@@ -592,7 +609,7 @@
592 609
         form["default_count_unit"] = this.form.default_count_unit
593 610
         form["total"] = this.form.total
594 611
         form["register_number"] = this.form.register_number
595
-
612
+        form["is_user"] = this.form.is_user
596 613
 
597 614
         return form
598 615
       }, changeSelected: function(val) {
@@ -674,7 +691,9 @@
674 691
     },
675 692
     watch: {
676 693
       visible(val) {
694
+       
677 695
         this.form = this.formValue
696
+       
678 697
         this.good_unit = this.formValue.good_unit
679 698
 
680 699
         if (this.isCreated == 1) {
@@ -683,6 +702,7 @@
683 702
       }
684 703
     },
685 704
     created(){
705
+      
686 706
       this.getlist()
687 707
       //获取所有经销商
688 708
       this.GetAllConfig()

+ 19 - 20
src/xt_pages/stock/config/goodInfo.vue View File

@@ -213,7 +213,8 @@
213 213
               min_number:"",
214 214
               packing_unit:"",
215 215
               packing_price:'',
216
-              default_count_unit:""
216
+              default_count_unit:"",
217
+              is_user:"2",
217 218
             },
218 219
 
219 220
             isVisibility: false
@@ -308,6 +309,12 @@
308 309
                 response.data.data.goodInfo.good_kind
309 310
             }
310 311
 
312
+          
313
+            if(this.goodInfo.goodInfoDialog.formValue.is_user <= 0){
314
+                this.goodInfo.goodInfoDialog.formValue.is_user = ''
315
+              } else{
316
+                this.goodInfo.goodInfoDialog.formValue.is_user = this.goodInfo.goodInfoDialog.is_user.toString()
317
+              }
311 318
 
312 319
 
313 320
             if (response.data.data.goodInfo.medical_insurance_level <= 0) {
@@ -561,29 +568,21 @@
561 568
             } else {
562 569
               this.$refs.dialog.hide()
563 570
 
564
-              this.goodInfo.goodInfoData[
565
-                this.goodInfo.editGoodIndex
566
-                ].specification_name =
567
-                response.data.data.goodInfo.specification_name
568
-              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].good_unit =
569
-                response.data.data.goodInfo.good_unit
570
-              this.goodInfo.goodInfoData[
571
-                this.goodInfo.editGoodIndex
572
-                ].buy_price = response.data.data.goodInfo.buy_price.toString()
573
-              this.goodInfo.goodInfoData[
574
-                this.goodInfo.editGoodIndex
575
-                ].sell_price = response.data.data.goodInfo.sell_price.toString()
576
-              this.goodInfo.goodInfoData[
577
-                this.goodInfo.editGoodIndex
578
-                ].expiry_date_warn_day_count = response.data.data.goodInfo.expiry_date_warn_day_count.toString()
579
-              this.goodInfo.goodInfoData[
580
-                this.goodInfo.editGoodIndex
581
-                ].stock_warn_count = response.data.data.goodInfo.stock_warn_count.toString()
571
+              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].specification_name = response.data.data.goodInfo.specification_name
572
+              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].good_unit = response.data.data.goodInfo.good_unit
573
+              this.goodInfo.goodInfoData[ this.goodInfo.editGoodIndex].buy_price = response.data.data.goodInfo.buy_price.toString()
574
+              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].sell_price = response.data.data.goodInfo.sell_price.toString()
575
+              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].expiry_date_warn_day_count = response.data.data.goodInfo.expiry_date_warn_day_count.toString()
576
+              this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].stock_warn_count = response.data.data.goodInfo.stock_warn_count.toString()
582 577
 
583 578
               this.$message.success('修改成功')
584 579
             }
585 580
           })
586 581
         } else if (val.isCreated == 1) {
582
+          console.log("val23232323232323",val)
583
+          if(val.is_user == 0){
584
+            val.is_user = 2
585
+          }
587 586
           //新增
588 587
           createGoodInfo(val).then(response => {
589 588
             if (response.data.state == 0) {
@@ -639,7 +638,7 @@
639 638
         this.goodInfo.goodInfoDialog.formValue.dealer = ''
640 639
         this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count = ''
641 640
         this.goodInfo.goodInfoDialog.formValue.stock_warn_count = ''
642
-        this.goodInfo.goodInfoDialog.formValue.is_reuse = '2'
641
+        this.goodInfo.goodInfoDialog.formValue.is_user = "2"
643 642
 
644 643
       
645 644
       },