Ver código fonte

11月14日 库存扣减更新

XMLWAN 3 anos atrás
pai
commit
752151607b

+ 6 - 14
src/views/layout/Layout.vue Ver arquivo

@@ -16,24 +16,16 @@
16 16
           <i class="iconfont icon-computer_fill navIcon"></i>
17 17
           <p>透析管理</p>
18 18
         </div>
19
-<<<<<<< Updated upstream
20
-        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
21
-          <i class="iconfont icon-kccx navIcon"></i>
22
-          <p>采购管理</p>
23
-        </div>
24
-=======
25
-<<<<<<< Updated upstream
19
+
20
+
21
+
26 22
         <!-- <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
27 23
           <i class="iconfont icon-kccx navIcon"></i>
28 24
           <p>采购管理</p>
29 25
         </div> -->
30
-=======
31
-       <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
32
-        <i class="iconfont icon-kccx navIcon"></i>
33
-         <p>采购管理</p>
34
-       </div>
35
->>>>>>> Stashed changes
36
->>>>>>> Stashed changes
26
+
27
+
28
+
37 29
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
38 30
           <i class="iconfont icon-kccx navIcon"></i>
39 31
           <p>库房管理</p>

+ 70 - 141
src/xt_pages/supply/components/editGoodReturn.vue Ver arquivo

@@ -824,66 +824,7 @@ export default {
824 824
         })
825 825
         .catch(() => {});
826 826
     },
