Przeglądaj źródła

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

csx 3 lat temu
rodzic
commit
437bf5045b

+ 2 - 2
config/dev.env.js Wyświetl plik

@@ -7,8 +7,8 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  BASE_API: '"http://localhost:9529"',
10
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  // BASE_API: '"http://localhost:9529"',
12 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14 14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 8 - 0
src/api/supply.js Wyświetl plik

@@ -239,3 +239,11 @@ export function deleteGoodOrder(id, params) {
239 239
     params: params
240 240
   })
241 241
 }
242
+
243
+export function getSupplyWarehouseOutById(id, params) {
244
+  return request({
245
+    url: '/api/supply/getsupplywarehouseoutbyid?id=' + id,
246
+    method: 'get',
247
+    params: params
248
+  })
249
+}

+ 3 - 3
src/views/layout/Layout.vue Wyświetl plik

@@ -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>
19
+        <!-- <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
+         <i class="iconfont icon-kccx navIcon"></i>
21 21
           <p>采购管理</p>
22
-        </div>
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>

+ 8 - 7
src/xt_pages/data/components/addDrugs.vue Wyświetl plik

@@ -354,7 +354,7 @@
354 354
                             </el-date-picker>
355 355
                         </el-form-item>
356 356
                       
357
-                        <!-- <el-form-item label="是否零用:">
357
+                        <el-form-item label="是否零用:">
358 358
 
359 359
                             <el-select v-model="form.is_user" style="width:160px" filterable placeholder="请选择">
360 360
                                 <el-option
@@ -364,7 +364,7 @@
364 364
                                         :value="item.id">
365 365
                                 </el-option>
366 366
                             </el-select>
367
-                        </el-form-item> -->
367
+                        </el-form-item>
368 368
                       
369 369
 
370 370
                         <el-form-item label="药品备注:">
@@ -595,7 +595,7 @@
595 595
           prescribing_number_unit:"",
596 596
           total:"",
597 597
           specification_name:"",
598
-          is_user:2,
598
+          is_user:"2",
599 599
         },
600 600
 
601 601
         rules: {
@@ -648,11 +648,11 @@
648 648
         minNumberShow:false,
649 649
         packingUnit:[],
650 650
         userList: [{
651
-          id: '1',
652
-          name: '是'
651
+          id: "1",
652
+          name: "是"
653 653
         }, {
654
-          id: '2',
655
-          name: '否'
654
+          id: "2",
655
+          name: "否"
656 656
         }],
657 657
       }
658 658
     },
@@ -781,6 +781,7 @@
781 781
           }
782 782
 
783 783
           this.form['lmt_used_flag'] = 0
784
+          this.form['is_user'] = "2"
784 785
 
