Bladeren bron

打印单以及禅道单

huangyw 3 jaren geleden
bovenliggende
commit
2c99f2deff

+ 263 - 22
src/xt_pages/dialysis/template/DialysisPrintOrderFortySix.vue Bestand weergeven

@@ -59,12 +59,12 @@
59 59
           <div class="inline_block">
60 60
             病区:
61 61
             <div class="under_line" style="width: 50px; text-align: center">
62
-              <span v-if="org_id == 10121">{{
62
+              <span>{{
63 63
                 patientInfo.DialysisSchedule.device_zone.name
64 64
                   ? patientInfo.DialysisSchedule.device_zone.name
65
-                  : ""
65
+                  : "/"
66 66
               }}</span>
67
-              <span v-else>{{ "/" }}</span>
67
+              
68 68
             </div>
69 69
           </div>
70 70
           <div class="inline_block">
@@ -91,7 +91,6 @@
91 91
             </div>
92 92
           </div>
93 93
         </div>
94
-  
95 94
 
96 95
         <div
97 96
           class="row"
@@ -695,11 +694,8 @@
695 694
                     class="row"
696 695
                     style="padding: 2px 0; line-height: 23px; display: flex"
697 696
                   >
698
-                    <div
699
-                      class="inline_block"
700
-                      style="flex: 1"
701
-                    >
702
-                      <span>透析(滤)器/灌流器:</span>
697
+                    <div class="inline_block" style="flex: 1">
698
+                      <span>透析器/灌流器:</span>
703 699
                       <div
704 700
                         class="under_line"
705 701
                         style="width: 100px; text-align: center"
@@ -707,16 +703,6 @@
707 703
                         {{
708 704
                           prescription.dialyzer_perfusion_apparatus
709 705
                             ? prescription.dialyzer_perfusion_apparatus
710
-                            : ""
711
-                        }}
712
-                        {{
713
-                          prescription.dialysis_dialyszers
714
-                            ? prescription.dialysis_dialyszers
715
-                            : ""
716
-                        }}
717
-                        {{
718
-                          prescription.dialysis_irrigation
719
-                            ? prescription.dialysis_irrigation
720 706
                             : "/"
721 707
                         }}
722 708
                       </div>
@@ -1586,7 +1572,6 @@
1586 1572
               </div>
1587 1573
             </div>
1588 1574
           </div>
1589
-
1590 1575
         </template>
1591 1576
         <div class="row" style="margin-top: -11px; position: relative">
1592 1577
           <table class="proj_table">
@@ -1704,7 +1689,263 @@
1704 1689
                   </td>
1705 1690
                 </tr>
1706 1691
               </template>
1707
-
1692
+              <tr>
1693
+                <td colspan="7">
1694
+                  <div
1695
+                    class="row"
1696
+                    style="padding: 2px 0; line-height: 23px; display: flex"
1697
+                  >
1698
+                    <div class="inline_block" style="flex: 1">
1699
+                      穿刺护士:
1700
+                      <div
1701
+                        class="under_line"
1702
+                        style="width: 80px; text-align: center"
1703
+                      >
1704
+                        <span
1705
+                          style="height: 30px; display: inline-block"
1706
+                          v-if="
1707
+                            setAdminUserES(
1708
+                              dialysisOrder == null
1709
+                                ? 0
1710
+                                : dialysisOrder.puncture_nurse
1711
+                            ) == ''
1712
+                          "
1713
+                        >
1714
+                          {{
1715
+                            getAdminUser(
1716
+                              dialysisOrder == null
1717
+                                ? 0
1718
+                                : dialysisOrder.puncture_nurse
1719
+                            )
1720
+                          }}</span
1721
+                        >
1722
+                        <img
1723
+                          style="height: 30px"
1724
+                          :src="
1725
+                            setAdminUserES(
1726
+                              dialysisOrder == null
1727
+                                ? 0
1728
+                                : dialysisOrder.puncture_nurse
1729
+                            )
1730
+                          "
1731
+                          alt=""
1732
+                          srcset=""
1733
+                          v-else
1734
+                        />
1735
+                      </div>
1736
+                    </div>
1737
+                    <div class="inline_block" style="flex: 1">
1738
+                      治疗护士:
1739
+                      <div
1740
+                        class="under_line"
1741
+                        style="width: 80px; text-align: center"
1742
+                      >
1743
+                        <span
1744
+                          style="height: 30px; display: inline-block"
1745
+                          v-if="
1746
+                            setAdminUserES(
1747
+                              dialysisOrder == null
1748
+                                ? 0
1749
+                                : dialysisOrder.start_nurse
1750
+                            ) == ''
1751
+                          "
1752
+                        >
1753
+                          {{
1754
+                            getAdminUser(
1755
+                              dialysisOrder == null
1756
+                                ? 0
1757
+                                : dialysisOrder.start_nurse
1758
+                            )
1759
+                          }}</span
1760
+                        >
1761
+                        <img
1762
+                          style="height: 30px"
1763
+                          :src="
1764
+                            setAdminUserES(
1765
+                              dialysisOrder == null
1766
+                                ? 0
1767
+                                : dialysisOrder.start_nurse
1768
+                            )
1769
+                          "
1770
+                          alt=""
1771
+                          srcset=""
1772
+                          v-else
1773
+                        />
1774
+                      </div>
1775
+                    </div>
1776
+                    <div class="inline_block" style="flex: 1">
1777
+                      核对人员:
1778
+                      <div
1779
+                        class="under_line"
1780
+                        style="width: 80px; text-align: center"
1781
+                        v-if="dialysisOrder == null"
1782
+                      >
1783
+                        <span
1784
+                          style="height: 30px; display: inline-block"
1785
+                          v-if="
1786
+                            setAdminUserES(check == null ? 0 : check.creater) ==
1787
+                            ''
1788
+                          "
1789
+                        >
1790
+                          {{ getAdminUser(check == null ? 0 : check.creater) }}
1791
+                        </span>
1792
+                        <img
1793
+                          style="height: 30px"
1794
+                          :src="
1795
+                            setAdminUserES(check == null ? 0 : check.creater)
1796
+                          "
1797
+                          alt=""
1798
+                          srcset=""
1799
+                          v-else
1800
+                        />
1801
+                      </div>
1802
+                      <div
1803
+                        class="under_line"
1804
+                        style="width: 80px; text-align: center"
1805
+                        v-if="
1806
+                          dialysisOrder != null &&
1807
+                          dialysisOrder.start_nurse == check.modifier
1808
+                        "
1809
+                      >
1810
+                        <span
1811
+                          style="height: 30px; display: inline-block"
1812
+                          v-if="
1813
+                            setAdminUserES(check == null ? 0 : check.creater) ==
1814
+                            ''
1815
+                          "
1816
+                        >
1817
+                          {{ getAdminUser(check == null ? 0 : check.creater) }}
1818
+                        </span>
1819
+                        <img
1820
+                          style="height: 30px"
1821
+                          :src="
1822
+                            setAdminUserES(check == null ? 0 : check.creater)
1823
+                          "
1824
+                          alt=""
1825
+                          srcset=""
1826
+                          v-else
1827
+                        />
1828
+                      </div>
1829
+                      <div
1830
+                        class="under_line"
1831
+                        style="width: 80px; text-align: center"
1832
+                        v-if="
1833
+                          dialysisOrder != null &&
1834
+                          dialysisOrder.start_nurse == check.creater
1835
+                        "
1836
+                      >
1837
+                        <span
1838
+                          style="height: 30px; display: inline-block"
1839
+                          v-if="
1840
+                            setAdminUserES(
1841
+                              check == null ? 0 : check.modifier
1842
+                            ) == ''
1843
+                          "
1844
+                        >
1845
+                          {{ getAdminUser(check == null ? 0 : check.modifier) }}
1846
+                        </span>
1847
+                        <img
1848
+                          style="height: 30px"
1849
+                          :src="
1850
+                            setAdminUserES(check == null ? 0 : check.modifier)
1851
+                          "
1852
+                          alt=""
1853
+                          srcset=""
1854
+                          v-else
1855
+                        />
1856
+                      </div>
1857
+                      <div
1858
+                        class="under_line"
1859
+                        style="width: 80px; text-align: center"
1860
+                        v-if="
1861
+                          dialysisOrder != null &&
1862
+                          dialysisOrder.start_nurse != check.creater &&
1863
+                          dialysisOrder.start_nurse != check.modifier
1864
+                        "
1865
+                      >
1866
+                        <span
1867
+                          style="height: 30px; display: inline-block"
1868
+                          v-if="
1869
+                            setAdminUserES(check == null ? 0 : check.creater) ==
1870
+                            ''
1871
+                          "
1872
+                        >
1873
+                          {{ getAdminUser(check == null ? 0 : check.creater) }}
1874
+                        </span>
1875
+                        <img
1876
+                          style="height: 30px"
1877
+                          :src="
1878
+                            setAdminUserES(check == null ? 0 : check.creater)
1879
+                          "
1880
+                          alt=""
1881
+                          srcset=""
1882
+                          v-else
1883
+                        />
1884
+                      </div>
1885
+                    </div>
1886
+                    <div class="inline_block" style="flex: 1">
1887
+                      下机护士:
1888
+                      <div
1889
+                        class="under_line"
1890
+                        style="width: 80px; text-align: center"
1891
+                      >
1892
+                        <span
1893
+                          style="height: 30px; display: inline-block"
1894
+                          v-if="
1895
+                            setAdminUserES(
1896
+                              dialysisOrder == null
1897
+                                ? 0
1898
+                                : dialysisOrder.finish_nurse
1899
+                            ) == ''
1900
+                          "
1901
+                        >
1902
+                          {{
1903
+                            getAdminUser(
1904
+                              dialysisOrder == null
1905
+                                ? 0
1906
+                                : dialysisOrder.finish_nurse
1907
+                            )
1908
+                          }}
1909
+                        </span>
1910
+                        <img
1911
+                          style="height: 30px"
1912
+                          :src="
1913
+                            setAdminUserES(
1914
+                              dialysisOrder == null
1915
+                                ? 0
1916
+                                : dialysisOrder.finish_nurse
1917
+                            )
1918
+                          "
1919
+                          alt=""
1920
+                          srcset=""
1921
+                          v-else
1922
+                        />
1923
+                      </div>
1924
+                    </div>
1925
+                    <div class="inline_block" style="flex: 1">
1926
+                      治疗医生:
1927
+                      <div
1928
+                        class="under_line"
1929
+                        style="width: 80px; text-align: center"
1930
+                      >
1931
+                        <span
1932
+                          style="height: 30px; display: inline-block"
1933
+                          v-if="setAdminUserES(prescription.creater) == ''"
1934
+                        >
1935
+                          {{ getAdminUser(prescription.creater) }}
1936
+                        </span>
1937
+                        <img
1938
+                          style="height: 30px"
1939
+                          :src="setAdminUserES(prescription.creater)"
1940
+                          alt=""
1941
+                          srcset=""
1942
+                          v-else
1943
+                        />
1944
+                      </div>
1945
+                    </div>
1946
+                  </div>
1947
+                </td>
1948
+              </tr>
1708 1949
             </tbody>
1709 1950
           </table>
1710 1951
           <!-- <div  class="print-yema">1</div> -->
@@ -1726,7 +1967,7 @@ import BreadCrumb from "@/xt_pages/components/bread-crumb";
1726 1967
 import print from "print-js";
1727 1968
 
1728 1969
 export default {
1729
-  name: 'DialysisPrintOrderFortySix',
1970
+  name: "DialysisPrintOrderFortySix",
1730 1971
   props: ["childResponse"],
1731 1972
   components: {
1732 1973
     // DialysisPrintOrderOne,

+ 16 - 3
src/xt_pages/supply/components/addGoodOrder.vue Bestand weergeven

@@ -12,7 +12,7 @@
12 12
           align-items: center;
13 13
         "
14 14
       >
15
-        <div>
15
+        <div style="display:flex;align-items: center;">
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
@@ -56,7 +56,7 @@
56 56
         ></el-date-picker> -->
57 57
           <span>单据编码:{{ good_number }}</span>
58 58
         </div>
59
-        <div>
59
+        <div style="display:flex">
60 60
           <el-button
61 61
             size="small"
62 62
             type="primary"
@@ -267,6 +267,7 @@
267 267
           <el-table-column label="采购金额" align="center" width="120px">
268 268
             <template slot-scope="scope">
269 269
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
270
+              <div style="visibility: hidden">/</div>
270 271
             </template>
271 272
           </el-table-column>
272 273
           <el-table-column label="生产日期" align="center" width="200px">
@@ -809,6 +810,7 @@ export default {
809 810
           this.recordInfo.tableList[i].supply_count;
810 811
       }
811 812
       this.total_price = total_price;
813
+      this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
812 814
       return total_price.toFixed(2);
813 815
     },
814 816
     addressChange() {
@@ -820,6 +822,7 @@ export default {
820 822
         ).toFixed(2);
821 823
       }
822 824
       this.discount_amount = discount_amount;
825
+     
823 826
     },
824 827
     count_discount() {
825 828
       this.rate_of_concession = (
@@ -828,7 +831,12 @@ export default {
828 831
       ).toFixed(2);
829 832
     },
830 833
     count_payment() {
831
-      this.arrearage = this.total_price - this.payment;
834
+      let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
835
+       if(arrearage_1 > 0){
836
+          this.arrearage = arrearage_1
837
+       }else{
838
+         this.arrearage = 0
839
+       }
832 840
     },
833 841
 
834 842
     count_arrearage() {
@@ -1382,6 +1390,10 @@ export default {
1382 1390
 </script>
1383 1391
 
1384 1392
 <style rel="stylesheet/css" lang="scss" scoped>
1393
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
1394
+  width: 10px;
1395
+  height: 10px;
1396
+}
1385 1397
 .information {
1386 1398
   border: 1px #dcdfe6 solid;
1387 1399
   padding: 30px 20px 30px 20px;
@@ -1436,4 +1448,5 @@ export default {
1436 1448
   bottom: 20px;
1437 1449
   height: 100%;
1438 1450
 }
1451
+
1439 1452
 </style>

+ 16 - 2
src/xt_pages/supply/components/addGoodReturn.vue Bestand weergeven

@@ -214,17 +214,20 @@
214 214
           <el-table-column label="采购金额" align="center" width="120px">
215 215
             <template slot-scope="scope">
216 216
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
217
+              <div style="visibility: hidden">/</div>
217 218
             </template>
218 219
           </el-table-column>
219 220
           <el-table-column label="折扣率" align="center" width="120px">
220 221
             <template slot-scope="scope">
221 222
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
223
+              <div style="visibility: hidden">/</div>
222 224
             </template>
223 225
           </el-table-column>
224 226
 
225 227
           <el-table-column label="折扣金额" align="center" width="120px">
226 228
             <template slot-scope="scope">
227 229
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
230
+              <div style="visibility: hidden">/</div>
228 231
             </template>
229 232
           </el-table-column>
230 233
 
@@ -683,6 +686,7 @@ export default {
683 686
         total_price += this.recordInfo.tableList[i].supply_price *this.recordInfo.tableList[i].supply_count;
684 687
       }
685 688
       this.total_price = total_price;
689
+      this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
686 690
       return total_price.toFixed(2);
687 691
     },
688 692
 
@@ -702,8 +706,13 @@ export default {
702 706
         (this.total_price * 0.01)
703 707
       ).toFixed(2);
704 708
     },
705
-    count_payment() {
706
-      this.arrearage = this.total_price - this.payment;
709
+      count_payment() {
710
+      let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
711
+       if(arrearage_1 > 0){
712
+          this.arrearage = arrearage_1
713
+       }else{
714
+         this.arrearage = 0
715
+       }
707 716
     },
708 717
 
709 718
     count_arrearage() {
@@ -1001,6 +1010,11 @@ export default {
1001 1010
   margin-top: 15px;
1002 1011
   margin-bottom: 15px;
1003 1012
 }
1013
+
1014
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
1015
+  width: 10px;
1016
+  height: 10px;
1017
+}
1004 1018
 </style>
1005 1019
 
1006 1020
 <style>

+ 178 - 138
src/xt_pages/supply/components/addPurchaseOrder.vue Bestand weergeven

@@ -109,7 +109,7 @@
109 109
           :data="recordInfo.tableList"
110 110
           :class="signAndWeighBoxPatients"
111 111
           border
112
-          style="width:100%"
112
+          style="width: 100%"
113 113
           max-height="450"
114 114
         >
115 115
           <el-table-column align="center" width="200">
@@ -150,7 +150,7 @@
150 150
                 v-model="scope.row.supply_type"
151 151
                 style="width: 120px"
152 152
                 :disabled="true"
153
-                 placeholder="商品类别"
153
+                placeholder="商品类别"
154 154
               ></el-input>
155 155
               <div style="visibility: hidden">/</div>
156 156
             </template>
@@ -211,7 +211,7 @@
211 211
               <el-form-item
212 212
                 :prop="'tableList.' + scope.$index + '.supply_count'"
213 213
                 :rules="tableRules.supply_count"
214
-                 placeholder="请输入数量"
214
+                placeholder="请输入数量"
215 215
               >
216 216
                 <el-input
217 217
                   v-model="scope.row.supply_count"
@@ -229,7 +229,7 @@
229 229
                 v-model="scope.row.supply_price"
230 230
                 style="width: 80px"
231 231
                 :disabled="disabled"
232
-                 placeholder="请输入采购单价"
232
+                placeholder="请输入采购单价"
233 233
               ></el-input>
234 234
               <div style="visibility: hidden">/</div>
235 235
             </template>
@@ -238,6 +238,7 @@
238 238
           <el-table-column label="采购金额" align="center" width="120px">
239 239
             <template slot-scope="scope">
240 240
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
241
+              <div style="visibility: hidden">/</div>
241 242
             </template>
242 243
           </el-table-column>
243 244
 
@@ -322,18 +323,22 @@
322 323
             </template>
323 324
           </el-table-column>
324 325
         </el-table>
325
-         <div style="margin-top: 10px">
326
-        <el-input
327
-          type="textarea"
328
-          :rows="2"
329
-          placeholder="备注信息"
330
-          v-model="return_remark"
331
-        >
332
-        </el-input>
333
-       </div>
326
+        <div style="margin-top: 10px">
327
+          <el-input
328
+            type="textarea"
329
+            :rows="2"
330
+            placeholder="备注信息"
331
+            v-model="return_remark"
332
+          >
333
+          </el-input>
334
+        </div>
334 335
         <!-- 审核水印 -->
335
-        <img src="@/assets/purchase/Reviewed.png" alt="正在加载..." class="reviewImg" v-show="Reviewed == true" />
336
-
336
+        <img
337
+          src="@/assets/purchase/Reviewed.png"
338
+          alt="正在加载..."
339
+          class="reviewImg"
340
+          v-show="Reviewed == true"
341
+        />
337 342
       </el-form>
338 343
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
339 344
       <div style="margin-top: 10px">
@@ -356,9 +361,7 @@
356 361
           ></el-input
357 362
         ></span>
358 363
       </div>
359
-      
360 364
     </div>
361
-    
362 365
   </div>
363 366
 </template>
364 367
 
@@ -382,7 +385,7 @@ export default {
382 385
   },
383 386
   data() {
384 387
     return {
385
-      Reviewed:false,
388
+      Reviewed: false,
386 389
       crumbs: [
387 390
         { path: false, name: "采购订单" },
388 391
         { path: "/spply/query", name: "新增采购订单" },
@@ -442,104 +445,143 @@ export default {
442 445
       ],
443 446
       goodList: [{ id: 1, name: "" }],
444 447
       total_price: 0,
445
-      return_remark:"",
446
-      is_check:2,
448
+      return_remark: "",
449
+      is_check: 2,
447 450
     };
448 451
   },
449 452
   methods: {
450
-   getInitOrder(){
451
-    getInitOrder().then(response=>{
452
-    if(response.data.state == 1){
453
-        var drugList = response.data.data.drugList
454
-        this.manufactuerList = response.data.data.manufactuerList
455
-        this.goodTypeList = response.data.data.goodTypeList
456
-        this.drugTypeList = response.data.data.drugTypeList
457
-        this.supplyList = response.data.data.supplyList
458
-       for(let i=0;i<drugList.length;i++){
459
-          for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
460
-            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
461
-              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
453
+    getInitOrder() {
454
+      getInitOrder().then((response) => {
455
+        if (response.data.state == 1) {
456
+          var drugList = response.data.data.drugList;
457
+          this.manufactuerList = response.data.data.manufactuerList;
458
+          this.goodTypeList = response.data.data.goodTypeList;
459
+          this.drugTypeList = response.data.data.drugTypeList;
460
+          this.supplyList = response.data.data.supplyList;
461
+          for (let i = 0; i < drugList.length; i++) {
462
+            for (let z = 0; z < drugList[i].drug_warehouse_info.length; z++) {
463
+              if (
464
+                drugList[i].max_unit ==
465
+                drugList[i].drug_warehouse_info[z].max_unit
466
+              ) {
467
+                drugList[i].drug_warehouse_info[z].stock_max_number =
468
+                  drugList[i].drug_warehouse_info[z].stock_max_number *
469
+                  drugList[i].min_number;
470
+              }
462 471
             }
463
-          }
464
-        for(let j=0;j<this.manufactuerList.length;j++){
465
-            if(drugList[i].manufacturer == this.manufactuerList[j].id){
466
-                drugList[i].manufacturer = this.manufactuerList[j].manufacturer_name
472
+            for (let j = 0; j < this.manufactuerList.length; j++) {
473
+              if (drugList[i].manufacturer == this.manufactuerList[j].id) {
474
+                drugList[i].manufacturer =
475
+                  this.manufactuerList[j].manufacturer_name;
476
+              }
467 477
             }
468
-        }
469
-        for(let y=0;y<this.drugTypeList.length;y++){
470
-            if(drugList[i].drug_type == this.drugTypeList[y].value){
471
-            drugList[i].drug_type = this.drugTypeList[y].name
478
+            for (let y = 0; y < this.drugTypeList.length; y++) {
479
+              if (drugList[i].drug_type == this.drugTypeList[y].value) {
480
+                drugList[i].drug_type = this.drugTypeList[y].name;
481
+              }
472 482
             }
473
-        }
474
-        drugList[i].supply_name =  drugList[i].drug_name + " " + drugList[i].dose +drugList[i].dose_unit+"*"+drugList[i].min_number+ drugList[i].min_unit+"/"+drugList[i].max_unit + " " + drugList[i].manufacturer
475
-        drugList[i].supply_type = drugList[i].drug_type
476
-        drugList[i].supply_specification_name = drugList[i].dose +drugList[i].dose_unit+"*"+drugList[i].min_number+ drugList[i].min_unit+"/"+drugList[i].max_unit
477
-        drugList[i].supply_total = this.getWarehoseInfo(drugList[i].drug_warehouse_info,drugList[i].max_unit,drugList[i].min_unit,drugList[i].min_number)
478
-        drugList[i].supply_count = ""
479
-        drugList[i].supply_total_price = ""
480
-        drugList[i].supply_manufacturer=  drugList[i].manufacturer
481
-        drugList[i].supply_license_number= drugList[i].number
482
-        drugList[i].supply_remake = ""
483
-        drugList[i].type = 1
484
-        drugList[i].supply_price = drugList[i].last_price
485
-        drugList[i].name = drugList[i].drug_name
486
-        if(drugList[i].max_unit!=drugList[i].min_unit){
487
-          drugList[i].unitList = [{id:1,name:""},{id:2,name:""}]
488
-        }
489
-        if(drugList[i].max_unit == drugList[i].min_unit){
490
-          drugList[i].unitList = [{id:1,name:""}]
491
-        }
492
-      
493
-        drugList[i].supply_unit = drugList[i].max_unit 
494
-        for(let j=0;j<drugList[i].unitList.length;j++){
495
-          if(drugList[i].max_unit!=drugList[i].min_unit){
496
-            drugList[i].unitList[0].name = drugList[i].max_unit
497
-            drugList[i].unitList[1].name = drugList[i].min_unit
498
-          }
499
-          if(drugList[i].max_unit ==drugList[i].min_unit){
500
-            drugList[i].unitList[0].name = drugList[i].max_unit
483
+            drugList[i].supply_name =
484
+              drugList[i].drug_name +
485
+              " " +
486
+              drugList[i].dose +
487
+              drugList[i].dose_unit +
488
+              "*" +
489
+              drugList[i].min_number +
490
+              drugList[i].min_unit +
491
+              "/" +
492
+              drugList[i].max_unit +
493
+              " " +
494
+              drugList[i].manufacturer;
495
+            drugList[i].supply_type = drugList[i].drug_type;
496
+            drugList[i].supply_specification_name =
497
+              drugList[i].dose +
498
+              drugList[i].dose_unit +
499
+              "*" +
500
+              drugList[i].min_number +
501
+              drugList[i].min_unit +
502
+              "/" +
503
+              drugList[i].max_unit;
504
+            drugList[i].supply_total = this.getWarehoseInfo(
505
+              drugList[i].drug_warehouse_info,
506
+              drugList[i].max_unit,
507
+              drugList[i].min_unit,
508
+              drugList[i].min_number
509
+            );
510
+            drugList[i].supply_count = "";
511
+            drugList[i].supply_total_price = "";
512
+            drugList[i].supply_manufacturer = drugList[i].manufacturer;
513
+            drugList[i].supply_license_number = drugList[i].number;
514
+            drugList[i].supply_remake = "";
515
+            drugList[i].type = 1;
516
+            drugList[i].supply_price = drugList[i].last_price;
517
+            drugList[i].name = drugList[i].drug_name;
518
+            if (drugList[i].max_unit != drugList[i].min_unit) {
519
+              drugList[i].unitList = [
520
+                { id: 1, name: "" },
521
+                { id: 2, name: "" },
522
+              ];
523
+            }
524
+            if (drugList[i].max_unit == drugList[i].min_unit) {
525
+              drugList[i].unitList = [{ id: 1, name: "" }];
526
+            }
527
+
528
+            drugList[i].supply_unit = drugList[i].max_unit;
529
+            for (let j = 0; j < drugList[i].unitList.length; j++) {
530
+              if (drugList[i].max_unit != drugList[i].min_unit) {
531
+                drugList[i].unitList[0].name = drugList[i].max_unit;
532
+                drugList[i].unitList[1].name = drugList[i].min_unit;
533
+              }
534
+              if (drugList[i].max_unit == drugList[i].min_unit) {
535
+                drugList[i].unitList[0].name = drugList[i].max_unit;
536
+              }
537
+            }
538
+            this.tabList.push(drugList[i]);
501 539
           }
502
-         
503
-        }
504
-        this.tabList.push(drugList[i])
505
-        }
506
-        this.drugList = drugList
507
-        var goodList =  response.data.data.goodList
508
-        for(let i=0;i<goodList.length;i++){
509
-        for(let j=0;j<this.manufactuerList.length;j++){
510
-            if(goodList[i].manufacturer == this.manufactuerList[j].id){
511
-                goodList[i].manufacturer = this.manufactuerList[j].manufacturer_name
540
+          this.drugList = drugList;
541
+          var goodList = response.data.data.goodList;
542
+          for (let i = 0; i < goodList.length; i++) {
543
+            for (let j = 0; j < this.manufactuerList.length; j++) {
544
+              if (goodList[i].manufacturer == this.manufactuerList[j].id) {
545
+                goodList[i].manufacturer =
546
+                  this.manufactuerList[j].manufacturer_name;
547
+              }
512 548
             }
513
-        }
514
-        for(let y=0;y<this.goodTypeList.length;y++){
515
-            if(goodList[i].good_type_id == this.goodTypeList[y].id){
516
-                goodList[i].good_type_id = this.goodTypeList[y].type_name
549
+            for (let y = 0; y < this.goodTypeList.length; y++) {
550
+              if (goodList[i].good_type_id == this.goodTypeList[y].id) {
551
+                goodList[i].good_type_id = this.goodTypeList[y].type_name;
552
+              }
517 553
             }
554
+            goodList[i].supply_name =
555
+              goodList[i].good_name +
556
+              " " +
557
+              goodList[i].specification_name +
558
+              " " +
559
+              goodList[i].manufacturer;
560
+            goodList[i].supply_type = goodList[i].good_type_id;
561
+            goodList[i].supply_specification_name =
562
+              goodList[i].specification_name;
563
+            goodList[i].supply_price = goodList[i].buy_price;
564
+            goodList[i].supply_total = this.getTotalStockCount(
565
+              goodList[i].good_warehouse_info
566
+            );
567
+            goodList[i].supply_count = "";
568
+            goodList[i].supply_total_price = "";
569
+            goodList[i].supply_manufacturer = goodList[i].manufacturer;
570
+            goodList[i].supply_license_number = goodList[i].number;
571
+            goodList[i].supply_remake = "";
572
+            goodList[i].type = 2;
573
+            goodList[i].name = goodList[i].good_name;
574
+            goodList[i].unitList = [{ id: 1, name: "" }];
575
+            goodList[i].supply_unit = goodList[i].packing_unit;
576
+            for (let j = 0; j < goodList[i].unitList.length; j++) {
577
+              goodList[i].unitList[0].name = goodList[i].packing_unit;
578
+            }
579
+            this.tabList.push(goodList[i]);
580
+          }
581
+          this.goodList = goodList;
518 582
         }
519
-        goodList[i].supply_name = goodList[i].good_name + " " + goodList[i].specification_name + " " +goodList[i].manufacturer
520
-        goodList[i].supply_type = goodList[i].good_type_id
521
-        goodList[i].supply_specification_name =goodList[i].specification_name
522
-        goodList[i].supply_price = goodList[i].buy_price
523
-        goodList[i].supply_total = this.getTotalStockCount(goodList[i].good_warehouse_info)
524
-        goodList[i].supply_count = ""
525
-        goodList[i].supply_total_price = ""
526
-        goodList[i].supply_manufacturer = goodList[i].manufacturer
527
-        goodList[i].supply_license_number = goodList[i].number
528
-        goodList[i].supply_remake = ""
529
-        goodList[i].type = 2
530
-        goodList[i].name = goodList[i].good_name
531
-        goodList[i].unitList =  [{id:1,name:""}]
532
-        goodList[i].supply_unit = goodList[i].packing_unit
533
-        for(let j=0;j<goodList[i].unitList.length;j++){
534
-           goodList[i].unitList[0].name = goodList[i].packing_unit 
535
-        }
536
-        this.tabList.push(goodList[i])
537
-        }
538
-        this.goodList = goodList
539
-        
540
-    } 
541
-    })
542
-},
583
+      });
584
+    },
543 585
     changeGoodName(val) {
544 586
       this.currentIndex = val;
545 587
     },
@@ -645,10 +687,9 @@ export default {
645 687
           var end = this.getTimes(this.end_time);
646 688
           const params = {
647 689
             stockIn: this.recordInfo.tableList,
648
-            return_remake:this.return_remark,
690
+            return_remake: this.return_remark,
649 691
           };
650 692
 
651
-         
652 693
           savePurchaseOrder(
653 694
             params,
654 695
             this.supplier_name,
@@ -662,15 +703,14 @@ export default {
662 703
               this.loading = false;
663 704
               this.$message.success("保存成功!");
664 705
               var warehouseInfo = response.data.data.warehouseInfo;
665
-              this.is_check = warehouseInfo.is_check
666
-              if(warehouseInfo.is_check == 1){
667
-                this.Reviewed = true
668
-               
706
+              this.is_check = warehouseInfo.is_check;
707
+              if (warehouseInfo.is_check == 1) {
708
+                this.Reviewed = true;
669 709
               }
670 710
               this.number = warehouseInfo.number;
671 711
               this.id = warehouseInfo.id;
672 712
               this.recordInfo.tableList = [];
673
-              this.return_remark = warehouseInfo.return_remake
713
+              this.return_remark = warehouseInfo.return_remake;
674 714
               var orderInfo = response.data.data.orderInfo;
675 715
               for (let i = 0; i < orderInfo.length; i++) {
676 716
                 if (orderInfo[i].is_source == 1) {
@@ -701,24 +741,24 @@ export default {
701 741
                 orderInfo[i].project_id = orderInfo[i].project_id;
702 742
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
703 743
               }
704
-            
744
+
705 745
               this.recordInfo.tableList = orderInfo;
706
-              for(let i=0;i<orderInfo.length;i++){
707
-                 orderInfo[i].name = ""
708
-                 orderInfo[i].supply_name = ""
709
-                 orderInfo[i].supply_specification_name = ""
710
-                if(orderInfo[i].is_source == 1){
711
-                  for(let j=0;j<this.drugList.length;j++){
712
-                     if(orderInfo[i].project_id == this.drugList[j].id){
713
-                        orderInfo[i].name = this.drugList[j].drug_name
714
-                     }
746
+              for (let i = 0; i < orderInfo.length; i++) {
747
+                orderInfo[i].name = "";
748
+                orderInfo[i].supply_name = "";
749
+                orderInfo[i].supply_specification_name = "";
750
+                if (orderInfo[i].is_source == 1) {
751
+                  for (let j = 0; j < this.drugList.length; j++) {
752
+                    if (orderInfo[i].project_id == this.drugList[j].id) {
753
+                      orderInfo[i].name = this.drugList[j].drug_name;
754
+                    }
715 755
                   }
716 756
                 }
717
-                if(orderInfo[i].is_source == 2){
718
-                  for(let y=0;y<this.goodList.length;y++){
719
-                     if(orderInfo[i].project_id = this.goodList[y].id){
720
-                        orderInfo[i].name = this.goodList[y].good_name
721
-                     }
757
+                if (orderInfo[i].is_source == 2) {
758
+                  for (let y = 0; y < this.goodList.length; y++) {
759
+                    if ((orderInfo[i].project_id = this.goodList[y].id)) {
760
+                      orderInfo[i].name = this.goodList[y].good_name;
761
+                    }
722 762
                   }
723 763
                 }
724 764
               }
@@ -736,7 +776,7 @@ export default {
736 776
       var min_str = "";
737 777
       if (arr.length > 0) {
738 778
         for (let i = 0; i < arr.length; i++) {
739
-          total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number);
779
+          total += parseInt(arr[i].stock_max_number + arr[i].stock_min_number);
740 780
         }
741 781
       }
742 782
       if (total < min_number) {
@@ -815,9 +855,8 @@ export default {
815 855
           var end = this.getTimes(this.end_time);
816 856
           const params = {
817 857
             stockIn: this.recordInfo.tableList,
818
-            return_remake:this.return_remark,
858
+            return_remake: this.return_remark,
819 859
           };
820
-         
821 860
 
822 861
           updatePurchaseOrder(
823 862
             params,
@@ -846,9 +885,10 @@ export default {
846 885
           this.recordInfo.tableList[i].supply_count;
847 886
       }
848 887
       this.total_price = total_price;
888
+      this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
849 889
       return total_price.toFixed(2);
850 890
     },
851
-     count_discount() {
891
+    count_discount() {
852 892
       this.rate_of_concession = (
853 893
         this.discount_amount /
854 894
         (this.total_price * 0.01)
@@ -870,7 +910,7 @@ export default {
870 910
               this.showThree = true
871 911
               this.disabled = true;
872 912
               this.$message.success("审核成功!");
873
-              this.Reviewed = true
913
+              this.Reviewed = true;
874 914
             }
875 915
           });
876 916
         })
@@ -899,8 +939,8 @@ export default {
899 939
         if (response.data.state == 1) {
900 940
           var msg = response.data.data.msg;
901 941
           this.disabled = false;
902
-          this.showOne = true
903
-          this.is_check =2 
942
+          this.showOne = true;
943
+          this.is_check = 2;
904 944
           this.$message.success("反审核成功!");
905 945
         }
906 946
       });
@@ -1056,7 +1096,7 @@ export default {
1056 1096
   margin-top: 15px;
1057 1097
   margin-bottom: 15px;
1058 1098
 }
1059
-.reviewImg{
1099
+.reviewImg {
1060 1100
   position: fixed;
1061 1101
   left: 50%;
1062 1102
   transform: translateX(-50%);
@@ -1064,8 +1104,8 @@ export default {
1064 1104
 }
1065 1105
 
1066 1106
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1067
-width:10px;
1068
-height:10px;
1107
+  width: 10px;
1108
+  height: 10px;
1069 1109
 }
1070 1110
 </style>
1071 1111
 

+ 11 - 0
src/xt_pages/supply/components/addSupply.vue Bestand weergeven

@@ -98,6 +98,17 @@
98 98
             <template slot-scope="scope">
99 99
               <el-form-item
100 100
                 :prop="'contacts.' + scope.$index + '.name'"
101
+                :rules="
102
+                  scope.row.name == ''
103
+                    ? [
104
+                        {
105
+                          required: 'true',
106
+                          message: '请输入主要联系人',
107
+                          trigger: ['blur'],
108
+                        },
109
+                      ]
110
+                    : null
111
+                "
101 112
               >
102 113
                 <el-input
103 114
                   v-model="scope.row.name"

+ 216 - 140
src/xt_pages/supply/components/editGoodOrder.vue Bestand weergeven

@@ -12,8 +12,9 @@
12 12
           align-items: center;
13 13
         "
14 14
       >
15
-        <div style="display: flex;">
16
-          <span style="color: red">*</span><span>供应商:</span>
15
+        <div style="display: flex; align-items: center">
16
+          <div><span style="color: red">*</span><span>供应商:</span></div>
17
+          <!-- <div>供应商:</div> -->
17 18
           <el-select
18 19
             v-model="supplier_name"
19 20
             style="width: 140px; margin-right: 10px"
@@ -42,7 +43,7 @@
42 43
             value-format="yyyy-MM-dd"
43 44
             :disabled="disabled"
44 45
           ></el-date-picker>
45
-    
46
+
46 47
           <span>单据编码:{{ good_number }}</span>
47 48
         </div>
48 49
       
@@ -276,7 +277,6 @@
276 277
               <el-form-item
277 278
                 :prop="'tableList.' + scope.$index + '.supply_product_date'"
278 279
                 :rules="tableRules.supply_product_date"
279
-
280 280
               >
281 281
                 <el-date-picker
282 282
                   prefix-icon="el-icon-date"
@@ -390,7 +390,7 @@
390 390
             :rows="2"
391 391
             placeholder="备注信息"
392 392
             v-model="return_remark"
393
-           :disabled="disabled"
393
+            :disabled="disabled"
394 394
           >
395 395
           </el-input>
396 396
         </div>
@@ -446,12 +446,20 @@
446 446
         ></span>
447 447
       </div>
448 448
     </div>
449
-    <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
449
+    <popup
450
+      ref="Popup"
451
+      :content="content"
452
+      :content_1="content_1"
453
+      :content_2="content_2"
454
+      :number="number"
455
+      :orderList="orderList"
456
+      :type="type"
457
+    ></popup>
450 458
   </div>
451 459
 </template>
452 460
 
453 461
 <script>
454
-import popup from "./Popup"
462
+import popup from "./Popup";
455 463
 import Computed from "../../components/Computed/index_1.vue";
456 464
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
457 465
 import { uParseTime } from "@/utils/tools";
@@ -465,7 +473,7 @@ import {
465 473
   MofyGoodOrder,
466 474
   UpdateSupplyWahouseingInfo,
467 475
   getSupplyWarehouseOutById,
468
-  deleteGoodOrderById
476
+  deleteGoodOrderById,
469 477
 } from "@/api/supply";
470 478
 
471 479
 export default {
@@ -481,11 +489,11 @@ export default {
481 489
         { path: false, name: "采购单" },
482 490
         { path: "/supply/good/order/query", name: "编辑采购单" },
483 491
       ],
484
-      content_2:"退库单",
485
-      content:"采购单",
486
-      content_1:"已有以下关联数据,不能反审核",
487
-      type:2,
488
-      orderList:[],
492
+      content_2: "退库单",
493
+      content: "采购单",
494
+      content_1: "已有以下关联数据,不能反审核",
495
+      type: 2,
496
+      orderList: [],
489 497
       showOne: true,
490 498
       showTwo: false,
491 499
       showThree: false,
@@ -499,7 +507,7 @@ export default {
499 507
       page: 1,
500 508
       limit: 10,
501 509
       goodType: [],
502
-       Reviewed: false,
510
+      Reviewed: false,
503 511
       goodInfo: [],
504 512
       org_id: 0,
505 513
       types: [],
@@ -548,15 +556,14 @@ export default {
548 556
       orderInfo: [],
549 557
       warese_out_id: 0,
550 558
       return_remark: "",
551
-      tableDataList:[],
559
+      tableDataList: [],
552 560
     };
553 561
   },
554 562
 
555
-  watch(){
556
-      // total_price:function(newval,oldval){
557
-      //   console.log(newval,'op')
558
-      // }
559
-
563
+  watch() {
564
+    // total_price:function(newval,oldval){
565
+    //   console.log(newval,'op')
566
+    // }
560 567
   },
561 568
 
562 569
   methods: {
@@ -590,10 +597,33 @@ export default {
590 597
                 drugList[i].drug_type = this.drugTypeList[y].name;
591 598
               }
592 599
             }
593
-            drugList[i].supply_name =drugList[i].drug_name +" " +drugList[i].dose +drugList[i].dose_unit +"*" +drugList[i].min_number +drugList[i].min_unit +"/" +drugList[i].max_unit +" " +drugList[i].manufacturer;
600
+            drugList[i].supply_name =
601
+              drugList[i].drug_name +
602
+              " " +
603
+              drugList[i].dose +
604
+              drugList[i].dose_unit +
605
+              "*" +
606
+              drugList[i].min_number +
607
+              drugList[i].min_unit +
608
+              "/" +
609
+              drugList[i].max_unit +
610
+              " " +
611
+              drugList[i].manufacturer;
594 612
             drugList[i].supply_type = drugList[i].drug_type;
595
-            drugList[i].supply_specification_name =drugList[i].dose + drugList[i].dose_unit +"*" +drugList[i].min_number +drugList[i].min_unit +"/" +drugList[i].max_unit;
596
-            drugList[i].supply_total = this.getWarehoseInfo(drugList[i].drug_warehouse_info,drugList[i].max_unit,drugList[i].min_unit,drugList[i].min_number);
613
+            drugList[i].supply_specification_name =
614
+              drugList[i].dose +
615
+              drugList[i].dose_unit +
616
+              "*" +
617
+              drugList[i].min_number +
618
+              drugList[i].min_unit +
619
+              "/" +
620
+              drugList[i].max_unit;
621
+            drugList[i].supply_total = this.getWarehoseInfo(
622
+              drugList[i].drug_warehouse_info,
623
+              drugList[i].max_unit,
624
+              drugList[i].min_unit,
625
+              drugList[i].min_number
626
+            );
597 627
             drugList[i].supply_count = "";
598 628
             drugList[i].supply_total_price = "";
599 629
             drugList[i].supply_manufacturer = drugList[i].manufacturer;
@@ -641,11 +671,19 @@ export default {
641 671
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
642 672
               }
643 673
             }
644
-            goodList[i].supply_name =goodList[i].good_name +" " +goodList[i].specification_name +" " +goodList[i].manufacturer;
674
+            goodList[i].supply_name =
675
+              goodList[i].good_name +
676
+              " " +
677
+              goodList[i].specification_name +
678
+              " " +
679
+              goodList[i].manufacturer;
645 680
             goodList[i].supply_type = goodList[i].good_type_id;
646
-            goodList[i].supply_specification_name =goodList[i].specification_name;
681
+            goodList[i].supply_specification_name =
682
+              goodList[i].specification_name;
647 683
             goodList[i].supply_price = goodList[i].buy_price;
648
-            goodList[i].supply_total = this.getTotalStockCount(goodList[i].good_warehouse_info);
684
+            goodList[i].supply_total = this.getTotalStockCount(
685
+              goodList[i].good_warehouse_info
686
+            );
649 687
             goodList[i].supply_count = "";
650 688
             goodList[i].supply_total_price = "";
651 689
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
@@ -744,38 +782,39 @@ export default {
744 782
       this.recordInfo.tableList.push(tempObj);
745 783
     },
746 784
     handleDelete: function (index, row) {
747
-      if(this.is_check == 1){
748
-        this.$message.error("已审核单据,不能删除!")
749
-        return false
785
+      if (this.is_check == 1) {
786
+        this.$message.error("已审核单据,不能删除!");
787
+        return false;
750 788
       }
751
-      if(row.id == 0){
789
+      if (row.id == 0) {
752 790
         if (this.recordInfo.tableList.length <= 1) {
753
-        this.$message.error("只有一条记录的时候无法删除");
754
-        return;
791
+          this.$message.error("只有一条记录的时候无法删除");
792
+          return;
793
+        } else {
794
+          this.recordInfo.tableList.splice(index, 1);
795
+        }
755 796
       } else {
756
-        this.recordInfo.tableList.splice(index, 1);
757
-       }
758
-      }else{
759
-         const params = {
760
-            id: row.id
761
-          }
762
-          this.$confirm('确认删除吗?', {
763
-            confirmButtonText: '确定',
764
-            cancelButtonText: '取消',
765
-            type: 'warning'
766
-          }).then(() => {
767
-            deleteGoodOrderById(params).then(response => {
797
+        const params = {
798
+          id: row.id,
799
+        };
800
+        this.$confirm("确认删除吗?", {
801
+          confirmButtonText: "确定",
802
+          cancelButtonText: "取消",
803
+          type: "warning",
804
+        })
805
+          .then(() => {
806
+            deleteGoodOrderById(params).then((response) => {
768 807
               if (response.data.state == 0) {
769
-                this.$message.error(response.data.msg)
770
-                return false
808
+                this.$message.error(response.data.msg);
809
+                return false;
771 810
               } else {
772
-                this.$message.success('删除成功')
811
+                this.$message.success("删除成功");
773 812
 
774
-                this.recordInfo.tableList.splice(index, 1)
813
+                this.recordInfo.tableList.splice(index, 1);
775 814
               }
776
-            })
777
-          }).catch(() => {
778
-        })
815
+            });
816
+          })
817
+          .catch(() => {});
779 818
       }
780 819
     },
781 820
 
@@ -836,10 +875,10 @@ export default {
836 875
           this.recordInfo.tableList[i].supply_count;
837 876
       }
838 877
       this.total_price = total_price;
839
-      this.addressChange()
878
+      this.addressChange();
840 879
       return total_price.toFixed(2);
841 880
     },
842
-       addressChange() {
881
+    addressChange() {
843 882
       var discount_amount = 0;
844 883
       if (this.rate_of_concession > 0) {
845 884
         discount_amount = (
@@ -856,18 +895,28 @@ export default {
856 895
       ).toFixed(2);
857 896
     },
858 897
     count_payment() {
859
-      this.arrearage = this.total_price - this.payment;
898
+      let arrearage_1 = (
899
+        this.total_price -
900
+        this.discount_amount -
901
+        this.payment
902
+      ).toFixed(2);
903
+      if (arrearage_1 > 0) {
904
+        this.arrearage = arrearage_1;
905
+      } else {
906
+        this.arrearage = 0;
907
+      }
860 908
     },
861 909
 
862 910
     count_arrearage() {
863
-      this.payment = this.total_price - this.arrearage;
911
+      this.payment = (this.total_price - this.arrearage).toFixed(2);
864 912
     },
865 913
     checkPurchaseOrder(id, index) {
866 914
       this.$confirm("是否审核?", {
867 915
         confirmButtonText: "确 定",
868 916
         cancelButtonText: "取 消",
869 917
         type: "warning",
870
-      }).then(() => {
918
+      })
919
+        .then(() => {
871 920
           checkPurchaseOrder(this.id).then((response) => {
872 921
             if (response.data.state == 1) {
873 922
               var info = response.data.data.info;
@@ -889,7 +938,7 @@ export default {
889 938
             this.showOne = false;
890 939
             this.showTwo = true;
891 940
             this.showThree = true;
892
-            this.disabled = true
941
+            this.disabled = true;
893 942
             this.Reviewed = true;
894 943
           }
895 944
 
@@ -985,9 +1034,11 @@ export default {
985 1034
             this.recordInfo.tableList = orderInfo;
986 1035
             this.tableDataList = []
987 1036
 
988
-            this.tableDataList = orderInfo
989
-          }
990
-        }
1037
+          this.recordInfo.tableList = [];
1038
+          this.recordInfo.tableList = orderInfo;
1039
+          this.tableDataList = [];
1040
+          this.tableDataList = orderInfo;
1041
+        }}
991 1042
       });
992 1043
     },
993 1044
     toPrint() {
@@ -1004,16 +1055,27 @@ export default {
1004 1055
         this.recordInfo.tableList[i].supply_count = parseInt(
1005 1056
           this.recordInfo.tableList[i].supply_count
1006 1057
         );
1007
-        this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString();
1008
-        this.recordInfo.tableList[i].supply_total_price =  this.recordInfo.tableList[i].supply_total_price.toString();
1009
-        this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString();
1010
-        this.recordInfo.tableList[i].min_price = this.recordInfo.tableList[i].min_price.toString();
1058
+        this.recordInfo.tableList[i].supply_price =
1059
+          this.recordInfo.tableList[i].supply_price.toString();
1060
+        this.recordInfo.tableList[i].supply_total_price =
1061
+          this.recordInfo.tableList[i].supply_total_price.toString();
1062
+        this.recordInfo.tableList[i].supply_total =
1063
+          this.recordInfo.tableList[i].supply_total.toString();
1064
+
1011 1065
         for (let j = 0; j < this.manufactuerList.length; j++) {
1012
-          if ( this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name) {
1013
-            this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id;
1066
+          if (
1067
+            this.recordInfo.tableList[i].supply_manufacturer ==
1068
+            this.manufactuerList[j].manufacturer_name
1069
+          ) {
1070
+            this.recordInfo.tableList[i].manufacturer_id =
1071
+              this.manufactuerList[j].id;
1014 1072
           }
1015
-          if ( this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id) {
1016
-            this.recordInfo.tableList[i].supply_manufacturer =this.manufactuerList[j].manufacturer_name;
1073
+          if (
1074
+            this.recordInfo.tableList[i].supply_manufacturer ==
1075
+            this.manufactuerList[j].id
1076
+          ) {
1077
+            this.recordInfo.tableList[i].supply_manufacturer =
1078
+              this.manufactuerList[j].manufacturer_name;
1017 1079
           }
1018 1080
         }
1019 1081
       }
@@ -1025,7 +1087,7 @@ export default {
1025 1087
           var params = {
1026 1088
             stockIn: this.recordInfo.tableList,
1027 1089
             return_remake: this.return_remark,
1028
-          }
1090
+          };
1029 1091
           //判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
1030 1092
 
1031 1093
           if(this.tableDataList.length != this.recordInfo.tableList.length){
@@ -1056,11 +1118,12 @@ export default {
1056 1118
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1057 1119
         if (response.data.state == 1) {
1058 1120
           this.$message.success("审核成功!");
1059
-          this.is_check = 1
1121
+          this.is_check = 1;
1060 1122
           this.showOne = false;
1061 1123
           this.showTwo = true;
1062 1124
           this.showThree = true;
1063 1125
           var purcaseOrder = response.data.data.purcaseOrder;
1126
+          this.Reviewed = true;
1064 1127
           console.log("采购订单", purcaseOrder);
1065 1128
 
1066 1129
           var goodOrder = response.data.data.goodOrder;
@@ -1083,7 +1146,8 @@ export default {
1083 1146
             for (let j = 0; j < drugList.length; j++) {
1084 1147
               if (goodOrder[i].is_source == 1) {
1085 1148
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1086
-                  goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1149
+                  goodOrder[i].count =
1150
+                    goodOrder[i].count * drugList[j].min_number;
1087 1151
                 }
1088 1152
               }
1089 1153
             }
@@ -1129,20 +1193,20 @@ export default {
1129 1193
                   if (purcaseOrder[i].project_id == newArr[j].project_id) {
1130 1194
                     //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,部分入库
1131 1195
                     if (purcaseOrder[i].count > newArr[j].count) {
1132
-                       arr.push(purcaseOrder[i].project_id);
1196
+                      arr.push(purcaseOrder[i].project_id);
1133 1197
                     }
1134 1198
                   }
1135 1199
                 }
1136 1200
               }
1137 1201
               //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成,全部入库
1138
-              console.log("审核23232323323",arr)
1202
+              console.log("审核23232323323", arr);
1139 1203
               if (arr.length == 0) {
1140
-                 is_warehouse = 1;
1204
+                is_warehouse = 1;
1141 1205
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
1142 1206
               }
1143 1207
 
1144 1208
               //部分入库
1145
-              if (arr.length >0) {
1209
+              if (arr.length > 0) {
1146 1210
                 //修改订购单
1147 1211
                 is_warehouse = 3;
1148 1212
                 this.ModefySupplyWarehousing(is_warehouse, warehousing_id);
@@ -1174,46 +1238,51 @@ export default {
1174 1238
         if (response.data.state == 1) {
1175 1239
           var cancelList = response.data.data.cancelList;
1176 1240
           console.log("退库单", cancelList);
1177
-           var drugList = response.data.data.drugList;
1241
+          var drugList = response.data.data.drugList;
1178 1242
           console.log("药品列表", drugList);
1179 1243
           var cancelOrderList = response.data.data.cancelOrderList;
1180 1244
           console.log("退库单详情", cancelOrderList);
1181
-          var ids =""
1182
-          if(cancelList.length == 0){
1183
-            this.$router.push({ path: "/good/return/add?id=" + this.id+"&ids="+ids });
1245
+          var ids = "";
1246
+          if (cancelList.length == 0) {
1247
+            this.$router.push({
1248
+              path: "/good/return/add?id=" + this.id + "&ids=" + ids,
1249
+            });
1184 1250
           }
1185 1251
           if (cancelList.length > 0) {
1186 1252
             var outList = response.data.data.outList;
1187
-            console.log("购货单2322323",outList)
1188
-            for(let i=0;i<outList.length;i++){
1189
-              if(outList[i].is_source == 1){
1190
-                for(let j=0;j<drugList.length;j++){
1191
-                  if(outList[i].project_id == drugList[j].id){
1192
-                    if(outList[i].supply_unit == drugList[j].max_unit){
1193
-                      outList[i].count = outList[i].count * drugList[j].min_number
1253
+            console.log("购货单2322323", outList);
1254
+            for (let i = 0; i < outList.length; i++) {
1255
+              if (outList[i].is_source == 1) {
1256
+                for (let j = 0; j < drugList.length; j++) {
1257
+                  if (outList[i].project_id == drugList[j].id) {
1258
+                    if (outList[i].supply_unit == drugList[j].max_unit) {
1259
+                      outList[i].count =
1260
+                        outList[i].count * drugList[j].min_number;
1194 1261
                     }
1195
-
1196 1262
                   }
1197 1263
                 }
1198 1264
               }
1199 1265
             }
1200 1266
 
1201
-            for(let i=0;i<cancelOrderList.length;i++){
1202
-             if(cancelOrderList[i].is_source == 1){
1203
-                for(let j=0;j<drugList.length;j++){
1204
-                  if(cancelOrderList[i].project_id == drugList[j].id){
1205
-                    if(cancelOrderList[i].supply_unit == drugList[j].max_unit){
1206
-                      cancelOrderList[i].count = cancelOrderList[i].count * drugList[j].min_number
1267
+            for (let i = 0; i < cancelOrderList.length; i++) {
1268
+              if (cancelOrderList[i].is_source == 1) {
1269
+                for (let j = 0; j < drugList.length; j++) {
1270
+                  if (cancelOrderList[i].project_id == drugList[j].id) {
1271
+                    if (
1272
+                      cancelOrderList[i].supply_unit == drugList[j].max_unit
1273
+                    ) {
1274
+                      cancelOrderList[i].count =
1275
+                        cancelOrderList[i].count * drugList[j].min_number;
1207 1276
                     }
1208 1277
                   }
1209
-                 }
1210
-               }
1278
+                }
1279
+              }
1211 1280
             }
1212 1281
 
1213
-            console.log("数据变了后23323233",outList)
1282
+            console.log("数据变了后23323233", outList);
1214 1283
 
1215 1284
             let objInfo = {};
1216
-            if(cancelOrderList.length >0){
1285
+            if (cancelOrderList.length > 0) {
1217 1286
               cancelOrderList.forEach((item, index) => {
1218 1287
                 let { project_id } = item;
1219 1288
                 if (!objInfo[project_id]) {
@@ -1224,57 +1293,56 @@ export default {
1224 1293
                   };
1225 1294
                 }
1226 1295
               });
1227
-              let newArr = Object.values(objInfo)
1228
-              console.log("最好的输3233232323323223", newArr)
1229
-              console.log("数据变了后23323233",cancelOrderList)
1296
+              let newArr = Object.values(objInfo);
1297
+              console.log("最好的输3233232323323223", newArr);
1298
+              console.log("数据变了后23323233", cancelOrderList);
1230 1299
               for (let i = 0; i < cancelOrderList.length; i++) {
1231 1300
                 for (let j = 0; j < newArr.length; j++) {
1232 1301
                   if (cancelOrderList[i].project_id == newArr[j].project_id) {
1233
-                    newArr[j].child.push(cancelOrderList[i])
1302
+                    newArr[j].child.push(cancelOrderList[i]);
1303
+                  }
1234 1304
                 }
1235 1305
               }
1236 1306
 
1237
-             }
1238
-
1239
-            for (let i = 0; i < newArr.length; i++) {
1240
-              for (let j = 0; j < newArr[i].child.length; j++) {
1241
-                newArr[i].count += newArr[i].child[j].count;
1307
+              for (let i = 0; i < newArr.length; i++) {
1308
+                for (let j = 0; j < newArr[i].child.length; j++) {
1309
+                  newArr[i].count += newArr[i].child[j].count;
1310
+                }
1242 1311
               }
1243
-            }
1244 1312
 
1245
-            var arr = []
1246
-            var total = 0;
1247
-            var str = "";
1248
-                //如果采购单有数据,则需要比较数量
1249
-            if (newArr.length > 0) {
1250
-              for (let i = 0; i < outList.length; i++) {
1251
-                for (let j = 0; j < newArr.length; j++) {
1252
-                  if (outList[i].project_id == newArr[j].project_id) {
1253
-                    //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1254
-                    if (outList[i].count > newArr[j].count) {
1255
-                       arr.push(outList[i].project_id);
1313
+              var arr = [];
1314
+              var total = 0;
1315
+              var str = "";
1316
+              //如果采购单有数据,则需要比较数量
1317
+              if (newArr.length > 0) {
1318
+                for (let i = 0; i < outList.length; i++) {
1319
+                  for (let j = 0; j < newArr.length; j++) {
1320
+                    if (outList[i].project_id == newArr[j].project_id) {
1321
+                      //根据商品ID比较数量大小,把数量不足的商品ID储存,表示退货单的数量未满足采购单的数据,可以继续生成退货单
1322
+                      if (outList[i].count > newArr[j].count) {
1323
+                        arr.push(outList[i].project_id);
1324
+                      }
1256 1325
                     }
1257 1326
                   }
1258 1327
                 }
1259
-              }
1260
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1328
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1261 1329
 
1262
-              if (arr.length == 0) {
1263
-                this.$message.error("该订单已全部生成退库单,请知悉!");
1264
-                return
1265
-              }
1266
-              console.log("arr23323232232323",arr)
1267
-              if (arr.length > 0) {
1268
-                str = arr.join(",");
1269
-                this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1330
+                if (arr.length == 0) {
1331
+                  this.$message.error("该订单已全部生成退库单,请知悉!");
1332
+                  return;
1333
+                }
1334
+                console.log("arr23323232232323", arr);
1335
+                if (arr.length > 0) {
1336
+                  str = arr.join(",");
1337
+                  this.$router.push({
1338
+                    path: "/good/return/edit?id=" + id + "&ids=" + str,
1339
+                  });
1340
+                }
1270 1341
               }
1271
-             }
1272
-
1342
+            }
1273 1343
           }
1274
-         }
1275 1344
         }
1276 1345
       });
1277
-
1278 1346
     },
1279 1347
     //反审核
1280 1348
     MofyGoodOrder() {
@@ -1294,11 +1362,11 @@ export default {
1294 1362
             return
1295 1363
           }
1296 1364
           if (msg == 2) {
1297
-            var cancelList = response.data.data.cancelList
1298
-            console.log("cancelLIST2332322332232323",cancelList)
1299
-            this.orderList = cancelList
1300
-            this.$refs.Popup.dialogVisible = true
1301
-            return
1365
+            var cancelList = response.data.data.cancelList;
1366
+            console.log("cancelLIST2332322332232323", cancelList);
1367
+            this.orderList = cancelList;
1368
+            this.$refs.Popup.dialogVisible = true;
1369
+            return;
1302 1370
           }
1303 1371
 
1304 1372
           var purcaseOrder = response.data.data.purcaseOrder;
@@ -1310,13 +1378,16 @@ export default {
1310 1378
           var ids = "";
1311 1379
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
1312 1380
           if (goodOrder.length == 0) {
1313
-            this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + ids});
1381
+            this.$router.push({
1382
+              path: "/good/order/add?id=" + id + "&ids=" + ids,
1383
+            });
1314 1384
           }
1315 1385
           for (let i = 0; i < purcaseOrder.length; i++) {
1316 1386
             for (let j = 0; j < drugList.length; j++) {
1317 1387
               if (purcaseOrder[i].is_source == 1) {
1318 1388
                 if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
1319
-                  purcaseOrder[i].count = purcaseOrder[i].count * drugList[j].min_number;
1389
+                  purcaseOrder[i].count =
1390
+                    purcaseOrder[i].count * drugList[j].min_number;
1320 1391
                 }
1321 1392
               }
1322 1393
             }
@@ -1326,7 +1397,8 @@ export default {
1326 1397
             for (let j = 0; j < drugList.length; j++) {
1327 1398
               if (goodOrder[i].is_source == 1) {
1328 1399
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1329
-                  goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1400
+                  goodOrder[i].count =
1401
+                    goodOrder[i].count * drugList[j].min_number;
1330 1402
                 }
1331 1403
               }
1332 1404
             }
@@ -1463,6 +1535,10 @@ export default {
1463 1535
   margin-top: 15px;
1464 1536
   margin-bottom: 15px;
1465 1537
 }
1538
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
1539
+  width: 10px;
1540
+  height: 10px;
1541
+}
1466 1542
 </style>
1467 1543
 
1468 1544
 <style>

+ 225 - 150
src/xt_pages/supply/components/editGoodReturn.vue Bestand weergeven

@@ -59,9 +59,23 @@
59 59
           <span>单据编码:{{ number }}</span>
60 60
         </div>
61 61
         <div>
62
-          <el-button size="small" type="primary" @click="updateGoodReturn">保存</el-button>
63
-          <el-button size="small" type="primary" @click="checkReturnOrder" v-if="is_check == 2">审核</el-button>
64
-          <el-button size="small" type="primary" @click="modefyReturnOrder" v-if="is_check == 1">反审核</el-button>
62
+          <el-button size="small" type="primary" @click="updateGoodReturn"
63
+            >保存</el-button
64
+          >
65
+          <el-button
66
+            size="small"
67
+            type="primary"
68
+            @click="checkReturnOrder"
69
+            v-if="is_check == 2"
70
+            >审核</el-button
71
+          >
72
+          <el-button
73
+            size="small"
74
+            type="primary"
75
+            @click="modefyReturnOrder"
76
+            v-if="is_check == 1"
77
+            >反审核</el-button
78
+          >
65 79
         </div>
66 80
       </div>
67 81
 
@@ -118,6 +132,7 @@
118 132
                 :disabled="true"
119 133
                 placeholder="商品类别"
120 134
               ></el-input>
135
+              <div style="visibility: hidden">/</div>
121 136
             </template>
122 137
           </el-table-column>
123 138
           <el-table-column label="规格&单位" align="center" width="200px">
@@ -128,6 +143,7 @@
128 143
                 :disabled="true"
129 144
                 placeholder="规格&单位"
130 145
               ></el-input>
146
+              <div style="visibility: hidden">/</div>
131 147
             </template>
132 148
           </el-table-column>
133 149
 
@@ -164,6 +180,7 @@
164 180
                 style="width: 100px"
165 181
                 :disabled="true"
166 182
               ></el-input>
183
+              <div style="visibility: hidden">/</div>
167 184
             </template>
168 185
           </el-table-column>
169 186
           <el-table-column label="可退数量" align="center" width="200px">
@@ -173,6 +190,7 @@
173 190
                 style="width: 150px"
174 191
                 :disabled="true"
175 192
               ></el-input>
193
+              <div style="visibility: hidden">/</div>
176 194
             </template>
177 195
           </el-table-column>
178 196
           <el-table-column label="数量" align="center" width="120px">
@@ -202,23 +220,27 @@
202 220
                 :disabled="disabled"
203 221
                 placeholder="请输入采购单价"
204 222
               ></el-input>
223
+              <div style="visibility: hidden">/</div>
205 224
             </template>
206 225
           </el-table-column>
207 226
 
208 227
           <el-table-column label="采购金额" align="center" width="120px">
209 228
             <template slot-scope="scope">
210 229
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
230
+              <div style="visibility: hidden">/</div>
211 231
             </template>
212 232
           </el-table-column>
213 233
           <el-table-column label="折扣率" align="center" width="120px">
214 234
             <template slot-scope="scope">
215 235
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
236
+              <div style="visibility: hidden">/</div>
216 237
             </template>
217 238
           </el-table-column>
218 239
 
219 240
           <el-table-column label="折扣金额" align="center" width="120px">
220 241
             <template slot-scope="scope">
221 242
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
243
+              <div style="visibility: hidden">/</div>
222 244
             </template>
223 245
           </el-table-column>
224 246
 
@@ -229,6 +251,7 @@
229 251
                 style="width: 160px"
230 252
                 :disabled="true"
231 253
               ></el-input>
254
+              <div style="visibility: hidden">/</div>
232 255
             </template>
233 256
           </el-table-column>
234 257
 
@@ -239,6 +262,7 @@
239 262
                 style="width: 160px"
240 263
                 :disabled="true"
241 264
               ></el-input>
265
+              <div style="visibility: hidden">/</div>
242 266
             </template>
243 267
           </el-table-column>
244 268
 
@@ -249,6 +273,7 @@
249 273
                 style="width: 160px"
250 274
                 :disabled="true"
251 275
               ></el-input>
276
+              <div style="visibility: hidden">/</div>
252 277
             </template>
253 278
           </el-table-column>
254 279
 
@@ -260,6 +285,7 @@
260 285
                 :disabled="disabled"
261 286
                 placeholder="请输入备注"
262 287
               ></el-input>
288
+              <div style="visibility: hidden">/</div>
263 289
             </template>
264 290
           </el-table-column>
265 291
 
@@ -311,6 +337,13 @@
311 337
         >
312 338
         </el-input>
313 339
       </div>
340
+        <!-- 审核水印 -->
341
+        <img
342
+          src="@/assets/purchase/Reviewed.png"
343
+          alt="正在加载..."
344
+          class="reviewImg"
345
+          v-show="Reviewed == true"
346
+        />
314 347
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
315 348
       <div style="margin-top: 10px">
316 349
         <span
@@ -375,7 +408,7 @@ import {
375 408
   updateGoodReturn,
376 409
   checkReturnOrder,
377 410
   deleteReturnOrderById,
378
-  modefyReturnOrder
411
+  modefyReturnOrder,
379 412
 } from "@/api/supply";
380 413
 export default {
381 414
   name: "addPurchaseOrder",
@@ -387,7 +420,7 @@ export default {
387 420
       tipsInfo: "",
388 421
       crumbs: [
389 422
         { path: false, name: "退货单" },
390
-        { path: "/good/return/add", name: "新增退货单" },
423
+        { path: "/good/return/add", name: "编辑退货单" },
391 424
       ],
392 425
       showTwo: true,
393 426
       showOne: false,
@@ -410,6 +443,7 @@ export default {
410 443
       form: {
411 444
         manufacturer_id: "",
412 445
       },
446
+      Reviewed:false,
413 447
       tabList: [],
414 448
       manufactuerList: [],
415 449
       currentIndex: 0,
@@ -620,17 +654,17 @@ export default {
620 654
       tempObj["is_total"] = 1;
621 655
       tempObj["project_id"] = 0;
622 656
       tempObj["supply_unit"] = "";
623
-      tempObj["supply_batch_number"] = ""
624
-      tempObj["supply_product_date"] = ""
625
-      tempObj["supply_expiry_date"] = ""
626
-      tempObj["warehousing_id"] =0
627
-      tempObj["warehouse_info_id"] =0
628
-      tempObj["count"] = ""
657
+      tempObj["supply_batch_number"] = "";
658
+      tempObj["supply_product_date"] = "";
659
+      tempObj["supply_expiry_date"] = "";
660
+      tempObj["warehousing_id"] = 0;
661
+      tempObj["warehouse_info_id"] = 0;
662
+      tempObj["count"] = "";
629 663
 
630 664
       this.recordInfo.tableList.push(tempObj);
631 665
     },
632 666
     handleDelete: function (index, row) {
633
-      if(row.id == 0){
667
+      if (row.id == 0) {
634 668
         if (this.recordInfo.tableList.length <= 1) {
635 669
           this.$message.error("只有一条记录的时候无法删除");
636 670
           return;
@@ -638,29 +672,29 @@ export default {
638 672
           this.recordInfo.tableList.splice(index, 1);
639 673
         }
640 674
       }
641
-      if(row.id >0){
642
-       if(this.is_check == 1){
643
-         this.$message.error("已审核单据,不能删除!")
644
-         return false
645
-       }
646
-       this.$confirm('确认删除吗?', '删除', {
647
-          confirmButtonText: '确 定',
648
-          cancelButtonText: '取 消',
649
-          type: 'warning'
650
-        }).then(() => {
651
-          deleteReturnOrderById(val.id).then(response => {
652
-            if (response.data.state == 1) {
653
-                var msg = response.data.data.msg
675
+      if (row.id > 0) {
676
+        if (this.is_check == 1) {
677
+          this.$message.error("已审核单据,不能删除!");
678
+          return false;
679
+        }
680
+        this.$confirm("确认删除吗?", "删除", {
681
+          confirmButtonText: "确 定",
682
+          cancelButtonText: "取 消",
683
+          type: "warning",
684
+        })
685
+          .then(() => {
686
+            deleteReturnOrderById(val.id).then((response) => {
687
+              if (response.data.state == 1) {
688
+                var msg = response.data.data.msg;
654 689
                 this.recordInfo.tableList.splice(index, 1);
655
-                this.$message.success("删除成功")
656
-            } else {
657
-                this.$message.error("删除失败")
658
-            }
690
+                this.$message.success("删除成功");
691
+              } else {
692
+                this.$message.error("删除失败");
693
+              }
694
+            });
659 695
           })
660
-        }).catch(() => {
661
-       })
696
+          .catch(() => {});
662 697
       }
663
-
664 698
     },
665 699
     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
666 700
       var total = 0;
@@ -795,9 +829,15 @@ export default {
795 829
         this.discount_amount /
796 830
         (this.total_price * 0.01)
797 831
       ).toFixed(2);
832
+
798 833
     },
799 834
     count_payment() {
800
-      this.arrearage = this.total_price - this.payment;
835
+      let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
836
+      if (arrearage_1 > 0) {
837
+        this.arrearage = arrearage_1;
838
+      } else {
839
+        this.arrearage = 0;
840
+      }
801 841
     },
802 842
 
803 843
     count_arrearage() {
@@ -822,66 +862,69 @@ export default {
822 862
         })
823 863
         .catch(() => {});
824 864
     },
825
-   getGoodReturnDetail(){
826
-
827
-      var id = this.$route.query.id
828
-      getGoodReturnDetail(id).then(response=>{
829
-        if(response.data.state == 1){
830
-          var out = response.data.data.cancelDetail
831
-          console.log("out23322323232323",out)
832
-          this.warehouse_out_id = out.warehouse_out_id
833
-          this.number = out.number
834
-          this.is_check = out.is_check
835
-          this.id = out.id
836
-          this.supplier_name = out.supplier_id
837
-          this.rate_of_concession = out.rate_of_concession
838
-          this.discount_amount = out.discount_amount
839
-          this.payment = out.payment
840
-          this.arrearage = out.arrearage
841
-          this.start_time = this.getTimes(out.document_date)
842
-          var orderInfo = response.data.data.orderCancelDetail
843
-          if(out.is_check == 1){
844
-            this.disabled = true
865
+    getGoodReturnDetail() {
866
+      var id = this.$route.query.id;
867
+      getGoodReturnDetail(id).then((response) => {
868
+        if (response.data.state == 1) {
869
+          var out = response.data.data.cancelDetail;
870
+          console.log("out23322323232323", out);
871
+          this.warehouse_out_id = out.warehouse_out_id;
872
+          this.number = out.number;
873
+          this.is_check = out.is_check;
874
+          this.id = out.id;
875
+          this.supplier_name = out.supplier_id;
876
+          this.rate_of_concession = out.rate_of_concession;
877
+          this.discount_amount = out.discount_amount;
878
+          this.payment = out.payment;
879
+          this.arrearage = out.arrearage;
880
+          this.start_time = this.getTimes(out.document_date);
881
+          var orderInfo = response.data.data.orderCancelDetail;
882
+          if (out.is_check == 1) {
883
+            this.disabled = true;
845 884
           }
846
-          console.log("退库单详情",orderInfo)
847
-          var drugList = response.data.data.drugList
848
-          var goodList = response.data.data.goodList
849
-          for(let i=0;i< orderInfo.length;i++){
850
-              orderInfo[i].id = orderInfo[i].id
851
-              orderInfo[i].supply_count =  orderInfo[i].count
852
-              orderInfo[i].count = orderInfo[i].source_count
853
-              orderInfo[i].supply_price =  orderInfo[i].price
854
-              orderInfo[i].supply_remake =  orderInfo[i].remark
855
-              orderInfo[i].type =  orderInfo[i].is_source
856
-              orderInfo[i].project_id =  orderInfo[i].project_id
857
-              orderInfo[i].supply_unit =  orderInfo[i].supply_unit
858
-              orderInfo[i].order_number =  orderInfo[i].order_number
859
-              orderInfo[i].good_number = orderInfo[i].good_number
860
-              orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
861
-              orderInfo[i].supply_expiry_date =  orderInfo[i].supply_expiry_date
862
-              orderInfo[i].supply_product_date = orderInfo[i].supply_product_date
863
-            if(orderInfo[i].is_source == 1){
864
-              for(let j=0;j<drugList.length;j++){
865
-                  if( orderInfo[i].project_id == drugList[j].id){
866
-                    if(drugList[j].max_unit!=drugList[j].min_unit){
867
-                      orderInfo[i].unitList = [{id:1,name:""},{id:2,name:""}]
868
-                      orderInfo[i].unitList[0].name = drugList[j].max_unit
869
-                      orderInfo[i].unitList[1].name = drugList[j].min_unit
870
-                    }
871
-                    if(drugList[j].max_unit ==drugList[j].min_unit){
872
-                      orderInfo[i].unitList = [{id:1,name:""}]
873
-                      orderInfo[i].unitList[0].name = drugList[j].max_unit
874
-                    }
875
-
885
+          console.log("退库单详情", orderInfo);
886
+          var drugList = response.data.data.drugList;
887
+          var goodList = response.data.data.goodList;
888
+          for (let i = 0; i < orderInfo.length; i++) {
889
+            orderInfo[i].id = orderInfo[i].id;
890
+            orderInfo[i].supply_count = orderInfo[i].count;
891
+            orderInfo[i].count = orderInfo[i].source_count;
892
+            orderInfo[i].supply_price = orderInfo[i].price;
893
+            orderInfo[i].supply_remake = orderInfo[i].remark;
894
+            orderInfo[i].type = orderInfo[i].is_source;
895
+            orderInfo[i].project_id = orderInfo[i].project_id;
896
+            orderInfo[i].supply_unit = orderInfo[i].supply_unit;
897
+            orderInfo[i].order_number = orderInfo[i].order_number;
898
+            orderInfo[i].good_number = orderInfo[i].good_number;
899
+            orderInfo[i].supply_total_price = (
900
+              orderInfo[i].count * orderInfo[i].price
901
+            ).toFixed(2);
902
+            orderInfo[i].supply_expiry_date = orderInfo[i].supply_expiry_date;
903
+            orderInfo[i].supply_product_date = orderInfo[i].supply_product_date;
904
+            if (orderInfo[i].is_source == 1) {
905
+              for (let j = 0; j < drugList.length; j++) {
906
+                if (orderInfo[i].project_id == drugList[j].id) {
907
+                  if (drugList[j].max_unit != drugList[j].min_unit) {
908
+                    orderInfo[i].unitList = [
909
+                      { id: 1, name: "" },
910
+                      { id: 2, name: "" },
911
+                    ];
912
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
913
+                    orderInfo[i].unitList[1].name = drugList[j].min_unit;
876 914
                   }
877
-              }
878
-              }
879
-            if(orderInfo[i].is_source == 2){
880
-              for(let j=0;j<goodList.length;j++){
881
-                  if(orderInfo[i].project_id == goodList[j].id){
882
-                      orderInfo[i].unitList = [{id:1,name:""}]
883
-                      orderInfo[i].unitList[0].name = goodList[j].packing_unit
915
+                  if (drugList[j].max_unit == drugList[j].min_unit) {
916
+                    orderInfo[i].unitList = [{ id: 1, name: "" }];
917
+                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
884 918
                   }
919
+                }
920
+              }
921
+            }
922
+            if (orderInfo[i].is_source == 2) {
923
+              for (let j = 0; j < goodList.length; j++) {
924
+                if (orderInfo[i].project_id == goodList[j].id) {
925
+                  orderInfo[i].unitList = [{ id: 1, name: "" }];
926
+                  orderInfo[i].unitList[0].name = goodList[j].packing_unit;
927
+                }
885 928
               }
886 929
             }
887 930
           }
@@ -895,66 +938,87 @@ export default {
895 938
       var id = this.$route.query.id;
896 939
       this.$router.push({ path: "/purchase/order/print?&id=" + id });
897 940
     },
898
-    updateGoodReturn(){
941
+    updateGoodReturn() {
899 942
       var warehouse_out_id = this.$route.query.id;
900
-      this.$refs["tableForm"].validate((valid)=>{
901
-        if(valid){
902
-          this.loading = true
903
-          for(let i=0;i<this.recordInfo.tableList.length;i++){
904
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
905
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
906
-            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
907
-            for(let j=0;j<this.manufactuerList.length;j++){
908
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
909
-                  this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
910
-                }
911
-                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id){
912
-                  this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name
913
-                }
914
-             }
943
+      this.$refs["tableForm"].validate((valid) => {
944
+        if (valid) {
945
+          this.loading = true;
946
+          for (let i = 0; i < this.recordInfo.tableList.length; i++) {
947
+            this.recordInfo.tableList[i].supply_count = parseInt(
948
+              this.recordInfo.tableList[i].supply_count
949
+            );
950
+            this.recordInfo.tableList[i].supply_price =
951
+              this.recordInfo.tableList[i].supply_price.toString();
952
+            this.recordInfo.tableList[i].supply_total =
953
+              this.recordInfo.tableList[i].supply_total.toString();
954
+            for (let j = 0; j < this.manufactuerList.length; j++) {
955
+              if (
956
+                this.recordInfo.tableList[i].supply_manufacturer ==
957
+                this.manufactuerList[j].manufacturer_name
958
+              ) {
959
+                this.recordInfo.tableList[i].manufacturer_id =
960
+                  this.manufactuerList[j].id;
961
+              }
962
+              if (
963
+                this.recordInfo.tableList[i].supply_manufacturer ==
964
+                this.manufactuerList[j].id
965
+              ) {
966
+                this.recordInfo.tableList[i].supply_manufacturer =
967
+                  this.manufactuerList[j].manufacturer_name;
968
+              }
969
+            }
915 970
           }
916 971
           var params = {
917
-            stockIn:this.recordInfo.tableList,
918
-            return_marke:this.return_remark,
919
-          }
920
-          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=>{
921
-             if(response.data.state == 1){
922
-                var msg = response.data.msg;
923
-                this.loading = false;
924
-                this.$message.success("保存成功!");
925
-             }
926
-          })
927
-
972
+            stockIn: this.recordInfo.tableList,
973
+            return_marke: this.return_remark,
974
+          };
975
+          updateGoodReturn(
976
+            params,
977
+            warehouse_out_id,
978
+            this.start_time,
979
+            this.rate_of_concession,
980
+            this.discount_amount,
981
+            this.arrearage,
982
+            this.payment,
983
+            this.supplier_name,
984
+            this.number
985
+          ).then((response) => {
986
+            if (response.data.state == 1) {
987
+              var msg = response.data.msg;
988
+              this.loading = false;
989
+              this.$message.success("保存成功!");
990
+            }
991
+          });
928 992
         }
929
-      })
993
+      });
930 994
     },
931
-    checkReturnOrder(){
932
-      this.loading = true
933
-     var params = {
934
-       warehouse_out_id:this.warehouse_out_id,
935
-       id:this.id,
936
-     }
937
-     checkReturnOrder(params).then(response=>{
938
-       if(response.data.state == 1){
939
-        this.loading = false
940
-        var msg = response.data.data.msg
941
-        this.$message.success("审核成功!")
942
-       }
943
-     })
995
+    checkReturnOrder() {
996
+      this.loading = true;
997
+      var params = {
998
+        warehouse_out_id: this.warehouse_out_id,
999
+        id: this.id,
1000
+      };
1001
+      checkReturnOrder(params).then((response) => {
1002
+        if (response.data.state == 1) {
1003
+          this.loading = false;
1004
+          var msg = response.data.data.msg;
1005
+          this.$message.success("审核成功!");
1006
+        }
1007
+      });
944 1008
     },
945
-    modefyReturnOrder(){
946
-      this.loading = true
947
-     var params = {
948
-       warehouse_out_id:this.warehouse_out_id,
949
-       id:this.id,
950
-     }
951
-     modefyReturnOrder(params).then(response=>{
952
-       if(response.data.state == 1){
953
-         this.loading = false
954
-         var msg = response.data.data.msg
955
-         this.$message.success("反审核成功!")
956
-       }
957
-     })
1009
+    modefyReturnOrder() {
1010
+      this.loading = true;
1011
+      var params = {
1012
+        warehouse_out_id: this.warehouse_out_id,
1013
+        id: this.id,
1014
+      };
1015
+      modefyReturnOrder(params).then((response) => {
1016
+        if (response.data.state == 1) {
1017
+          this.loading = false;
1018
+          var msg = response.data.data.msg;
1019
+          this.$message.success("反审核成功!");
1020
+        }
1021
+      });
958 1022
     },
959 1023
   },
960 1024
   created() {
@@ -975,12 +1039,12 @@ export default {
975 1039
     tempObj["is_total"] = 1;
976 1040
     tempObj["project_id"] = 0;
977 1041
     tempObj["supply_unit"] = "";
978
-    tempObj["supply_batch_number"] = ""
979
-    tempObj["supply_product_date"] = ""
980
-    tempObj["supply_expiry_date"] = ""
981
-    tempObj["warehousing_id"] =0
982
-    tempObj["warehouse_info_id"] =0
983
-    tempObj["count"] = ""
1042
+    tempObj["supply_batch_number"] = "";
1043
+    tempObj["supply_product_date"] = "";
1044
+    tempObj["supply_expiry_date"] = "";
1045
+    tempObj["warehousing_id"] = 0;
1046
+    tempObj["warehouse_info_id"] = 0;
1047
+    tempObj["count"] = "";
984 1048
     this.recordInfo.tableList.push(tempObj);
985 1049
     this.getInitOrder();
986 1050
     //获取购货单列表
@@ -1014,6 +1078,11 @@ export default {
1014 1078
   margin-top: 15px;
1015 1079
   margin-bottom: 15px;
1016 1080
 }
1081
+
1082
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
1083
+  width: 10px;
1084
+  height: 10px;
1085
+}
1017 1086
 </style>
1018 1087
 
1019 1088
 <style>
@@ -1044,4 +1113,10 @@ export default {
1044 1113
   bottom: 20px;
1045 1114
   height: 100%;
1046 1115
 }
1116
+.reviewImg {
1117
+  position: fixed;
1118
+  left: 50%;
1119
+  transform: translateX(-50%);
1120
+  top: 30%;
1121
+}
1047 1122
 </style>

+ 7 - 1
src/xt_pages/supply/components/editPurchaseOrder.vue Bestand weergeven

@@ -12,7 +12,7 @@
12 12
           align-items: center;
13 13
         "
14 14
       >
15
-        <div>
15
+        <div style="display:flex;align-items: center;">
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
@@ -1124,6 +1124,10 @@ export default {
1124 1124
   margin-top: 15px;
1125 1125
   margin-bottom: 15px;
1126 1126
 }
1127
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
1128
+  width: 10px;
1129
+  height: 10px;
1130
+}
1127 1131
 </style>
1128 1132
 
1129 1133
 <style>
@@ -1160,4 +1164,6 @@ export default {
1160 1164
   transform: translateX(-50%);
1161 1165
   top: 30%;
1162 1166
 }
1167
+
1168
+
1163 1169
 </style>

+ 4 - 0
src/xt_pages/supply/goodOrderQuery.vue Bestand weergeven

@@ -407,6 +407,10 @@ export default {
407 407
   margin-top: 15px;
408 408
   margin-bottom: 15px;
409 409
 }
410
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
411
+  width: 10px;
412
+  height: 10px;
413
+}
410 414
 </style>
411 415
 
412 416
 <style>

+ 4 - 0
src/xt_pages/supply/goodreturn.vue Bestand weergeven

@@ -392,6 +392,10 @@ export default {
392 392
   margin-top: 15px;
393 393
   margin-bottom: 15px;
394 394
 }
395
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
396
+  width: 10px;
397
+  height: 10px;
398
+}
395 399
 </style>
396 400
 
397 401
 <style>

+ 4 - 0
src/xt_pages/supply/purchaseOrderQuery.vue Bestand weergeven

@@ -438,6 +438,10 @@ tr:last-child {
438 438
   margin-top: 15px;
439 439
   margin-bottom: 15px;
440 440
 }
441
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
442
+  width: 10px;
443
+  height: 10px;
444
+}
441 445
 </style>
442 446
 
443 447
 <style>

+ 4 - 0
src/xt_pages/supply/supplyQuery.vue Bestand weergeven

@@ -278,6 +278,10 @@ export default {
278 278
 </script>
279 279
 
280 280
 <style rel="stylesheet/css" lang="scss" scoped>
281
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
282
+  width: 10px;
283
+  height: 10px;
284
+}
281 285
 .information {
282 286
   border: 1px #dcdfe6 solid;
283 287
   padding: 30px 20px 30px 20px;