|
@@ -74,7 +74,7 @@
|
74
|
74
|
|
75
|
75
|
<el-table-column prop="name" label="盘点后数量" width="180" align="center">
|
76
|
76
|
<template slot-scope="scope">
|
77
|
|
- <el-input style="width:100px" v-model="scope.row.last_stock_max_number"></el-input>{{scope.row.max_unit}}
|
|
77
|
+ <el-input style="width:100px" v-model="scope.row.last_stock_max_number" @input="getSupplyCount(scope.row.warehousing_count,scope.row.max_unit,scope.row.last_stock_max_number,scope.row.max_unit,scope.row.last_stock_min_number,scope.row.min_unit,scope.row.XtBaseDrug.min_number,scope.row.XtBaseDrug.max_unit,scope.row.XtBaseDrug.min_unit)"></el-input>{{scope.row.max_unit}}
|
78
|
78
|
<span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:100px" v-model="scope.row.last_stock_min_number"></el-input>{{scope.row.min_unit}}</span>
|
79
|
79
|
</template>
|
80
|
80
|
</el-table-column>
|
|
@@ -193,6 +193,31 @@ export default {
|
193
|
193
|
}
|
194
|
194
|
},
|
195
|
195
|
methods:{
|
|
196
|
+ getSupplyCount(warehousing_count,max_unit,last_stock_max_number,max_unit_one,last_stock_min_number,min_unit_one,base_min_number,base_max_unit,base_min_unit){
|
|
197
|
+
|
|
198
|
+ var total_one = 0
|
|
199
|
+ var total_two =0
|
|
200
|
+
|
|
201
|
+ if(max_unit == base_max_unit && base_max_unit!=base_min_unit){
|
|
202
|
+ total_one = warehousing_count *base_min_number
|
|
203
|
+ }
|
|
204
|
+
|
|
205
|
+ if(max_unit == base_min_unit && base_max_unit!=base_min_unit){
|
|
206
|
+ total_one = warehousing_count
|
|
207
|
+ }
|
|
208
|
+ if(max_unit == base_min_unit && base_max_unit==base_min_unit){
|
|
209
|
+ total_one = warehousing_count
|
|
210
|
+ }
|
|
211
|
+
|
|
212
|
+ total_two = last_stock_max_number * base_min_number + last_stock_min_number
|
|
213
|
+
|
|
214
|
+ console.log("total_one",total_one)
|
|
215
|
+ console.log("total_two",total_two)
|
|
216
|
+ if(total_two > total_one){
|
|
217
|
+ this.$message.error("盘点后数量大于该批次入库数量!")
|
|
218
|
+ }
|
|
219
|
+
|
|
220
|
+ },
|
196
|
221
|
changeNumber(val){
|
197
|
222
|
this.form.warehouse_info_id = val
|
198
|
223
|
this.getDrugWarehouseInfoTotal(val)
|
|
@@ -830,7 +855,8 @@ export default {
|
830
|
855
|
this.tableData = list
|
831
|
856
|
}
|
832
|
857
|
})
|
833
|
|
- }
|
|
858
|
+ },
|
|
859
|
+
|
834
|
860
|
},
|
835
|
861
|
created(){
|
836
|
862
|
this.unitList = this.getDataConfig('hemodialysis','units')
|