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
 
147
 
148
 export function saveGoodReturnOrder(data, warehouse_out_id, start_time, rate_of_concession, discount_amount, arrearage, payment, supplier_id) {
148
 export function saveGoodReturnOrder(data, warehouse_out_id, start_time, rate_of_concession, discount_amount, arrearage, payment, supplier_id) {
149
   return request({
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
     method: 'post',
151
     method: 'post',
152
     data: data
152
     data: data
153
   })
153
   })

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

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

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

335
               register_number:"",
335
               register_number:"",
336
               is_user:"2",
336
               is_user:"2",
337
               number:"",
337
               number:"",
338
+              is_warehouse:"1",
338
             },
339
             },
339
             isVisibility: false,
340
             isVisibility: false,
340
           }
341
           }
733
             this.goodInfo.goodInfoDialog.formValue.number = response.data.data.goodInfo.number
734
             this.goodInfo.goodInfoDialog.formValue.number = response.data.data.goodInfo.number
734
            
735
            
735
             this.goodInfo.goodInfoDialog.formValue.is_user = response.data.data.goodInfo.is_user.toString()
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
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
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
           <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') != 1">{{ anticoagulant_shouji != "0" ? anticoagulant_shouji : "" }}</span>
147
           <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') != 1">{{ anticoagulant_shouji != "0" ? anticoagulant_shouji : "" }}</span>
148
           <span v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
148
           <span v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
149
             <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1" ></span>
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
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 3">{{ anticoagulant_shouji != "0" ? "iu" : "" }}</span>
152
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 3">{{ anticoagulant_shouji != "0" ? "iu" : "" }}</span>
153
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span>
153
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span>
154
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 4" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span >
154
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 4" >{{ anticoagulant_shouji != "0" ? "mg" : "" }}</span >
243
           <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') != 1">{{ anticoagulant_weichi != "0" ? anticoagulant_weichi : "" }}</span>
243
           <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') != 1">{{ anticoagulant_weichi != "0" ? anticoagulant_weichi : "" }}</span>
244
           <span v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
244
           <span v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
245
             <span class="content" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1"></span>
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
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 3">{{ anticoagulant_weichi != "0" ? "iu/h" : "" }}</span>
248
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 3">{{ anticoagulant_weichi != "0" ? "iu/h" : "" }}</span>
249
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>
249
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 1">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>
250
             <span class="unit" v-if="getValueStr('anticoagulant', 'anticoagulant') == 4">{{ anticoagulant_weichi != "0" ? "mg/h" : "" }}</span>
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
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
203
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
204
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
204
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
205
                             <el-form-item
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
                                     :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
207
                                     :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
208
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
208
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
209
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
209
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
212
                             </el-form-item>
212
                             </el-form-item>
213
 
213
 
214
                             <el-form-item
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
                                     :label="'首剂(mg) : '">
216
                                     :label="'首剂(mg) : '">
217
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
217
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
218
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
218
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
257
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
257
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
258
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
258
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
259
                             <el-form-item :label="'维持(' + anticoagulant.weichi_unit + ') : '"
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
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
261
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
262
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
262
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
263
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
263
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
264
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
264
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
265
                             </el-form-item>
265
                             </el-form-item>
266
                             <el-form-item :label="'维持(mg/h) : '"
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
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
268
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
269
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
269
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
270
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
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
             
201
             
202
             <el-form-item label="是否零用:">
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
                   <el-option
205
                   <el-option
206
                           v-for="(item,index) in userList"
206
                           v-for="(item,index) in userList"
207
                           :key="index"
207
                           :key="index"
210
                   </el-option>
210
                   </el-option>
211
               </el-select>
211
               </el-select>
212
              </el-form-item>
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
             <el-form-item label="批准文号:" >
226
             <el-form-item label="批准文号:" >
215
               <el-input v-model="form.number" style="width:180px"></el-input>
227
               <el-input v-model="form.number" style="width:180px"></el-input>
216
             </el-form-item>
228
             </el-form-item>
217
 
229
 
230
+   
231
+
218
 
232
 
219
             <el-form-item label="备注 : " prop="name" style="width:100%;">
233
             <el-form-item label="备注 : " prop="name" style="width:100%;">
220
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
234
               <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
388
           register_number:"",
402
           register_number:"",
389
           is_user:"2",
403
           is_user:"2",
390
           number:"",
404
           number:"",
405
+          is_warehouse:"1",
391
         },
406
         },
392
 
407
 
393
         rules: {
408
         rules: {
616
         form["register_number"] = this.form.register_number
631
         form["register_number"] = this.form.register_number
617
         form["is_user"] = this.form.is_user
632
         form["is_user"] = this.form.is_user
618
         form["number"] = this.form.number
633
         form["number"] = this.form.number
619
-
634
+        form["is_warehouse"] = this.form.is_warehouse
620
         return form
635
         return form
621
       }, changeSelected: function(val) {
636
       }, changeSelected: function(val) {
622
         console.log(val)
637
         console.log(val)
690
         }
705
         }
691
       },
706
       },