785 786
         } else {
786 787
           for (let key in obj) {

+ 75 - 76
src/xt_pages/supply/components/addGoodOrder.vue Wyświetl plik

@@ -7,8 +7,7 @@
7 7
     <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8 8
     <div>
9 9
         <span style="color:red">*</span><span>供应商:</span>
10
-        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
11
-        @change="changeTypeName">
10
+        <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择">
12 11
         <el-option
13 12
             v-for="item in supplyList"
14 13
             :key="item.id"
@@ -28,7 +27,6 @@
28 27
         align="right"
29 28
         format="yyyy-MM-dd"
30 29
         value-format="yyyy-MM-dd"
31
-        @change="startTimeChange"
32 30
         ></el-date-picker>
33 31
         <!-- <span>交货日期:</span> -->
34 32
         <!-- <el-date-picker
@@ -52,7 +50,7 @@
52 50
          <el-button size="small" type="primary" @click="updateGoodOrder" v-show="showTwo">保存</el-button>
53 51
         <el-button size="small" type="primary"  @click="checkPurchaseOrder">审核</el-button>
54 52
 
55
-       
53
+
56 54
     </div>
57 55
     </div>
58 56
 
@@ -75,7 +73,7 @@
75 73
         </template>
76 74
         <template slot-scope="scope">
77 75
            <el-form-item :prop="'tableList.' + scope.$index + '.name'" :rules='tableRules.name'>
78
-            <el-select v-model="scope.row.name" style="width:160px;" filterable placeholder="请选择" @change="changeName"   @input="changeGoodName(scope.$index)" :disabled="disabled">
76
+            <el-select v-model="scope.row.name" style="width:160px;" filterable placeholder="请选择商品" @change="changeName"   @input="changeGoodName(scope.$index)" :disabled="disabled">
79 77
                 <el-option
80 78
                     v-for="(item,index) in tabList"
81 79
                     :key="index"
@@ -91,13 +89,13 @@
91 89
             <span>商品类别</span>
92 90
         </template>
93 91
         <template slot-scope="scope">
94
-            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"></el-input>
92
+            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"  placeholder="商品类别"></el-input>
95 93
             <div style="visibility: hidden">/</div>
96 94
         </template>
97 95
     </el-table-column>
98
-    <el-table-column label="规格&单位" align="center" width="120px">
96
+    <el-table-column label="规格&单位" align="center" width="150px">
99 97
         <template slot-scope="scope">
100
-            <el-input v-model="scope.row.supply_specification_name" style="width:100px" :disabled="true"></el-input>
98
+            <el-input v-model="scope.row.supply_specification_name" style="width:120px" :disabled="true" placeholder="规格&单位"></el-input>
101 99
             <div style="visibility: hidden">/</div>
102 100
         </template>
103 101
     </el-table-column>
@@ -115,16 +113,16 @@
115 113
                         :value="item.name">
116 114
                     </el-option>
117 115
              </el-select>
118
-          </el-form-item>  
116
+          </el-form-item>
119 117
         </template>
120 118
     </el-table-column>
121
-    <el-table-column label="批号" align="center" width="130px">
119
+    <el-table-column label="批号" align="center" width="200px">
122 120
          <template slot="header" slot-scope="scope">
123 121
             <span>批号<span style="color: red">*</span></span>
124 122
         </template>
125 123
         <template slot-scope="scope">
126 124
            <el-form-item  :prop="'tableList.' + scope.$index + '.supply_batch_number'" :rules='tableRules.supply_batch_number'>
127
-             <el-input v-model="scope.row.supply_batch_number" style="width:80px" :disabled="disabled"></el-input>
125
+             <el-input v-model="scope.row.supply_batch_number" style="width:180px" :disabled="disabled" placeholder="请输入批号"></el-input>
128 126
           </el-form-item>
129 127
         </template>
130 128
     </el-table-column>
@@ -142,26 +140,26 @@
142 140
              </el-form-item>
143 141
        </template>
144 142
     </el-table-column>
145
-    <el-table-column label="可用库存" align="center" width="100px">
143
+    <el-table-column label="可用库存" align="center" width="150px">
146 144
         <template slot-scope="scope">
147
-            <el-input v-model="scope.row.supply_total" style="width:80px" :disabled="true"></el-input>
145
+            <el-input v-model="scope.row.supply_total" style="width:100px" :disabled="true"></el-input>
148 146
             <div style="visibility: hidden">/</div>
149 147
         </template>
150 148
     </el-table-column>
151
-    <el-table-column label="数量" align="center" width="120px">
149
+    <el-table-column label="数量" align="center" width="140px">
152 150
         <template slot="header" slot-scope="scope">
153 151
             <span>数量<span style="color: red">*</span></span>
154 152
         </template>
155 153
         <template slot-scope="scope">
156 154
           <el-form-item  :prop="'tableList.' + scope.$index + '.supply_count'" :rules='tableRules.supply_count'>
157
-             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled"></el-input>
155
+             <el-input v-model="scope.row.supply_count" style="width:100px" :disabled="disabled" placeholder="请输入数量"></el-input>
158 156
           </el-form-item>
159 157
         </template>
160 158
     </el-table-column>
161 159
 
162
-    <el-table-column label="采购单价" align="center" width="120px">
160
+    <el-table-column label="采购单价" align="center" width="180px">
163 161
         <template slot-scope="scope">
164
-        <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
162
+        <el-input v-model="scope.row.supply_price" style="width:140px" :disabled="disabled"  placeholder="请输入采购单价"></el-input>
165 163
         <div style="visibility: hidden">/</div>
166 164
         </template>
167 165
     </el-table-column>
@@ -216,7 +214,7 @@
216 214
 
217 215
     <el-table-column label="备注" align="center" width="200px">
218 216
         <template slot-scope="scope">
219
-        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled"></el-input>
217
+        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled" placeholder="请输入备注"></el-input>
220 218
         <div style="visibility: hidden">/</div>
221 219
         </template>
222 220
     </el-table-column>
@@ -243,17 +241,28 @@
243 241
         </template>
244 242
     </el-table-column>
245 243
   </el-table>
244
+   <div style="margin-top: 10px">
245
+        <el-input
246
+          type="textarea"
247
+          :rows="2"
248
+          placeholder="备注信息"
249
+          v-model="return_remark"
250
+        >
251
+        </el-input>
252
+   </div>
246 253
 </el-form>
247 254
    <!-- <div style="margin-top:10px">
248 255
       合计:{{getAllPrice()}} 元
249 256
    </div>
250 257
    <div style="margin-top:10px">
251
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession"></el-input>%</span>
258
+        <span>优惠率:<el-input style="width:150px" v-model="rate_of_concession" placeholder="请输入优惠率"></el-input>%</span>
252 259
 
253
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
254
-      
255
-        <span>本次付款:<el-input style="width:100px" v-model="payment"></el-input></span>
260
+        <span>优惠金额:<el-input style="width:150px" v-model="discount_amount" placeholder="请输入优惠金额"></el-input></span>
256 261
 
262
+        <span>本次付款:<el-input style="width:150px" v-model="payment" placeholder="请输入本次付款"></el-input></span>
263
+
264
+        <span>本次欠款:<el-input style="width:150px" v-model="arrearage" placeholder="请输入本次欠款"></el-input></span>
265
+    </div>
257 266
         <span>本次欠款:<el-input style="width:100px" v-model="arrearage"></el-input></span>
258 267
     </div> -->
259 268
     <Computed :total="total_price" :rate_of_concession="rate_of_concession" :discount_amount="discount_amount"></Computed>
@@ -346,6 +355,7 @@ return {
346 355
    showOne:true,
347 356
    showTwo:false,
348 357
    warese_out_id:0,
358
+   return_remark:"",
349 359
   };
350 360
 },
351 361
 methods:{
@@ -392,8 +402,8 @@ getInitOrder(){
392 402
         if(drugList[i].max_unit == drugList[i].min_unit){
393 403
           drugList[i].unitList = [{id:1,name:""}]
394 404
         }
395
-       
396
-        drugList[i].supply_unit = drugList[i].max_unit 
405
+
406
+        drugList[i].supply_unit = drugList[i].max_unit
397 407
         for(let j=0;j<drugList[i].unitList.length;j++){
398 408
           if(drugList[i].max_unit != drugList[i].min_unit){
399 409
             drugList[i].unitList[0].name = drugList[i].max_unit
@@ -433,19 +443,19 @@ getInitOrder(){
433 443
         goodList[i].unitList =  [{id:1,name:""}]
434 444
         goodList[i].supply_unit = goodList[i].packing_unit
435 445
         for(let j=0;j<goodList[i].unitList.length;j++){
436
-           goodList[i].unitList[0].name = goodList[i].packing_unit 
446
+           goodList[i].unitList[0].name = goodList[i].packing_unit
437 447
         }
438 448
         this.tabList.push(goodList[i])
439 449
         }
440 450
         this.goodList = goodList
441
-    } 
451
+    }
442 452
     })
443 453
 },
