huangyw 3 years ago
parent
commit
f7278c95bf

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

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

+ 41 - 6
src/xt_pages/supply/components/addGoodOrder.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             :disabled="disabled"
21
             :disabled="disabled"
22
           >
22
           >
396
           >
396
           >
397
           </el-input>
397
           </el-input>
398
         </div>
398
         </div>
399
+         <!-- 审核水印 -->
400
+        <img
401
+          src="@/assets/purchase/Reviewed.png"
402
+          alt="正在加载..."
403
+          class="reviewImg"
404
+          v-show="Reviewed == true"
405
+        />
399
       </el-form>
406
       </el-form>
400
       <div>
407
       <div>
401
         <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
408
         <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
484
   },
491
   },
485
   data() {
492
   data() {
486
     return {
493
     return {
494
+      Reviewed: false,
487
       crumbs: [
495
       crumbs: [
488
         { path: false, name: "采购单" },
496
         { path: false, name: "采购单" },
489
         { path: "/supply/good/order/query", name: "新增采购单" },
497
         { path: "/supply/good/order/query", name: "新增采购单" },
562
     total_price: function (newval, oldval) {
570
     total_price: function (newval, oldval) {
563
       if(this.rate_of_concession != ""){
571
       if(this.rate_of_concession != ""){
564
         this.addressChange()
572
         this.addressChange()
573
+        this.count_payment()
565
       }
574
       }
566
     }
575
     }
567
   },
576
   },
845
         ).toFixed(2);
854
         ).toFixed(2);
846
       }
855
       }
847
       this.discount_amount = discount_amount;
856
       this.discount_amount = discount_amount;
848
-     
857
+      if(this.payment > 0) this.count_payment()
858
+      
849
     },
859
     },
850
     count_discount() {
860
     count_discount() {
851
       this.rate_of_concession = (
861
       this.rate_of_concession = (
852
         this.discount_amount /
862
         this.discount_amount /
853
         (this.total_price * 0.01)
863
         (this.total_price * 0.01)
854
       ).toFixed(2);
864
       ).toFixed(2);
865
+      if(this.payment > 0) this.count_payment()
855
     },
866
     },
856
     count_payment() {
867
     count_payment() {
857
       let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
868
       let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
1153
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1164
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1154
         if (response.data.state == 1) {
1165
         if (response.data.state == 1) {
1155
           this.$message.success("审核成功!");
1166
           this.$message.success("审核成功!");
1167
+          this.Reviewed = true;
1156
           this.disabled = true
1168
           this.disabled = true
1157
           this.is_check = 1
1169
           this.is_check = 1
1158
           this.showOne = false;
1170
           this.showOne = false;
1545
 </script>
1557
 </script>
1546
 
1558
 
1547
 <style rel="stylesheet/css" lang="scss" scoped>
1559
 <style rel="stylesheet/css" lang="scss" scoped>
1560
+.reviewImg {
1561
+  position: fixed;
1562
+  left: 50%;
1563
+  transform: translateX(-50%);
1564
+  top: 30%;
1565
+}
1566
+
1567
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1568
+  overflow: auto;
1569
+}
1570
+/deep/ .gutter {
1571
+  width: 15px !important;
1572
+  display: inline-block !important;
1573
+}
1574
+/deep/ .el-table__fixed-right-patch {
1575
+  width: 15px !important;
1576
+}
1577
+
1578
+/deep/ .el-table__fixed-right {
1579
+  bottom: 0 !important;
1580
+  left: auto;
1581
+  right: 0;
1582
+}
1548
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1583
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1549
-  width: 10px;
1550
-  height: 10px;
1584
+  width: 15px !important;
1585
+  height: 15px !important;
1551
 }
1586
 }
1552
 .information {
1587
 .information {
1553
   border: 1px #dcdfe6 solid;
1588
   border: 1px #dcdfe6 solid;
1598
 .el-table::before {
1633
 .el-table::before {
1599
   background-color: #d0d3da;
1634
   background-color: #d0d3da;
1600
 }
1635
 }
1601
-.el-table__fixed-right {
1636
+/* .el-table__fixed-right {
1602
   width: 150px;
1637
   width: 150px;
1603
   bottom: 20px;
1638
   bottom: 20px;
1604
   height: 100%;
1639
   height: 100%;
1605
-}
1640
+} */
1606
 
1641
 
1607
 </style>
1642
 </style>

+ 29 - 4
src/xt_pages/supply/components/addGoodReturn.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             :disabled="disabled"
21
             :disabled="disabled"
22
           >
22
           >
1305
 </script>
1305
 </script>
1306
 
1306
 
1307
 <style rel="stylesheet/css" lang="scss" scoped>
1307
 <style rel="stylesheet/css" lang="scss" scoped>
1308
+
1309
+.reviewImg {
1310
+  position: fixed;
1311
+  left: 50%;
1312
+  transform: translateX(-50%);
1313
+  top: 30%;
1314
+}
1308
 .information {
1315
 .information {
1309
   border: 1px #dcdfe6 solid;
1316
   border: 1px #dcdfe6 solid;
1310
   padding: 30px 20px 30px 20px;
1317
   padding: 30px 20px 30px 20px;
1330
   margin-bottom: 15px;
1337
   margin-bottom: 15px;
1331
 }
1338
 }
1332
 
1339
 
1340
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1341
+  overflow: auto;
1342
+}
1343
+/deep/ .gutter {
1344
+  width: 15px !important;
1345
+  display: inline-block !important;
1346
+}
1347
+/deep/ .el-table__fixed-right-patch {
1348
+  width: 15px !important;
1349
+}
1350
+
1351
+/deep/ .el-table__fixed-right {
1352
+  bottom: 0 !important;
1353
+  left: auto;
1354
+  right: 0;
1355
+}
1333
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1356
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1334
-  width: 10px;
1335
-  height: 10px;
1357
+  width: 15px !important;
1358
+  height: 15px !important;
1336
 }
1359
 }
1337
 </style>
1360
 </style>
1338
 
1361
 
1359
 .el-table::before {
1382
 .el-table::before {
1360
   background-color: #d0d3da;
1383
   background-color: #d0d3da;
1361
 }
1384
 }
1362
-.el-table__fixed-right {
1385
+/* .el-table__fixed-right {
1363
   width: 150px;
1386
   width: 150px;
1364
   bottom: 20px;
1387
   bottom: 20px;
1365
   height: 100%;
1388
   height: 100%;
1366
 }
1389
 }
1390
+ */
1391
+
1367
 </style>
1392
 </style>

+ 20 - 5
src/xt_pages/supply/components/addPurchaseOrder.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
           >
21
           >
22
             <el-option
22
             <el-option
1143
   transform: translateX(-50%);
1143
   transform: translateX(-50%);
1144
   top: 30%;
1144
   top: 30%;
1145
 }
1145
 }
