Commit 959bc323 authored by 王飞龙's avatar 王飞龙

药品bug

parent 3344307b
...@@ -492,7 +492,7 @@ ...@@ -492,7 +492,7 @@
<script> <script>
import { parseStrEmpty, parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { drugOut, getDrug, listDrugDelivery } from '../../../api/financial/drug' import { drugOut, getDrug, listDrugDelivery } from '../../../api/financial/drug'
import { deepClone, moneyFormat } from '@/utils' import { deepClone, moneyFormat } from '@/utils'
...@@ -642,9 +642,14 @@ export default { ...@@ -642,9 +642,14 @@ export default {
{ required: true, message: '请输入出库数量', trigger: 'blur' }, { required: true, message: '请输入出库数量', trigger: 'blur' },
{ validator: (rules, value, callback) => { { validator: (rules, value, callback) => {
console.log('value', value) console.log('value', value)
if (parseStrEmpty(this.form.number) === '') { console.log('this.number', this.form.number)
callback(new Error('请输入出库数量')) // console.log(parseStrEmpty(this.form.number))
} else if (this.form.number === 0) { // if (parseStrEmpty(this.form.number) === '') {
// console.log('我在第一层')
// callback(new Error('请输入出库数量'))
// } else
if (this.form.number === 0) {
console.log('我在第二层')
callback(new Error('出库数量不能为0')) callback(new Error('出库数量不能为0'))
} else if (this.form.number > 0) { } else if (this.form.number > 0) {
callback() callback()
...@@ -742,7 +747,8 @@ export default { ...@@ -742,7 +747,8 @@ export default {
const id = row.drugId const id = row.drugId
// 查询药品信息 // 查询药品信息
getDrug(id).then(res => { getDrug(id).then(res => {
this.form = res.data console.log('药品信息', res)
this.form = { number: 0, ...res.data }
if (this.form.currentQty < this.form.safeQty) { if (this.form.currentQty < this.form.safeQty) {
console.log('为真了') console.log('为真了')
...@@ -1013,7 +1019,7 @@ export default { ...@@ -1013,7 +1019,7 @@ export default {
}, },
// 关闭配药出库弹出层 // 关闭配药出库弹出层
closeWindow() { closeWindow() {
this.$refs['form'].resetFields() // this.$refs['form'].resetFields()
this.isShowOne = false this.isShowOne = false
}, },
// 导出格式化 // 导出格式化
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment