Selaa lähdekoodia

11月14日 库存扣减更新

XMLWAN 3 vuotta sitten
vanhempi
commit
dd24a427c0

+ 2 - 1
src/api/supply.js Näytä tiedosto

89
 }
89
 }
90
 
90
 
91
 export function deletePurchaseOrder(id, params) {
91
 export function deletePurchaseOrder(id, params) {
92
-  console.log("id232323223",id)
92
+  console.log('id232323223', id)
93
   return request({
93
   return request({
94
     url: '/api/supply/deletepurchorder?id=' + id,
94
     url: '/api/supply/deletepurchorder?id=' + id,
95
     method: 'Get',
95
     method: 'Get',
337
     params: params
337
     params: params
338
   })
338
   })
339
 }
339
 }
340
+

+ 13 - 11
src/xt_pages/dialysis/dialysisPrintOrder.vue Näytä tiedosto

65
           >打印</el-button
65
           >打印</el-button
66
         >
66
         >
67
       </template>
67
       </template>
68
-      <template v-if="org_template_info.template_id == 46">
69
-        <el-button
70
-          :loading="loading"
71
-          size="small"
72
-          icon="el-icon-printer"
73
-          @click="printThisPage"
74
-          type="primary"
75
-          >打印</el-button
76
-        >
77
-      </template>
68
+   
78
       <template v-if="org_template_info.template_id == 5">
69
       <template v-if="org_template_info.template_id == 5">
79
         <div>
70
         <div>
80
           <el-button
71
           <el-button
623
           >打印</el-button
614
           >打印</el-button
624
         >
615
         >
625
       </template>
616
       </template>
617
+      <template v-if="org_template_info.template_id == 46">
618
+        <el-button
619
+          :loading="loading"
620
+          size="small"
621
+          icon="el-icon-printer"
622
+          @click="printThisPage"
623
+          type="primary"
624
+          >打印</el-button
625
+        >
626
+      </template>
626
     </div>
627
     </div>
627
     <div class="app-container" style="min-height:0;">
628
     <div class="app-container" style="min-height:0;">
628
       <!--<div class="order-print-btn"-->
629
       <!--<div class="order-print-btn"-->