1146
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1147
+  overflow: auto;
1148
+}
1149
+/deep/ .gutter {
1150
+  width: 15px !important;
1151
+  display: inline-block !important;
1152
+}
1153
+/deep/ .el-table__fixed-right-patch {
1154
+  width: 15px !important;
1155
+}
1146
 
1156
 
1157
+/deep/ .el-table__fixed-right {
1158
+  bottom: 0 !important;
1159
+  left: auto;
1160
+  right: 0;
1161
+}
1147
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1162
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1148
-  width: 10px;
1149
-  height: 10px;
1163
+  width: 15px !important;
1164
+  height: 15px !important;
1150
 }
1165
 }
1151
 </style>
1166
 </style>
1152
 
1167
 
1173
 .el-table::before {
1188
 .el-table::before {
1174
   background-color: #d0d3da;
1189
   background-color: #d0d3da;
1175
 }
1190
 }
1176
-.el-table__fixed-right {
1191
+/* .el-table__fixed-right {
1177
   width: 150px;
1192
   width: 150px;
1178
   bottom: 20px;
1193
   bottom: 20px;
1179
   height: 100%;
1194
   height: 100%;
1180
-}
1195
+} */
1181
 </style>
1196
 </style>

+ 35 - 18
src/xt_pages/supply/components/addSupply.vue View File

1
 <template>
1
 <template>
2
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :before-close="closePop" >
2
+  <el-dialog
3
+    :title="title"
4
+    :visible.sync="dialogVisible"
5
+    width="40%"
6
+    :before-close="closePop"
7
+  >
3
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
8
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
4
     <div>
9
     <div>
5
       <el-form
10
       <el-form
32
                 @select="handleSelect"
37
                 @select="handleSelect"
33
               ></el-autocomplete> -->
38
               ></el-autocomplete> -->
34
 
39
 
35
-              <el-select
36
-                v-model="supplier.supplierType"
37
-                @select="handleSelect"
38
-              >
40
+              <el-select v-model="supplier.supplierType" @select="handleSelect">
39
                 <el-option
41
                 <el-option
40
                   v-for="item in supplierType"
42
                   v-for="item in supplierType"
41
                   :key="item.name"
43
                   :key="item.name"
51
               <el-input
53
               <el-input
52
                 v-model="supplier.vatRate"
54
                 v-model="supplier.vatRate"
53
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
55
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
54
-              ></el-input>%
56
+              ></el-input
57
+              >%
55
             </el-form-item>
58
             </el-form-item>
56
           </el-col>
59
           </el-col>
57
         </el-row>
60
         </el-row>
318
         this.title = "编辑供应商";
321
         this.title = "编辑供应商";
319
         this.supplier.supplierCode = data.SupplierCode;
322
         this.supplier.supplierCode = data.SupplierCode;
320
         this.supplier.supplierName = data.SupplierName;
323
         this.supplier.supplierName = data.SupplierName;
321
-        if (data.SupplierType == 0){
322
-          this.supplier.supplierType = ""
323
-        }else {
324
+        if (data.SupplierType == 0) {
325
+          this.supplier.supplierType = "";
326
+        } else {
324
           this.supplier.supplierType = data.SupplierType;
327
           this.supplier.supplierType = data.SupplierType;
325
         }
328
         }
326
         this.supplier.vatRate = data.VatRate;
329
         this.supplier.vatRate = data.VatRate;
432
                     this.closePop();
435
                     this.closePop();
433
                     this.$emit("init");
436
                     this.$emit("init");
434
                   } else {
437
                   } else {
435
-                    this.$message.error("新增失败:"+res.data.msg);
438
+                    this.$message.error("新增失败:" + res.data.msg);
436
                     setTimeout(() => {
439
                     setTimeout(() => {
437
                       this.closePop();
440
                       this.closePop();
438
                     }, 2000);
441
                     }, 2000);
480
                     this.closePop();
483
                     this.closePop();
481
                     this.$emit("init");
484
                     this.$emit("init");
482
                   } else {
485
                   } else {
483
-                    this.$message.error("修改失败:"+res.data.msg);
486
+                    this.$message.error("修改失败:" + res.data.msg);
484
                     setTimeout(() => {
487
                     setTimeout(() => {
485
                       this.closePop();
488
                       this.closePop();
486
                     }, 2000);
489
                     }, 2000);
565
       let params = {
568
       let params = {
566
         id: data.id,
569
         id: data.id,
567
       };
570
       };
568
-      if (params.id==undefined||params.id=="undefined") {
571
+      if (params.id == undefined || params.id == "undefined") {
569
         this.recordInfo.contacts.splice(index, 1);
572
         this.recordInfo.contacts.splice(index, 1);
570
-      }else {
573
+      } else {
571
         if (this.show_type == 1) {
574
         if (this.show_type == 1) {
572
           if (this.recordInfo.contacts.length <= 1) {
575
           if (this.recordInfo.contacts.length <= 1) {
573
             return;
576
             return;
577
         } else if (this.show_type == 2) {
580
         } else if (this.show_type == 2) {
578
           delcontactone(params).then((res) => {
581
           delcontactone(params).then((res) => {
579
             if (res.data.state == 1) {
582
             if (res.data.state == 1) {
580
-              this.$message.success("删除成功!!:",index);
583
+              this.$message.success("删除成功!!:", index);
581
               this.getcontacts(this.supplier_ids);
584
               this.getcontacts(this.supplier_ids);
582
             } else {
585
             } else {
583
               this.$message.error(res.data.data.list);
586
               this.$message.error(res.data.data.list);
661
 /deep/ .el-form-item__error {
664
 /deep/ .el-form-item__error {
662
   // display: none !important;
665
   // display: none !important;
663
 }
666
 }
664
-/deep/ .el-table__body-wrapper::-webkit-scrollbar {
665
-  width: 10px;
666
-  height: 10px;
667
+// /deep/ .el-table__body-wrapper::-webkit-scrollbar {
668
+//   width: 10px;
669
+//   height: 10px;
670
+// }
671
+
672
+
673
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
674
+  overflow: auto;
675
+}
676
+/deep/ .gutter {
677
+  width: 22px !important;
678
+  display: inline-block !important;
679
+}
680
+/deep/ .el-table__fixed-right-patch {
681
+  width: 22px !important;
667
 }
682
 }
668
 
683
 
669
-/deep/ .el-table__fixed-right{
684
+/deep/ .el-table__fixed-right {
670
   bottom: 0 !important;
685
   bottom: 0 !important;
686
+  left: auto;
687
+  right: 22px;
671
 }
688
 }
672
 </style>
689
 </style>

+ 30 - 10
src/xt_pages/supply/components/editGoodOrder.vue View File

17
           <!-- <div>供应商:</div> -->
17
           <!-- <div>供应商:</div> -->
18
           <el-select
18
           <el-select
19
             v-model="supplier_name"
19
             v-model="supplier_name"
20
-            style="width: 140px; margin-right: 10px"
20
+            style="width: 220px; margin-right: 10px"
21
             placeholder="请选择"
21
             placeholder="请选择"
22
             :disabled="disabled"
22
             :disabled="disabled"
23
           >
23
           >
565
       tableDataList: [],
565
       tableDataList: [],
566
     };
566
     };
567
   },
567
   },
568
-
569
-  watch() {
570
-    // total_price:function(newval,oldval){
571
-    //   console.log(newval,'op')
572
-    // }
568
+   watch: {
569
+    total_price: function (newval, oldval) {
570
+      if(this.rate_of_concession != ""){
571
+        this.addressChange()
572
+        this.count_payment()
573
+      }
574
+    }
573
   },
575
   },
574
 
576
 
575
   methods: {
577
   methods: {
898
         ).toFixed(2);
900
         ).toFixed(2);
899
       }
901
       }
900
       this.discount_amount = discount_amount;
902
       this.discount_amount = discount_amount;
903
+      if(this.payment > 0) this.count_payment()
901
     },
904
     },
902
     count_discount() {
905
     count_discount() {
903
       this.rate_of_concession = (
906
       this.rate_of_concession = (
904
         this.discount_amount /
907
         this.discount_amount /
905
         (this.total_price * 0.01)
908
         (this.total_price * 0.01)
906
       ).toFixed(2);
909
       ).toFixed(2);
910
+      if(this.payment > 0) this.count_payment()
907
     },
911
     },
908
     count_payment() {
912
     count_payment() {
909
       let arrearage_1 = (
913
       let arrearage_1 = (
1581
   margin-top: 15px;
1585
   margin-top: 15px;
1582
   margin-bottom: 15px;
1586
   margin-bottom: 15px;
1583
 }
1587
 }
1588
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1589
+  overflow: auto;
1590
+}
1591
+/deep/ .gutter {
1592
+  width: 15px !important;
1593
+  display: inline-block !important;
1594
+}
1595
+/deep/ .el-table__fixed-right-patch {
1596
+  width: 15px !important;
1597
+}
1598
+
1599
+/deep/ .el-table__fixed-right {
1600
+  bottom: 0 !important;
1601
+  left: auto;
1602
+  right: 0;
1603
+}
1584
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1604
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1585
-  width: 10px;
1586
-  height: 10px;
1605
+  width: 15px !important;
1606
+  height: 15px !important;
1587
 }
1607
 }
1588
 </style>
1608
 </style>
1589
 
1609
 
1610
 .el-table::before {
1630
 .el-table::before {
1611
   background-color: #d0d3da;
1631
   background-color: #d0d3da;
1612
 }
1632
 }
1613
-.el-table__fixed-right {
1633
+/* .el-table__fixed-right {
1614
   width: 150px;
1634
   width: 150px;
1615
   bottom: 20px;
1635
   bottom: 20px;
1616
   height: 100%;
1636
   height: 100%;
1617
-}
1637
+} */
1618
 .reviewImg {
1638
 .reviewImg {
1619
   position: fixed;
1639
   position: fixed;
1620
   left: 50%;
1640
   left: 50%;

+ 21 - 5
src/xt_pages/supply/components/editGoodReturn.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             :disabled ="disabled"
21
             :disabled ="disabled"
22
           >
22
           >
1341
   margin-bottom: 15px;
1341
   margin-bottom: 15px;
1342
 }
1342
 }
1343
 
1343
 
1344
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1345
+  overflow: auto;
1346
+}
1347
+/deep/ .gutter {
1348
+  width: 15px !important;
1349
+  display: inline-block !important;
1350
+}
1351
+/deep/ .el-table__fixed-right-patch {
1352
+  width: 15px !important;
1353
+}
1354
+
1355
+/deep/ .el-table__fixed-right {
1356
+  bottom: 0 !important;
1357
+  left: auto;
1358
+  right: 0;
1359
+}
1344
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1360
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1345
-  width: 10px;
1346
-  height: 10px;
1361
+  width: 15px !important;
1362
+  height: 15px !important;
1347
 }
1363
 }
1348
 </style>
1364
 </style>
1349
 
1365
 
1370
 .el-table::before {
1386
 .el-table::before {
1371
   background-color: #d0d3da;
1387
   background-color: #d0d3da;
1372
 }
1388
 }
1373
-.el-table__fixed-right {
1389
+/* .el-table__fixed-right {
1374
   width: 150px;
1390
   width: 150px;
1375
   bottom: 20px;
1391
   bottom: 20px;
1376
   height: 100%;
1392
   height: 100%;
1377
-}
1393
+} */
1378
 .reviewImg {
1394
 .reviewImg {
1379
   position: fixed;
1395
   position: fixed;
1380
   left: 50%;
1396
   left: 50%;

+ 216 - 157
src/xt_pages/supply/components/editPurchaseOrder.vue View File

12
           align-items: center;
12
           align-items: center;
13
         "
13
         "
14
       >
14
       >
15
-        <div style="display:flex;align-items: center;">
15
+        <div style="display: flex; align-items: center">
16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             @change="changeTypeName"
21
             @change="changeTypeName"
22
             :disabled="disabled"
22
             :disabled="disabled"
60
           ></el-date-picker>
60
           ></el-date-picker>
61
           <span>单据编码:{{ number }}</span>
61
           <span>单据编码:{{ number }}</span>
62
         </div>
62
         </div>
63
-        <div style="display: flex;">
63
+        <div style="display: flex">
64
           <el-button size="small" type="primary" @click="toAdd" v-show="showOne"
64
           <el-button size="small" type="primary" @click="toAdd" v-show="showOne"
65
             >生成采购单</el-button
65
             >生成采购单</el-button
66
           >
66
           >
348
             v-model="discount_amount"
348
             v-model="discount_amount"
349
             :disabled="disabled"
349
             :disabled="disabled"
350
             placeholder="请输入优惠金额"
350
             placeholder="请输入优惠金额"
351
+            @input="count_discount"
351
           ></el-input
352
           ></el-input
352
         ></span>
353
         ></span>
353
       </div>
354
       </div>
367
     <el-button @click="dialogVisible = false">取 消</el-button>
368
     <el-button @click="dialogVisible = false">取 消</el-button>
368
   </span>
369
   </span>
369
   </el-dialog> -->
370
   </el-dialog> -->
370
-  <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
371
+    <popup
372
+      ref="Popup"
373
+      :content="content"
374
+      :content_1="content_1"
375
+      :content_2="content_2"
376
+      :number="number"
377
+      :orderList="orderList"
378
+      :type="type"
379
+    ></popup>
371
   </div>
380
   </div>
372
 </template>
381
 </template>
373
 
382
 
374
 <script>
383
 <script>
375
-import popup from "./Popup"
384
+import popup from "./Popup";
376
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
385
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
377
 import { uParseTime } from "@/utils/tools";
386
 import { uParseTime } from "@/utils/tools";
378
 import {
387
 import {
384
   getGoodOrderList,
393
   getGoodOrderList,
385
   getReturnOrder,
394
   getReturnOrder,
386
   deletePurchaseOrder,
395
   deletePurchaseOrder,
387
-  deletePurchOder
396
+  deletePurchOder,
388
 } from "@/api/supply";
397
 } from "@/api/supply";
389
 export default {
398
 export default {
390
   name: "addPurchaseOrder",
399
   name: "addPurchaseOrder",
391
   components: {
400
   components: {
392
     BreadCrumb,
401
     BreadCrumb,
393
-    popup
402
+    popup,
394
   },
403
   },
395
   data() {
404
   data() {
396
     return {
405
     return {
397
-      content_2:"采购单",
398
-      content:"采购订单",
399
-      content_1:"已有以下关联数据,不能反审核",
400
-      type:1,
406
+      content_2: "采购单",
407
+      content: "采购订单",
408
+      content_1: "已有以下关联数据,不能反审核",
409
+      type: 1,
401
       Reviewed: false,
410
       Reviewed: false,
402
       crumbs: [
411
       crumbs: [
403
         { path: false, name: "采购订单" },
412
         { path: false, name: "采购订单" },
454
       showThree: false,
463
       showThree: false,
455
       orderList: [],
464
       orderList: [],
456
       return_remark: "",
465
       return_remark: "",
457
-      
458
     };
466
     };
459
   },
467
   },
468
+
469
+  watch: {
470
+    total_price: function (newval, oldval) {
471
+      if (this.rate_of_concession != "") {
472
+        this.addressChange();
473
+      }
474
+    },
475
+  },
460
   methods: {
476
   methods: {
461
     getInitOrder() {
477
     getInitOrder() {
462
       getInitOrder().then((response) => {
478
       getInitOrder().then((response) => {
559
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
575
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
560
               }
576
               }
561
             }
577
             }
562
-            goodList[i].supply_name =goodList[i].good_name +" " +goodList[i].specification_name +" " + goodList[i].manufacturer;
578
+            goodList[i].supply_name =
579
+              goodList[i].good_name +
580
+              " " +
581
+              goodList[i].specification_name +
582
+              " " +
583
+              goodList[i].manufacturer;
563
             goodList[i].supply_type = goodList[i].good_type_id;
584
             goodList[i].supply_type = goodList[i].good_type_id;
564
-            goodList[i].supply_specification_name =goodList[i].specification_name;
585
+            goodList[i].supply_specification_name =
586
+              goodList[i].specification_name;
565
             goodList[i].supply_price = goodList[i].buy_price;
587
             goodList[i].supply_price = goodList[i].buy_price;
566
-            goodList[i].supply_total = this.getTotalStockCount(goodList[i].good_warehouse_info);
588
+            goodList[i].supply_total = this.getTotalStockCount(
589
+              goodList[i].good_warehouse_info
590
+            );
567
             goodList[i].supply_count = "";
591
             goodList[i].supply_count = "";
568
             goodList[i].supply_total_price = "";
592
             goodList[i].supply_total_price = "";
569
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
593
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
570
-            goodList[i].supply_license_number = goodList[i].number
594
+            goodList[i].supply_license_number = goodList[i].number;
571
             goodList[i].supply_remake = "";
595
             goodList[i].supply_remake = "";
572
             goodList[i].type = 2;
596
             goodList[i].type = 2;
573
             goodList[i].name = goodList[i].good_name;
597
             goodList[i].name = goodList[i].good_name;
579
             this.tabList.push(goodList[i]);
603
             this.tabList.push(goodList[i]);
580
           }
604
           }
581
           this.goodList = goodList;
605
           this.goodList = goodList;
582
-          
583
         }
606
         }
584
       });
607
       });
585
     },
608
     },
594
           this.recordInfo.tableList[i].name = val.name;
617
           this.recordInfo.tableList[i].name = val.name;
595
           this.recordInfo.tableList[i].supply_name = val.supply_name;
618
           this.recordInfo.tableList[i].supply_name = val.supply_name;
596
           this.recordInfo.tableList[i].supply_type = val.supply_type;
619
           this.recordInfo.tableList[i].supply_type = val.supply_type;
597
-          this.recordInfo.tableList[i].supply_specification_name =val.supply_specification_name;
620
+          this.recordInfo.tableList[i].supply_specification_name =
621
+            val.supply_specification_name;
598
           this.recordInfo.tableList[i].supply_total = val.supply_total;
622
           this.recordInfo.tableList[i].supply_total = val.supply_total;
599
           if (val.supply_count == NaN) {
623
           if (val.supply_count == NaN) {
600
             this.recordInfo.tableList[i].supply_count = "";
624
             this.recordInfo.tableList[i].supply_count = "";
604
               : "";
628
               : "";
605
           }
629
           }
606
 
630
 
607
-          this.recordInfo.tableList[i].supply_price = val.supply_price? val.supply_price: "";
608
-          this.recordInfo.tableList[i].supply_total_price =val.supply_total_price ? val.supply_total_price : "";
609
-          this.recordInfo.tableList[i].supply_manufacturer =val.supply_manufacturer;
610
-          this.recordInfo.tableList[i].supply_license_number =val.supply_license_number;
631
+          this.recordInfo.tableList[i].supply_price = val.supply_price
632
+            ? val.supply_price
633
+            : "";
634
+          this.recordInfo.tableList[i].supply_total_price =
635
+            val.supply_total_price ? val.supply_total_price : "";
636
+          this.recordInfo.tableList[i].supply_manufacturer =
637
+            val.supply_manufacturer;
638
+          this.recordInfo.tableList[i].supply_license_number =
639
+            val.supply_license_number;
611
           this.recordInfo.tableList[i].supply_remake = val.supply_remake;
640
           this.recordInfo.tableList[i].supply_remake = val.supply_remake;
612
           this.recordInfo.tableList[i].is_total = val.is_total;
641
           this.recordInfo.tableList[i].is_total = val.is_total;
613
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
642
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
641
       this.recordInfo.tableList.push(tempObj);
670
       this.recordInfo.tableList.push(tempObj);
642
     },
671
     },
643
     handleDelete: function (index, row) {
672
     handleDelete: function (index, row) {
644
-      
645
-      if(this.is_check == 1){
646
-         this.$message.error("已审核单据,不能删除!")
647
-         return false
673
+      if (this.is_check == 1) {
674
+        this.$message.error("已审核单据,不能删除!");
675
+        return false;
648
       }
676
       }
649
-      if(row.id == 0){
677
+      if (row.id == 0) {
650
         if (this.recordInfo.tableList.length <= 1) {
678
         if (this.recordInfo.tableList.length <= 1) {
651
           this.$message.error("只有一条记录的时候无法删除");
679
           this.$message.error("只有一条记录的时候无法删除");
652
           return;
680
           return;
653
         } else {
681
         } else {
654
           this.recordInfo.tableList.splice(index, 1);
682
           this.recordInfo.tableList.splice(index, 1);
655
         }
683
         }
656
-      }else{
657
-          const params = {
658
-            id: row.id
659
-          }
660
-          this.$confirm('确认删除吗?', {
661
-            confirmButtonText: '确定',
662
-            cancelButtonText: '取消',
663
-            type: 'warning'
664
-          }).then(() => {
665
-            deletePurchOder(params).then(response => {
684
+      } else {
685
+        const params = {
686
+          id: row.id,
687
+        };
688
+        this.$confirm("确认删除吗?", {
689
+          confirmButtonText: "确定",
690
+          cancelButtonText: "取消",
691
+          type: "warning",
692
+        })
693
+          .then(() => {
694
+            deletePurchOder(params).then((response) => {
666
               if (response.data.state == 0) {
695
               if (response.data.state == 0) {
667
-                this.$message.error(response.data.msg)
668
-                return false
696
+                this.$message.error(response.data.msg);
697
+                return false;
669
               } else {
698
               } else {
670
-                this.$message.success('删除成功')
699
+                this.$message.success("删除成功");
671
 
700
 
672
-                this.recordInfo.tableList.splice(index, 1)
701
+                this.recordInfo.tableList.splice(index, 1);
673
               }
702
               }
674
-            })
675
-          }).catch(() => {
676
-        })
677
-        
703
+            });
704
+          })
705
+          .catch(() => {});
678
       }
706
       }
679
-      
680
     },
707
     },