444 454
 changeGoodName(val){
445 455
   this.currentIndex = val
446 456
 },
447 457
 changeName(val){
448
-  
458
+
449 459
    for(let i=0;i<this.recordInfo.tableList.length;i++){
450 460
     if(this.currentIndex == i){
451 461
         this.recordInfo.tableList[i].project_id = val.id
@@ -471,7 +481,7 @@ changeName(val){
471 481
         this.recordInfo.tableList[i].unitList = val.unitList
472 482
      }
473 483
     }
474
-   
484
+
475 485
 
476 486
 },
477 487
 handleEdit(){
@@ -507,20 +517,6 @@ handleDelete: function(index, row) {
507 517
         this.recordInfo.tableList.splice(index, 1)
508 518
    }
509 519
 },
510
-
511
-changeTypeName(){
512
-
513
-},
514
-startTimeChange(){
515
-
516
-},
517
-endTimeChange(){
518
-
519
-},
520
-search(){
521
-
522
-},
523
-
524 520
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
525 521
     var total = 0
526 522
     var max_str=  ""
@@ -574,7 +570,7 @@ getTimes(time) {
574 570
    var total_price = 0
575 571
    for(let i=0;i<this.recordInfo.tableList.length;i++){
576 572
       total_price += (this.recordInfo.tableList[i].supply_price * this.recordInfo.tableList[i].supply_count)
577
-   }  
573
+   }
578 574
    return total_price.toFixed(2)
579 575
  },
580 576
  checkPurchaseOrder(id,index){
@@ -582,21 +578,21 @@ getTimes(time) {
582 578
     confirmButtonText: '确 定',
583 579
     cancelButtonText: '取 消',
584 580
     type: 'warning'
585
-    }).then(() => { 
581
+    }).then(() => {
586 582
     checkPurchaseOrder(this.id).then(response => {
587 583
         if (response.data.state == 1) {
588 584
           var info = response.data.data.info
589 585
           this.disabled = true
590 586
           this.$message.success("审核成功!")
591 587
           this.getPurchaseOrderDetail()
592
-        } 
588
+        }
593 589
      })
594 590
     })
595 591
     .catch(() => {
596
-    }) 
592
+    })
597 593
   },
598 594
   getPurchaseOrderDetail(){
599
-     
595
+
600 596
       var id = this.$route.query.id
601 597
       var ids = this.$route.query.ids
602 598
     getPurchaseOrderInfo(id,ids).then(response=>{
@@ -609,7 +605,7 @@ getTimes(time) {
609 605
         this.discount_amount = info.discount_amount
610 606
         this.number = info.number
611 607
         var orderInfo = response.data.data.orderInfo
612
-        
608
+
613 609
         for(let i=0;i<orderInfo.length;i++){
614 610
           orderInfo[i].supply_batch_number = ""
615 611
           orderInfo[i].supply_product_date = ""
@@ -640,36 +636,36 @@ getTimes(time) {
640 636
                     orderInfo[i].unitList[0].name = drugList[j].max_unit
641 637
                   }
642 638
                 }
643
-             }  
644
-            } 
639
+             }
640
+            }
645 641
           if(orderInfo[i].is_source == 2){
646 642
             for(let j=0;j<goodList.length;j++){
647 643
                 if(orderInfo[i].project_id == goodList[j].id){
648 644
                     orderInfo[i].unitList = [{id:1,name:""}]
649 645
                     orderInfo[i].unitList[0].name = goodList[j].packing_unit
650 646
                 }
651
-            }  
652
-          } 
647
+            }
648
+          }
653 649
         }