692
      changeDefaultCountUnit(val){
707
      changeDefaultCountUnit(val){
693
-       console.log("val2222",val)
708
+      
694
        this.form.default_count_unit = ''
709
        this.form.default_count_unit = ''
695
         this.form.default_count_unit = val
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
     watch: {
719
     watch: {

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

801
       for (let i = 0; i < arr.length; i++) {
801
       for (let i = 0; i < arr.length; i++) {
802
         total_count += arr[i].stock_count;
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
     calculate: function (val) {
812
     calculate: function (val) {

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

133
             </template>
133
             </template>
134
           </el-table-column>
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
           <el-table-column label="单位" align="center" width="120px">
148
           <el-table-column label="单位" align="center" width="120px">
137
             <template slot="header" slot-scope="scope">
149
             <template slot="header" slot-scope="scope">
138
               <span>单位<span style="color: red">*</span></span>
150
               <span>单位<span style="color: red">*</span></span>
677
       var min_str = "";
689
       var min_str = "";
678
       if (arr.length > 0) {
690
       if (arr.length > 0) {
679
         for (let i = 0; i < arr.length; i++) {
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
       if (total < min_number) {
695
       if (total < min_number) {
702
       for (let i = 0; i < arr.length; i++) {
714
       for (let i = 0; i < arr.length; i++) {
703
         total_count += arr[i].stock_count;
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
     calculate: function (val) {
724
     calculate: function (val) {
708
       if (isNaN(val)) {
725
       if (isNaN(val)) {
795
           var drugList = response.data.data.drugList;
812
           var drugList = response.data.data.drugList;
796
           var goodList = response.data.data.goodList;
813
           var goodList = response.data.data.goodList;
797
           for (let i = 0; i < orderInfo.length; i++) {
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
             orderInfo[i].id = orderInfo[i].id;
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
             orderInfo[i].count = orderInfo[i].count
828
             orderInfo[i].count = orderInfo[i].count
801
             orderInfo[i].supply_price = orderInfo[i].price;
829
             orderInfo[i].supply_price = orderInfo[i].price;
802
             orderInfo[i].supply_remake = orderInfo[i].remark;
830
             orderInfo[i].supply_remake = orderInfo[i].remark;
1015
      }
1043
      }
1016
      checkReturnOrder(params).then(response=>{
1044
      checkReturnOrder(params).then(response=>{
1017
        if(response.data.state == 1){
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
         var msg = response.data.data.msg
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
       for (let i = 0; i < arr.length; i++) {
849
       for (let i = 0; i < arr.length; i++) {
850
         total_count += arr[i].stock_count;
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
     calculate: function (val) {
859
     calculate: function (val) {
855
       if (isNaN(val)) {
860
       if (isNaN(val)) {

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

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
+            :disabled ="disabled"
21
           >
22
           >
22
             <el-option
23
             <el-option
23
               v-for="item in supplyList"
24
               v-for="item in supplyList"
145
             </template>
146
             </template>
146
           </el-table-column>
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
           <el-table-column label="单位" align="center" width="120px">
161
           <el-table-column label="单位" align="center" width="120px">
149
             <template slot="header" slot-scope="scope">
162
             <template slot="header" slot-scope="scope">
150
               <span>单位<span style="color: red">*</span></span>
163
               <span>单位<span style="color: red">*</span></span>
333
       </el-form>
346
       </el-form>
334
       <div style="margin-top: 10px">
347
       <div style="margin-top: 10px">
335
         <el-input
348
         <el-input
349
+         :disabled ="disabled"
336
           type="textarea"
350
           type="textarea"
337
           :rows="2"
351
           :rows="2"
338
           placeholder="备注信息"
352
           placeholder="备注信息"
355
             v-model="rate_of_concession"
369
             v-model="rate_of_concession"
356
             @input="addressChange"
370
             @input="addressChange"
357
             placeholder="请输入优惠率"
371
             placeholder="请输入优惠率"
372
+            :disabled ="disabled"
358
           ></el-input
373
           ></el-input
359
           >%</span
374
           >%</span
360
         >
375
         >
365
             v-model="discount_amount"
380
             v-model="discount_amount"
366
             @input="count_discount"
381
             @input="count_discount"
367
             placeholder="请输入优惠金额"
382
             placeholder="请输入优惠金额"
383
+            :disabled ="disabled"
368
           ></el-input
384
           ></el-input
369
         ></span>
385
         ></span>
370
 
386
 
374
             v-model="payment"
390
             v-model="payment"
375
             @input="count_payment"
391
             @input="count_payment"
376
             placeholder="请输入本次退款"
392
             placeholder="请输入本次退款"
393
+            :disabled ="disabled"
377
           ></el-input
394
           ></el-input
378
         ></span>
395
         ></span>
379
 
396
 
383
             v-model="arrearage"
400
             v-model="arrearage"
384
             @input="count_arrearage"
401
             @input="count_arrearage"
385
             placeholder="请输入本次欠款"
402
             placeholder="请输入本次欠款"
403
+            :disabled ="disabled"
386
           ></el-input
404
           ></el-input
387
         ></span>
405
         ></span>
388
       </div>
406
       </div>
717
       var min_str = "";
735
       var min_str = "";
718
       if (arr.length > 0) {
736
       if (arr.length > 0) {
719
         for (let i = 0; i < arr.length; i++) {
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
       if (total < min_number) {
741
       if (total < min_number) {
742
       for (let i = 0; i < arr.length; i++) {
760
       for (let i = 0; i < arr.length; i++) {
743
         total_count += arr[i].stock_count;
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
     calculate: function (val) {
770
     calculate: function (val) {
748
       if (isNaN(val)) {
771
       if (isNaN(val)) {
873
           this.discount_amount = out.discount_amount;
896
           this.discount_amount = out.discount_amount;
874
           this.payment = out.payment;
897
           this.payment = out.payment;
875
           this.arrearage = out.arrearage;
898
           this.arrearage = out.arrearage;
899
+          this.return_remark = out.return_remark
876
           this.start_time = this.getTimes(out.document_date);
900
           this.start_time = this.getTimes(out.document_date);
877
           var orderInfo = response.data.data.orderCancelDetail;
901
           var orderInfo = response.data.data.orderCancelDetail;
878
           if (out.is_check == 1) {
902
           if (out.is_check == 1) {
879
             this.disabled = true;
903
             this.disabled = true;
904
+            this.Reviewed = true
880
           }
905
           }
881
           console.log("退库单详情", orderInfo);
906
           console.log("退库单详情", orderInfo);
882
           var drugList = response.data.data.drugList;
907
           var drugList = response.data.data.drugList;

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

715
       for (let i = 0; i < arr.length; i++) {
715
       for (let i = 0; i < arr.length; i++) {
716
         total_count += arr[i].stock_count;
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
     calculate: function (val) {
725
     calculate: function (val) {
721
       if (isNaN(val)) {
726
       if (isNaN(val)) {

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

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

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

113
           <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)}}</span> 
113
           <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)}}</span> 
114
          </template>
114
          </template>
115
        </el-table-column>
115
        </el-table-column>
116
-        <!-- <el-table-column label="已退款" align="center" width="200">
116
+        <el-table-column label="已退款" align="center" width="200">
117
          <template slot-scope="scope">
117
          <template slot-scope="scope">
118
-         
118
+           <span v-if="scope.row.payment > 0">{{scope.row.payment}}</span> 
119
          </template>
119
          </template>
120
-       </el-table-column> -->
120
+       </el-table-column>
121
        <el-table-column label="数量" align="center" width="200">
121
        <el-table-column label="数量" align="center" width="200">
122
          <template slot-scope="scope">
122
          <template slot-scope="scope">
123
            {{getCount(scope.row.cancelOrder)}}
123
            {{getCount(scope.row.cancelOrder)}}
306
        var buy_price = 0
306
        var buy_price = 0
307
        if(arr!=undefined && arr.length > 0){
307
        if(arr!=undefined && arr.length > 0){
308
           for(let i=0;i<arr.length;i++){
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
        var buy_price = 0
317
        var buy_price = 0
318
        if(arr!=undefined && arr.length > 0){
318
        if(arr!=undefined && arr.length > 0){
319
           for(let i=0;i<arr.length;i++){
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
        return (buy_price-discount_amount).toFixed(2)
323
        return (buy_price-discount_amount).toFixed(2)
325
      },
324
      },
326
      getAllCount(arr){
325
      getAllCount(arr){
327
        var count = ""
326
        var count = ""
328
         if(arr!=undefined && arr.length > 0){
327
         if(arr!=undefined && arr.length > 0){
329
           for(let i=0;i<arr.length;i++){
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
        return count
332
        return count
354
             if (response.data.state == 1) {
353
             if (response.data.state == 1) {
355
                 var msg = response.data.data.msg
354
                 var msg = response.data.data.msg
356
                 this.tableList.splice(index, 1);
355
                 this.tableList.splice(index, 1);
356
+                this.getlist()
357
                 this.$message.success("删除成功")
357
                 this.$message.success("删除成功")
358
             } else {
358
             } else {
359
                 this.$message.error("删除失败")
359
                 this.$message.error("删除失败")
363
        }) 
363
        }) 
364
      },
364
      },
365
      getCount(val){
365
      getCount(val){
366
+       console.log("val323223322323",val)
366
        var total = 0
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
   created() {
380
   created() {
381
     var nowYear = now.getFullYear(); //当前年 
383
     var nowYear = now.getFullYear(); //当前年 
382
     //本月的开始时间
384
     //本月的开始时间
383
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
385
     var monthStartDate = new Date(nowYear, nowMonth, 1); 
384
-    this.start_time = monthStartDate
386
+    this.start_time = this.getTimes(monthStartDate) 
385
     this.end_time = this.getTimes(new Date());
387
     this.end_time = this.getTimes(new Date());
386
     this.org_id =  this.$store.getters.xt_user.org_id
388
     this.org_id =  this.$store.getters.xt_user.org_id
387
     this.getAllSupply()
389
     this.getAllSupply()

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

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