681
 
708
 
682
     changeTypeName() {},
709
     changeTypeName() {},
715
       for (let i = 0; i < arr.length; i++) {
742
       for (let i = 0; i < arr.length; i++) {
716
         total_count += arr[i].stock_count;
743
         total_count += arr[i].stock_count;
717
       }
744
       }
718
-      if(total_count >0){
745
+      if (total_count > 0) {
719
         return total_count;
746
         return total_count;
720
-      }else{
721
-        return ""
747
+      } else {
748
+        return "";
722
       }
749
       }
723
-     
724
     },
750
     },
725
     calculate: function (val) {
751
     calculate: function (val) {
726
       if (isNaN(val)) {
752
       if (isNaN(val)) {
746
       this.$refs["tableForm"].validate((valid) => {
772
       this.$refs["tableForm"].validate((valid) => {
747
         if (valid) {
773
         if (valid) {
748
           this.loading = true;
774
           this.loading = true;
749
-         
775
+
750
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
776
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
751
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
752
-            this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
753
-            this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count *this.recordInfo.tableList[i].supply_price).toString();
754
-            this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
755
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString();
777
+            this.recordInfo.tableList[i].supply_count = parseInt(
778
+              this.recordInfo.tableList[i].supply_count
779
+            );
780
+            this.recordInfo.tableList[i].supply_license_number =
781
+              this.recordInfo.tableList[i].supply_license_number.toString();
782
+            this.recordInfo.tableList[i].supply_total_price = (
783
+              this.recordInfo.tableList[i].supply_count *
784
+              this.recordInfo.tableList[i].supply_price
785
+            ).toString();
786
+            this.recordInfo.tableList[i].supply_total =
787
+              this.recordInfo.tableList[i].supply_total.toString();
788
+            this.recordInfo.tableList[i].supply_price =
789
+              this.recordInfo.tableList[i].supply_price.toString();
756
             for (let j = 0; j < this.manufactuerList.length; j++) {
790
             for (let j = 0; j < this.manufactuerList.length; j++) {
757
               if (
791
               if (
758
                 this.recordInfo.tableList[i].supply_manufacturer ==
792
                 this.recordInfo.tableList[i].supply_manufacturer ==
776
             stockIn: this.recordInfo.tableList,
810
             stockIn: this.recordInfo.tableList,
777
             return_remake: this.return_remark,
811
             return_remake: this.return_remark,
778
           };
812
           };
779
-          console.log("哈哈哈哈哈哈",params)
780
-          
813
+          console.log("哈哈哈哈哈哈", params);
814
+
781
           updatePurchaseOrder(
815
           updatePurchaseOrder(
782
             params,
816
             params,
783
             this.supplier_name,
817
             this.supplier_name,
792
               this.loading = false;
826
               this.loading = false;
793
               var warehousingInfo = response.data.data.warehousingInfo;
827
               var warehousingInfo = response.data.data.warehousingInfo;
794
               this.$message.success("保存成功!");
828
               this.$message.success("保存成功!");
795
-              this.getPurchaseOrderDetail()
829
+              this.getPurchaseOrderDetail();
796
             }
830
             }
797
           });
831
           });
798
         }
832
         }
807
           this.recordInfo.tableList[i].supply_count;
841
           this.recordInfo.tableList[i].supply_count;
808
       }
842
       }
809
       this.total_price = total_price;
843
       this.total_price = total_price;
810
-      this.addressChange()
844
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
811
       return total_price.toFixed(2);
845
       return total_price.toFixed(2);
812
     },
846
     },
813
 
847
 
816
         confirmButtonText: "确 定",
850
         confirmButtonText: "确 定",
817
         cancelButtonText: "取 消",
851
         cancelButtonText: "取 消",
818
         type: "warning",
852
         type: "warning",
819
-      }).then(() => {
853
+      })
854
+        .then(() => {
820
           checkPurchaseOrder(this.id).then((response) => {
855
           checkPurchaseOrder(this.id).then((response) => {
821
             if (response.data.state == 1) {
856
             if (response.data.state == 1) {
822
               var info = response.data.data.info;
857
               var info = response.data.data.info;
872
             this.showTwo = false;
907
             this.showTwo = false;
873
             this.showThree = true;
908
             this.showThree = true;
874
           }
909
           }
875
-         
910
+
876
           var drugList = response.data.data.baseList;
911
           var drugList = response.data.data.baseList;
877
           var goodList = response.data.data.goodList;
912
           var goodList = response.data.data.goodList;
878
           for (let i = 0; i < orderInfo.length; i++) {
913
           for (let i = 0; i < orderInfo.length; i++) {
879
-            orderInfo[i].id = orderInfo[i].id
914
+            orderInfo[i].id = orderInfo[i].id;
880
             orderInfo[i].supply_count = orderInfo[i].count;
915
             orderInfo[i].supply_count = orderInfo[i].count;
881
             orderInfo[i].supply_price = orderInfo[i].price;
916
             orderInfo[i].supply_price = orderInfo[i].price;
882
             orderInfo[i].supply_remake = orderInfo[i].remark;
917
             orderInfo[i].supply_remake = orderInfo[i].remark;
910
               }
945
               }
911
             }
946
             }
912
           }
947
           }
913
-         
948
+
914
           this.recordInfo.tableList = [];
949
           this.recordInfo.tableList = [];
915
-          if(orderInfo.length == 0){
916
-              const tempObj = {};
917
-              tempObj["id"] = 0;
918
-              tempObj["name"] = "";
919
-              tempObj["supply_name"] = "";
920
-              tempObj["supply_type"] = "";
921
-              tempObj["supply_specification_name"] = "";
922
-              tempObj["supply_total"] = "";
923
-              tempObj["supply_count"] = "";
924
-              tempObj["supply_price"] = "";
925
-              tempObj["supply_total_price"] = "";
926
-              tempObj["supply_manufacturer"] = "";
927
-              tempObj["supply_license_number"] = "";
928
-              tempObj["supply_remake"] = "";
929
-              tempObj["type"] = 0;
930
-              tempObj["is_total"] = 1;
931
-              tempObj["project_id"] = 0;
932
-              tempObj["supply_unit"] = "";
933
-              tempObj["manufacturer_id"] = "";
934
-              this.recordInfo.tableList.push(tempObj);
935
-          }else{
950
+          if (orderInfo.length == 0) {
951
+            const tempObj = {};
952
+            tempObj["id"] = 0;
953
+            tempObj["name"] = "";
954
+            tempObj["supply_name"] = "";
955
+            tempObj["supply_type"] = "";
956
+            tempObj["supply_specification_name"] = "";
957
+            tempObj["supply_total"] = "";
958
+            tempObj["supply_count"] = "";
959
+            tempObj["supply_price"] = "";
960
+            tempObj["supply_total_price"] = "";
961
+            tempObj["supply_manufacturer"] = "";
962
+            tempObj["supply_license_number"] = "";
963
+            tempObj["supply_remake"] = "";
964
+            tempObj["type"] = 0;
965
+            tempObj["is_total"] = 1;
966
+            tempObj["project_id"] = 0;
967
+            tempObj["supply_unit"] = "";
968
+            tempObj["manufacturer_id"] = "";
969
+            this.recordInfo.tableList.push(tempObj);
970
+          } else {
936
             this.recordInfo.tableList = orderInfo;
971
             this.recordInfo.tableList = orderInfo;
937
           }
972
           }
938
-         
939
         }
973
         }
