Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
9aac6908ca

+ 4 - 3
src/xt_pages/stock/drugs/drugStockInOrder.vue View File

@@ -205,11 +205,11 @@
205 205
             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
206 206
           </template>
207 207
         </el-table-column>
208
-        <el-table-column label="拆零零售价" align="center">
208
+        <!-- <el-table-column label="拆零零售价" align="center">
209 209
           <template slot-scope="scope">
210 210
             {{scope.row.retail_price}}
211 211
           </template>
212
-        </el-table-column>
212
+        </el-table-column> -->
213 213
         <el-table-column label="进货价" align="center">
214 214
           <template slot-scope="scope">
215 215
             {{scope.row.price}}
@@ -217,7 +217,8 @@
217 217
         </el-table-column>
218 218
         <el-table-column label="总价" align="center">
219 219
           <template slot-scope="scope">
220
-            {{scope.row.total_price}}
220
+            <!-- {{scope.row.total_price}} -->
221
+            {{(scope.row.warehousing_count * scope.row.price).toFixed(2)}}
221 222
           </template>
222 223
         </el-table-column>
223 224
         <el-table-column label="生产厂家" align="center">

+ 23 - 12
src/xt_pages/supply/components/addGoodOrder.vue View File

@@ -472,7 +472,8 @@ import {
472 472
   getGoodOrderCountList,
473 473
   ModefySupplyWarehousing,
474 474
   MofyGoodOrder,
475
-  getSupplyWarehouseOutById
475
+  getSupplyWarehouseOutById,
476
+  UpdateSupplyWahouseingInfo
476 477
 } from "@/api/supply";