827
-    getGoodReturnDetail() {
828
-      var id = this.$route.query.id;
829
-      getGoodReturnDetail(id).then((response) => {
830
-        if (response.data.state == 1) {
831
-          var out = response.data.data.cancelDetail;
832
-          console.log("out23322323232323", out);
833
-          this.warehouse_out_id = out.warehouse_out_id;
834
-          this.is_check = out.is_check;
835
-          this.id = out.id;
836
-          this.supplier_name = out.supplier_id;
837
-          this.rate_of_concession = out.rate_of_concession;
838
-          this.discount_amount = out.discount_amount;
839
-          this.payment = out.payment;
840
-          this.arrearage = out.arrearage;
841
-          this.start_time = this.getTimes(out.document_date);
842
-          var orderInfo = response.data.data.orderCancelDetail;
843
-          console.log("orderINFO233232232332", orderInfo);
844
-          var drugList = response.data.data.drugList;
845
-          var goodList = response.data.data.goodList;
846
-          for (let i = 0; i < orderInfo.length; i++) {
847
-            orderInfo[i].supply_count = orderInfo[i].count;
848
-            orderInfo[i].supply_price = orderInfo[i].price;
849
-            orderInfo[i].supply_remake = orderInfo[i].remark;
850
-            orderInfo[i].type = orderInfo[i].is_source;
851
-            orderInfo[i].project_id = orderInfo[i].project_id;
852
-            orderInfo[i].supply_unit = orderInfo[i].supply_unit;
853
-            orderInfo[i].order_number = orderInfo[i].order_number;
854
-            orderInfo[i].good_number = orderInfo[i].good_number;
855
-            orderInfo[i].supply_total_price = (
856
-              orderInfo[i].count * orderInfo[i].price
857
-            ).toFixed(2);
858
-            orderInfo[i].supply_expiry_date = orderInfo[i].supply_expiry_date;
859
-            orderInfo[i].supply_product_date = orderInfo[i].supply_product_date;
860
-            if (orderInfo[i].is_source == 1) {
861
-              for (let j = 0; j < drugList.length; j++) {
862
-                if (orderInfo[i].project_id == drugList[j].id) {
863
-                  if (drugList[j].max_unit != drugList[j].min_unit) {
864
-                    orderInfo[i].unitList = [
865
-                      { id: 1, name: "" },
866
-                      { id: 2, name: "" },
867
-                    ];
868
-                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
869
-                    orderInfo[i].unitList[1].name = drugList[j].min_unit;
870
-                  }
871
-                  if (drugList[j].max_unit == drugList[j].min_unit) {
872
-                    orderInfo[i].unitList = [{ id: 1, name: "" }];
873
-                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
874
-                  }
875
-                }
876
-              }
877
-            }
878
-            if (orderInfo[i].is_source == 2) {
879
-              for (let j = 0; j < goodList.length; j++) {
880
-                if (orderInfo[i].project_id == goodList[j].id) {
881
-                  orderInfo[i].unitList = [{ id: 1, name: "" }];
882
-                  orderInfo[i].unitList[0].name = goodList[j].packing_unit;
883
-                }
884
-              }
885
-            }
886
-    getGoodReturnDetail(){
827
+   getGoodReturnDetail(){
887 828
 
888 829
       var id = this.$route.query.id
889 830
       getGoodReturnDetail(id).then(response=>{
@@ -956,89 +897,77 @@ export default {
956 897
       var id = this.$route.query.id;
957 898
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
958 899
     },
959
-    updateGoodReturn() {
960
-      var warehouse_out_id = this.$route.query.id;
961
-      this.$refs["tableForm"].validate((valid)=>{
962
-        if(valid){
963
-          this.loading = true
964
-          for(let i=0;i<this.recordInfo.tableList.length;i++){
965
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
966
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
967
-            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
900
+    // updateGoodReturn() {
901
+    //   var warehouse_out_id = this.$route.query.id;
902
+    //   this.$refs["tableForm"].validate((valid)=>{
903
+    //     if(valid){
904
+    //       this.loading = true
905
+    //       for(let i=0;i<this.recordInfo.tableList.length;i++){
906
+    //         this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
907
+    //         this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
908
+    //         this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
968 909
 
969
-            for(let j=0;j<this.manufactuerList.length;j++){
970
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
971
-                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
972
-                }
973
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
974
-                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
975
-                }
910
+    //         for(let j=0;j<this.manufactuerList.length;j++){
911
+    //             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
912
+    //               this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
913
+    //             }
914
+    //             if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
915
+    //               this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
916
+    //             }
976 917
 
977
-      this.$refs["tableForm"].validate((valid) => {
978
-        if (valid) {
979
-          this.loading = true;
980
-          for (let i = 0; i < this.recordInfo.tableList.length; i++) {
981
-            this.recordInfo.tableList[i].supply_count = parseInt(
982
-              this.recordInfo.tableList[i].supply_count
983
-            );
984
-            this.recordInfo.tableList[i].supply_price =
985
-              this.recordInfo.tableList[i].supply_price.toString();
986
-            this.recordInfo.tableList[i].supply_total =
987
-              this.recordInfo.tableList[i].supply_total.toString();
918
+    //   this.$refs["tableForm"].validate((valid) => {
919
+    //     if (valid) {
920
+    //       this.loading = true;
921
+    //       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
922
+    //         this.recordInfo.tableList[i].supply_count = parseInt(
923
+    //           this.recordInfo.tableList[i].supply_count
924
+    //         );
925
+    //         this.recordInfo.tableList[i].supply_price =
926
+    //           this.recordInfo.tableList[i].supply_price.toString();
927
+    //         this.recordInfo.tableList[i].supply_total =
928
+    //           this.recordInfo.tableList[i].supply_total.toString();
988 929
 
989
-            for (let j = 0; j < this.manufactuerList.length; j++) {
990
-              if (
991
-                this.recordInfo.tableList[i].supply_manufacturer ==
992
-                this.manufactuerList[j].manufacturer_name
993
-              ) {
994
-                this.recordInfo.tableList[i].manufacturer_id =
995
-                  this.manufactuerList[j].id;
996
-              }
997
-              if (
998
-                this.recordInfo.tableList[i].supply_manufacturer ==
999
-                this.manufactuerList[j].id
1000
-              ) {
1001
-                this.recordInfo.tableList[i].supply_manufacturer =
1002
-                  this.manufactuerList[j].manufacturer_name;
1003
-              }
1004
-            }
1005
-          }
1006
-          var params = {
1007
-            stockIn:this.recordInfo.tableList,
1008
-            return_marke:this.return_remark,
1009
-          }
1010
-          console.log("start_time232233232",this.start_time)
1011
-          console.log("arrage2323322323",params)
1012
-          updateGoodReturn(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name,this.number).then(response=>{
1013
-            if(response.data.state == 1){
1014
-               var msg = response.data.msg
1015
-               this.loading = false
1016
-               this.$message.success("保存成功!")
1017
-            stockIn: this.recordInfo.tableList,
1018
-            return_marke: this.return_remark,
1019
-          };
1020
-          console.log("start_time232233232", this.start_time);
1021
-          console.log("arrage2323322323", this.arrearage);
1022
-          updateGoodReturn(
1023
-            params,
1024
-            warehouse_out_id,
1025
-            this.start_time,
1026
-            this.rate_of_concession,
1027
-            this.discount_amount,
1028
-            this.arrearage,
1029
-            this.payment,
1030
-            this.supplier_name,
1031
-            this.number
1032
-          ).then((response) => {
1033
-            if (response.data.state == 1) {
1034
-              var msg = response.data.msg;
1035
-              this.loading = false;
1036
-              this.$message.success("保存成功!");
1037
-            }
1038
-          });
1039
-        }
1040
-      });
1041
-    },
930
+    //         for (let j = 0; j < this.manufactuerList.length; j++) {
931
+    //           if (
932
+    //             this.recordInfo.tableList[i].supply_manufacturer ==
933
+    //             this.manufactuerList[j].manufacturer_name
934
+    //           ) {
935
+    //             this.recordInfo.tableList[i].manufacturer_id =
936
+    //               this.manufactuerList[j].id;
937
+    //           }
938
+    //           if (
939
+    //             this.recordInfo.tableList[i].supply_manufacturer ==
940
+    //             this.manufactuerList[j].id
941
+    //           ) {
942
+    //             this.recordInfo.tableList[i].supply_manufacturer =
943
+    //               this.manufactuerList[j].manufacturer_name;
944
+    //           }
945
+    //         }
946
+    //       }
947
+    //       var params = {
948
+    //         stockIn:this.recordInfo.tableList,
949
+    //         return_marke:this.return_remark,
950
+    //       }
951
+    //       console.log("start_time232233232",this.start_time)
952
+    //       console.log("arrage2323322323",params)
953
+    //       updateGoodReturn(
954
+    //         params,
955
+    //         warehouse_out_id,
956
+    //         this.start_time,
957
+    //         this.rate_of_concession,
958
+    //         this.discount_amount,
959
+    //         this.arrearage,
960
+    //         this.payment,
961
+    //         this.supplier_name,
962
+    //         this.number
963
+    //       ).then((response) => {
964
+    //         if (response.data.state == 1) {
965
+    //           var msg = response.data.msg;
966
+    //           this.loading = false;
967
+    //           this.$message.success("保存成功!");
968
+    //         }
969
+    //       })
970
+    // },
1042 971
     checkReturnOrder(){
1043 972
       this.loading = true
1044 973
      var params = {
@@ -1064,7 +993,7 @@ export default {
1064 993
 
1065 994
        }
1066 995
      })
1067
-    }
996
+    },
1068 997
     checkReturnOrder() {
1069 998
       var params = {
1070 999
         warehouse_out_id: this.warehouse_out_id,