940
       });
974
       });
941
     },
975
     },
955
           var purcaseOrder = response.data.data.purcaseOrder;
989
           var purcaseOrder = response.data.data.purcaseOrder;
956
 
990
 
957
           var goodOrder = response.data.data.goodOrder;
991
           var goodOrder = response.data.data.goodOrder;
958
-         
992
+
959
           var drugList = response.data.data.drugList;
993
           var drugList = response.data.data.drugList;
960
-      
994
+
961
           var ids = "";
995
           var ids = "";
962
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
996
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
963
           if (goodOrder.length == 0) {
997
           if (goodOrder.length == 0) {
964
-            this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + ids});
998
+            this.$router.push({
999
+              path: "/good/order/add?id=" + id + "&ids=" + ids,
1000
+            });
965
           }
1001
           }
966
-       
967
-          
1002
+
968
           for (let i = 0; i < purcaseOrder.length; i++) {
1003
           for (let i = 0; i < purcaseOrder.length; i++) {
969
             for (let j = 0; j < drugList.length; j++) {
1004
             for (let j = 0; j < drugList.length; j++) {
970
               if (purcaseOrder[i].is_source == 1) {
1005
               if (purcaseOrder[i].is_source == 1) {
971
                 if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
1006
                 if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
972
-                  purcaseOrder[i].count = purcaseOrder[i].count * drugList[j].min_number;
1007
+                  purcaseOrder[i].count =
1008
+                    purcaseOrder[i].count * drugList[j].min_number;
973
                 }
1009
                 }
974
               }
1010
               }
975
             }
1011
             }