1271
       } else if (
1272
       } else if (
1272
         this.org_template_info.template_id == 6 ||
1273
         this.org_template_info.template_id == 6 ||
1273
         this.org_template_info.template_id == 10 ||
1274
         this.org_template_info.template_id == 10 ||
1274
-        this.org_template_info.template_id == 11
1275
+        this.org_template_info.template_id == 11 ||
1276
+        this.org_template_info.template_id == 46
1275
       ) {
1277
       ) {
1276
         printJS({
1278
         printJS({
1277
           printable: "dialysis-print-box-1",
1279
           printable: "dialysis-print-box-1",

+ 1 - 0
src/xt_pages/supply/components/addGoodOrder.vue Näytä tiedosto

436
               v-model="arrearage"
436
               v-model="arrearage"
437
               @input="count_arrearage"
437
               @input="count_arrearage"
438
               placeholder="请输入本次欠款"
438
               placeholder="请输入本次欠款"
439
+              :disabled="disabled"
439
             ></el-input
440
             ></el-input
440
           ></span>
441
           ></span>
441
         </div>
442
         </div>

+ 17 - 6
src/xt_pages/supply/components/addGoodReturn.vue Näytä tiedosto

18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
             style="width: 140px; margin-right: 10px"
19
             style="width: 140px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
-            @change="changeTypeName"
22
           >
21
           >
23
             <el-option
22
             <el-option
24
               v-for="item in supplyList"
23
               v-for="item in supplyList"
253
             </template>
252
             </template>
254
           </el-table-column>
253
           </el-table-column>
255
 
254
 
256
-          <el-table-column label="源采购单号" align="center" width="200px">
255
+          <el-table-column label="源采购单号" align="center" width="200px">
257
             <template slot-scope="scope">
256
             <template slot-scope="scope">
258
               <el-input
257
               <el-input
259
                 v-model="scope.row.good_number"
258
                 v-model="scope.row.good_number"
604
       tempObj["supply_type"] = "";
603
       tempObj["supply_type"] = "";
605
       tempObj["supply_specification_name"] = "";
604
       tempObj["supply_specification_name"] = "";
606
       tempObj["supply_total"] = "";
605
       tempObj["supply_total"] = "";
607
-      tempObj["count"] = "";
606
+      tempObj["count"] = 0;
608
       tempObj["supply_count"] = "";
607
       tempObj["supply_count"] = "";
609
       tempObj["supply_price"] = "";
608
       tempObj["supply_price"] = "";
610
       tempObj["supply_total_price"] = "";
609
       tempObj["supply_total_price"] = "";
621
       tempObj["supply_expiry_date"] = ""
620
       tempObj["supply_expiry_date"] = ""
622
       tempObj["warehousing_id"] =0
621
       tempObj["warehousing_id"] =0
623
       tempObj["warehouse_info_id"] =0
622
       tempObj["warehouse_info_id"] =0
623
+      tempObj["good_number"] = ""
624
+      tempObj["min_price"] = "";
624
       this.recordInfo.tableList.push(tempObj);
625
       this.recordInfo.tableList.push(tempObj);
625
     },
626
     },
626
     handleDelete: function (index, row) {
627
     handleDelete: function (index, row) {
817
              this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
818
              this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
818
             this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
819
             this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
819
             this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
820
             this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
821
+            if(this.recordInfo.tableList[i].supply_product_date == ""){
822
+              console.log("进来3323232")
823
+              this.recordInfo.tableList[i].supply_product_date = 0
824
+            }
825
+            if(this.recordInfo.tableList[i].supply_expiry_date == ""){
826
+              this.recordInfo.tableList[i].supply_expiry_date = 0
827
+            }
820
             for (let j = 0; j < this.manufactuerList.length; j++) {
828
             for (let j = 0; j < this.manufactuerList.length; j++) {
821
               if (this.recordInfo.tableList[i].supply_manufacturer ==this.manufactuerList[j].manufacturer_name) {
829
               if (this.recordInfo.tableList[i].supply_manufacturer ==this.manufactuerList[j].manufacturer_name) {
822
                 this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id;
830
                 this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id;
824
               if (this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id) {
832
               if (this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id) {
825
                 this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name;
833
                 this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name;
826
               }
834
               }
835
+
827
             }
836
             }
828
           } 
837
           } 
829
            var params = {
838
            var params = {
830
             stockIn:this.recordInfo.tableList,
839
             stockIn:this.recordInfo.tableList,
831
             return_marke:this.return_remark,
840
             return_marke:this.return_remark,
832
            }
841
            }
833
-           console.log("2323323232",this.start_time)
842
+           console.log("2323323232",params)
834
          
843
          
835
            saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
844
            saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
836
              if(response.data.state == 1){
845
              if(response.data.state == 1){
971
     tempObj["supply_expiry_date"] = ""
980
     tempObj["supply_expiry_date"] = ""
972
     tempObj["warehousing_id"] =0
981
     tempObj["warehousing_id"] =0
973
     tempObj["warehouse_info_id"] =0
982
     tempObj["warehouse_info_id"] =0
974
-    tempObj["count"] = "";
983
+    tempObj["count"] = 0;
984
+    tempObj["good_number"] = ""
985
+    tempObj["min_price"] = "";
975
     this.recordInfo.tableList.push(tempObj);
986
     this.recordInfo.tableList.push(tempObj);
976
     console.log("即哪里地方2",this.recordInfo.tableList)
987
     console.log("即哪里地方2",this.recordInfo.tableList)
977
     this.getInitOrder();
988
     this.getInitOrder();
980
      //获取购货单列表
991
      //获取购货单列表
981
       this.getGoodOrderDetail();
992
       this.getGoodOrderDetail();
982
     }
993
     }
983
-
994
+    this.start_time = this.getTimes(new Date());
984
   },
995
   },
985
 };
996
 };
986
 </script>
997
 </script>

+ 11 - 16
src/xt_pages/supply/components/addPurchaseOrder.vue Näytä tiedosto

660
         if (valid) {
660
         if (valid) {
661
           this.loading = true;
661
           this.loading = true;
662
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
662
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
663
-            this.recordInfo.tableList[i].supply_count = parseInt(
664
-              this.recordInfo.tableList[i].supply_count
665
-            );
666
-            this.recordInfo.tableList[i].supply_license_number =
667
-              this.recordInfo.tableList[i].supply_license_number.toString();
668
-            this.recordInfo.tableList[i].supply_total_price = (
669
-              this.recordInfo.tableList[i].supply_count *
670
-              this.recordInfo.tableList[i].supply_price
671
-            ).toString();
672
-            this.recordInfo.tableList[i].supply_total =
673
-              this.recordInfo.tableList[i].supply_total.toString();
674
-            this.recordInfo.tableList[i].supply_price =
675
-              this.recordInfo.tableList[i].supply_price.toString();
663
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
664
+            this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
665
+            this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count *this.recordInfo.tableList[i].supply_price ).toString();
666
+            this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString();
667
+            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString();
676
             for (let j = 0; j < this.manufactuerList.length; j++) {
668
             for (let j = 0; j < this.manufactuerList.length; j++) {
677
               if (
669
               if (
678
                 this.recordInfo.tableList[i].supply_manufacturer ==
670
                 this.recordInfo.tableList[i].supply_manufacturer ==
712
               this.recordInfo.tableList = [];
704
               this.recordInfo.tableList = [];
713
               this.return_remark = warehouseInfo.return_remake;
705
               this.return_remark = warehouseInfo.return_remake;
714
               var orderInfo = response.data.data.orderInfo;
706
               var orderInfo = response.data.data.orderInfo;
707
+              console.log("orderINO23323332232323",orderInfo)
715
               for (let i = 0; i < orderInfo.length; i++) {
708
               for (let i = 0; i < orderInfo.length; i++) {
716
                 if (orderInfo[i].is_source == 1) {
709
                 if (orderInfo[i].is_source == 1) {
717
                   for (let j = 0; j < this.drugList.length; j++) {
710
                   for (let j = 0; j < this.drugList.length; j++) {
740
                 orderInfo[i].type = orderInfo[i].is_source;
733
                 orderInfo[i].type = orderInfo[i].is_source;
741
                 orderInfo[i].project_id = orderInfo[i].project_id;
734
                 orderInfo[i].project_id = orderInfo[i].project_id;
742
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
735
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
736
+                orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
743
               }
737
               }
744
 
738
 
745
               this.recordInfo.tableList = orderInfo;
739
               this.recordInfo.tableList = orderInfo;
740
+              console.log("orderInfo2332322323232332",orderInfo)
746
               for (let i = 0; i < orderInfo.length; i++) {
741
               for (let i = 0; i < orderInfo.length; i++) {
747
-                orderInfo[i].name = "";
748
-                orderInfo[i].supply_name = "";
749
-                orderInfo[i].supply_specification_name = "";
742
+                // orderInfo[i].name = "";
743
+                // orderInfo[i].supply_name = "";
744
+                // orderInfo[i].supply_specification_name = "";
750
                 if (orderInfo[i].is_source == 1) {
745
                 if (orderInfo[i].is_source == 1) {
751
                   for (let j = 0; j < this.drugList.length; j++) {
746
                   for (let j = 0; j < this.drugList.length; j++) {
752
                     if (orderInfo[i].project_id == this.drugList[j].id) {
747
                     if (orderInfo[i].project_id == this.drugList[j].id) {

+ 6 - 2
src/xt_pages/supply/components/editGoodOrder.vue Näytä tiedosto

1060
         this.recordInfo.tableList[i].supply_total_price =
1060
         this.recordInfo.tableList[i].supply_total_price =
1061
           this.recordInfo.tableList[i].supply_total_price.toString();
1061
           this.recordInfo.tableList[i].supply_total_price.toString();
1062
         this.recordInfo.tableList[i].supply_total =
1062
         this.recordInfo.tableList[i].supply_total =
1063
-          this.recordInfo.tableList[i].supply_total.toString();
1064
-
1063
+        this.recordInfo.tableList[i].supply_total.toString();
1064
+        this.recordInfo.tableList[i].min_price =
1065
+        this.recordInfo.tableList[i].min_price.toString();
1065
         for (let j = 0; j < this.manufactuerList.length; j++) {
1066
         for (let j = 0; j < this.manufactuerList.length; j++) {
1066
           if (
1067
           if (
1067
             this.recordInfo.tableList[i].supply_manufacturer ==
1068
             this.recordInfo.tableList[i].supply_manufacturer ==
1122
           this.showOne = false;
1123
           this.showOne = false;
1123
           this.showTwo = true;
1124
           this.showTwo = true;
1124
           this.showThree = true;
1125
           this.showThree = true;
1126
+          this.disabled = true
1125
           var purcaseOrder = response.data.data.purcaseOrder;
1127
           var purcaseOrder = response.data.data.purcaseOrder;
1126
           this.Reviewed = true;
1128
           this.Reviewed = true;
1127
           console.log("采购订单", purcaseOrder);
1129
           console.log("采购订单", purcaseOrder);
1359
             this.$message.success("反审核成功!");
1361
             this.$message.success("反审核成功!");
1360
             this.disabled = false
1362
             this.disabled = false
1361
             this.Reviewed = false
1363
             this.Reviewed = false
1364
+            this.showOne = true
1365
+            this.showTwo = false
1362
             return
1366
             return
1363
           }
1367
           }
1364
           if (msg == 2) {
1368
           if (msg == 2) {

+ 8 - 2
src/xt_pages/supply/components/editGoodReturn.vue Näytä tiedosto

266
             </template>
266
             </template>
267
           </el-table-column>
267
           </el-table-column>
268
 
268
 
269
-          <el-table-column label="源采购单号" align="center" width="200px">
269
+          <el-table-column label="源采购单号" align="center" width="200px">
270
             <template slot-scope="scope">
270
             <template slot-scope="scope">
271
               <el-input
271
               <el-input
272
                 v-model="scope.row.good_number"
272
                 v-model="scope.row.good_number"
660
       tempObj["warehousing_id"] = 0;
660
       tempObj["warehousing_id"] = 0;
661
       tempObj["warehouse_info_id"] = 0;
661
       tempObj["warehouse_info_id"] = 0;
662
       tempObj["count"] = "";
662
       tempObj["count"] = "";
663
-
663
+      tempObj["min_price"] = "";
664
+      tempObj["good_number"] = ""
664
       this.recordInfo.tableList.push(tempObj);
665
       this.recordInfo.tableList.push(tempObj);
665
     },
666
     },
666
     handleDelete: function (index, row) {
667
     handleDelete: function (index, row) {
972
             stockIn: this.recordInfo.tableList,
973
             stockIn: this.recordInfo.tableList,
973
             return_marke: this.return_remark,
974
             return_marke: this.return_remark,
974
           };
975
           };
976
+          console.log("parms32322332",params)
977
+         
975
           updateGoodReturn(
978
           updateGoodReturn(
976
             params,
979
             params,
977
             warehouse_out_id,
980
             warehouse_out_id,
1045
     tempObj["warehousing_id"] = 0;
1048
     tempObj["warehousing_id"] = 0;
1046
     tempObj["warehouse_info_id"] = 0;
1049
     tempObj["warehouse_info_id"] = 0;
1047
     tempObj["count"] = "";
1050
     tempObj["count"] = "";
1051
+    tempObj["min_price"] = "";
1052
+    tempObj["good_number"] = ""
1048
     this.recordInfo.tableList.push(tempObj);
1053
     this.recordInfo.tableList.push(tempObj);
1049
     this.getInitOrder();
1054
     this.getInitOrder();
1050
     //获取购货单列表
1055
     //获取购货单列表
1051
     this.getGoodReturnDetail();
1056
     this.getGoodReturnDetail();
1057
+    this.start_time = this.getTimes(new Date());
1052
   },
1058
   },
1053
 };
1059
 };
1054
 </script>
1060
 </script>

+ 3 - 2
src/xt_pages/supply/components/editPurchaseOrder.vue Näytä tiedosto

771
             stockIn: this.recordInfo.tableList,
771
             stockIn: this.recordInfo.tableList,
772
             return_remake: this.return_remark,
772
             return_remake: this.return_remark,
773
           };
773
           };
774
-         
775
-
774
+          console.log("哈哈哈哈哈哈",params)
775
+          
776
           updatePurchaseOrder(
776
           updatePurchaseOrder(
777
             params,
777
             params,
778
             this.supplier_name,
778
             this.supplier_name,
860
           var drugList = response.data.data.baseList;
860
           var drugList = response.data.data.baseList;
861
           var goodList = response.data.data.goodList;
861
           var goodList = response.data.data.goodList;
862
           for (let i = 0; i < orderInfo.length; i++) {
862
           for (let i = 0; i < orderInfo.length; i++) {
863
+            orderInfo[i].id = orderInfo[i].id
863
             orderInfo[i].supply_count = orderInfo[i].count;
864
             orderInfo[i].supply_count = orderInfo[i].count;
864
             orderInfo[i].supply_price = orderInfo[i].price;
865
             orderInfo[i].supply_price = orderInfo[i].price;
865
             orderInfo[i].supply_remake = orderInfo[i].remark;
866
             orderInfo[i].supply_remake = orderInfo[i].remark;

+ 5 - 5
src/xt_pages/supply/goodreturn.vue Näytä tiedosto

157
                 icon="el-icon-delete"
157
                 icon="el-icon-delete"
158
                 size="small"
158
                 size="small"
159
                 type="danger"
159
                 type="danger"
160
-                @click="toClickOne(scope.row)"
160
+                @click="toClickOne(scope.row,scope.$index)"
161
               >删除
161
               >删除
162
               </el-button>
162
               </el-button>
163
           </template>
163
           </template>
331
          this.$message.error("已审核单据,不能删除!")
331
          this.$message.error("已审核单据,不能删除!")
332
          return false
332
          return false
333
        }
333
        }
334
-       if(val.cancelOut.length >0 ){
335
-         this.$message.error("已关联单据,不能删除!")
336
-         return false
337
-       }
334
+      //  if(val.cancelOrder.length >0 ){
335
+      //    this.$message.error("已关联单据,不能删除!")
336
+      //    return false
337
+      //  }
338
        this.$confirm('确认删除吗?', '删除', {
338
        this.$confirm('确认删除吗?', '删除', {
339
           confirmButtonText: '确 定',
339
           confirmButtonText: '确 定',
340
           cancelButtonText: '取 消',
340
           cancelButtonText: '取 消',