477 478
 export default {
478 479
   name: "addPurchaseOrder",
@@ -882,9 +883,7 @@ export default {
882 883
       getPurchaseOrderInfo(id, ids).then((response) => {
883 884
         if (response.data.state == 1) {
884 885
           var info = response.data.data.info;
885
-          
886
-         
887
-
886
+          console.log("采购订单ID")
888 887
           this.id = info.id;
889 888
           this.supplier_name = info.supplier_id;
890 889
           this.rate_of_concession = info.rate_of_concession;
@@ -1254,8 +1253,11 @@ export default {
1254 1253
     MofyGoodOrder() {
1255 1254
       var id = this.warese_out_id;
1256 1255
       console.log("采购单ID",id)
1256
+      var warehousing_id = this.id
1257
+      console.log("采购订单ID",warehousing_id)
1257 1258
       var params = {
1258 1259
         id: id,
1260
+        warehousing_id:warehousing_id,
1259 1261
       };
1260 1262
       MofyGoodOrder(params).then((response) => {
1261 1263
         if (response.data.state == 1) {
@@ -1265,7 +1267,7 @@ export default {
1265 1267
             this.is_check = 2
1266 1268
             this.disabled = false
1267 1269
             this.Reviewed = false
1268
-            return
1270
+           
1269 1271
           }
1270 1272
           if (msg == 2) {
1271 1273
             var cancelList = response.data.data.cancelList
@@ -1282,9 +1284,11 @@ export default {
1282 1284
           var drugList = response.data.data.drugList;
1283 1285
           console.log("druglist23323223", drugList);
1284 1286
           var ids = "";
1285
-          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
1287
+          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据,未入库
1286 1288
           if (goodOrder.length == 0) {
1287
-            this.$router.push({path: "/good/order/add?id=" + this.id + "&ids=" + ids});
1289
+             var is_warehouse = 2;
1290
+             this.ModefySupplyWarehousing(is_warehouse, this.id);
1291
+             return
1288 1292
           }
1289 1293
           for (let i = 0; i < purcaseOrder.length; i++) {
1290 1294
             for (let j = 0; j < drugList.length; j++) {
@@ -1351,11 +1355,18 @@ export default {
1351 1355
                   }
1352 1356
                 }
1353 1357
               }
1354
-              //如果total的长度等于0,怎修改该订单的状态为全部入库
1355
-
1358
+            
1359
+              console.log("arr233232233232",arr)
1360
+             if (arr.length == 0) {
1361
+                //未入库
1362
+                var is_warehouse = 2;
1363
+                this.ModefySupplyWarehousing(is_warehouse, this.id);
1364
+                
1365
+              }
1356 1366
               if (arr.length > 0) {
1357
-                //修改采购订单的状态为全部入库
1358
-                this.UpdateSupplyWahouseingInfo();
1367
+                //部分入库
1368
+                var is_warehouse = 3;
1369
+                this.ModefySupplyWarehousing(is_warehouse, this.id);
1359 1370
               }
1360 1371
             }
1361 1372
           }
@@ -1364,7 +1375,7 @@ export default {
1364 1375
     },
1365 1376
     UpdateSupplyWahouseingInfo() {
1366 1377
       var params = {
1367
-        warehousing_id: this.$route.query.warehousing_id,
1378
+        warehousing_id: this.warehousing_id,
1368 1379
       };
1369 1380
       console.log("采购单ID",params)
1370 1381
       UpdateSupplyWahouseingInfo(params).then((response) => {

+ 62 - 14
src/xt_pages/supply/components/addGoodReturn.vue View File

@@ -18,6 +18,7 @@
18 18
             v-model="supplier_name"
19 19
             style="width: 140px; margin-right: 10px"
20 20
             placeholder="请选择"
21
+            :disabled="disabled"
21 22
           >
22 23
             <el-option
23 24
               v-for="item in supplyList"
@@ -39,6 +40,7 @@
39 40
             align="right"
40 41
             format="yyyy-MM-dd"
41 42
             value-format="yyyy-MM-dd"
43
+            :disabled="disabled"
42 44
           ></el-date-picker>
43 45
          
44 46
           <span>单据编码:{{ number }}</span>
@@ -214,16 +216,20 @@
214 216
               <div style="visibility: hidden">/</div>
215 217
             </template>
216 218
           </el-table-column>
217
-          <el-table-column label="折扣率" align="center" width="120px">
219
+          <el-table-column label="折扣率(%)" align="center" width="120px">
218 220
             <template slot-scope="scope">
219
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
221
+               <el-input
222
+                  v-model="scope.row.deposit_rate"
223
+                  style="width: 80px"
224
+                  :disabled="disabled"
225
+                ></el-input>
220 226
               <div style="visibility: hidden">/</div>
221 227
             </template>
222 228
           </el-table-column>
223 229
 
224 230
           <el-table-column label="折扣金额" align="center" width="120px">
225 231
             <template slot-scope="scope">
226
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
232
+              {{ calculate(scope.row.supply_count * scope.row.supply_price * (scope.row.deposit_rate/100)) }}
227 233
               <div style="visibility: hidden">/</div>
228 234
             </template>
229 235
           </el-table-column>
@@ -250,7 +256,7 @@
250 256
             </template>
251 257
           </el-table-column>
252 258
 
253
-          <el-table-column label="采购单号" align="center" width="200px">
259
+          <el-table-column label="关联采购单号" align="center" width="200px">
254 260
             <template slot-scope="scope">
255 261
               <el-input
256 262
                 v-model="scope.row.good_number"
@@ -321,6 +327,13 @@
321 327
         >
322 328
         </el-input>
323 329
       </div>
330
+       <!-- 审核水印 -->
331
+        <img
332
+          src="@/assets/purchase/Reviewed.png"
333
+          alt="正在加载..."
334
+          class="reviewImg"
335
+          v-show="Reviewed == true"
336
+        />
324 337
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
325 338
       <div style="margin-top: 10px">
326 339
         <span
@@ -329,6 +342,7 @@
329 342
             v-model="rate_of_concession"
330 343
             @input="addressChange"
331 344
             placeholder="请输入优惠率"
345
+            :disabled="disabled"
332 346
           ></el-input
333 347
           >%</span
334 348
         >
@@ -339,15 +353,17 @@
339 353
             v-model="discount_amount"
340 354
             @input="count_discount"
341 355
             placeholder="请输入优惠金额"
356
+            :disabled="disabled"
342 357
           ></el-input
343 358
         ></span>
344 359
 
345 360
         <span
346
-          >本次款:<el-input
361
+          >本次退款:<el-input
347 362
             style="width: 100px"
348 363
             v-model="payment"
349 364
             @input="count_payment"
350
-            placeholder="请输入本次付款"
365
+            placeholder="请输入本次退款"
366
+            :disabled="disabled"
351 367
           ></el-input
352 368
         ></span>
353 369
 
@@ -357,10 +373,12 @@
357 373
             v-model="arrearage"
358 374
             @input="count_arrearage"
359 375
             placeholder="请输入本次欠款"
376
+            :disabled="disabled"
360 377
           ></el-input
361 378
         ></span>
362 379
       </div>
363 380
     </div>
381
+    
364 382
   </div>
365 383
 </template>
366 384
 
@@ -436,6 +454,7 @@ export default {
436 454
       warehouse_out_id:0,
437 455
       showThree:false,
438 456
       tableDataList:[],
457
+      Reviewed:false,
439 458
     };
440 459
   },
441 460
   watch: {
@@ -507,6 +526,12 @@ export default {
507 526
             drugList[i].type = 1;
508 527
             drugList[i].supply_price = drugList[i].last_price;
509 528
             drugList[i].name = drugList[i].drug_name;
529
+            drugList[i].count = this.getWarehoseInfo(
530
+              drugList[i].drug_warehouse_info,
531
+              drugList[i].max_unit,
532
+              drugList[i].min_unit,
533
+              drugList[i].min_number
534
+            );
510 535
             drugList[i].unitList = [
511 536
               { id: 1, name: "" },
512 537
               { id: 2, name: "" },
@@ -545,6 +570,9 @@ export default {
545 570
             goodList[i].supply_total = this.getTotalStockCount(
546 571
               goodList[i].good_warehouse_info
547 572
             );
573
+            goodList[i].count = this.getTotalStockCount(
574
+              goodList[i].good_warehouse_info
575
+            );
548 576
             goodList[i].supply_count = "";
549 577
             goodList[i].supply_total_price = "";
550 578
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
@@ -601,6 +629,7 @@ export default {
601 629
           this.recordInfo.tableList[i].is_total = val.is_total;
602 630
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
603 631
           this.recordInfo.tableList[i].unitList = val.unitList;
632
+          this.recordInfo.tableList[i].count = val.count
604 633
         }
605 634
       }
606 635
     },
@@ -631,6 +660,7 @@ export default {
631 660
       tempObj["warehouse_info_id"] =0
632 661
       tempObj["good_number"] = ""
633 662
       tempObj["min_price"] = "";
663
+      tempObj["deposit_rate"] = ""
634 664
       this.recordInfo.tableList.push(tempObj);
635 665
     },
636 666
     handleDelete: function (index, row) {
@@ -781,6 +811,7 @@ export default {
781 811
             orderInfo[i].supply_batch_number = orderInfo[i].supply_batch_number
782 812
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
783 813
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
814
+            orderInfo[i].deposit_rate = ""
784 815
             if (orderInfo[i].is_source == 1) {
785 816
               for (let j = 0; j < drugList.length; j++) {
786 817
                 if (orderInfo[i].project_id == drugList[j].id) {
@@ -826,11 +857,12 @@ export default {
826 857
         if(valid){
827 858
           this.loading = true
828 859
           for(let i=0;i<this.recordInfo.tableList.length;i++){
829
-             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
860
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
830 861
             this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
831 862
             this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
863
+            this.recordInfo.tableList[i].count =this.recordInfo.tableList[i].count.toString();
864
+            this.recordInfo.tableList[i].deposit_rate = this.recordInfo.tableList[i].deposit_rate.toString()
832 865
             if(this.recordInfo.tableList[i].supply_product_date == ""){
833
-              console.log("进来3323232")
834 866
               this.recordInfo.tableList[i].supply_product_date = 0
835 867
             }
836 868
             if(this.recordInfo.tableList[i].supply_expiry_date == ""){
@@ -882,8 +914,11 @@ export default {
882 914
                 this.arrearage = out.arrearage
883 915
                 this.start_time = this.getTimes(out.document_date)
884 916
                 var orderInfo = response.data.data.list
917
+                
885 918
                 for(let i=0;i< orderInfo.length;i++){
886
-                   orderInfo[i].supply_count =  orderInfo[i].count
919
+                  orderInfo[i].name = orderInfo[i].name
920
+                  orderInfo[i].id = orderInfo[i].id
921
+                  orderInfo[i].supply_count =  orderInfo[i].supply_count
887 922
                   orderInfo[i].supply_price =  orderInfo[i].price
888 923
                   orderInfo[i].supply_remake =  orderInfo[i].remark
889 924
                   orderInfo[i].type =  orderInfo[i].is_source
@@ -891,9 +926,13 @@ export default {
891 926
                   orderInfo[i].supply_unit =  orderInfo[i].supply_unit
892 927
                   orderInfo[i].order_number =  orderInfo[i].order_number
893 928
                   orderInfo[i].good_number = orderInfo[i].good_number
894
-                  orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
929
+                  orderInfo[i].supply_total_price = (orderInfo[i].supply_count * orderInfo[i].price).toFixed(2)
895 930
                   orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
896 931
                   orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
932
+                  orderInfo[i].deposit_rate = orderInfo[i].deposit_rate
933
+                  orderInfo[i].count = orderInfo[i].count
934
+                  orderInfo[i].supply_total = orderInfo[i].supply_total
935
+                  orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
897 936
                    if(orderInfo[i].is_source == 1){
898 937
                      for(let j=0;j<this.drugList.length;j++){
899 938
                         if(orderInfo[i].project_id == this.drugList[j].id){
@@ -922,6 +961,9 @@ export default {
922 961
                     }
923 962
                   }
924 963
                 }
964
+                console.log("oredereInof2332",orderInfo)
965
+                this.recordInfo.tableList = []
966
+                this.recordInfo.tableList = orderInfo
925 967
              }
926 968
            })
927 969
           
@@ -937,7 +979,8 @@ export default {
937 979
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
938 980
             this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
939 981
             this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
940
-            
982
+            this.recordInfo.tableList[i].count =this.recordInfo.tableList[i].count.toString();
983
+            this.recordInfo.tableList[i].deposit_rate = this.recordInfo.tableList[i].deposit_rate.toString()
941 984
             for(let j=0;j<this.manufactuerList.length;j++){
942 985
                 if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
943 986
                   this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
@@ -974,9 +1017,11 @@ export default {
974 1017
        if(response.data.state == 1){
975 1018
         this.loading = false
976 1019
         this.showThree = false
1020
+        this.disabled = true
977 1021
         this.is_check = 1
978 1022
         var msg = response.data.data.msg
979
-        this.$message.success("保存成功!")
1023
+        this.Reviewed = true
1024
+        this.$message.success("审核成功!")
980 1025
        }
981 1026
      })
982 1027
     },
@@ -991,7 +1036,9 @@ export default {
991 1036
           this.loading = false;
992 1037
           var msg = response.data.data.msg;
993 1038
           this.$message.success("反审核成功!");
1039
+          this.disabled = false
994 1040
           this.is_check = 2
1041
+          this.Reviewed = false
995 1042
         }
996 1043
       });
997 1044
     },
@@ -1021,11 +1068,12 @@ export default {
1021 1068
     tempObj["supply_expiry_date"] = ""
1022 1069
     tempObj["warehousing_id"] =0
1023 1070
     tempObj["warehouse_info_id"] =0
1024
-    tempObj["count"] = 0;
1071
+    tempObj["count"] = "";
1025 1072
     tempObj["good_number"] = ""
1026 1073
     tempObj["min_price"] = "";
1074
+    tempObj["deposit_rate"] = ""
1027 1075
     this.recordInfo.tableList.push(tempObj);
1028
-    console.log("即哪里地方2",this.recordInfo.tableList)
1076
+   
1029 1077
     this.getInitOrder();
1030 1078
     if(parseInt(this.$route.query.id) > 0){
1031 1079
 

+ 23 - 21
src/xt_pages/supply/components/addPurchaseOrder.vue View File

@@ -731,11 +731,12 @@ export default {
731 731
                   for (let j = 0; j < this.goodList.length; j++) {
732 732
                     if (orderInfo[i].project_id == this.goodList[j].id) {
733 733
                       orderInfo[i].unitList = [{ id: 1, name: "" }];
734
-                      orderInfo[i].unitList[0].name =
735
-                        this.goodList[j].packing_unit;
734
+                      orderInfo[i].unitList[0].name = this.goodList[j].packing_unit;
736 735
                     }
737 736
                   }
738 737
                 }
738
+                orderInfo[i].id = orderInfo[i].id
739
+                orderInfo[i].name = orderInfo[i].name
739 740
                 orderInfo[i].supply_count = orderInfo[i].count;
740 741
                 orderInfo[i].supply_price = orderInfo[i].price;
741 742
                 orderInfo[i].supply_remake = orderInfo[i].remark;
@@ -743,29 +744,30 @@ export default {
743 744
                 orderInfo[i].project_id = orderInfo[i].project_id;
744 745
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
745 746
                 orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
747
+                orderInfo[i].supply_total = orderInfo[i].supply_total
746 748
               }
747 749
 
748 750
               this.recordInfo.tableList = orderInfo;
749 751
               console.log("orderInfo2332322323232332",orderInfo)
750
-              for (let i = 0; i < orderInfo.length; i++) {
751
-                // orderInfo[i].name = "";
752
-                // orderInfo[i].supply_name = "";
753
-                // orderInfo[i].supply_specification_name = "";
754
-                if (orderInfo[i].is_source == 1) {
755
-                  for (let j = 0; j < this.drugList.length; j++) {
756
-                    if (orderInfo[i].project_id == this.drugList[j].id) {
757
-                      orderInfo[i].name = this.drugList[j].drug_name;
758
-                    }
759
-                  }
760
-                }
761
-                if (orderInfo[i].is_source == 2) {
762
-                  for (let y = 0; y < this.goodList.length; y++) {
763
-                    if ((orderInfo[i].project_id = this.goodList[y].id)) {
764
-                      orderInfo[i].name = this.goodList[y].good_name;
765
-                    }
766
-                  }
767
-                }
768
-              }
752
+              // for (let i = 0; i < orderInfo.length; i++) {
753
+              //   orderInfo[i].name = "";
754
+              //   orderInfo[i].supply_name = "";
755
+              //   orderInfo[i].supply_specification_name = "";
756
+              //   if (orderInfo[i].is_source == 1) {
757
+              //     for (let j = 0; j < this.drugList.length; j++) {
758
+              //       if (orderInfo[i].project_id == this.drugList[j].id) {
759
+              //         orderInfo[i].name = this.drugList[j].drug_name;
760
+              //       }
761
+              //     }
762
+              //   }
763
+              //   if (orderInfo[i].is_source == 2) {
764
+              //     for (let y = 0; y < this.goodList.length; y++) {
765
+              //       if ((orderInfo[i].project_id = this.goodList[y].id)) {
766
+              //         orderInfo[i].name = this.goodList[y].good_name;
767
+              //       }
768
+              //     }
769
+              //   }
770
+              // }
769 771
               this.showTwo = false;
770 772
               this.showOne = true;
771 773
               this.showThree = true

+ 15 - 9
src/xt_pages/supply/components/editGoodOrder.vue View File

@@ -951,6 +951,7 @@ export default {
951 951
           this.number = out.number;
952 952
           this.good_number = out.good_number;
953 953
           this.return_remark = out.return_remake;
954
+          
954 955
           this.start_time = this.getTimes(out.document_date);
955 956
           var orderInfo = response.data.data.list;
956 957
 
@@ -1365,7 +1366,6 @@ export default {
1365 1366
             this.Reviewed = false
1366 1367
             this.showOne = true
1367 1368
             this.showTwo = false
1368
-            return
1369 1369
           }
1370 1370
           if (msg == 2) {
1371 1371
             var cancelList = response.data.data.cancelList;
@@ -1382,11 +1382,11 @@ export default {
1382 1382
           var drugList = response.data.data.drugList;
1383 1383
           console.log("druglist23323223", drugList);
1384 1384
           var ids = "";
1385
-          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
1385
+          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据,未入库
1386 1386
           if (goodOrder.length == 0) {
1387
-            this.$router.push({
1388
-              path: "/good/order/add?id=" + id + "&ids=" + ids,
1389
-            });
1387
+              var is_warehouse = 2;
1388
+              this.ModefySupplyWarehousing(is_warehouse, this.$route.query.warehousing_id);
1389
+              return
1390 1390
           }
1391 1391
           for (let i = 0; i < purcaseOrder.length; i++) {
1392 1392
             for (let j = 0; j < drugList.length; j++) {
@@ -1455,11 +1455,17 @@ export default {
1455 1455
                   }
1456 1456
                 }
1457 1457
               }
1458
-              //如果total的长度等于0,怎修改该订单的状态为全部入库
1459
-
1458
+              //如果长度等于0,怎修改该订单的状态未入库
1459
+              console.log("arr233232233232",arr)
1460
+              if(arr.length == 0){
1461
+                var is_warehouse = 2;
1462
+                this.ModefySupplyWarehousing(is_warehouse, this.$route.query.warehousing_id);
1463
+                return
1464
+              }
1460 1465
               if (arr.length > 0) {
1461
-                //修改采购订单的状态为全部入库
1462
-                this.UpdateSupplyWahouseingInfo();
1466
+                //修改采购订单的状态为部分入库
1467
+                var is_warehouse = 3;
1468
+                this.ModefySupplyWarehousing(is_warehouse, this.$route.query.warehousing_id);
1463 1469
               }
1464 1470
             }
1465 1471
           }

+ 33 - 12
src/xt_pages/supply/components/editGoodReturn.vue View File

@@ -18,7 +18,6 @@
18 18
             v-model="supplier_name"
19 19
             style="width: 140px; margin-right: 10px"
20 20
             placeholder="请选择"
21
-            @change="changeTypeName"
22 21
           >
23 22
             <el-option
24 23
               v-for="item in supplyList"
@@ -40,7 +39,6 @@
40 39
             align="right"
41 40
             format="yyyy-MM-dd"
42 41
             value-format="yyyy-MM-dd"
43
-            @change="startTimeChange"
44 42
           ></el-date-picker>
45 43
           <!-- <span>交货日期:</span>
46 44
         <el-date-picker
@@ -232,18 +230,23 @@
232 230
           </el-table-column>
233 231
           <el-table-column label="折扣率" align="center" width="120px">
234 232
             <template slot-scope="scope">
235
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
233
+               <el-input
234
+                  v-model="scope.row.deposit_rate"
235
+                  style="width: 80px"
236
+                  :disabled="disabled"
237
+                ></el-input>
236 238
               <div style="visibility: hidden">/</div>
237 239
             </template>
238 240
           </el-table-column>
239 241
 
240
-          <el-table-column label="折扣金额" align="center" width="120px">
242
+           <el-table-column label="折扣金额" align="center" width="120px">
241 243
             <template slot-scope="scope">
242
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
244
+              {{ calculate(scope.row.supply_count * scope.row.supply_price * (scope.row.deposit_rate/100)) }}
243 245
               <div style="visibility: hidden">/</div>
244 246
             </template>
245 247
           </el-table-column>
246 248
 
249
+
247 250
           <el-table-column label="生产厂家" align="center" width="200px">
248 251
             <template slot-scope="scope">
249 252
               <el-input
@@ -266,7 +269,7 @@
266 269
             </template>
267 270
           </el-table-column>
268 271
 
269
-          <el-table-column label="采购单号" align="center" width="200px">
272
+          <el-table-column label="关联采购单号" align="center" width="200px">
270 273
             <template slot-scope="scope">
271 274
               <el-input
272 275
                 v-model="scope.row.good_number"
@@ -366,11 +369,11 @@
366 369
         ></span>
367 370
 
368 371
         <span
369
-          >本次款:<el-input
372
+          >本次退款:<el-input
370 373
             style="width: 100px"
371 374
             v-model="payment"
372 375
             @input="count_payment"
373
-            placeholder="请输入本次款"
376
+            placeholder="请输入本次退款"
374 377
           ></el-input
375 378
         ></span>
376 379
 
@@ -527,6 +530,12 @@ export default {
527 530
               drugList[i].min_unit,
528 531
               drugList[i].min_number
529 532
             );
533
+            drugList[i].count = this.getWarehoseInfo(
534
+              drugList[i].drug_warehouse_info,
535
+              drugList[i].max_unit,
536
+              drugList[i].min_unit,
537
+              drugList[i].min_number
538
+            );
530 539
             drugList[i].supply_count = "";
531 540
             drugList[i].supply_total_price = "";
532 541
             drugList[i].supply_manufacturer = drugList[i].manufacturer;
@@ -573,6 +582,9 @@ export default {
573 582
             goodList[i].supply_total = this.getTotalStockCount(
574 583
               goodList[i].good_warehouse_info
575 584
             );
585
+            goodList[i].count = this.getTotalStockCount(
586
+              goodList[i].good_warehouse_info
587
+            );
576 588
             goodList[i].supply_count = "";
577 589
             goodList[i].supply_total_price = "";
578 590
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
@@ -629,6 +641,7 @@ export default {
629 641
           this.recordInfo.tableList[i].is_total = val.is_total;
630 642
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
631 643
           this.recordInfo.tableList[i].unitList = val.unitList;
644
+          this.recordInfo.tableList[i].count = val.count
632 645
         }
633 646
       }
634 647
     },
@@ -662,6 +675,7 @@ export default {
662 675
       tempObj["count"] = "";
663 676
       tempObj["min_price"] = "";
664 677
       tempObj["good_number"] = ""
678
+      tempObj["deposit_rate"] = ""
665 679
       this.recordInfo.tableList.push(tempObj);
666 680
     },
667 681
     handleDelete: function (index, row) {
@@ -869,8 +883,9 @@ export default {
869 883
           var goodList = response.data.data.goodList;
870 884
           for (let i = 0; i < orderInfo.length; i++) {
871 885
             orderInfo[i].id = orderInfo[i].id;
872
-            orderInfo[i].supply_count = orderInfo[i].count;
873
-            orderInfo[i].count = orderInfo[i].source_count;
886
+            orderInfo[i].supply_count = orderInfo[i].supply_count;
887
+            orderInfo[i].count = orderInfo[i].count;
888
+
874 889
             orderInfo[i].supply_price = orderInfo[i].price;
875 890
             orderInfo[i].supply_remake = orderInfo[i].remark;
876 891
             orderInfo[i].type = orderInfo[i].is_source;
@@ -930,9 +945,11 @@ export default {
930 945
               this.recordInfo.tableList[i].supply_count
931 946
             );
932 947
             this.recordInfo.tableList[i].supply_price =
933
-              this.recordInfo.tableList[i].supply_price.toString();
948
+            this.recordInfo.tableList[i].supply_price.toString();
934 949
             this.recordInfo.tableList[i].supply_total =
935
-              this.recordInfo.tableList[i].supply_total.toString();
950
+            this.recordInfo.tableList[i].supply_total.toString();
951
+            this.recordInfo.tableList[i].count = this.recordInfo.tableList[i].count.toString()
952
+            this.recordInfo.tableList[i].deposit_rate = this.recordInfo.tableList[i].deposit_rate.toString()
936 953
             for (let j = 0; j < this.manufactuerList.length; j++) {
937 954
               if (
938 955
                 this.recordInfo.tableList[i].supply_manufacturer ==
@@ -991,6 +1008,7 @@ export default {
991 1008
            this.$message.success("审核成功!");
992 1009
            this.is_check = 1
993 1010
            this.Reviewed = true
1011
+           this.disabled = true
994 1012
           }
995 1013
           if(msg == 2){
996 1014
             var good_name = response.data.data.good_name
@@ -1024,6 +1042,8 @@ export default {
1024 1042
           var msg = response.data.data.msg;
1025 1043
           this.$message.success("反审核成功!");
1026 1044
           this.Reviewed = false
1045
+          this.disabled = false
1046
+          this.is_check = 2
1027 1047
         }
1028 1048
       });
1029 1049
     },
@@ -1054,6 +1074,7 @@ export default {
1054 1074
     tempObj["count"] = "";
1055 1075
     tempObj["min_price"] = "";
1056 1076
     tempObj["good_number"] = ""
1077
+    tempObj["deposit_rate"] = ""
1057 1078
     this.recordInfo.tableList.push(tempObj);
1058 1079
     this.getInitOrder();
1059 1080
     //获取购货单列表

+ 4 - 4
src/xt_pages/supply/goodreturn.vue View File

@@ -93,17 +93,17 @@
93 93
               <span>{{getName(scope.row.supplier_id)}}</span>
94 94
             </template>
95 95
          </el-table-column>
96
-        <el-table-column label="关联购订单号" align="center" width="200">
96
+        <el-table-column label="关联购订单号" align="center" width="200">
97 97
           <template slot-scope="scope">
98 98
             <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].order_number}}</span>
99 99
           </template>
100 100
         </el-table-column>
101
-           <el-table-column label="采购单号" align="center" width="200">
101
+           <el-table-column label="关联采购单号" align="center" width="200">
102 102
           <template slot-scope="scope">
103 103
              <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].good_number}}</span>
104 104
           </template>
105 105
         </el-table-column>
106
-        <el-table-column label="购金额" align="center" width="200">
106
+        <el-table-column label="购金额" align="center" width="200">
107 107
           <template slot-scope="scope">
108 108
              <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder)}}</span> 
109 109
           </template>
@@ -124,7 +124,7 @@
124 124
          </template>
125 125
        </el-table-column>
126 126
 
127
-       <el-table-column label="款状态" align="center" width="200">
127
+       <el-table-column label="退款状态" align="center" width="200">
128 128
          <template slot-scope="scope">
129 129
            <!-- <span v-if="scope.row.is_check == 2">未审核</span>
130 130
            <span v-if="scope.row.is_check == 1">已审核</span> -->