979
             for (let j = 0; j < drugList.length; j++) {
1015
             for (let j = 0; j < drugList.length; j++) {
980
               if (goodOrder[i].is_source == 1) {
1016
               if (goodOrder[i].is_source == 1) {
981
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1017
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
982
-                    goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1018
+                  goodOrder[i].count =
1019
+                    goodOrder[i].count * drugList[j].min_number;
983
                 }
1020
                 }
984
               }
1021
               }
985
             }
1022
             }
1006
                 }
1043
                 }
1007
               }
1044
               }
1008
             }
1045
             }
1009
-     
1010
 
1046
 
1011
             for (let i = 0; i < newArr.length; i++) {
1047
             for (let i = 0; i < newArr.length; i++) {
1012
               for (let j = 0; j < newArr[i].child.length; j++) {
1048
               for (let j = 0; j < newArr[i].child.length; j++) {
1014
               }
1050
               }
1015
             }
1051
             }
1016
 
1052
 
1017
-            var arr = []; 
1053
+            var arr = [];
1018
             var total = 0;
1054
             var total = 0;
1019
             var str = "";
1055
             var str = "";
1020
-            console.log("newArr2323223323223",newArr)
1021
-            console.log("newArr2323223323223",purcaseOrder)
1022
-            
1056
+            console.log("newArr2323223323223", newArr);
1057
+            console.log("newArr2323223323223", purcaseOrder);
1023
 
1058
 
1024
-           console.log("长度1",goodOrder.length)
1025
-           console.log("长度2",purcaseOrder.length)
1059
+            console.log("长度1", goodOrder.length);
1060
+            console.log("长度2", purcaseOrder.length);
1026
 
1061
 