654
-      
650
+
655 651
         this.recordInfo.tableList= []
656 652
         this.recordInfo.tableList = orderInfo
657
-       
653
+
658 654
           console.log("orderINFO23323232",this.recordInfo.tableList)
659 655
       }
660
-    })  
656
+    })
661 657
   },
662 658
   toPrint(){
663 659
      var id = this.$route.query.id
664
-     this.$router.push({path:"/purchase/order/print?&id="+id})  
660
+     this.$router.push({path:"/purchase/order/print?&id="+id})
665 661
   },
666
-  saveGoodOrder(){ 
667
-   
662
+  saveGoodOrder(){
663
+
668 664
     if(this.supplier_name == 0 || this.supplier_name == ""){
669 665
        this.$message.error("供应商不能为空!")
670 666
        this.loading = false
671 667
        return false
672
-    } 
668
+    }
673 669
 
674 670
     for(let i=0;i<this.recordInfo.tableList.length;i++){
675 671
 
@@ -677,7 +673,7 @@ getTimes(time) {
677 673
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
678 674
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
679 675
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
680
-       
676
+
681 677
         for(let j=0;j<this.manufactuerList.length;j++){
682 678
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
683 679
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
@@ -694,10 +690,11 @@ getTimes(time) {
694 690
            this.loading = true
695 691
            var warehousing_id = this.$route.query.id
696 692
            var params = {
697
-             "stockIn":this.recordInfo.tableList,
693
+             stockIn:this.recordInfo.tableList,
694
+             return_remake:this.return_remark,
698 695
            }
699
-        console.log("stockIN2323322332322323",params)  
700
-       
696
+        console.log("stockIN2323322332322323",params)
697
+
701 698
         addGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehousing_id,this.number,this.rate_of_concession,this.discount_amount).then(response=>{
702 699
           if(response.data.state == 1){
703 700
              this.loading = false
@@ -713,6 +710,7 @@ getTimes(time) {
713 710
              this.payment =warehouseOut.payment
714 711
              this.arrearage =warehouseOut.arrearage
715 712
              this.supplier_name = warehouseOut.supplier_id
713
+             this.return_remake = warehouseOut.return_remake
716 714
              this.start_time = this.getTimes(warehouseOut.document_date)
717 715
             for(let i=0;i< orderInfo.length;i++){
718 716
               orderInfo[i].supply_count =  orderInfo[i].count
@@ -737,32 +735,32 @@ getTimes(time) {
737 735
                       orderInfo[i].unitList[0].name = this.drugList[j].max_unit
738 736
                     }
739 737
                   }
740
-              }  
741
-              } 
738
+              }
739
+              }
742 740
             if(orderInfo[i].is_source == 2){
743 741
               for(let j=0;j<this.goodList.length;j++){
744 742
                   if(orderInfo[i].project_id == this.goodList[j].id){
745 743
                       orderInfo[i].unitList = [{id:1,name:""}]
746 744
                       orderInfo[i].unitList[0].name = this.goodList[j].packing_unit
747 745
                   }
748
-              }  
749
-            } 
746
+              }
747
+            }
750 748
           }
751 749
           this.recordInfo.tableList= []
752 750
           this.recordInfo.tableList = orderInfo
753
-            
751
+
754 752
            }
755 753
          })
756 754
         }
757 755
     })
758 756
   },
