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

药品bug

parent 3344307b
......@@ -492,7 +492,7 @@
<script>
import { parseStrEmpty, parseTime } from '@/utils/ruoyi'
import { parseTime } from '@/utils/ruoyi'
import { mapGetters } from 'vuex'
import { drugOut, getDrug, listDrugDelivery } from '../../../api/financial/drug'
import { deepClone, moneyFormat } from '@/utils'
......@@ -642,9 +642,14 @@ export default {
{ required: true, message: '请输入出库数量', trigger: 'blur' },
{ validator: (rules, value, callback) => {
console.log('value', value)
if (parseStrEmpty(this.form.number) === '') {
callback(new Error('请输入出库数量'))
} else if (this.form.number === 0) {
console.log('this.number', this.form.number)
// console.log(parseStrEmpty(this.form.number))
// if (parseStrEmpty(this.form.number) === '') {
// console.log('我在第一层')
// callback(new Error('请输入出库数量'))
// } else
if (this.form.number === 0) {
console.log('我在第二层')
callback(new Error('出库数量不能为0'))
} else if (this.form.number > 0) {
callback()
......@@ -742,7 +747,8 @@ export default {
const id = row.drugId
// 查询药品信息
getDrug(id).then(res => {
this.form = res.data
console.log('药品信息', res)
this.form = { number: 0, ...res.data }
if (this.form.currentQty < this.form.safeQty) {
console.log('为真了')
......@@ -1013,7 +1019,7 @@ export default {
},
// 关闭配药出库弹出层
closeWindow() {
this.$refs['form'].resetFields()
// this.$refs['form'].resetFields()
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