1027
-          if(purcaseOrder.length <=goodOrder.length){
1028
-            //如果采购单有数据,则需要比较数量
1029
-            if (newArr.length > 0) {
1030
-              for (let i = 0; i < purcaseOrder.length; i++) {
1031
-                for (let j = 0; j < newArr.length; j++) {
1032
-                  if (purcaseOrder[i].project_id == newArr[j].project_id) {
1033
-                    //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,可以继续生成采购单
1034
-                    if (purcaseOrder[i].count > newArr[j].count) {
1035
-                      arr.push(purcaseOrder[i].project_id);
1062
+            if (purcaseOrder.length <= goodOrder.length) {
1063
+              //如果采购单有数据,则需要比较数量
1064
+              if (newArr.length > 0) {
1065
+                for (let i = 0; i < purcaseOrder.length; i++) {
1066
+                  for (let j = 0; j < newArr.length; j++) {
1067
+                    if (purcaseOrder[i].project_id == newArr[j].project_id) {
1068
+                      //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,可以继续生成采购单
1069
+                      if (purcaseOrder[i].count > newArr[j].count) {
1070
+                        arr.push(purcaseOrder[i].project_id);
1071
+                      }
1036
                     }
1072
                     }
1037
                   }
1073
                   }
1038
                 }
1074
                 }
1039
-              }
1040
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1041
-             
1042
-              if (arr.length == 0) {
1043
-                this.$message.error("该订单已全部生成采购单,请知悉!");
1044
-                return;
1045
-              }
1075
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1046
 
1076
 
1047
-              if (arr.length >0) {
1048
-                str = arr.join(",");
1049
-                this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
1050
-              }
1077
+                if (arr.length == 0) {
1078
+                  this.$message.error("该订单已全部生成采购单,请知悉!");
1079
+                  return;
1080
+                }
1051
 
1081
 
1082
+                if (arr.length > 0) {
1083
+                  str = arr.join(",");
1084
+                  this.$router.push({
1085
+                    path: "/good/order/add?id=" + id + "&ids=" + str,
1086
+                  });
1087
+                }
1088
+              }
1052
             }
1089
             }
1053
-
1054
-          }
1055
-          //如果采购订单的商品个数不等与 采购单里面的商品个数
1056
-          if(purcaseOrder.length>goodOrder.length){
1057
-           var arrList = []
1058
-           var str = "";
1059
-            if (newArr.length > 0) {
1060
-              for (let i = 0; i < purcaseOrder.length; i++) {
1061
-                for (let j = 0; j < newArr.length; j++) {
1062
-                  //如果采购订单的商品个数不等与 采购单里面的商品个数
1063
-                  if(purcaseOrder[i].project_id != newArr[j].project_id){
1064
-                     arrList.push(purcaseOrder[i].project_id)
1090
+            //如果采购订单的商品个数不等与 采购单里面的商品个数
1091
+            if (purcaseOrder.length > goodOrder.length) {
1092
+              var arrList = [];
1093
+              var str = "";
1094
+              if (newArr.length > 0) {
1095
+                for (let i = 0; i < purcaseOrder.length; i++) {
1096
+                  for (let j = 0; j < newArr.length; j++) {
1097
+                    //如果采购订单的商品个数不等与 采购单里面的商品个数
1098
+                    if (purcaseOrder[i].project_id != newArr[j].project_id) {
1099
+                      arrList.push(purcaseOrder[i].project_id);
1100
+                    }
1065
                   }
1101
                   }
1066
                 }
1102
                 }
1067
-              }
1068
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1069
-              console.log("are232323323223322323",arrList)
1070
-              if(arrList.length > 0){
1071
-                str = arrList.join(",");
1072
-                this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
1103
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1104
+                console.log("are232323323223322323", arrList);
1105
+                if (arrList.length > 0) {
1106
+                  str = arrList.join(",");
1107
+                  this.$router.push({
1108
+                    path: "/good/order/add?id=" + id + "&ids=" + str,
1109
+                  });
1110
+                }
1073
               }
1111
               }
1074
             }
1112
             }
1075
-           }
1076
           }
1113
           }
1077
         }
1114
         }
1078
       });
1115
       });
1079
     },
1116
     },
1080
     addressChange() {
1117
     addressChange() {
1118
+      var discount_amount = 0;
1081
       if (this.rate_of_concession > 0) {
1119
       if (this.rate_of_concession > 0) {
1082
-        this.discount_amount = (
1120
+        discount_amount = (
1083
           (this.rate_of_concession / 100) *
1121
           (this.rate_of_concession / 100) *
1084
           this.total_price
1122
           this.total_price
1085
         ).toFixed(2);
1123
         ).toFixed(2);
1086
       }
1124
       }
1125
+      this.discount_amount = discount_amount;
1126
+    },
1127
+    count_discount() {
1128
+      this.rate_of_concession = (
1129
+        this.discount_amount /
1130
+        (this.total_price * 0.01)
1131
+      ).toFixed(2);
1087
     },
1132
     },
1088
     checkReturnOrder() {
1133
     checkReturnOrder() {
1089
       var id = this.$route.query.id;
1134
       var id = this.$route.query.id;
1090
       //获取购货订单号
1135
       //获取购货订单号
1091
       getGoodOrderList(id).then((response) => {
1136
       getGoodOrderList(id).then((response) => {
1092
         if (response.data.state == 1) {
1137
         if (response.data.state == 1) {
1093
-          var list = response.data.data.list
1094
-        
1095
-          this.orderList = list
1138
+          var list = response.data.data.list;
1139
+
1140
+          this.orderList = list;
1096
           //如果长度大于0,有购货单不能反审核
1141
           //如果长度大于0,有购货单不能反审核
1097
           if (list.length > 0) {
1142
           if (list.length > 0) {
1098
-            this.$refs.Popup.dialogVisible = true
1099
-            return 
1143
+            this.$refs.Popup.dialogVisible = true;
1144
+            return;
1100
           }
1145
           }
1101
           if (list.length == 0) {
1146
           if (list.length == 0) {
1102
-            this.getReturnOrder()
1103
-            this.showOne = false
1104
-            this.showTwo = true
1105
-            this.showThree = false
1147
+            this.getReturnOrder();
1148
+            this.showOne = false;
1149
+            this.showTwo = true;
1150
+            this.showThree = false;
1106
           }
1151
           }
1107
         }
1152
         }
1108
       });
1153
       });
1113
         if (response.data.state == 1) {
1158
         if (response.data.state == 1) {
1114
           var msg = response.data.data.msg;
1159
           var msg = response.data.data.msg;
1115
           this.disabled = false;
1160
           this.disabled = false;
1116
-          this.Reviewed = false
1161
+          this.Reviewed = false;
1117
           this.$message.success("反审核成功!");
1162
           this.$message.success("反审核成功!");
1118
           this.getPurchaseOrderDetail();
1163
           this.getPurchaseOrderDetail();
1119
         }
1164
         }
1120
       });
1165
       });
