Browse Source

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

csx 3 years ago
parent
commit
ccc8d4706d

+ 1 - 0
src/api/supply.js View File

@@ -89,6 +89,7 @@ export function updateGoodOrder(data, supplier_name, start, arrearage, payment,
89 89
 }
90 90
 
91 91
 export function deletePurchaseOrder(id, params) {
92
+  console.log("id232323223",id)
92 93
   return request({
93 94
     url: '/api/supply/deletepurchorder?id=' + id,
94 95
     method: 'Get',

+ 6 - 7
src/xt_pages/data/components/consumables.vue View File

@@ -334,6 +334,7 @@
334 334
               total:"",
335 335
               register_number:"",
336 336
               is_user:"2",
337
+              number:"",
337 338
             },
338 339
             isVisibility: false,
339 340
           }
@@ -568,15 +569,12 @@
568 569
               response.data.data.goodInfo.good_type_id;
569 570
 
570 571
 
571
-            this.goodInfo.goodInfoDialog.formValue.good_name =
572
-              response.data.data.goodInfo.good_name;
572
+            this.goodInfo.goodInfoDialog.formValue.good_name = response.data.data.goodInfo.good_name;
573 573
 
574 574
 
575
-            this.goodInfo.goodInfoDialog.formValue.pinyin =
576
-              response.data.data.goodInfo.pinyin;
575
+            this.goodInfo.goodInfoDialog.formValue.pinyin = response.data.data.goodInfo.pinyin;
577 576
 
578
-            this.goodInfo.goodInfoDialog.formValue.wubi =
579
-              response.data.data.goodInfo.wubi;
577
+            this.goodInfo.goodInfoDialog.formValue.wubi = response.data.data.goodInfo.wubi;
580 578
 
581 579
 
582 580
 
@@ -731,7 +729,8 @@
731 729
             this.goodInfo.goodInfoDialog.formValue.packing_price = response.data.data.goodInfo.packing_price
732 730
             this.goodInfo.goodInfoDialog.formValue.default_count_unit = response.data.data.goodInfo.default_count_unit
733 731
             this.goodInfo.goodInfoDialog.formValue.register_number = response.data.data.goodInfo.register_number
734
-
732
+            
733
+            this.goodInfo.goodInfoDialog.formValue.number = response.data.data.goodInfo.number
735 734
            
736 735
             this.goodInfo.goodInfoDialog.formValue.is_user = response.data.data.goodInfo.is_user.toString()
737 736
             

+ 8 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

@@ -918,6 +918,12 @@
918 918
             v-if="org_template_info.template_id == 45"
919 919
           >
920 920
           </DialysisPrintOrderFortyFive>
921
+
922
+             <DialysisPrintOrderFortySix
923
+            v-bind:childResponse="childResponse"
924
+            v-if="org_template_info.template_id == 46"
925
+          >
926
+          </DialysisPrintOrderFortySix>
921 927
         </div>
922 928
       </el-container>
923 929
     </div>
@@ -982,9 +988,11 @@ import DialysisPrintOrderFortyTwo from "./template/DialysisPrintOrderFortyTwo";
982 988
 import DialysisPrintOrderFortyThree from "./template/DialysisPrintOrderFortyThree";
983 989
 import DialysisPrintOrderFortyFour from "./template/DialysisPrintOrderFortyFour";
984 990
 import DialysisPrintOrderFortyFive from "./template/DialysisPrintOrderFortyFive";
991
+import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix"
985 992
 export default {
986 993
   name: "dialysisPrintOrder",
987 994
   components: {
995
+    DialysisPrintOrderFortySix,
988 996
     DialysisPrintOrderFortyFive,
989 997
     DialysisPrintOrderFortyFour,
990 998
     DialysisPrintOrderFortyThree,

File diff suppressed because it is too large
+ 2903 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortySix.vue


+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -357,7 +357,7 @@
357 357
                   </div>
358 358
                   <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
359 359
                     <div class="inline_block" style="flex:1;">
360
-                      透析(滤)器:
360
+                      <span>透析(滤)器:</span> 
361 361
                       <div class="under_line" style="width: 100px;text-align: center">
362 362
                         {{ prescription.dialyzer_perfusion_apparatus ? prescription.dialyzer_perfusion_apparatus : "" }}
363 363
                         {{prescription.dialysis_dialyszers?prescription.dialysis_dialyszers:"/"}}

+ 6 - 0
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

@@ -211,6 +211,10 @@
211 211
               </el-select>
212 212
              </el-form-item>
213 213
 
214
+            <el-form-item label="批准文号:" >
215
+              <el-input v-model="form.number" style="width:180px"></el-input>
216
+            </el-form-item>
217
+
214 218
 
215 219
             <el-form-item label="备注 : " prop="name" style="width:100%;">
216 220
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
@@ -383,6 +387,7 @@
383 387
           total:"",
384 388
           register_number:"",
385 389
           is_user:"2",
390
+          number:"",
386 391
         },
387 392
 
388 393
         rules: {
@@ -610,6 +615,7 @@
610 615
         form["total"] = this.form.total
611 616
         form["register_number"] = this.form.register_number
612 617
         form["is_user"] = this.form.is_user
618
+        form["number"] = this.form.number
613 619
 
614 620
         return form
615 621
       }, changeSelected: function(val) {

+ 2 - 2
src/xt_pages/stock/stockQuery.vue View File

@@ -113,7 +113,7 @@
113 113
        </el-table-column>
114 114
        <el-table-column label="出库数量" align="center" v-if="showOne">
115 115
          <template slot-scope="scope">
116
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10088 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id ==10290 ">
116
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10188 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id ==10290 ">
117 117
              <span>
118 118
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info)}}
119 119
             </span>
@@ -124,7 +124,7 @@
124 124
       
125 125
         <el-table-column label="剩余库存量" align="center" v-if="showThree">
126 126
          <template slot-scope="scope">
127
-          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10088 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id == 10290">
127
+          <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id == 10188 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164 || org_id == 10290">
128 128
             {{getOverFlushInfo(scope.row.xt_warehouse_info)}}
129 129
           </span>
130 130
           <span v-else>{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>

+ 40 - 34
src/xt_pages/supply/components/addGoodOrder.vue View File

@@ -528,7 +528,8 @@ export default {
528 528
       showTwo: false,
529 529
       warese_out_id: 0,
530 530
       return_remark: "",
531
-      is_warehouse:0
531
+      is_warehouse:0,
532
+      tableDataList:[]
532 533
     };
533 534
   },
