Kaynağa Gözat

11月14日 库存扣减更新

XMLWAN 3 yıl önce
ebeveyn
işleme
9310312766

+ 1 - 1
src/api/supply.js Dosyayı Görüntüle

@@ -147,7 +147,7 @@ export function ModefySupplyWarehousing(params) {
147 147
 
148 148
 export function saveGoodReturnOrder(data, warehouse_out_id, start_time, rate_of_concession, discount_amount, arrearage, payment, supplier_id) {
149 149
   return request({
150
-    url: '/api/supply/savegoodreturnOrder?warehouse_out_id=' + warehouse_out_id + '&start_time=' + start_time + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&arrearage=' + arrearage + '&payment=' + payment + '&supplier_id=' + supplier_id,
150
+    url: '/api/supply/savegoodreturnOrder?warehouse_out_id=' + warehouse_out_id + '&start_time=' + start_time + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&arrerage=' + arrearage + '&payment=' + payment + '&supplier_id=' + supplier_id,
151 151
     method: 'post',
152 152
     data: data
153 153
   })

+ 2 - 2
src/views/layout/Layout.vue Dosyayı Görüntüle

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

+ 3 - 0
src/xt_pages/data/components/consumables.vue Dosyayı Görüntüle

@@ -335,6 +335,7 @@
335 335
               register_number:"",
336 336
               is_user:"2",
337 337
               number:"",
338
+              is_warehouse:"1",
338 339
             },
339 340
             isVisibility: false,
340 341
           }
@@ -733,6 +734,8 @@
733 734
             this.goodInfo.goodInfoDialog.formValue.number = response.data.data.goodInfo.number
734 735
            
735 736
             this.goodInfo.goodInfoDialog.formValue.is_user = response.data.data.goodInfo.is_user.toString()
737
+
738
+            this.goodInfo.goodInfoDialog.formValue.is_warehouse = response.data.data.goodInfo.is_warehouse.toString()
736 739
             
737 740
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
738 741
 

+ 4 - 4
src/xt_pages/dialysis/details/DialysisPrescription.vue Dosyayı Görüntüle

@@ -147,8 +147,8 @@
147 147
           <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') != 1">{{ anticoagulant_shouji != "0" ? anticoagulant_shouji : "" }}</span>
148 148
           <span v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
149 149
             <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1" ></span>
150
-            <span class="unit"  v-if="getValueStr('anticoagulant', 'anticoagulant') == 2  && this.$store.getters.xt_user.template_info.template_id != 13  && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 38" >{{ anticoagulant_shouji != "0" ? "iu" : "" }}</span>
151
-            <span class="unit"  v-if="getValueStr('anticoagulant', 'anticoagulant') == 2  && (this.$store.getters.xt_user.template_info.template_id == 13 ||  this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 40 || this.$store.getters.xt_user.template_info.template_id == 38)" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span>
150
+            <span class="unit"  v-if="getValueStr('anticoagulant', 'anticoagulant') == 2  && this.$store.getters.xt_user.template_info.template_id != 13  && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 38  && this.$store.getters.xt_user.template_info.template_id != 45">{{ anticoagulant_shouji != "0" ? "iu" : "" }}</span>
151
+            <span class="unit"  v-if="getValueStr('anticoagulant', 'anticoagulant') == 2  && (this.$store.getters.xt_user.template_info.template_id == 13 ||  this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 40 || this.$store.getters.xt_user.template_info.template_id == 38  || this.$store.getters.xt_user.template_info.template_id == 45)" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span>
152 152
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 3">{{ anticoagulant_shouji != "0" ? "iu" : "" }}</span>
153 153
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span>
154 154
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 4" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span >
@@ -243,8 +243,8 @@
243 243
           <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') != 1">{{ anticoagulant_weichi != "0" ? anticoagulant_weichi : "" }}</span>
244 244
           <span v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
245 245
             <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1"></span>