1121
     },
1166
     },
1122
     toClick(id) {
1167
     toClick(id) {
1123
-      this.$router.push({path:"/good/order/edit?id=" + id});
1168
+      this.$router.push({ path: "/good/order/edit?id=" + id });
1124
     },
1169
     },
1125
   },
1170
   },
1126
   created() {
1171
   created() {
1174
   margin-top: 15px;
1219
   margin-top: 15px;
1175
   margin-bottom: 15px;
1220
   margin-bottom: 15px;
1176
 }
1221
 }
1222
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1223
+  overflow: auto;
1224
+}
1225
+/deep/ .gutter {
1226
+  width: 15px !important;
1227
+  display: inline-block !important;
1228
+}
1229
+/deep/ .el-table__fixed-right-patch {
1230
+  width: 15px !important;
1231
+}
1232
+
1233
+/deep/ .el-table__fixed-right {
1234
+  bottom: 0 !important;
1235
+  left: auto;
1236
+  right: 0;
1237
+}
1177
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1238
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1178
-  width: 10px;
1179
-  height: 10px;
1239
+  width: 15px !important;
1240
+  height: 15px !important;
1180
 }
1241
 }
1181
 </style>
1242
 </style>
1182
 
1243
 
1203
 .el-table::before {
1264
 .el-table::before {
1204
   background-color: #d0d3da;
1265
   background-color: #d0d3da;
1205
 }
1266
 }
1206
-.el-table__fixed-right {
1267
+/* .el-table__fixed-right {
1207
   width: 150px;
1268
   width: 150px;
1208
   bottom: 20px;
1269
   bottom: 20px;
1209
   height: 100%;
1270
   height: 100%;
1210
-}
1271
+} */
1211
 .reviewImg {
1272
 .reviewImg {
1212
   position: fixed;
1273
   position: fixed;
1213
   left: 50%;
1274
   left: 50%;
1214
   transform: translateX(-50%);
1275
   transform: translateX(-50%);
1215
   top: 30%;
1276
   top: 30%;
1216
 }
1277
 }
1217
-
1218
-
1219
 </style>
1278
 </style>

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

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

+ 9 - 8
src/xt_pages/supply/goodreturn.vue View File

87
         border
87
         border
88
         style="width: 100%"
88
         style="width: 100%"
89
       >
89
       >
90
-        <el-table-column label="单据日期" align="center" width="200">
90
+        <el-table-column label="单据日期" align="center" width="100">
91
           <template slot-scope="scope">
91
           <template slot-scope="scope">
92
             <span>{{ getTimes(scope.row.document_date) }}</span>
92
             <span>{{ getTimes(scope.row.document_date) }}</span>
93
           </template>
93
           </template>
124
             >
124
             >
125
           </template>
125
           </template>
126
         </el-table-column>
126
         </el-table-column>
127
-        <el-table-column label="采购金额" align="center" width="200">
127
+        <el-table-column label="采购金额" align="center" width="130">
128
           <template slot-scope="scope">
128
           <template slot-scope="scope">
129
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
129
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
130
               getAllBuyPrice(scope.row.cancelOrder)
130
               getAllBuyPrice(scope.row.cancelOrder)
131
             }}</span>
131
             }}</span>
132
           </template>
132
           </template>
133
         </el-table-column>
133
         </el-table-column>
134
-        <el-table-column label="优惠后金额" align="center" width="200">
134
+        <el-table-column label="优惠后金额" align="center" width="130">
135
           <template slot-scope="scope">
135
           <template slot-scope="scope">
136
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
136
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
137
               getAllBuyPriceOne(
137
               getAllBuyPriceOne(
141
             }}</span>
141
             }}</span>
142
           </template>
142
           </template>
143
         </el-table-column>
143
         </el-table-column>
144
-        <el-table-column label="已退款" align="center" width="200">
144
+        <el-table-column label="已退款" align="center" width="130">
145
           <template slot-scope="scope">
145
           <template slot-scope="scope">
146
             <span v-if="scope.row.payment > 0">{{ scope.row.payment }}</span>
146
             <span v-if="scope.row.payment > 0">{{ scope.row.payment }}</span>
147
           </template>
147
           </template>
148
         </el-table-column>
148
         </el-table-column>
149
-        <el-table-column label="数量" align="center" width="200">
149
+        <el-table-column label="数量" align="center" width="120">
150
           <template slot-scope="scope">
150
           <template slot-scope="scope">
151
             {{ getCount(scope.row.cancelOrder) }}
151
             {{ getCount(scope.row.cancelOrder) }}
152
           </template>
152
           </template>
153
         </el-table-column>
153
         </el-table-column>
154
 
154
 
155
-        <el-table-column label="退款状态" align="center" width="200">
155
+        <el-table-column label="退款状态" align="center" width="120">
156
           <template slot-scope="scope">
156
           <template slot-scope="scope">
157
             <!-- <span v-if="scope.row.is_check == 2">未审核</span>
157
             <!-- <span v-if="scope.row.is_check == 2">未审核</span>
158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
159
+          
159
            <span v-if="scope.row.payment == 0">未退款</span>
160
            <span v-if="scope.row.payment == 0">未退款</span>
160
            <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161
            <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161
            <span v-if="scope.row.payment > 0 && scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
162
            <span v-if="scope.row.payment > 0 && scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
162
           </template>
163
           </template>
163
         </el-table-column>
164
         </el-table-column>
164
 
165
 
165
-        <el-table-column label="制单人" align="center" width="200">
166
+        <el-table-column label="制单人" align="center" width="120">
166
           <template slot-scope="scope">
167
           <template slot-scope="scope">
167
             {{ getDocName(scope.row.creater) }}
168
             {{ getDocName(scope.row.creater) }}
168
           </template>
169
           </template>
169
         </el-table-column>
170
         </el-table-column>
170
 
171
 
171
-        <el-table-column label="审核人" align="center" width="200">
172
+        <el-table-column label="审核人" align="center" width="120">
172
           <template slot-scope="scope">
173
           <template slot-scope="scope">
173
             {{ getDocName(scope.row.checker) }}
174
             {{ getDocName(scope.row.checker) }}
174
           </template>
175
           </template>

+ 1 - 1
src/xt_pages/supply/supplyQuery.vue View File

15
         <div>
15
         <div>
16
           <el-select
16
           <el-select
17
             v-model="type_name"
17
             v-model="type_name"
18
-            style="width: 170px; margin-right: 10px"
18
+            style="width: 220px; margin-right: 10px"
19
             clearable
19
             clearable
20
             placeholder="请选择供应商类别"
20
             placeholder="请选择供应商类别"
21
             @change="changeTypeName"
21
             @change="changeTypeName"