534 535
   methods: {
@@ -645,7 +646,7 @@ export default {
645 646
             goodList[i].supply_count = "";
646 647
             goodList[i].supply_total_price = "";
647 648
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
648
-            goodList[i].supply_license_number = "";
649
+            goodList[i].supply_license_number = goodList[i].number;
649 650
             goodList[i].supply_remake = "";
650 651
             goodList[i].type = 2;
651 652
             goodList[i].name = goodList[i].good_name;
@@ -815,23 +816,23 @@ export default {
815 816
     count_arrearage() {
816 817
       this.payment = this.total_price - this.arrearage;
817 818
     },
818
-    checkPurchaseOrder() {
819
-      this.$confirm("是否审核?", {
820
-        confirmButtonText: "确 定",
821
-        cancelButtonText: "取 消",
822
-        type: "warning",
823
-      }).then(() => {
824
-          checkPurchaseOrder(this.id).then((response) => {
825
-            if (response.data.state == 1) {
826
-              var info = response.data.data.info;
827
-              this.disabled = true;
828
-              this.$message.success("审核成功!");
829
-              this.getPurchaseOrderDetail();
830
-            }
831
-          });
832
-        })
833
-        .catch(() => {});
834
-    },
819
+    // checkPurchaseOrder() {
820
+    //   this.$confirm("是否审核?", {
821
+    //     confirmButtonText: "确 定",
822
+    //     cancelButtonText: "取 消",
823
+    //     type: "warning",
824
+    //   }).then(() => {
825
+    //       checkPurchaseOrder(this.id).then((response) => {
826
+    //         if (response.data.state == 1) {
827
+    //           var info = response.data.data.info;
828
+    //           this.disabled = true;
829
+    //           this.$message.success("审核成功!");
830
+    //           this.getPurchaseOrderDetail();
831
+    //         }
832
+    //       });
833
+    //     })
834
+    //     .catch(() => {});
835
+    // },
835 836
     getPurchaseOrderDetail() {
836 837
       var id = this.$route.query.id;
837 838
       var ids = this.$route.query.ids;
@@ -851,7 +852,6 @@ export default {
851 852
             orderInfo[i].supply_product_date = "";
852 853
             orderInfo[i].supply_expiry_date = "";
853 854
           }
854
-          console.log("drugli323322332", orderInfo);
855 855
           var drugList = response.data.data.baseList;
856 856
           var goodList = response.data.data.goodList;
857 857
           for (let i = 0; i < orderInfo.length; i++) {
@@ -893,8 +893,10 @@ export default {
893 893
 
894 894
           this.recordInfo.tableList = [];
895 895
           this.recordInfo.tableList = orderInfo;
896
-
897
-          console.log("orderINFO23323232", this.recordInfo.tableList);
896
+          //用来判断是否删除了从采购订单的数据
897
+          this.tableDataList = []
898
+          this.tableDataList = orderInfo
899
+         
898 900
         }
899 901
       });
900 902
     },
@@ -910,9 +912,7 @@ export default {
910 912
       }
911 913
 
912 914
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
913
-        this.recordInfo.tableList[i].supply_count = parseInt(
914
-          this.recordInfo.tableList[i].supply_count
915
-        );
915
+        this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
916 916
         this.recordInfo.tableList[i].supply_price =
917 917
           this.recordInfo.tableList[i].supply_price.toString();
918 918
         this.recordInfo.tableList[i].supply_total_price =
@@ -942,6 +942,15 @@ export default {
942 942
         if (valid) {
943 943
           this.loading = true;
944 944
           var warehousing_id = this.$route.query.id;
945
+          //判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
946
+        
947
+          if(this.tableDataList.length != this.recordInfo.tableList){
948
+             warehousing_id = 0
949
+             for(let i=0;i<this.recordInfo.tableList.length;i++){
950
+              this.recordInfo.tableList[i].id = 0
951
+              this.number = ""
952
+             }
953
+          }
945 954
           var params = {
946 955
             stockIn: this.recordInfo.tableList,
947 956
             return_remake: this.return_remark,
@@ -1089,7 +1098,7 @@ export default {
1089 1098
     checkGoodOrder() {
1090 1099
       var id = this.warese_out_id;
1091 1100
       var warehousing_id = this.warehousing_id;
1092
-      console.log("hhh2323232323232323",id,warehousing_id)
1101
+      
1093 1102
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1094 1103
         if (response.data.state == 1) {
1095 1104
           this.$message.success("审核成功!");
@@ -1098,12 +1107,9 @@ export default {
1098 1107
           this.showTwo = true;
1099 1108
           this.showThree = true;
1100 1109
           var purcaseOrder = response.data.data.purcaseOrder;
1101
-          console.log("采购订单", purcaseOrder);
1102
-
1103 1110
           var goodOrder = response.data.data.goodOrder;
1104
-          console.log("采购单", goodOrder);
1105 1111
           var drugList = response.data.data.drugList;
1106
-          console.log("druglist23323223", drugList);
1112
+     
1107 1113
           var is_warehouse = 0;
1108 1114
           for (let i = 0; i < purcaseOrder.length; i++) {
1109 1115
             for (let j = 0; j < drugList.length; j++) {
@@ -1173,17 +1179,17 @@ export default {
1173 1179
                 }
1174 1180
               }
1175 1181
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1176
-
1182
+             console.log("审核长度2332322323323332",arr)
1177 1183
               if (arr.length == 0) {
1178 1184
                 this.is_warehouse = 1;
1179
-                this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1185
+                this.ModefySupplyWarehousing(this.is_warehouse, warehousing_id);
1180 1186
               }
1181 1187
 
1182 1188
               //部分入库
1183
-              if (total != goodOrder.length) {
1189
+              if (arr.length > 0) {
1184 1190
                 //修改订购单
1185 1191
                 this.is_warehouse = 3;
1186
-                this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1192
+                this.ModefySupplyWarehousing(this.is_warehouse, warehousing_id);
1187 1193
               }
1188 1194
             }
1189 1195
           }

+ 2 - 1
src/xt_pages/supply/components/addGoodReturn.vue View File

@@ -537,7 +537,7 @@ export default {
537 537
             goodList[i].supply_count = "";
538 538
             goodList[i].supply_total_price = "";
539 539
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
540
-            goodList[i].supply_license_number = "";
540
+            goodList[i].supply_license_number = goodList[i].number;
541 541
             goodList[i].supply_remake = "";
542 542
             goodList[i].type = 2;
543 543
             goodList[i].name = goodList[i].good_name;
@@ -746,6 +746,7 @@ export default {
746 746
           var drugList = response.data.data.drugList;
747 747
           var goodList = response.data.data.goodList;
748 748
           for (let i = 0; i < orderInfo.length; i++) {
749
+            orderInfo[i].id = orderInfo[i].id;
749 750
             orderInfo[i].supply_count = orderInfo[i].count;
750 751
             orderInfo[i].count = orderInfo[i].count
751 752
             orderInfo[i].supply_price = orderInfo[i].price;

+ 50 - 14
src/xt_pages/supply/components/addPurchaseOrder.vue View File

@@ -74,9 +74,16 @@
74 74
             size="small"
75 75
             type="primary"
76 76
             @click="checkPurchaseOrder"
77
-            v-show="showOne"
78
-            >审核</el-button
79
-          >
77
+            v-show="showOne">审核
78
+         </el-button>
79
+
80
+         <!-- <el-button
81
+            size="small"
82
+            type="primary"
83
+            @click="checkReturnOrder"
84
+            v-if="is_check == 1">反审核
85
+         </el-button> -->
86
+         
80 87
           <el-button
81 88
             size="small"
82 89
             type="primary"
@@ -97,10 +104,10 @@
97 104
           :data="recordInfo.tableList"
98 105
           :class="signAndWeighBoxPatients"
99 106
           border
100
-          style="width: 100%"
107
+          style="width:100%"
101 108
           max-height="450"
102 109
         >
103
-          <el-table-column align="center" width="200px">
110
+          <el-table-column align="center" width="200">
104 111
             <template slot="header" slot-scope="scope">
105 112
               <span>商品<span style="color: red">*</span></span>
106 113
             </template>
@@ -111,7 +118,7 @@
111 118
               >
112 119
                 <el-select
113 120
                   v-model="scope.row.name"
114
-                  style="width: 160px"
121
+                  style="width: 160"
115 122
                   filterable
116 123
                   placeholder="请选择商品"
117 124
                   @change="changeName"
@@ -129,7 +136,7 @@
129 136
               </el-form-item>
130 137
             </template>
131 138
           </el-table-column>
132
-          <el-table-column align="center" width="150px">
139
+          <el-table-column align="center" width="150">
133 140
             <template slot="header" slot-scope="scope">
134 141
               <span>商品类别</span>
135 142
             </template>
@@ -143,7 +150,7 @@
143 150
               <div style="visibility: hidden">/</div>
144 151
             </template>
145 152
           </el-table-column>
146
-          <el-table-column label="规格&单位" align="center" width="200px">
153
+          <el-table-column label="规格&单位" align="center" width="200s">
147 154
             <template slot-scope="scope">
148 155
               <el-input
149 156
                 placeholder="规格&单位"
@@ -340,6 +347,7 @@
340 347
             style="width: 150px"
341 348
             v-model="discount_amount"
342 349
             placeholder="请输入优惠金额"
350
+            @input="count_discount"
343 351
           ></el-input
344 352
         ></span>
345 353
       </div>
@@ -357,6 +365,7 @@ import {
357 365
   savePurchaseOrder,
358 366
   updatePurchaseOrder,
359 367
   checkPurchaseOrder,
368
+  getReturnOrder
360 369
 } from "@/api/supply";
361 370
 import { getDataConfig } from "@/utils/data";
362 371
 export default {
@@ -427,6 +436,7 @@ export default {
427 436
       goodList: [{ id: 1, name: "" }],
428 437
       total_price: 0,
429 438
       return_remark:"",
439
+      is_check:2,
430 440
     };
431 441
   },
432 442
   methods: {
@@ -507,7 +517,7 @@ export default {
507 517
         goodList[i].supply_count = ""
508 518
         goodList[i].supply_total_price = ""
509 519
         goodList[i].supply_manufacturer = goodList[i].manufacturer
510
-        goodList[i].supply_license_number = ""
520
+        goodList[i].supply_license_number = goodList[i].number
511 521
         goodList[i].supply_remake = ""
512 522
         goodList[i].type = 2
513 523
         goodList[i].name = goodList[i].good_name
@@ -519,7 +529,7 @@ export default {
519 529
         this.tabList.push(goodList[i])
520 530
         }
521 531
         this.goodList = goodList
522
-        console.log(this.goodList,'oo')
532
+        
523 533
     } 
524 534
     })
525 535
 },
@@ -631,7 +641,7 @@ export default {
631 641
             return_remake:this.return_remark,
632 642
           };
633 643
 
634
-          console.log("params23322323", params);
644
+         
635 645
           savePurchaseOrder(
636 646
             params,
637 647
             this.supplier_name,
@@ -645,8 +655,10 @@ export default {
645 655
               this.loading = false;
646 656
               this.$message.success("保存成功!");
647 657
               var warehouseInfo = response.data.data.warehouseInfo;
658
+              this.is_check = warehouseInfo.is_check
648 659
               if(warehouseInfo.is_check == 1){
649 660
                 this.Reviewed = true
661
+               
650 662
               }
651 663
               this.number = warehouseInfo.number;
652 664
               this.id = warehouseInfo.id;
@@ -682,7 +694,7 @@ export default {
682 694
                 orderInfo[i].project_id = orderInfo[i].project_id;
683 695
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
684 696
               }
685
-              console.log("orderINFO23323232", orderInfo);
697
+            
686 698
               this.recordInfo.tableList = orderInfo;
687 699
               for(let i=0;i<orderInfo.length;i++){
688 700
                  orderInfo[i].name = ""
@@ -716,7 +728,7 @@ export default {
716 728
       var min_str = "";
717 729
       if (arr.length > 0) {
718 730
         for (let i = 0; i < arr.length; i++) {
719
-          total += parseInt(arr[i].stock_max_number);
731
+          total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number);
720 732
         }
721 733
       }
722 734
       if (total < min_number) {
@@ -797,7 +809,7 @@ export default {
797 809
             stockIn: this.recordInfo.tableList,
798 810
             return_remake:this.return_remark,
799 811
           };
800
-          console.log("params23232233223", params);
812
+         
801 813
 
802 814
           updatePurchaseOrder(
803 815
             params,
@@ -827,6 +839,12 @@ export default {
827 839
       }
828 840
       this.total_price = total_price;
829 841
       return total_price.toFixed(2);
842
+    },
843
+     count_discount() {
844
+      this.rate_of_concession = (
845
+        this.discount_amount /
846
+        (this.total_price * 0.01)
847
+      ).toFixed(2);
830 848
     },
831 849
     checkPurchaseOrder(id, index) {
832 850
       this.$confirm("是否审核?", {
@@ -838,6 +856,7 @@ export default {
838 856
           checkPurchaseOrder(this.id).then((response) => {
839 857
             if (response.data.state == 1) {
840 858
               var info = response.data.data.info;
859
+              this.is_check = info.is_check
841 860
               this.disabled = true;
842 861
               this.$message.success("审核成功!");
843 862
               this.Reviewed = true
@@ -863,6 +882,18 @@ export default {
863 882
       }
864 883
       this.discount_amount = discount_amount;
865 884
     },
885
+    checkReturnOrder() {
886
+      var id = this.id;
887
+      getReturnOrder(id).then((response) => {
888
+        if (response.data.state == 1) {
889
+          var msg = response.data.data.msg;
890
+          this.disabled = false;
891
+          this.showOne = true
892
+          this.is_check =2 
893
+          this.$message.success("反审核成功!");
894
+        }
895
+      });
896
+    },
866 897
   },
867 898
 
868 899
   created() {
@@ -920,6 +951,11 @@ export default {
920 951
   transform: translateX(-50%);
921 952
   top: 30%;
922 953
 }
954
+
955
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
956
+width:10px;
957
+height:10px;
958
+}
923 959
 </style>
924 960
 
925 961
 <style>

+ 30 - 22
src/xt_pages/supply/components/addSupply.vue View File

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="35%">
2
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :show-close="false">
3 3
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
4 4
     <div>
5 5
       <el-form
@@ -32,11 +32,14 @@
32 32
                 @select="handleSelect"
33 33
               ></el-autocomplete> -->
34 34
 
35
-              <el-select v-model="supplier.supplierType" @select="handleSelect">
35
+              <el-select
36
+                v-model="supplier.supplierType"
37
+                @select="handleSelect"
38
+              >
36 39
                 <el-option
37 40
                   v-for="item in supplierType"
38 41
                   :key="item.value"
39
-                  :label="item.label"
42
+                  :label="item.name"
40 43
                   :value="item.value"
41 44
                 >
42 45
                 </el-option>
@@ -87,7 +90,7 @@
87 90
           max-height="450"
88 91
         >
89 92
           <!-- 联系人填写 -->
90
-          <el-table-column label="联系人" align="center" width="110px">
93
+          <el-table-column label="联系人" align="center" width="130">
91 94
             <template slot="header" slot-scope="scope">
92 95
               <span>联系人<span style="color: red">*</span></span>
93 96
             </template>
@@ -109,17 +112,17 @@
109 112
               >
110 113
                 <el-input
111 114
                   v-model="scope.row.name"
112
-                  style="width: 80px; margin-top: 3px"
115
+                  style="width: 100px; margin-top: 3px"
113 116
                 ></el-input>
114 117
               </el-form-item>
115 118
             </template>
116 119
           </el-table-column>
117 120
           <!-- 手机填写 -->
118
-          <el-table-column label="手机" align="center" width="100px">
121
+          <el-table-column label="手机" align="center" width="150">
119 122
             <template slot-scope="scope">
120 123
               <el-input
121 124
                 v-model="scope.row.phone"
122
-                style="width: 80px"
125
+                style="width: 120px"
123 126
               ></el-input>
124 127
               <div style="visibility: hidden">/</div>
125 128
             </template>
@@ -127,22 +130,22 @@
127 130
           <!-- id填写======================================================= -->
128 131
           <el-table-column label="id" v-if="false">
129 132
             <template slot-scope="scope">
130
-              <el-input v-model="scope.row.id" style="width: 80px"></el-input>
133
+              <el-input v-model="scope.row.id" style="width: 100px"></el-input>
131 134
               <div style="visibility: hidden">/</div>
132 135
             </template>
133 136
           </el-table-column>
134 137
           <!-- 联系地址填写 -->
135
-          <el-table-column label="联系地址" align="center" width="130px">
138
+          <el-table-column label="联系地址" align="center" width="150">
136 139
             <template slot-scope="scope">
137 140
               <el-input
138 141
                 v-model="scope.row.address"
139
-                style="width: 115px"
142
+                style="width: 120px"
140 143
               ></el-input>
141 144
               <div style="visibility: hidden">/</div>
142 145
             </template>
143 146
           </el-table-column>
144 147
           <!-- 首要联系人填写 -->
145
-          <el-table-column align="center" width="100px">
148
+          <el-table-column align="center" width="130px">
146 149
             <template slot="header" slot-scope="scope">
147 150
               <span>首要联系人<span style="color: red">*</span></span>
148 151
             </template>
@@ -151,8 +154,7 @@
151 154
                 <!-- :prop="'contacts.' + scope.$index + '.name'"  如需添加可在上方标签加入 -->
152 155
                 <el-select
153 156
                   v-model="scope.row.is_first"
154
-                  style="width: 90px"
155
-                  placeholder="请选择"
157
+                  style="width: 110px"
156 158
                   @change="changeName($event, scope)"
157 159
                 >
158 160
                   <el-option
@@ -170,7 +172,7 @@
170 172
           <el-table-column
171 173
             label="操作"
172 174
             align="center"
173
-            width="120px"
175
+            width="150px"
174 176
             fixed="right"
175 177
           >
176 178
             <template slot-scope="scope">
@@ -181,7 +183,6 @@
181 183
                 placement="top"
182 184
               >
183 185
                 <el-button
184
-                  class="tablebtn"
185 186
                   size="mini"
186 187
                   type="primary"
187 188
                   icon="el-icon-circle-plus-outline"
@@ -196,7 +197,6 @@
196 197
                 placement="top"
197 198
               >
198 199
                 <el-button
199
-                  class="tablebtn"
200 200
                   size="mini"
201 201
                   type="danger"
202 202
                   icon="el-icon-delete"
@@ -287,7 +287,7 @@ export default {
287 287
       supplier: {
288 288
         supplierName: "",
289 289
         supplierCode: "gsy001",
290
-        supplierType: 0,
290
+        supplierType: "请选择类别",
291 291
         vatRate: 0,
292 292
         number: "",
293 293
         bank: "",
@@ -429,7 +429,7 @@ export default {
429 429
                     this.closePop();
430 430
                     this.$emit("init");
431 431
                   } else {
432
-                    this.$message.error("新增失败");
432
+                    this.$message.error("新增失败"+res.data.msg);
433 433
                     setTimeout(() => {
434 434
                       this.closePop();
435 435
                     }, 2000);
@@ -477,7 +477,7 @@ export default {
477 477
                     this.closePop();
478 478
                     this.$emit("init");
479 479
                   } else {
480
-                    this.$message.error("修改失败");
480
+                    this.$message.error("修改失败"+res.data.msg);
481 481
                     setTimeout(() => {
482 482
                       this.closePop();
483 483
                     }, 2000);
@@ -571,8 +571,8 @@ export default {
571 571
         }
572 572
       } else if (this.show_type == 2) {
573 573
         delcontactone(params).then((res) => {
574
-          if (res.data.data.list == "删除成功") {
575
-            this.$message.success(res.data.data.list);
574
+          if (res.data.state == 1) {
575
+            this.$message.success("删除成功");
576 576
             this.getcontacts(this.supplier_ids);
577 577
           } else {
578 578
             this.$message.error(res.data.data.list);
@@ -630,7 +630,7 @@ export default {
630 630
       width: 75% !important;
631 631
     }
632 632
     .el-select.el-select--medium {
633
-      width: 70% !important;
633
+      width: 85% !important;
634 634
     }
635 635
   }
636 636
 }
@@ -655,4 +655,12 @@ export default {
655 655
 /deep/ .el-form-item__error {
656 656
   // display: none !important;
657 657
 }
658
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
659
+  width: 10px;
660
+  height: 10px;
661
+}
662
+
663
+/deep/ .el-table__fixed-right{
664
+  bottom: 0 !important;
665
+}
658 666
 </style>

+ 72 - 36
src/xt_pages/supply/components/editGoodOrder.vue View File

@@ -12,12 +12,13 @@
12 12
           align-items: center;
13 13
         "
14 14
       >
15
-        <div>
15
+        <div style="display: flex;">
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
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,24 +40,14 @@
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
-          <!-- <span>交货日期:</span> -->
44
-          <!-- <el-date-picker
45
-            size="small"
46
-            v-model="end_time"
47
-            prefix-icon="el-icon-date"
48
-            :editable="false"
49
-            style="width: 196px;"
50
-            type="date"
51
-            placeholder="选择日期时间"
52
-            align="right"
53
-            format="yyyy-MM-dd"
54
-            value-format="yyyy-MM-dd"
55
-            @change="endTimeChange"
56
-        ></el-date-picker> -->
45
+    
57 46
           <span>单据编码:{{ good_number }}</span>
58 47
         </div>
59
-        <div>
48
+      
49
+          <el-button size="small" type="primary" @click="updateGoodOrder">保存</el-button>
50
+        <div style="display: flex;" >
60 51
           <el-button size="small" type="primary" @click="updateGoodOrder"
61 52
             >保存</el-button
62 53
           >
@@ -213,6 +204,7 @@
213 204
                   placeholder="选择日期时间"
214 205
                   format="yyyy-MM-dd"
215 206
                   value-format="yyyy-MM-dd"
207
+                  :disabled="disabled"
216 208
                 >
217 209
                 </el-date-picker>
218 210
               </el-form-item>
@@ -262,6 +254,7 @@
262 254
           <el-table-column label="采购金额" align="center" width="120px">
263 255
             <template slot-scope="scope">
264 256
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
257
+              <div style="visibility: hidden">/</div>
265 258
             </template>
266 259
           </el-table-column>
267 260
           <el-table-column label="生产日期" align="center" width="200px">
@@ -272,6 +265,7 @@
272 265
               <el-form-item
273 266
                 :prop="'tableList.' + scope.$index + '.supply_product_date'"
274 267
                 :rules="tableRules.supply_product_date"
268
+
275 269
               >
276 270
                 <el-date-picker
277 271
                   prefix-icon="el-icon-date"
@@ -281,6 +275,7 @@
281 275
                   placeholder="选择日期时间"
282 276
                   format="yyyy-MM-dd"
283 277
                   value-format="yyyy-MM-dd"
278
+                  :disabled="disabled"
284 279
                 >
285 280
                 </el-date-picker>
286 281
               </el-form-item>
@@ -384,9 +379,17 @@
384 379
             :rows="2"
385 380
             placeholder="备注信息"
386 381
             v-model="return_remark"
382
+           :disabled="disabled"
387 383
           >
388 384
           </el-input>
389 385
         </div>
386
+        <!-- 审核水印 -->
387
+        <img
388
+          src="@/assets/purchase/Reviewed.png"
389
+          alt="正在加载..."
390
+          class="reviewImg"
391
+          v-show="Reviewed == true"
392
+        />
390 393
       </el-form>
391 394
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
392 395
       <div style="margin-top: 10px">
@@ -396,6 +399,7 @@
396 399
             v-model="rate_of_concession"
397 400
             @input="addressChange"
398 401
             placeholder="请输入优惠率"
402
+            :disabled="disabled"
399 403
           ></el-input
400 404
           >%</span
401 405
         >
@@ -406,6 +410,7 @@
406 410
             v-model="discount_amount"
407 411
             @input="count_discount"
408 412
             placeholder="请输入优惠金额"
413
+            :disabled="disabled"
409 414
           ></el-input
410 415
         ></span>
411 416
 
@@ -415,6 +420,7 @@
415 420
             v-model="payment"
416 421
             @input="count_payment"
417 422
             placeholder="请输入本次付款"
423
+            :disabled="disabled"
418 424
           ></el-input
419 425
         ></span>
420 426
 
@@ -424,10 +430,10 @@
424 430
             v-model="arrearage"
425 431
             @input="count_arrearage"
426 432
             placeholder="请输入本次欠款"
433
+            :disabled="disabled"
427 434
           ></el-input
428 435
         ></span>
429 436
       </div>
430
-      <!-- <Computed></Computed> -->
431 437
     </div>
432 438
     <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
433 439
   </div>
@@ -484,6 +490,7 @@ export default {
484 490
       page: 1,
485 491
       limit: 10,
486 492
       goodType: [],
493
+       Reviewed: false,
487 494
       goodInfo: [],
488 495
       org_id: 0,
489 496
       types: [],
@@ -532,8 +539,17 @@ export default {
532 539
       orderInfo: [],
533 540
       warese_out_id: 0,
534 541
       return_remark: "",
542
+      tableDataList:[],
535 543
     };
536 544
   },
545
+
546
+  watch(){
547
+      // total_price:function(newval,oldval){
548
+      //   console.log(newval,'op')
549
+      // }
550
+
551
+  },
552
+
537 553
   methods: {
538 554
     getInitOrder() {
539 555
       getInitOrder().then((response) => {
@@ -623,7 +639,7 @@ export default {
623 639
             goodList[i].supply_count = "";
624 640
             goodList[i].supply_total_price = "";
625 641
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
626
-            goodList[i].supply_license_number = "";
642
+            goodList[i].supply_license_number = goodList[i].number;
627 643
             goodList[i].supply_remake = "";
628 644
             goodList[i].type = 2;
629 645
             goodList[i].name = goodList[i].good_name;
@@ -712,7 +728,7 @@ export default {
712 728
       tempObj["good_number"] = "";
713 729
       this.recordInfo.tableList.push(tempObj);
714 730
     },
715
-    handleDelete: function (index, row) { 
731
+    handleDelete: function (index, row) {
716 732
       if(this.is_check == 1){
717 733
         this.$message.error("已审核单据,不能删除!")
718 734
         return false
@@ -805,6 +821,7 @@ export default {
805 821
           this.recordInfo.tableList[i].supply_count;
806 822
       }
807 823
       this.total_price = total_price;
824
+      this.addressChange()
808 825
       return total_price.toFixed(2);
809 826
     },
810 827
        addressChange() {
@@ -835,8 +852,7 @@ export default {
835 852
         confirmButtonText: "确 定",
836 853
         cancelButtonText: "取 消",
837 854
         type: "warning",
838
-      })
839
-        .then(() => {
855
+      }).then(() => {
840 856
           checkPurchaseOrder(this.id).then((response) => {
841 857
             if (response.data.state == 1) {
842 858
               var info = response.data.data.info;
@@ -858,6 +874,8 @@ export default {
858 874
             this.showOne = false;
859 875
             this.showTwo = true;
860 876
             this.showThree = true;
877
+            this.disabled = true
878
+            this.Reviewed = true;
861 879
           }
862 880
 
863 881
           this.id = out.id;
@@ -921,6 +939,9 @@ export default {
921 939
 
922 940
           this.recordInfo.tableList = [];
923 941
           this.recordInfo.tableList = orderInfo;
942
+          this.tableDataList = []
943
+          this.tableDataList = orderInfo
944
+
924 945
         }
925 946
       });
926 947
     },
@@ -960,8 +981,18 @@ export default {
960 981
             stockIn: this.recordInfo.tableList,
961 982
             return_remake: this.return_remark,
962 983
           }
984
+          //判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
985
+
986
+          if(this.tableDataList.length != this.recordInfo.tableList){
987
+             warehousing_id = 0
988
+             for(let i=0;i<this.recordInfo.tableList.length;i++){
989
+              this.recordInfo.tableList[i].id = 0
990
+              this.recordInfo.tableDataList[i].order_number = ""
991
+              this.number = ""
992
+             }
993
+          }
963 994
           console.log("param23322332323",params)
964
-        
995
+          return
965 996
           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) => {
966 997
             if (response.data.state == 1) {
967 998
               this.loading = false;
@@ -1004,8 +1035,7 @@ export default {
1004 1035
             for (let j = 0; j < drugList.length; j++) {
1005 1036
               if (goodOrder[i].is_source == 1) {
1006 1037
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1007
-                  goodOrder[i].count =
1008
-                    goodOrder[i].count * drugList[j].min_number;
1038
+                  goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1009 1039
                 }
1010 1040
               }
1011 1041
             }
@@ -1051,20 +1081,20 @@ export default {
1051 1081
                   if (purcaseOrder[i].project_id == newArr[j].project_id) {
1052 1082
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,部分入库
1053 1083
                     if (purcaseOrder[i].count > newArr[j].count) {
1054
-                      arr.push(purcaseOrder[i].project_id);
1084
+                       arr.push(purcaseOrder[i].project_id);
1055 1085
                     }
1056 1086
                   }
1057 1087
                 }
1058 1088
               }
1059 1089
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1060
-
1090
+              console.log("审核23232323323",arr)
1061 1091
               if (arr.length == 0) {
1062
-                is_warehouse = 1;
1092
+                 is_warehouse = 1;
1063 1093
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1064 1094
               }
1065 1095
 
1066 1096
               //部分入库
1067
-              if (total != goodOrder.length) {
1097
+              if (arr.length >0) {
1068 1098
                 //修改订购单
1069 1099
                 is_warehouse = 3;
1070 1100
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
@@ -1133,7 +1163,7 @@ export default {
1133 1163
             }
1134 1164
 
1135 1165
             console.log("数据变了后23323233",outList)
1136
-           
1166
+
1137 1167
             let objInfo = {};
1138 1168
             if(cancelOrderList.length >0){
1139 1169
               cancelOrderList.forEach((item, index) => {
@@ -1155,15 +1185,15 @@ export default {
1155 1185
                     newArr[j].child.push(cancelOrderList[i])
1156 1186
                 }
1157 1187
               }
1158
-              
1159
-             } 
1188
+
1189
+             }
1160 1190
 
1161 1191
             for (let i = 0; i < newArr.length; i++) {
1162 1192
               for (let j = 0; j < newArr[i].child.length; j++) {
1163 1193
                 newArr[i].count += newArr[i].child[j].count;
1164 1194
               }
1165 1195
             }
1166
-           
1196
+
1167 1197
             var arr = []
1168 1198
             var total = 0;
1169 1199
             var str = "";
@@ -1183,7 +1213,7 @@ export default {
1183 1213
 
1184 1214
               if (arr.length == 0) {
1185 1215
                 this.$message.error("该订单已全部生成退库单,请知悉!");
1186
-                return 
1216
+                return
1187 1217
               }
1188 1218
               console.log("arr23323232232323",arr)
1189 1219
               if (arr.length > 0) {
@@ -1191,12 +1221,12 @@ export default {
1191 1221
                 this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1192 1222
               }
1193 1223
              }
1194
-         
1224
+
1195 1225
           }
1196 1226
          }
1197 1227
         }
1198 1228
       });
1199
-     
1229
+
1200 1230
     },
1201 1231
     //反审核
1202 1232
     MofyGoodOrder() {
@@ -1211,7 +1241,7 @@ export default {
1211 1241
           var msg = response.data.data.msg;
1212 1242
           if (msg == 1) {
1213 1243
             this.$message.success("反审核成功!");
1214
-            return 
1244
+            return
1215 1245
           }
1216 1246
           if (msg == 2) {
1217 1247
             var cancelList = response.data.data.cancelList
@@ -1412,4 +1442,10 @@ export default {
1412 1442
   bottom: 20px;
1413 1443
   height: 100%;
1414 1444
 }
1445
+.reviewImg {
1446
+  position: fixed;
1447
+  left: 50%;
1448
+  transform: translateX(-50%);
1449
+  top: 30%;
1450
+}
1415 1451
 </style>

+ 37 - 86
src/xt_pages/supply/components/editGoodReturn.vue View File

@@ -62,12 +62,6 @@
62 62
           <el-button size="small" type="primary" @click="updateGoodReturn">保存</el-button>
63 63
           <el-button size="small" type="primary" @click="checkReturnOrder" v-if="is_check == 2">审核</el-button>
64 64
           <el-button size="small" type="primary" @click="modefyReturnOrder" v-if="is_check == 1">反审核</el-button>
65
-          <el-button size="small" type="primary" @click="updateGoodReturn"
66
-            >保存</el-button
67
-          >
68
-          <el-button size="small" type="primary" @click="checkReturnOrder"
69
-            >审核</el-button
70
-          >
71 65
         </div>
72 66
       </div>
73 67
 
@@ -548,7 +542,7 @@ export default {
548 542
             goodList[i].supply_count = "";
549 543
             goodList[i].supply_total_price = "";
550 544
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
551
-            goodList[i].supply_license_number = "";
545
+            goodList[i].supply_license_number = goodList[i].number;
552 546
             goodList[i].supply_remake = "";
553 547
             goodList[i].type = 2;
554 548
             goodList[i].name = goodList[i].good_name;
@@ -897,77 +891,39 @@ export default {
897 891
       var id = this.$route.query.id;
898 892
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
899 893
     },
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()
909
-
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
-    //             }
917
-
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();
894
+    updateGoodReturn(){
895
+      var warehouse_out_id = this.$route.query.id;
896
+      this.$refs["tableForm"].validate((valid)=>{
897
+        if(valid){
898
+          this.loading = true
899
+          for(let i=0;i<this.recordInfo.tableList.length;i++){
900
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
901
+            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
902
+            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
903
+            for(let j=0;j<this.manufactuerList.length;j++){
904
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
905
+                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
906
+                }
907
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
908
+                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
909
+                }
910
+             }
911
+          }
912
+          var params = {
913
+            stockIn:this.recordInfo.tableList,
914
+            return_marke:this.return_remark,
915
+          }
916
+          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=>{
917
+             if(response.data.state == 1){
918
+                var msg = response.data.msg;
919
+                this.loading = false;
920
+                this.$message.success("保存成功!");
921
+             }
922
+          })
929 923
 
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
-    // },
924
+        }
925
+      })
926
+    },
971 927
     checkReturnOrder(){
972 928
       this.loading = true
973 929
      var params = {
@@ -978,7 +934,7 @@ export default {
978 934
        if(response.data.state == 1){
979 935
         this.loading = false
980 936
         var msg = response.data.data.msg
981
-        this.$message.success("保存成功!")
937
+        this.$message.success("审核成功!")
982 938
        }
983 939
      })
984 940
     },
@@ -990,17 +946,12 @@ export default {
990 946
      }
991 947
      modefyReturnOrder(params).then(response=>{
992 948
        if(response.data.state == 1){
993
-
949
+         this.loading = false
950
+         var msg = response.data.data.msg
951
+         this.$message.success("反审核成功!")
994 952
        }
995 953
      })
996 954
     },
997
-    checkReturnOrder() {
998
-      var params = {
999
-        warehouse_out_id: this.warehouse_out_id,
1000
-        id: this.id,
1001
-      };
1002
-      checkReturnOrder(params).then((response) => {});
1003
-    },
1004 955
   },
1005 956
   created() {
1006 957
     const tempObj = {};

+ 24 - 14
src/xt_pages/supply/components/editPurchaseOrder.vue View File

@@ -141,6 +141,7 @@
141 141
                 style="width: 120px"
142 142
                 :disabled="true"
143 143
               ></el-input>
144
+              <div style="visibility: hidden">/</div>
144 145
             </template>
145 146
           </el-table-column>
146 147
           <el-table-column label="规格&单位" align="center" width="200px">
@@ -150,6 +151,7 @@
150 151
                 style="width: 150px"
151 152
                 :disabled="true"
152 153
               ></el-input>
154
+              <div style="visibility: hidden">/</div>
153 155
             </template>
154 156
           </el-table-column>
155 157
           <el-table-column label="单位" align="center" width="120px">
@@ -187,6 +189,7 @@
187 189
                 style="width: 100px"
188 190
                 :disabled="true"
189 191
               ></el-input>
192
+              <div style="visibility: hidden">/</div>
190 193
             </template>
191 194
           </el-table-column>
192 195
           <el-table-column label="数量" align="center" width="180px">
@@ -216,12 +219,14 @@
216 219
                 :disabled="disabled"
217 220
                 placeholder="请输入采购单价"
218 221
               ></el-input>
222
+              <div style="visibility: hidden">/</div>
219 223
             </template>
220 224
           </el-table-column>
221 225
 
222 226
           <el-table-column label="采购金额" align="center" width="120px">
223 227
             <template slot-scope="scope">
224 228
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
229
+              <div style="visibility: hidden">/</div>
225 230
             </template>
226 231
           </el-table-column>
227 232
 
@@ -241,6 +246,7 @@
241 246
                 >
242 247
                 </el-option>
243 248
               </el-select>
249
+              <div style="visibility: hidden">/</div>
244 250
             </template>
245 251
           </el-table-column>
246 252
 
@@ -251,6 +257,7 @@
251 257
                 style="width: 160px"
252 258
                 :disabled="true"
253 259
               ></el-input>
260
+              <div style="visibility: hidden">/</div>
254 261
             </template>
255 262
           </el-table-column>
256 263
 
@@ -262,6 +269,7 @@
262 269
                 :disabled="disabled"
263 270
                 placeholder="请输入备注"
264 271
               ></el-input>
272
+              <div style="visibility: hidden">/</div>
265 273
             </template>
266 274
           </el-table-column>
267 275
 
@@ -374,7 +382,8 @@ import {
374 382
   getAllOrderCountList,
375 383
   getGoodOrderList,
376 384
   getReturnOrder,
377
-  deletePurchaseOrder
385
+  deletePurchaseOrder,
386
+  deletePurchOder
378 387
 } from "@/api/supply";
379 388
 export default {
380 389
   name: "addPurchaseOrder",
@@ -557,7 +566,7 @@ export default {
557 566
             goodList[i].supply_count = "";
558 567
             goodList[i].supply_total_price = "";
559 568
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
560
-            goodList[i].supply_license_number = "";
569
+            goodList[i].supply_license_number = goodList[i].number
561 570
             goodList[i].supply_remake = "";
562 571
             goodList[i].type = 2;
563 572
             goodList[i].name = goodList[i].good_name;
@@ -569,7 +578,7 @@ export default {
569 578
             this.tabList.push(goodList[i]);
570 579
           }
571 580
           this.goodList = goodList;
572
-          console.log(this.goodList, "oo");
581
+          
573 582
         }
574 583
       });
575 584
     },
@@ -631,6 +640,7 @@ export default {
631 640
       this.recordInfo.tableList.push(tempObj);
632 641
     },
633 642
     handleDelete: function (index, row) {
643
+      
634 644
       if(this.is_check == 1){
635 645
          this.$message.error("已审核单据,不能删除!")
636 646
          return false
@@ -651,7 +661,7 @@ export default {
651 661
             cancelButtonText: '取消',
652 662
             type: 'warning'
653 663
           }).then(() => {
654
-            deletePurchaseOrder(params).then(response => {
664
+            deletePurchOder(params).then(response => {
655 665
               if (response.data.state == 0) {
656 666
                 this.$message.error(response.data.msg)
657 667
                 return false
@@ -730,8 +740,7 @@ export default {
730 740
       this.$refs["tableForm"].validate((valid) => {
731 741
         if (valid) {
732 742
           this.loading = true;
733
-          console.log("生产厂商", this.recordInfo.tableList);
734
-          console.log("生产上次", this.manufactuerList);
743
+         
735 744
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
736 745
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
737 746
             this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
@@ -761,7 +770,7 @@ export default {
761 770
             stockIn: this.recordInfo.tableList,
762 771
             return_remake: this.return_remark,
763 772
           };
764
-          console.log("param23232332", params);
773
+         
765 774
 
766 775
           updatePurchaseOrder(
767 776
             params,
@@ -791,6 +800,7 @@ export default {
791 800
           this.recordInfo.tableList[i].supply_count;
792 801
       }
793 802
       this.total_price = total_price;
803
+      this.addressChange()
794 804
       return total_price.toFixed(2);
795 805
     },
796 806
 
@@ -845,7 +855,7 @@ export default {
845 855
             this.showTwo = false;
846 856
             this.showThree = true;
847 857
           }
848
-          console.log("drugli323322332", this.drugList);
858
+         
849 859
           var drugList = response.data.data.baseList;
850 860
           var goodList = response.data.data.goodList;
851 861
           for (let i = 0; i < orderInfo.length; i++) {
@@ -882,7 +892,7 @@ export default {
882 892
               }
883 893
             }
884 894
           }
885
-          console.log("orderINFO23323232", orderInfo);
895
+         
886 896
           this.recordInfo.tableList = [];
887 897
           this.recordInfo.tableList = orderInfo;
888 898
         }
@@ -902,12 +912,11 @@ export default {
902 912
       getAllOrderCountList(id).then((response) => {
903 913
         if (response.data.state == 1) {
904 914
           var purcaseOrder = response.data.data.purcaseOrder;
905
-          console.log("采购订单", purcaseOrder);
906 915
 
907 916
           var goodOrder = response.data.data.goodOrder;
908
-          console.log("采购单", goodOrder);
917
+         
909 918
           var drugList = response.data.data.drugList;
910
-          console.log("druglist23323223", drugList);
919
+      
911 920
           var ids = "";
912 921
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
913 922
           if (goodOrder.length == 0) {
@@ -954,7 +963,7 @@ export default {
954 963
                 }
955 964
               }
956 965
             }
957
-            console.log("newAr2332232323", newArr);
966
+     
958 967
 
959 968
             for (let i = 0; i < newArr.length; i++) {
960 969
               for (let j = 0; j < newArr[i].child.length; j++) {
@@ -1008,7 +1017,7 @@ export default {
1008 1017
       getGoodOrderList(id).then((response) => {
1009 1018
         if (response.data.state == 1) {
1010 1019
           var list = response.data.data.list
1011
-          console.log("list23232323",list)
1020
+        
1012 1021
           this.orderList = list
1013 1022
           //如果长度大于0,有购货单不能反审核
1014 1023
           if (list.length > 0) {
@@ -1030,6 +1039,7 @@ export default {
1030 1039
         if (response.data.state == 1) {
1031 1040
           var msg = response.data.data.msg;
1032 1041
           this.disabled = false;
1042
+          this.Reviewed = false
1033 1043
           this.$message.success("反审核成功!");
1034 1044
           this.getPurchaseOrderDetail();
1035 1045
         }

+ 1 - 1
src/xt_pages/supply/components/editSupply.vue View File

@@ -918,7 +918,7 @@ background-color: #d0d3da;
918 918
 }
919 919
 .el-table__fixed-right{
920 920
   width:150px;
921
-  bottom: 20px;
921
+  /* bottom: 20px; */
922 922
   height: 100%;
923 923
 }
924 924
 </style>

+ 284 - 255
src/xt_pages/supply/purchaseOrderQuery.vue View File

@@ -3,49 +3,61 @@
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
     </div>
6
-    <div class="app-container ">
7
-      <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
6
+    <div class="app-container">
7
+      <div
8
+        style="
9
+          justify-content: space-between;
10
+          margin: 0px 0 12px 0;
11
+          display: flex;
12
+          align-items: center;
13
+        "
14
+      >
8 15
         <div>
9
-        
10 16
           <el-date-picker
11 17
             size="small"
12 18
             v-model="start_time"
13 19
             prefix-icon="el-icon-date"
14 20
             :editable="false"
15
-            style="width: 196px;"
21
+            style="width: 196px"
16 22
             type="date"
17 23
             placeholder="选择日期时间"
18 24
             align="right"
19 25
             format="yyyy-MM-dd"
20 26
             value-format="yyyy-MM-dd"
21 27
             @change="startTimeChange"
22
-           ></el-date-picker>-
23
-            <el-date-picker
24
-              size="small"
25
-              v-model="end_time"
26
-              prefix-icon="el-icon-date"
27
-              :editable="false"
28
-              style="width: 196px;"
29
-              type="date"
30
-              placeholder="选择日期时间"
31
-              align="right"
32
-              format="yyyy-MM-dd"
33
-              value-format="yyyy-MM-dd"
34
-              @change="endTimeChange"
28
+          ></el-date-picker
29
+          >-
30
+          <el-date-picker
31
+            size="small"
32
+            v-model="end_time"
33
+            prefix-icon="el-icon-date"
34
+            :editable="false"
35
+            style="width: 196px"
36
+            type="date"
37
+            placeholder="选择日期时间"
38
+            align="right"
39
+            format="yyyy-MM-dd"
40
+            value-format="yyyy-MM-dd"
41
+            @change="endTimeChange"
35 42
           ></el-date-picker>
36 43
           <span>审核状态:</span>
37
-           <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
38
-            @change="changeTypeName">
44
+          <el-select
45
+            v-model="check_id"
46
+            style="width: 140px; margin-right: 10px"
47
+            placeholder="请选择"
48
+            @change="changeTypeName"
49
+          >
39 50
             <el-option
40
-                v-for="item in checkList"
41
-                :key="item.id"
42
-                :label="item.name"
43
-                :value="item.id">
51
+              v-for="item in checkList"
52
+              :key="item.id"
53
+              :label="item.name"
54
+              :value="item.id"
55
+            >
44 56
             </el-option>
45 57
           </el-select>
46 58
           <el-input
47 59
             size="small"
48
-            style="width: 200px;margin-left:10px;"
60
+            style="width: 200px; margin-left: 10px"
49 61
             class="filter-item"
50 62
             v-model.trim="keywords"
51 63
             placeholder="订单编号或供应商名称"
@@ -64,12 +76,11 @@
64 76
         </div>
65 77
       </div>
66 78
 
67
-
68
-       <el-table
79
+      <el-table
69 80
         :row-style="{ color: '#303133' }"
70 81
         :header-cell-style="{
71 82
           backgroundColor: 'rgb(245, 247, 250)',
72
-          color: '#606266'
83
+          color: '#606266',
73 84
         }"
74 85
         :data="tableList"
75 86
         :class="signAndWeighBoxPatients"
@@ -77,98 +88,99 @@
77 88
       >
78 89
         <el-table-column label="订单日期" align="center">
79 90
           <template slot-scope="scope">
80
-            <span>{{getTimes(scope.row.document_date)}}</span>
81
-         </template>
91
+            <span>{{ getTimes(scope.row.document_date) }}</span>
92
+          </template>
82 93
         </el-table-column>
83 94
         <el-table-column label="订单编号" align="center">
84 95
           <template slot-scope="scope">
85
-            <span>{{scope.row.number}}</span>
96
+            <span>{{ scope.row.number }}</span>
86 97
           </template>
87 98
         </el-table-column>
88 99
         <el-table-column label="供应商" align="center">
89
-            <template slot-scope="scope">
90
-              <span>{{getName(scope.row.supplier_id)}}</span>
91
-            </template>
92
-         </el-table-column>
93
-        <el-table-column label="关联采购单号" align="center">
94 100
           <template slot-scope="scope">
95
-            <div style="width:100%;height:100%">
96
-              <tr class="annotation-rs cluster-rs" v-for="(item,index) in scope.row.orderOut" :key="index">
101
+            <span>{{ getName(scope.row.supplier_id) }}</span>
102
+          </template>
103
+        </el-table-column>
104
+        <el-table-column label="关联采购单号" align="center" width="150">
105
+          <template slot-scope="scope">
106
+            <div style="width: 100%; height: 100%">
107
+              <tr class="color" v-for="(item,index) in scope.row.orderOut" :key="index">
97 108
                  <td>{{item.good_number}}</td>
98 109
               </tr>
110
+
99 111
             </div>
100 112
           </template>
101 113
         </el-table-column>
102 114
         <el-table-column label="采购金额" align="center">
103 115
           <template slot-scope="scope">
104
-             <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
116
+            <span v-if="getAllBuyPrice(scope.row.orderInfo) > 0">{{
117
+              getAllBuyPrice(scope.row.orderInfo)
118
+            }}</span>
119
+          </template>
120
+        </el-table-column>
121
+
122
+        <el-table-column label="数量" align="center">
123
+          <template slot-scope="scope">
124
+            {{ getAllCount(scope.row.orderInfo) }}
125
+          </template>
126
+        </el-table-column>
127
+        <el-table-column label="订单状态" align="center">
128
+          <template slot-scope="scope">
129
+            <span v-if="scope.row.is_warehouse == 1">全部入库</span>
130
+            <span v-if="scope.row.is_warehouse == 2">未入库</span>
131
+            <span v-if="scope.row.is_warehouse == 3">部分入库</span>
105 132
           </template>
106 133
         </el-table-column>
107 134
 
108
-       <el-table-column label="数量" align="center">
109
-         <template slot-scope="scope">
110
-           {{getAllCount(scope.row.orderInfo)}}
111
-         </template>
112
-       </el-table-column>
113
-       <el-table-column label="订单状态" align="center">
114
-         <template slot-scope="scope">
115
-           <span v-if="scope.row.is_warehouse == 1">全部入库</span>
116
-           <span v-if="scope.row.is_warehouse == 2">未入库</span>
117
-           <span v-if="scope.row.is_warehouse == 3">部分入库</span>
118
-         </template>
119
-       </el-table-column>
120
-     
121 135
         <el-table-column label="交货日期" align="center">
122
-         <template slot-scope="scope">
123
-           {{getTimes(scope.row.delivery_date)}}
124
-         </template>
125
-       </el-table-column>
126
-        
127
-    
128
-      <el-table-column label="制单人" align="center">
129
-         <template slot-scope="scope">
130
-          {{getDocName(scope.row.creater)}}
131
-         </template>
132
-       </el-table-column>
136
+          <template slot-scope="scope">
137
+            {{ getTimes(scope.row.delivery_date) }}
138
+          </template>
139
+        </el-table-column>
133 140
 
134
-      <el-table-column label="审核人" align="center">
135
-         <template slot-scope="scope">
136
-          {{getDocName(scope.row.checker)}}
137
-         </template>
138
-       </el-table-column>
141
+        <el-table-column label="制单人" align="center">
142
+          <template slot-scope="scope">
143
+            {{ getDocName(scope.row.creater) }}
144
+          </template>
145
+        </el-table-column>
139 146
 
140
-       <el-table-column label="操作" align="center" width="200px">
147
+        <el-table-column label="审核人" align="center">
141 148
           <template slot-scope="scope">
142
-              <el-button
143
-                icon="el-icon-edit-outline"
144
-                size="small"
145
-                type="primary"
146
-                @click="toClick(scope.row.id)"
149
+            {{ getDocName(scope.row.checker) }}
150
+          </template>
151
+        </el-table-column>
152
+
153
+        <el-table-column label="操作" align="center" width="200px">
154
+          <template slot-scope="scope">
155
+            <el-button
156
+              icon="el-icon-edit-outline"
157
+              size="small"
158
+              type="primary"
159
+              @click="toClick(scope.row.id)"
147 160
               >编辑
148
-              </el-button>
149
-              <el-button
150
-                icon="el-icon-delete"
151
-                size="small"
152
-                type="danger"
153
-                @click="toDelete(scope.row,scope.$index)"
161
+            </el-button>
162
+            <el-button
163
+              icon="el-icon-delete"
164
+              size="small"
165
+              type="danger"
166
+              @click="toDelete(scope.row, scope.$index)"
154 167
               >删除
155
-              </el-button>
168
+            </el-button>
156 169
           </template>
157 170
         </el-table-column>
158 171
       </el-table>
159 172
       <el-pagination
160 173
         @size-change="handleSizeChange"
161 174
         @current-change="handleCurrentChange"
162
-        :page-sizes="[10, 50, 100,200,500,1000]"
175
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
163 176
         :page-size="10"
164 177
         background
165 178
         align="right"
166
-        style="margin-top:20px;"
179
+        style="margin-top: 20px"
167 180
         layout="total, sizes, prev, pager, next, jumper"
168 181
         :total="total"
169 182
       >
170 183
       </el-pagination>
171
-
172 184
     </div>
173 185
   </div>
174 186
 </template>
@@ -176,217 +188,229 @@
176 188
 <script>
177 189
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
178 190
 
179
-import {getAllSupply,getAllPurchaseOrderList,deletePurchaseOrder} from "@/api/supply"
180
-import {uParseTime } from '@/utils/tools'
191
+import {
192
+  getAllSupply,
193
+  getAllPurchaseOrderList,
194
+  deletePurchaseOrder,
195
+} from "@/api/supply";
196
+import { uParseTime } from "@/utils/tools";
181 197
 export default {
182 198
   name: "stockIn",
183
-   components: {
184
-     
185
-   },
199
+  components: {},
186 200
   components: {
187
-    BreadCrumb
201
+    BreadCrumb,
188 202
   },
189 203
   data() {
190 204
     return {
205
+      isActive: false,
206
+      aa: ["111111", "22222"],
207
+      Color_txt: true,
191 208
       crumbs: [
192 209
         { path: false, name: "采购管理" },
193
-        { path: "/supply/query", name: "采购订单" }
210
+        { path: "/supply/query", name: "采购订单" },
194 211
       ],
195 212
       keywords: "",
196 213
       total: 0,
197 214
       multipleSelection: [],
198 215
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
199 216
       start_time: "",
200
-      end_time:"",
217
+      end_time: "",
201 218
       page: 1,
202 219
       limit: 10,
203 220
       goodType: [],
204 221
       goodInfo: [],
205
-      org_id:0,
206
-      types:[],
207
-      tableList:[{}],
208
-      type_name:"",
209
-      checkList:[
210
-        {id:0,name:"请选择"},
211
-        {id:1,name:"已审核"},
212
-        {id:2,name:"未审核"},
222
+      org_id: 0,
223
+      types: [],
224
+      tableList: [{}],
225
+      type_name: "",
226
+      checkList: [
227
+        { id: 0, name: "请选择" },
228
+        { id: 1, name: "已审核" },
229
+        { id: 2, name: "未审核" },
213 230
       ],
214
-      supplyList:[],
215
-      check_id:0,
216
-      doctorList:[],
231
+      supplyList: [],
232
+      check_id: 0,
233
+      doctorList: [],
217 234
     };
218 235
   },
219
-  methods:{
220
-     toAdd(){
221
-       this.$router.push({path:"/purchase/order/add"})
222
-     },
223
-     changeTypeName(){
224
-       this.getlist()
225
-     },
226
-     startTimeChange(){
227
-      this.getlist()
228
-     },
229
-     endTimeChange(){
230
-      this.getlist()
231
-     },
232
-     search(){
233
-      this.getlist()
234
-     },
235
-     handleSizeChange(val){
236
-       this.limit = val
237
-       this.getlist()
238
-     },
239
-     handleCurrentChange(val){
240
-       this.page = val
241
-       this.getlist()
242
-     },
243
-     getAllSupply(){
244
-       getAllSupply().then(response=>{
245
-         if(response.data.state == 1){
246
-            var supplyList = response.data.data.supplyList
247
-            this.doctorList = response.data.data.doctorList
248
-            for(let i=0;i<supplyList.length;i++){
249
-              this.supplyList.push(supplyList[i])
250
-            }
251
-         }
252
-       })
253
-     },
254
-     getTimes(time) {
255
-      if (time === '') {
256
-      return ''
236
+  methods: {
237
+    toAdd() {
238
+      this.$router.push({ path: "/purchase/order/add" });
239
+    },
240
+    changeTypeName() {
241
+      this.getlist();
242
+    },
243
+    startTimeChange() {
244
+      this.getlist();
245
+    },
246
+    endTimeChange() {
247
+      this.getlist();
248
+    },
249
+    search() {
250
+      this.getlist();
251
+    },
252
+    handleSizeChange(val) {
253
+      this.limit = val;
254
+      this.getlist();
255
+    },
256
+    handleCurrentChange(val) {
257
+      this.page = val;
258
+      this.getlist();
259
+    },
260
+    getAllSupply() {
261
+      getAllSupply().then((response) => {
262
+        if (response.data.state == 1) {
263
+          var supplyList = response.data.data.supplyList;
264
+          this.doctorList = response.data.data.doctorList;
265
+          for (let i = 0; i < supplyList.length; i++) {
266
+            this.supplyList.push(supplyList[i]);
267
+          }
268
+        }
269
+      });
270
+    },
271
+    getTimes(time) {
272
+      if (time === "") {
273
+        return "";
257 274
       }
258
-      return uParseTime(time, '{y}-{m}-{d}')
259
-     },
260
-     getlist(){
261
-        console.log("hhhhhh",this.end_time)
262
-        var params = {
263
-          check_id:this.check_id,
264
-          start_time:this.start_time,
265
-          end_time:this.end_time,
266
-          keyword:this.keywords,
267
-          page:this.page,
268
-          limit:this.limit,
275
+      return uParseTime(time, "{y}-{m}-{d}");
276
+    },
277
+    getlist() {
278
+      console.log("hhhhhh", this.end_time);
279
+      var params = {
280
+        check_id: this.check_id,
281
+        start_time: this.start_time,
282
+        end_time: this.end_time,
283
+        keyword: this.keywords,
284
+        page: this.page,
285
+        limit: this.limit,
286
+      };
287
+      console.log("params2332232332", params);
288
+      getAllPurchaseOrderList(params).then((response) => {
289
+        if (response.data.state == 1) {
290
+          var list = response.data.data.list;
291
+          this.tableList = list;
292
+          var total = response.data.data.total;
293
+          this.total = total;
269 294
         }
270
-       console.log("params2332232332",params)
271
-       getAllPurchaseOrderList(params).then(response=>{
272
-          if(response.data.state == 1){
273
-            var list = response.data.data.list 
274
-            this.tableList = list
275
-            var total = response.data.data.total
276
-            this.total = total
277
-          }
278
-       })
279
-     },
280
-     getName(id){
281
-       var name = ""
282
-       for(let i=0;i<this.supplyList.length;i++){
283
-         if(id == this.supplyList[i].id){
284
-           name = this.supplyList[i].supplier_name
285
-         }
286
-       }
287
-       return name
288
-     },
289
-     getDocName(id){
290
-      var user_name = ""
291
-      for(let i=0;i<this.doctorList.length;i++){
292
-        if(id == this.doctorList[i].admin_user_id){
293
-          user_name = this.doctorList[i].user_name
295
+      });
296
+    },
297
+    getName(id) {
298
+      var name = "";
299
+      for (let i = 0; i < this.supplyList.length; i++) {
300
+        if (id == this.supplyList[i].id) {
301
+          name = this.supplyList[i].supplier_name;
294 302
         }
295 303
       }
296
-      return user_name
297
-     },
298
-     getAllBuyPrice(arr){
299
-       var buy_price = 0
300
-       if(arr!=undefined && arr.length > 0){
301
-          for(let i=0;i<arr.length;i++){
302
-            buy_price += (arr[i].count * arr[i].price)
303
-          }
304
-       }
305
-       return buy_price.toFixed(2)
306
-     },
307
-     getAllCount(arr){
308
-       var count = 0
309
-        if(arr!=undefined && arr.length > 0){
310
-          for(let i=0;i<arr.length;i++){
311
-            count += parseInt(arr[i].count)
312
-          }
313
-       }
314
-       if(count == 0){
315
-         return ""
316
-       }
317
-       if(count > 0){
318
-         return count
319
-       }
320
-      
321
-     },
322
-     toClick(id){
323
-       this.$router.push({path:"/purchase/order/edit?id="+id})
324
-     },
325
-     toDelete(val,index){
326
-       if(val.is_check == 1){
327
-         this.$message.error("已审核单据,不能删除!")
328
-         return false
329
-       }
330
-       if(val.orderOut.length >0 ){
331
-         this.$message.error("已关联单据,不能删除!")
332
-         return false
333
-       }
334
-       this.$confirm('确认删除吗?', '删除', {
335
-          confirmButtonText: '确 定',
336
-          cancelButtonText: '取 消',
337
-          type: 'warning'
338
-        }).then(() => {
339
-            
340
-          deletePurchaseOrder(val.id).then(response => {
304
+      return name;
305
+    },
306
+    getDocName(id) {
307
+      var user_name = "";
308
+      for (let i = 0; i < this.doctorList.length; i++) {
309
+        if (id == this.doctorList[i].admin_user_id) {
310
+          user_name = this.doctorList[i].user_name;
311
+        }
312
+      }
313
+      return user_name;
314
+    },
315
+    getAllBuyPrice(arr) {
316
+      var buy_price = 0;
317
+      if (arr != undefined && arr.length > 0) {
318
+        for (let i = 0; i < arr.length; i++) {
319
+          buy_price += arr[i].count * arr[i].price;
320
+        }
321
+      }
322
+      return buy_price.toFixed(2);
323
+    },
324
+    getAllCount(arr) {
325
+      var count = 0;
326
+      if (arr != undefined && arr.length > 0) {
327
+        for (let i = 0; i < arr.length; i++) {
328
+          count += parseInt(arr[i].count);
329
+        }
330
+      }
331
+      if (count == 0) {
332
+        return "";
333
+      }
334
+      if (count > 0) {
335
+        return count;
336
+      }
337
+    },
338
+    toClick(id) {
339
+      this.$router.push({ path: "/purchase/order/edit?id=" + id });
340
+    },
341
+    toDelete(val, index) {
342
+      if (val.is_check == 1) {
343
+        this.$message.error("已审核单据,不能删除!");
344
+        return false;
345
+      }
346
+      if (val.orderOut.length > 0) {
347
+        this.$message.error("已关联单据,不能删除!");
348
+        return false;
349
+      }
350
+      this.$confirm("确认删除吗?", "删除", {
351
+        confirmButtonText: "确 定",
352
+        cancelButtonText: "取 消",
353
+        type: "warning",
354
+      })
355
+        .then(() => {
356
+          deletePurchaseOrder(val.id).then((response) => {
341 357
             if (response.data.state == 1) {
342
-                var msg = response.data.data.msg
343
-                this.tableList.splice(index, 1);
344
-                this.$message.success("删除成功")
358
+              var msg = response.data.data.msg;
359
+              this.tableList.splice(index, 1);
360
+              this.$message.success("删除成功");
345 361
             } else {
346
-                this.$message.error("删除失败")
362
+              this.$message.error("删除失败");
347 363
             }
348
-          })
364
+          });
349 365
         })
350
-        .catch(() => {
351
-        }) 
352
-      }
366
+        .catch(() => {});
367
+    },
368
+    // 动态改变表格样式
369
+    Color_Change() {
370
+      this.Color_txt = true;
371
+      console.log(this.Color_txt, "op");
372
+    },
373
+
374
+    Color_Changeleave() {
375
+      this.Color_txt = false;
376
+      console.log(this.Color_txt, "false");
377
+    },
353 378
   },
354 379
   created() {
355
-    var now = new Date(); //当前日期 
356
-    var nowMonth = now.getMonth(); //当前月 
357
-    var nowYear = now.getFullYear(); //当前年 
380
+    var now = new Date(); //当前日期
381
+    var nowMonth = now.getMonth(); //当前月
382
+    var nowYear = now.getFullYear(); //当前年
358 383
     //本月的开始时间
359
-    var monthStartDate = new Date(nowYear, nowMonth, 1); 
360
-    this.start_time = this.getTimes(monthStartDate) 
361
-    this.end_time = this.getTimes(new Date())
362
-    this.org_id =  this.$store.getters.xt_user.org_id
363
-    this.getAllSupply()
364
-    this.getlist()
384
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
385
+    this.start_time = this.getTimes(monthStartDate);
386
+    this.end_time = this.getTimes(new Date());
387
+    this.org_id = this.$store.getters.xt_user.org_id;
388
+    this.getAllSupply();
389
+    this.getlist();
365 390
   },
366
- 
367 391
 };
368 392
 </script>
369 393
 <style lang="scss">
370
-  .cluster-rs {
394
+.cluster-rs {
395
+  text-align: center;
396
+}
397
+.annotation-rs {
398
+  width: 100%;
399
+  height: 100%;
400
+  border: none;
401
+  td {
402
+    width: 155px;
403
+    padding: 5px;
404
+    border-right: none;
371 405
     text-align: center;
406
+    vertical-align: middle;
372 407
   }
373
-  .annotation-rs{
374
-    width: 100%;
375
-    height: 100%;
376
-    border: none;
377
-    td{
378
-      width: 155px;
379
-      padding: 5px;
380
-      border-right: none;
381
-      text-align: center;
382
-      vertical-align: middle;
383
-    }
384
-  }
385
-  tr:last-child{
386
-    td{
387
-      border-bottom: none;
388
-    }
408
+}
409
+tr:last-child {
410
+  td {
411
+    border-bottom: none;
389 412
   }
413
+}
390 414
 </style>
391 415
 
392 416
 <style rel="stylesheet/css" lang="scss" scoped>
@@ -440,4 +464,9 @@ export default {
440 464
   background-color: #d0d3da;
441 465
 }
442 466
 
467
+.color {
468
+  background: none !important;
469
+  display: flex;
470
+  flex-direction: column;
471
+}
443 472
 </style>

+ 7 - 0
src/xt_pages/supply/supplyQuery.vue View File

@@ -16,6 +16,7 @@
16 16
           <el-select
17 17
             v-model="type_name"
18 18
             style="width: 170px; margin-right: 10px"
19
+            clearable
19 20
             placeholder="请选择供应商类别"
20 21
             @change="changeTypeName"
21 22
           >
@@ -230,6 +231,11 @@ export default {
230 231
     },
231 232
 
232 233
     toDelete(val, index) {
234
+      this.$confirm('确认删除吗?','删除',{
235
+        confirmButtonText: '确 定',
236
+        concelmButtonText: '取 消',
237
+        type: 'warning'
238
+      }).then(() => {
233 239
       delsupplys(val.ID)
234 240
         .then((res) => {
235 241
           if (res.data.code == 0) {
@@ -242,6 +248,7 @@ export default {
242 248
         .catch((err) => {
243 249
           console.log(err);
244 250
         });
251
+      }).catch(() => {})
245 252
     },
246 253
 
247 254
     toAdd(val) {