246
-            <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 2 && this.$store.getters.xt_user.template_info.template_id != 13 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 38">{{ anticoagulant_weichi != "0" ? "iu/h" : "" }}</span>
247
-            <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 2 && (this.$store.getters.xt_user.template_info.template_id == 13 ||  this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 40 || this.$store.getters.xt_user.template_info.template_id == 38)">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>
246
+            <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 2 && this.$store.getters.xt_user.template_info.template_id != 13 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.template_id != 45">{{ anticoagulant_weichi != "0" ? "iu/h" : "" }}</span>
247
+            <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 2 && (this.$store.getters.xt_user.template_info.template_id == 13 ||  this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 40 || this.$store.getters.xt_user.template_info.template_id == 38 ||  this.$store.getters.xt_user.template_info.template_id == 45)">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>
248 248
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 3">{{ anticoagulant_weichi != "0" ? "iu/h" : "" }}</span>
249 249
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>
250 250
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 4">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>

+ 4 - 4
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Dosyayı Görüntüle

@@ -203,7 +203,7 @@
203 203
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
204 204
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
205 205
                             <el-form-item
206
-                                    v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987 '
206
+                                    v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987  && this.$store.getters.xt_user.template_info.template_id != 45'
207 207
                                     :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
208 208
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
209 209
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
@@ -212,7 +212,7 @@
212 212
                             </el-form-item>
213 213
 
214 214
                             <el-form-item
215
-                                    v-if='this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987'
215
+                                    v-if='this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.template_id == 45 || this.$store.getters.xt_user.template_info.org_id == 9987'
216 216
                                     :label="'首剂(mg) : '">
217 217
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
218 218
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
@@ -257,14 +257,14 @@
257 257
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
258 258
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
259 259
                             <el-form-item :label="'维持(' + anticoagulant.weichi_unit + ') : '"
260
-                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987">
260
+                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987 && this.$store.getters.xt_user.template_info.template_id != 45">
261 261
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
262 262
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
263 263
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
264 264
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
265 265
                             </el-form-item>
266 266
                             <el-form-item :label="'维持(mg/h) : '"
267
-                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987">
267
+                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987 ||  this.$store.getters.xt_user.template_info.template_id == 45">
268 268
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
269 269
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
270 270
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"

+ 25 - 4
src/xt_pages/stock/Dialog/goodInfoDailog.vue Dosyayı Görüntüle

@@ -201,7 +201,7 @@
201 201
             
202 202
             <el-form-item label="是否零用:">
203 203
 
204
-              <el-select v-model="form.is_user" style="width:160px" filterable placeholder="请选择">
204
+              <el-select v-model="form.is_user" style="width:160px" filterable placeholder="请选择" @change="changeUse">
205 205
                   <el-option
206 206
                           v-for="(item,index) in userList"
207 207
                           :key="index"
@@ -210,11 +210,25 @@
210 210
                   </el-option>
211 211
               </el-select>
212 212
              </el-form-item>
213
-
213
+           
214
+            <el-form-item label="是否自动出库:" v-if="form.is_user == 1">
215
+              <el-select v-model="form.is_warehouse" style="width:160px" filterable placeholder="请选择">
216
+                  <el-option
217
+                          v-for="(item,index) in userList"
218
+                          :key="index"
219
+                          :label="item.name"
220
+                          :value="item.id">
221
+                  </el-option>
222
+              </el-select>
223
+             </el-form-item>
224
+ 
225
+          
214 226
             <el-form-item label="批准文号:" >
215 227
               <el-input v-model="form.number" style="width:180px"></el-input>
216 228
             </el-form-item>
217 229
 
230
+   
231
+
218 232
 
219 233
             <el-form-item label="备注 : " prop="name" style="width:100%;">
220 234
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
@@ -388,6 +402,7 @@
388 402
           register_number:"",
389 403
           is_user:"2",
390 404
           number:"",
405
+          is_warehouse:"1",
391 406
         },