759
-  updateGoodOrder(){ 
760
-   
757
+  updateGoodOrder(){
758
+
761 759
     if(this.supplier_name == 0 || this.supplier_name == ""){
762 760
        this.$message.error("供应商不能为空!")
763 761
        this.loading = false
764 762
        return false
765
-    } 
763
+    }
766 764
     console.log("表哥2323233232",this.recordInfo.tableList)
767 765
     for(let i=0;i<this.recordInfo.tableList.length;i++){
768 766
 
@@ -770,7 +768,7 @@ getTimes(time) {
770 768
         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
771 769
         this.recordInfo.tableList[i].supply_total_price= this.recordInfo.tableList[i].supply_total_price.toString()
772 770
         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
773
-        
771
+
774 772
         for(let j=0;j<this.manufactuerList.length;j++){
775 773
             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
776 774
               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
@@ -787,15 +785,16 @@ getTimes(time) {
787 785
            this.loading = true
788 786
            var warehose_out_id = this.$route.query.id
789 787
            var params = {
790
-             "stockIn":this.recordInfo.tableList,
791
-           } 
788
+             stockIn:this.recordInfo.tableList,
789
+             return_remake:this.return_remake,
790
+           }
792 791
            console.log("sotckind23232232323232323232",params)
793
-           
792
+
794 793
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
795 794
            if(response.data.state == 1){
796 795
              this.loading = false
797 796
              this.$message.success("保存成功!")
798
-             
797
+
799 798
            }
800 799
          })
801 800
         }

+ 9 - 4
src/xt_pages/supply/components/addGoodReturn.vue Wyświetl plik

@@ -96,7 +96,7 @@
96 96
                   v-model="scope.row.name"
97 97
                   style="width: 160px"
98 98
                   filterable
99
-                  placeholder="请选择"
99
+                  placeholder="请选择商品"
100 100
                   @change="changeName"
101 101
                   @input="changeGoodName(scope.$index)"
102 102
                   :disabled="disabled"
@@ -121,6 +121,7 @@
121 121
                 v-model="scope.row.supply_type"
122 122
                 style="width: 120px"
123 123
                 :disabled="true"
124
+                placeholder="商品类别"
124 125
               ></el-input>
125 126
             </template>
126 127
           </el-table-column>
@@ -130,6 +131,7 @@
130 131
                 v-model="scope.row.supply_specification_name"
131 132
                 style="width: 150px"
132 133
                 :disabled="true"
134
+                 placeholder="规格&单位"
133 135
               ></el-input>
134 136
             </template>
135 137
           </el-table-column>
@@ -166,6 +168,7 @@
166 168
                 v-model="scope.row.supply_specification_name"
167 169
                 style="width: 150px"
168 170
                 :disabled="true"
171
+                placeholder="可退数量"
169 172
               ></el-input>
170 173
             </template>
171 174
           </el-table-column>
@@ -187,17 +190,18 @@
187 190
             </template>
188 191
           </el-table-column>
189 192
 
190
-          <el-table-column label="购货单价" align="center" width="120px">
193
+          <el-table-column label="采购单价" align="center" width="180px">
191 194
             <template slot-scope="scope">
192 195
               <el-input
193 196
                 v-model="scope.row.supply_price"
194
-                style="width: 80px"
197
+                style="width: 140px"
195 198
                 :disabled="disabled"
199
+                 placeholder="请输入采购单价"
196 200
               ></el-input>
197 201
             </template>
198 202
           </el-table-column>
199 203
 
200
-          <el-table-column label="购金额" align="center" width="120px">
204
+          <el-table-column label="购金额" align="center" width="120px">
201 205
             <template slot-scope="scope">
202 206
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
203 207
             </template>
@@ -250,6 +254,7 @@
250 254
                 v-model="scope.row.supply_remake"
251 255
                 style="width: 160px"
252 256
                 :disabled="disabled"
257
+                placeholder="请输入备注"
253 258
               ></el-input>
254 259
             </template>
255 260
           </el-table-column>

+ 25 - 25
src/xt_pages/supply/components/addPurchaseOrder.vue Wyświetl plik

@@ -191,7 +191,7 @@
191 191
               <div style="visibility: hidden">/</div>
192 192
             </template>
193 193
           </el-table-column>
194
-          <el-table-column label="数量" align="center" width="120px">
194
+          <el-table-column label="数量" align="center" width="140px">
195 195
             <template slot="header" slot-scope="scope">
196 196
               <span>数量<span style="color: red">*</span></span>
197 197
             </template>
@@ -199,22 +199,22 @@
199 199
               <el-form-item
200 200
                 :prop="'tableList.' + scope.$index + '.supply_count'"
201 201
                 :rules="tableRules.supply_count"
202
-                 placeholder="请输入数量"
203 202
               >
204 203
                 <el-input
205 204
                   v-model="scope.row.supply_count"
206
-                  style="width: 80px"
205
+                  style="width: 100px"
207 206
                   :disabled="disabled"
207
+                  placeholder="请输入数量"
208 208
                 ></el-input>
209 209
               </el-form-item>
210 210
             </template>
211 211
           </el-table-column>
212 212
 
213
-          <el-table-column label="购货单价" align="center" width="140px">
213
+          <el-table-column label="采购单价" align="center" width="180px">
214 214
             <template slot-scope="scope">
215 215
               <el-input
216 216
                 v-model="scope.row.supply_price"
217
-                style="width: 80px"
217
+                style="width: 140px"
218 218
                 :disabled="disabled"
219 219
                  placeholder="请输入购货单价"
220 220
               ></el-input>
@@ -309,6 +309,15 @@
309 309
             </template>
310 310
           </el-table-column>
311 311
         </el-table>
312
+        <div style="margin-top: 10px">
313
+        <el-input
314
+          type="textarea"
315
+          :rows="2"
316
+          placeholder="备注信息"
317
+          v-model="return_remark"
318
+        >
319
+        </el-input>
320
+       </div>
312 321
         <!-- 审核水印 -->
313 322
         <img src="@/assets/purchase/Reviewed.png" alt="正在加载..." class="reviewImg" v-show="Reviewed == true" />
314 323
 
@@ -317,19 +326,19 @@
317 326
       <div style="margin-top: 10px">
318 327
         <span
319 328
           >优惠率:<el-input
320
-            style="width: 100px"
329
+            style="width: 150px"
321 330
             v-model="rate_of_concession"
322 331
             @input="addressChange"
323
-            @placeholder="请输入优惠率"
332
+            placeholder="请输入优惠率"
324 333
           ></el-input
325 334
           >%</span
326 335
         >
327 336
 
328 337
         <span
329 338
           >优惠金额:<el-input
330
-            style="width: 100px"
339
+            style="width: 150px"
331 340
             v-model="discount_amount"
332
-            @placeholder="请输入优惠金额"
341
+            placeholder="请输入优惠金额"
333 342
           ></el-input
334 343
         ></span>
335 344
       </div>
@@ -351,21 +360,6 @@ import {
351 360
 import { getDataConfig } from "@/utils/data";
352 361
 export default {
353 362
   name: "addPurchaseOrder",
354
-  created() {
355
-    this.org_id = this.$store.getters.xt_user.org_id;
356
-
357
-    var start_time = window.sessionStorage.getItem("start_time");
358
-    var end_time = window.sessionStorage.getItem("end_time");
359
-
360
-    if (start_time != null) {
361
-      this.start_time = start_time;
362
-    }
363
-    if (end_time != null) {
364
-      this.end_time = end_time;
365
-    }
366
-    window.sessionStorage.removeItem("start_time");
367
-    window.sessionStorage.removeItem("end_time");
368
-  },
369 363
   components: {
370 364
     BreadCrumb,
371 365
   },
@@ -430,6 +424,7 @@ export default {
430 424
       ],
431 425
       goodList: [{ id: 1, name: "" }],
432 426
       total_price: 0,
427
+      return_remark:"",
433 428
     };
434 429
   },
435 430
   methods: {
@@ -659,9 +654,11 @@ export default {
659 654
           var end = this.getTimes(this.end_time);
660 655
           const params = {
661 656
             stockIn: this.recordInfo.tableList,
657
+            return_remake:this.return_remark,
662 658
           };
663
-
659
+          
664 660
           console.log("params23322323", params);
661
+          
665 662
           savePurchaseOrder(
666 663
             params,
667 664
             this.supplier_name,
@@ -675,10 +672,12 @@ export default {
675 672
               this.loading = false;
676 673
               this.$message.success("保存成功!");
677 674
               var warehouseInfo = response.data.data.warehouseInfo;
675
+            
678 676
               if(warehouseInfo.is_check == 1){
679 677
                 this.Reviewed = true
680 678
               }
681 679
               this.number = warehouseInfo.number;
680
+              this.return_remark = warehouseInfo.return_remake
682 681
               this.id = warehouseInfo.id;
683 682
               this.recordInfo.tableList = [];
684 683
               var orderInfo = response.data.data.orderInfo;
@@ -824,6 +823,7 @@ export default {
824 823
           var end = this.getTimes(this.end_time);
825 824
           const params = {
826 825
             stockIn: this.recordInfo.tableList,
826
+            return_remake:this.return_remake,
827 827
           };
828 828
           console.log("params23232233223", params);
829 829
 

+ 50 - 29
src/xt_pages/supply/components/editGoodOrder.vue Wyświetl plik

@@ -91,13 +91,13 @@
91 91
             <span>商品类别</span>
92 92
         </template>
93 93
         <template slot-scope="scope">
94
-            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"></el-input>
94
+            <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true" placeholder="商品类别"></el-input>
95 95
             <div style="visibility: hidden">/</div>
96 96
         </template>
97 97
     </el-table-column>
98
-    <el-table-column label="规格&单位" align="center" width="120px">
98
+    <el-table-column label="规格&单位" align="center" width="150px">
99 99
         <template slot-scope="scope">
100
-            <el-input v-model="scope.row.supply_specification_name" style="width:100px" :disabled="true"></el-input>
100
+            <el-input v-model="scope.row.supply_specification_name" style="width:120px" :disabled="true" placeholder="规格&单位"></el-input>
101 101
             <div style="visibility: hidden">/</div>
102 102
         </template>
103 103
     </el-table-column>
@@ -118,13 +118,13 @@
118 118
           </el-form-item>  
119 119
         </template>
120 120
     </el-table-column>
121
-    <el-table-column label="批号" align="center" width="130px">
121
+    <el-table-column label="批号" align="center" width="200px">
122 122
          <template slot="header" slot-scope="scope">
123 123
             <span>批号<span style="color: red">*</span></span>
124 124
         </template>
125 125
         <template slot-scope="scope">
126 126
            <el-form-item  :prop="'tableList.' + scope.$index + '.supply_batch_number'" :rules='tableRules.supply_batch_number'>
127
-             <el-input v-model="scope.row.supply_batch_number" style="width:80px" :disabled="disabled"></el-input>
127
+             <el-input v-model="scope.row.supply_batch_number" style="width:180px" :disabled="disabled" placeholder="请输入批号"></el-input>
128 128
           </el-form-item>
129 129
         </template>
130 130
     </el-table-column>
@@ -142,9 +142,9 @@
142 142
              </el-form-item>
143 143
        </template>
144 144
     </el-table-column>
145
-    <el-table-column label="可用库存" align="center" width="100px">
145
+    <el-table-column label="可用库存" align="center" width="150px">
146 146
         <template slot-scope="scope">
147
-            <el-input v-model="scope.row.supply_total" style="width:80px" :disabled="true"></el-input>
147
+            <el-input v-model="scope.row.supply_total" style="width:100px" :disabled="true"></el-input>
148 148
             <div style="visibility: hidden">/</div>
149 149
         </template>
150 150
     </el-table-column>
@@ -154,14 +154,14 @@
154 154
         </template>
155 155
         <template slot-scope="scope">
156 156
           <el-form-item  :prop="'tableList.' + scope.$index + '.supply_count'" :rules='tableRules.supply_count'>
157
-             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled"></el-input>
157
+             <el-input v-model="scope.row.supply_count" style="width:80px" :disabled="disabled" placeholder="请输入数量"></el-input>
158 158
           </el-form-item>
159 159
         </template>
160 160
     </el-table-column>
161 161
 
162
-    <el-table-column label="采购单价" align="center" width="120px">
162
+    <el-table-column label="采购单价" align="center" width="180px">
163 163
         <template slot-scope="scope">
164
-        <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
164
+        <el-input v-model="scope.row.supply_price" style="width:140px" :disabled="disabled" placeholder="请输入采购单价"></el-input>
165 165
         <div style="visibility: hidden">/</div>
166 166
         </template>
167 167
     </el-table-column>
@@ -216,7 +216,7 @@
216 216
 
217 217
     <el-table-column label="备注" align="center" width="200px">
218 218
         <template slot-scope="scope">
219
-        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled"></el-input>
219
+        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled" placeholder="请输入备注"></el-input>
220 220
         <div style="visibility: hidden">/</div>
221 221
         </template>
222 222
     </el-table-column>
@@ -243,33 +243,31 @@
243 243
         </template>
244 244
     </el-table-column>
245 245
   </el-table>
246
+   <div style="margin-top: 10px">
247
+      <el-input
248
+        type="textarea"
249
+        :rows="2"
250
+        placeholder="备注信息"
251
+        v-model="return_remark"
252
+      >
253
+      </el-input>
254
+  </div>
246 255
 </el-form>
247 256
    <div style="margin-top:10px">
248 257
       合计:{{getAllPrice()}} 元
249 258
    </div>
250 259
    <div style="margin-top:10px">
251
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession"></el-input>%</span>
260
+        <span>优惠率:<el-input style="width:150px" v-model="rate_of_concession" placeholder="请输入优惠率"></el-input>%</span>
252 261
 
253
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
262
+        <span>优惠金额:<el-input style="width:150px" v-model="discount_amount" placeholder="请输入优惠金额"></el-input></span>
254 263
       
255
-        <span>本次付款:<el-input style="width:100px" v-model="payment"></el-input></span>
264
+        <span>本次付款:<el-input style="width:150px" v-model="payment" placeholder="请输入本次付款"></el-input></span>
256 265
 
257
-        <span>本次欠款:<el-input style="width:100px" v-model="arrearage"></el-input></span>
266
+        <span>本次欠款:<el-input style="width:150px" v-model="arrearage" placeholder="请输入本次欠款"></el-input></span>
258 267
     </div>
259 268
     <!-- <Computed></Computed> -->
260 269
 </div>
261 270
 
262
-  <!-- <el-dialog
263
-  title="提示"
264
-  :visible.sync="dialogVisible"
265
-  width="30%"
266
-  :before-close="handleClose">
267
-  <span>这是一段信息</span>
268
-  <span slot="footer" class="dialog-footer">
269
-    <el-button @click="dialogVisible = false">取 消</el-button>
270
-    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
271
-  </span>
272
-  </el-dialog> -->
273 271
 </div>
274 272
 </template>
275 273
 
@@ -277,7 +275,7 @@
277 275
 import Computed from "../../components/Computed/index_1.vue"
278 276
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
279 277
 import {uParseTime } from '@/utils/tools'
280
-import {getInitOrder,checkPurchaseOrder,getGoodOrderDetail,updateGoodOrder,getGoodOrderCountList,ModefySupplyWarehousing,MofyGoodOrder,UpdateSupplyWahouseingInfo} from "@/api/supply"
278
+import {getInitOrder,checkPurchaseOrder,getGoodOrderDetail,updateGoodOrder,getGoodOrderCountList,ModefySupplyWarehousing,MofyGoodOrder,UpdateSupplyWahouseingInfo,getSupplyWarehouseOutById} from "@/api/supply"
281 279
 export default {
282 280
 name: "addPurchaseOrder",
283 281
 components: {
@@ -344,7 +342,7 @@ return {
344 342
    good_number:"",
345 343
    orderInfo:[],
346 344
    warese_out_id:0,
347
-   
345
+   return_remark:"",
348 346
   };
349 347
 },
350 348
 methods:{
@@ -613,6 +611,7 @@ getTimes(time) {
613 611
         this.arrearage = out.arrearage
614 612
         this.number = out.number
615 613
         this.good_number = out.good_number
614
+        this.return_remark = out.return_remake
616 615
         this.start_time = this.getTimes(out.document_date)
617 616
         var orderInfo = response.data.data.list
618 617
         
@@ -696,7 +695,8 @@ getTimes(time) {
696 695
            this.loading = true
697 696
            var warehose_out_id = this.$route.query.id
698 697
            var params = {
699
-             "stockIn":this.recordInfo.tableList,
698
+             stockIn:this.recordInfo.tableList,
699
+             return_remake:this.return_remark,
700 700
            } 
701 701
            updateGoodOrder(params,this.supplier_name,start,this.arrearage,this.payment,warehose_out_id,this.number,this.rate_of_concession,this.discount_amount,this.good_number).then(response=>{
702 702
            if(response.data.state == 1){
@@ -820,6 +820,27 @@ getTimes(time) {
820 820
     })
821 821
   },
822 822
   toClick(){
823
+    //先判断采购单号有没有关联的采购退货单号,如果没有,则为首次生成采购退货单
824
+     if(this.is_check == 2){
825
+      this.$message.error("该采购单未审核,不能生成退货单数据!")
826
+      return false
827
+     }
828
+     var id = this.$route.query.id
829
+    getSupplyWarehouseOutById(id).then(response=>{
830
+      if(response.data.state == 1){
831
+        var cancelList = response.data.data.cancelList
832
+        console.log("cancelList23232232323323223",cancelList)
833
+        if(cancelList.length >0){
834
+
835
+        }
836
+        var outList = response.data.data.outList
837
+        console.log("outList2332232332",outList)
838
+        var cancelOrderList = response.data.data.cancelOrderList
839
+        console.log("cancelOrderList2323322322332",cancelOrderList)
840
+        var drugList = response.data.data.drugList
841
+        console.log("drugList233223232323232",drugList)
842
+      }
843
+    })
823 844
     this.$router.push({path:"/good/return/add?id="+this.id})
824 845
   },
825 846
   //反审核

+ 10 - 4
src/xt_pages/supply/components/editGoodReturn.vue Wyświetl plik

@@ -92,7 +92,7 @@
92 92
                   v-model="scope.row.name"
93 93
                   style="width: 160px"
94 94
                   filterable
95
-                  placeholder="请选择"
95
+                  placeholder="请选择商品"
96 96
                   @change="changeName"
97 97
                   @input="changeGoodName(scope.$index)"
98 98
                   :disabled="disabled"
@@ -117,6 +117,7 @@
117 117
                 v-model="scope.row.supply_type"
118 118
                 style="width: 120px"
119 119
                 :disabled="true"
120
+                placeholder="商品类别"
120 121
               ></el-input>
121 122
             </template>
122 123
           </el-table-column>
@@ -126,6 +127,7 @@
126 127
                 v-model="scope.row.supply_specification_name"
127 128
                 style="width: 150px"
128 129
                 :disabled="true"
130
+                placeholder="规格&单位"
129 131
               ></el-input>
130 132
             </template>
131 133
           </el-table-column>
@@ -168,6 +170,7 @@
168 170
           <el-table-column label="数量" align="center" width="120px">
169 171
             <template slot="header" slot-scope="scope">
170 172
               <span>数量<span style="color: red">*</span></span>
173
+
171 174
             </template>
172 175
             <template slot-scope="scope">
173 176
               <el-form-item
@@ -178,22 +181,24 @@
178 181
                   v-model="scope.row.supply_count"
179 182
                   style="width: 80px"
180 183
                   :disabled="disabled"
184
+                  placeholder="请输入数量"
181 185
                 ></el-input>
182 186
               </el-form-item>
183 187
             </template>
184 188
           </el-table-column>
185 189
 
186
-          <el-table-column label="购货单价" align="center" width="120px">
190
+          <el-table-column label="采购单价" align="center" width="180px">
187 191
             <template slot-scope="scope">
188 192
               <el-input
189 193
                 v-model="scope.row.supply_price"
190
-                style="width: 80px"
194
+                style="width: 140px"
191 195
                 :disabled="disabled"
196
+                placeholder="请输入采购单价"
192 197
               ></el-input>
193 198
             </template>
194 199
           </el-table-column>
195 200
 
196
-          <el-table-column label="购金额" align="center" width="120px">
201
+          <el-table-column label="购金额" align="center" width="120px">
197 202
             <template slot-scope="scope">
198 203
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
199 204
             </template>
@@ -246,6 +251,7 @@
246 251
                 v-model="scope.row.supply_remake"
247 252
                 style="width: 160px"
248 253
                 :disabled="disabled"
254
+                placeholder="请输入备注"
249 255
               ></el-input>
250 256
             </template>
251 257
           </el-table-column>

Plik diff jest za duży
+ 757 - 1080
src/xt_pages/supply/components/editPurchaseOrder.vue


+ 1 - 1
src/xt_pages/supply/goodOrderQuery.vue Wyświetl plik

@@ -107,7 +107,7 @@
107 107
        </el-table-column>
108 108
         <el-table-column label="已付款" align="center">
109 109
          <template slot-scope="scope">
110
-           {{scope.row.payment}}
110
+           <span v-if="scope.row.payment >0">{{scope.row.payment}}</span> 
111 111
          </template>
112 112
        </el-table-column>
113 113
        <el-table-column label="数量" align="center">