392 407
 
393 408
         rules: {
@@ -616,7 +631,7 @@
616 631
         form["register_number"] = this.form.register_number
617 632
         form["is_user"] = this.form.is_user
618 633
         form["number"] = this.form.number
619
-
634
+        form["is_warehouse"] = this.form.is_warehouse
620 635
         return form
621 636
       }, changeSelected: function(val) {
622 637
         console.log(val)
@@ -690,9 +705,15 @@
690 705
         }
691 706
       },
692 707
      changeDefaultCountUnit(val){
693
-       console.log("val2222",val)
708
+      
694 709
        this.form.default_count_unit = ''
695 710
         this.form.default_count_unit = val
711
+      },
712
+      changeUse(val){
713
+        console.log("val2222",val)
714
+        if(val == 1){
715
+         this.form.is_user = val
716
+        }
696 717
       }
697 718
     },
698 719
     watch: {

+ 6 - 1
src/xt_pages/supply/components/addGoodOrder.vue Dosyayı Görüntüle

@@ -801,7 +801,12 @@ export default {
801 801
       for (let i = 0; i < arr.length; i++) {
802 802
         total_count += arr[i].stock_count;
803 803
       }
804
-      return total_count;
804
+      if(total_count >0){
805
+        return total_count;
806
+      }else{
807
+        return ""
808
+      }
809
+     
805 810
     },
806 811
 
807 812
     calculate: function (val) {

+ 59 - 9
src/xt_pages/supply/components/addGoodReturn.vue Dosyayı Görüntüle

@@ -133,6 +133,18 @@
133 133
             </template>
134 134
           </el-table-column>
135 135
 
136
+          <el-table-column label="批号" align="center" width="200px">
137
+            <template slot-scope="scope">
138
+              <el-input
139
+                v-model="scope.row.supply_batch_number"
140
+                style="width: 150px"
141
+                :disabled="true"
142
+                placeholder="批号"
143
+              ></el-input>
144
+               <div style="visibility: hidden">/</div>
145
+            </template>
146
+          </el-table-column>
147
+
136 148
           <el-table-column label="单位" align="center" width="120px">
137 149
             <template slot="header" slot-scope="scope">
138 150
               <span>单位<span style="color: red">*</span></span>
@@ -677,7 +689,7 @@ export default {
677 689
       var min_str = "";
678 690
       if (arr.length > 0) {
679 691
         for (let i = 0; i < arr.length; i++) {
680
-          total += parseInt(arr[i].stock_max_number);
692
+          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
681 693
         }
682 694
       }
683 695
       if (total < min_number) {
@@ -702,7 +714,12 @@ export default {
702 714
       for (let i = 0; i < arr.length; i++) {
703 715
         total_count += arr[i].stock_count;
704 716
       }
705
-      return total_count;
717
+      if(total_count > 0){
718
+       return total_count;
719
+      }else{
720
+        return ""
721
+      }
722
+      
706 723
     },
707 724
     calculate: function (val) {
708 725
       if (isNaN(val)) {
@@ -795,8 +812,19 @@ export default {
795 812
           var drugList = response.data.data.drugList;
796 813
           var goodList = response.data.data.goodList;
797 814
           for (let i = 0; i < orderInfo.length; i++) {
815
+            if(orderInfo[i].is_source == 1){
816
+              for(let j=0;j<orderInfo[i].drug_warehouse_info.length;j++){
817
+                 if(orderInfo[i].drug_warehouse_info[j].max_unit == orderInfo[i].drug.max_unit){
818
+                    orderInfo[i].drug_warehouse_info[j].stock_max_number =  orderInfo[i].drug_warehouse_info[j].stock_max_number * orderInfo[i].drug.min_number
819
+                 }
820
+              }
821
+              orderInfo[i].supply_total = this.getWarehoseInfo(orderInfo[i].drug_warehouse_info,orderInfo[i].drug.max_unit,orderInfo[i].drug.min_unit,orderInfo[i].drug.min_number)
822
+            }
823
+            if(orderInfo[i].is_source == 2){
824
+               orderInfo[i].supply_total = this.getTotalStockCount(orderInfo[i].good_warehouse_info)
825
+            }
798 826
             orderInfo[i].id = orderInfo[i].id;
799
-            orderInfo[i].supply_count = orderInfo[i].count;
827
+            orderInfo[i].supply_count = orderInfo[i].supply_count;
800 828
             orderInfo[i].count = orderInfo[i].count
801 829
             orderInfo[i].supply_price = orderInfo[i].price;
802 830
             orderInfo[i].supply_remake = orderInfo[i].remark;
@@ -1015,13 +1043,35 @@ export default {
1015 1043
      }
1016 1044
      checkReturnOrder(params).then(response=>{
1017 1045
        if(response.data.state == 1){
1018
-        this.loading = false
1019
-        this.showThree = false
1020
-        this.disabled = true
1021
-        this.is_check = 1
1046
+      
1022 1047
         var msg = response.data.data.msg
1023
-        this.Reviewed = true
1024
-        this.$message.success("审核成功!")
1048
+        if(msg == 1){
1049
+          this.loading = false
1050
+          this.showThree = false
1051
+          this.disabled = true
1052
+          this.is_check = 1
1053
+          this.Reviewed = true
1054
+          this.$message.success("审核成功!")
1055
+        }
1056
+
1057
+         if(msg == 2){
1058
+            var good_name = response.data.data.good_name
1059
+            var specification_name = response.data.data.specification_name
1060
+            var str = good_name +"*" + specification_name +"库存不足,审核失败!"
1061
+            this.$message.error(str)
1062
+
1063
+          }
1064
+          if(msg == 3){
1065
+              var drug_name =  response.data.data.drug_name
1066
+              var dose = response.data.data.dose
1067
+              var dose_unit = response.data.data.dose_unit
1068
+              var min_number = response.data.data.min_number
1069
+              var min_unit =  response.data.data.min_unit
1070
+              var max_unit =  response.data.data.max_unit
1071
+              var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
1072
+              this.$message.error(str + "库存不足,审核失败!")
1073
+          }
1074
+       
1025 1075
        }
1026 1076
      })
1027 1077
     },

+ 6 - 1
src/xt_pages/supply/components/editGoodOrder.vue Dosyayı Görüntüle

@@ -849,7 +849,12 @@ export default {
849 849
       for (let i = 0; i < arr.length; i++) {
850 850
         total_count += arr[i].stock_count;
851 851
       }
852
-      return total_count;
852
+      if(total_count >0){
853
+         return total_count;
854
+      }else{
855
+        return ""
856
+      }
857
+      
853 858
     },
854 859
     calculate: function (val) {
855 860
       if (isNaN(val)) {

+ 27 - 2
src/xt_pages/supply/components/editGoodReturn.vue Dosyayı Görüntüle

@@ -18,6 +18,7 @@
18 18
             v-model="supplier_name"
19 19
             style="width: 140px; margin-right: 10px"
20 20
             placeholder="请选择"
21
+            :disabled ="disabled"
21 22
           >
22 23
             <el-option
23 24
               v-for="item in supplyList"
@@ -145,6 +146,18 @@
145 146
             </template>
146 147
           </el-table-column>
147 148
 
149
+         <el-table-column label="批号" align="center" width="200px">
150
+            <template slot-scope="scope">
151
+              <el-input
152
+                v-model="scope.row.supply_batch_number"
153
+                style="width: 150px"
154
+                :disabled="true"
155
+                placeholder="批号"
156
+              ></el-input>
157
+               <div style="visibility: hidden">/</div>
158
+            </template>
159
+          </el-table-column>
160
+
148 161
           <el-table-column label="单位" align="center" width="120px">
149 162
             <template slot="header" slot-scope="scope">
150 163
               <span>单位<span style="color: red">*</span></span>
@@ -333,6 +346,7 @@
333 346
       </el-form>
334 347
       <div style="margin-top: 10px">
335 348
         <el-input
349
+         :disabled ="disabled"
336 350
           type="textarea"
337 351
           :rows="2"
338 352
           placeholder="备注信息"
@@ -355,6 +369,7 @@
355 369
             v-model="rate_of_concession"
356 370
             @input="addressChange"
357 371
             placeholder="请输入优惠率"
372
+            :disabled ="disabled"
358 373
           ></el-input
359 374
           >%</span
360 375
         >
@@ -365,6 +380,7 @@
365 380
             v-model="discount_amount"
366 381
             @input="count_discount"
367 382
             placeholder="请输入优惠金额"
383
+            :disabled ="disabled"
368 384
           ></el-input
369 385
         ></span>
370 386
 
@@ -374,6 +390,7 @@
374 390
             v-model="payment"
375 391
             @input="count_payment"
376 392
             placeholder="请输入本次退款"
393
+            :disabled ="disabled"
377 394
           ></el-input
378 395
         ></span>
379 396
 
@@ -383,6 +400,7 @@
383 400
             v-model="arrearage"
384 401
             @input="count_arrearage"
385 402
             placeholder="请输入本次欠款"
403
+            :disabled ="disabled"
386 404
           ></el-input
387 405
         ></span>
388 406
       </div>
@@ -717,7 +735,7 @@ export default {
717 735
       var min_str = "";
718 736
       if (arr.length > 0) {
719 737
         for (let i = 0; i < arr.length; i++) {
720
-          total += parseInt(arr[i].stock_max_number);
738
+          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
721 739
         }
722 740
       }
723 741
       if (total < min_number) {
@@ -742,7 +760,12 @@ export default {
742 760
       for (let i = 0; i < arr.length; i++) {
743 761
         total_count += arr[i].stock_count;
744 762
       }
745
-      return total_count;
763
+      if(total_count >0){
764
+        return total_count;
765
+      }else{
766
+        return ""
767
+      }
768
+    
746 769
     },
747 770
     calculate: function (val) {
748 771
       if (isNaN(val)) {
@@ -873,10 +896,12 @@ export default {
873 896
           this.discount_amount = out.discount_amount;
874 897
           this.payment = out.payment;
875 898
           this.arrearage = out.arrearage;
899
+          this.return_remark = out.return_remark
876 900
           this.start_time = this.getTimes(out.document_date);
877 901
           var orderInfo = response.data.data.orderCancelDetail;
878 902
           if (out.is_check == 1) {
879 903
             this.disabled = true;
904
+            this.Reviewed = true
880 905
           }
881 906
           console.log("退库单详情", orderInfo);
882 907
           var drugList = response.data.data.drugList;

+ 6 - 1
src/xt_pages/supply/components/editPurchaseOrder.vue Dosyayı Görüntüle

@@ -715,7 +715,12 @@ export default {
715 715
       for (let i = 0; i < arr.length; i++) {
716 716
         total_count += arr[i].stock_count;
717 717
       }
718
-      return total_count;
718
+      if(total_count >0){
719
+        return total_count;
720
+      }else{
721
+        return ""
722
+      }
723
+     
719 724
     },
720 725
     calculate: function (val) {
721 726
       if (isNaN(val)) {

+ 1 - 0
src/xt_pages/supply/goodOrderQuery.vue Dosyayı Görüntüle

@@ -357,6 +357,7 @@ export default {
357 357
                 var msg = response.data.data.msg
358 358
                 this.tableList.splice(index, 1);
359 359
                 this.$message.success("删除成功")
360
+                this.getlist()
360 361
             } else {
361 362
                 this.$message.error("删除失败")
362 363
             }

+ 18 - 16
src/xt_pages/supply/goodreturn.vue Dosyayı Görüntüle

@@ -113,11 +113,11 @@
113 113
           <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)}}</span> 
114 114
          </template>
115 115
        </el-table-column>
116
-        <!-- <el-table-column label="已退款" align="center" width="200">
116
+        <el-table-column label="已退款" align="center" width="200">
117 117
          <template slot-scope="scope">
118
-         
118
+           <span v-if="scope.row.payment > 0">{{scope.row.payment}}</span> 
119 119
          </template>
120
-       </el-table-column> -->
120
+       </el-table-column>
121 121
        <el-table-column label="数量" align="center" width="200">
122 122
          <template slot-scope="scope">
123 123
            {{getCount(scope.row.cancelOrder)}}
@@ -306,7 +306,7 @@ export default {
306 306
        var buy_price = 0
307 307
        if(arr!=undefined && arr.length > 0){
308 308
           for(let i=0;i<arr.length;i++){
309
-            buy_price += (arr[i].count * arr[i].price)
309
+            buy_price += (arr[i].supply_count * arr[i].price)
310 310
           }
311 311
        }
312 312
 
@@ -317,17 +317,16 @@ export default {
317 317
        var buy_price = 0
318 318
        if(arr!=undefined && arr.length > 0){
319 319
           for(let i=0;i<arr.length;i++){
320
-            buy_price += (parseInt(arr[i].count) * arr[i].price)
320
+            buy_price += (parseInt(arr[i].supply_count) * arr[i].price)
321 321
           }
322 322
        }
323
-        console.log("discount233232232323",discount_amount)
324 323
        return (buy_price-discount_amount).toFixed(2)
325 324
      },
326 325
      getAllCount(arr){
327 326
        var count = ""
328 327
         if(arr!=undefined && arr.length > 0){
329 328
           for(let i=0;i<arr.length;i++){
330
-            count += arr[i].count
329
+            count += arr[i].supply_count
331 330
           }
332 331
        }
333 332
        return count
@@ -354,6 +353,7 @@ export default {
354 353
             if (response.data.state == 1) {
355 354
                 var msg = response.data.data.msg
356 355
                 this.tableList.splice(index, 1);
356
+                this.getlist()
357 357
                 this.$message.success("删除成功")
358 358
             } else {
359 359
                 this.$message.error("删除失败")
@@ -363,16 +363,18 @@ export default {
363 363
        }) 
364 364
      },
365 365
      getCount(val){
366
+       console.log("val323223322323",val)
366 367
        var total = 0
367
-       for(let i=0;i<val.length;i++){
368
-         total += val[i].count
369
-       }
370
-       if(total >0){
371
-         return total
372
-       }else{
373
-         return ""
368
+       if(val!=undefined){
369
+          for(let i=0;i<val.length;i++){
370
+          total += val[i].supply_count
371
+        }
372
+        if(total >0){
373
+          return total
374
+        }else{
375
+          return ""
376
+        }
374 377
        }
375
-      
376 378
      }
377 379
   },
378 380
   created() {
@@ -381,7 +383,7 @@ export default {
381 383
     var nowYear = now.getFullYear(); //当前年 
382 384
     //本月的开始时间
383 385
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
384
-    this.start_time = monthStartDate
386
+    this.start_time = this.getTimes(monthStartDate) 
385 387
     this.end_time = this.getTimes(new Date());
386 388
     this.org_id =  this.$store.getters.xt_user.org_id
387 389
     this.getAllSupply()

+ 1 - 0
src/xt_pages/supply/purchaseOrderQuery.vue Dosyayı Görüntüle

@@ -357,6 +357,7 @@ export default {
357 357
             if (response.data.state == 1) {
358 358
               var msg = response.data.data.msg;
359 359
               this.tableList.splice(index, 1);
360
+              this.getlist()
360 361
               this.$message.success("删除成功");
361 362
             } else {
362 363
               this.$message.error("删除失败");