Commit d520a8e9 authored by 王飞龙's avatar 王飞龙

药品bug

parent f86e976a
...@@ -186,6 +186,7 @@ ...@@ -186,6 +186,7 @@
<el-table-column label="当前库存" align="left" prop="currentQty" show-overflow-tooltip> <el-table-column label="当前库存" align="left" prop="currentQty" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.currentQty }}</span> <span>{{ scope.row.currentQty }}</span>
<span style="margin-left: 5px">{{ scope.row.stockUnit }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="取药状态" align="left" prop="status"> <el-table-column label="取药状态" align="left" prop="status">
...@@ -271,7 +272,11 @@ ...@@ -271,7 +272,11 @@
{{ scope.row.sallNum + scope.row.sallUnit }} {{ scope.row.sallNum + scope.row.sallUnit }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="当前库存 " align="left" :min-width="50" prop="currentQty" /> <el-table-column label="当前库存 " align="left" :min-width="50" prop="currentQty">
<template slot-scope="scope">
{{ scope.row.currentQty + scope.row.stockUnit }}
</template>
</el-table-column>
<el-table-column label="货架" align="left" :min-width="50" prop="location" /> <el-table-column label="货架" align="left" :min-width="50" prop="location" />
<el-table-column label="出库数量" :min-width="100" align="left" prop=" number"> <el-table-column label="出库数量" :min-width="100" align="left" prop=" number">
<template #default="{row, $index}"> <template #default="{row, $index}">
...@@ -281,8 +286,6 @@ ...@@ -281,8 +286,6 @@
{ validator: (rule, value, callback) => { { validator: (rule, value, callback) => {
if (value === 0) { if (value === 0) {
callback(new Error('出库数量不能为0')) callback(new Error('出库数量不能为0'))
} else if (value > row.currentQty) {
callback(new Error('库存不足'))
} else { } else {
callback() callback()
}}, trigger: 'blur' }]" }}, trigger: 'blur' }]"
...@@ -341,14 +344,15 @@ ...@@ -341,14 +344,15 @@
<el-form-item label="当前库存"> <el-form-item label="当前库存">
<span :class="{ 'test': currentQtyClass }"> <span :class="{ 'test': currentQtyClass }">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<el-input v-model.trim="form.currentQty" disabled /> <el-input v-model.trim="form.currentQty" disabled class="picker-style-unit" />
<!-- <span class="unit-text-price" style="margin-left: 0.625rem">{{ form.stockUnit }}</span>--> <span style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</div></span> </div></span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="安全库存"> <el-form-item label="安全库存">
<el-input v-model.trim="form.safeQty" disabled /> <el-input v-model.trim="form.safeQty" disabled class="picker-style-unit" />
<span style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -487,7 +491,7 @@ ...@@ -487,7 +491,7 @@
<script> <script>
import { parseTime } from '@/utils/ruoyi' import { parseStrEmpty, 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'
...@@ -636,8 +640,9 @@ export default { ...@@ -636,8 +640,9 @@ export default {
number: [ number: [
{ required: true, message: '请输入出库数量', trigger: 'blur' }, { required: true, message: '请输入出库数量', trigger: 'blur' },
{ validator: (rules, value, callback) => { { validator: (rules, value, callback) => {
if (this.form.number > this.form.currentQty) { console.log('value', value)
callback(new Error('库存不足')) if (parseStrEmpty(this.form.number) === '') {
callback(new Error('请输入出库数量'))
} else if (this.form.number === 0) { } else if (this.form.number === 0) {
callback(new Error('出库数量不能为0')) callback(new Error('出库数量不能为0'))
} else if (this.form.number > 0) { } else if (this.form.number > 0) {
......
...@@ -333,6 +333,7 @@ ...@@ -333,6 +333,7 @@
:min="0" :min="0"
:max="99999.99" :max="99999.99"
:precision="2" :precision="2"
class="picker-style1"
@keydown.native="keydown($event)" @keydown.native="keydown($event)"
/> />
{{ form.smallSallNormsUnit }} {{ form.smallSallNormsUnit }}
...@@ -378,14 +379,16 @@ ...@@ -378,14 +379,16 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="当前库存"> <el-form-item label="当前库存">
<span class="test"> <span class="test">
<el-input v-model.trim="form.currentQty" placeholder="-" disabled /> <el-input v-model.trim="form.currentQty" placeholder="-" class="picker-style-unit" disabled />
<span style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</span> </span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="安全库存"> <el-form-item label="安全库存">
<el-input v-model.trim="form.safeQty" placeholder="-" disabled /> <el-input v-model.trim="form.safeQty" placeholder="-" class="picker-style-unit" disabled />
<span style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -444,7 +447,7 @@ ...@@ -444,7 +447,7 @@
</el-row> </el-row>
</el-form> </el-form>
<!-- 1-- 入库信息--标签头 --> <!-- 1-- 入库信息--标签头 -->
<div class="title-paragraph" style="margin-top: 8px"> <div class="title-paragraph" style="margin-top: 10px">
<span class="title-text">入库信息</span> <span class="title-text">入库信息</span>
</div> </div>
<el-form ref="addform" :model="form" :rules="dialogRules" label-width="5.5rem"> <el-form ref="addform" :model="form" :rules="dialogRules" label-width="5.5rem">
...@@ -959,7 +962,10 @@ export default { ...@@ -959,7 +962,10 @@ export default {
.picker-style { .picker-style {
width: 100% !important; width: 100% !important;
} }
/*选择框样式*/
.picker-style1 {
width: 80% !important;
}
/*基本信息整体表单布局*/ /*基本信息整体表单布局*/
.base-message-module { .base-message-module {
margin-left: -2.5rem !important; margin-left: -2.5rem !important;
...@@ -978,7 +984,9 @@ export default { ...@@ -978,7 +984,9 @@ export default {
.bottom-bth-style-thirty{ .bottom-bth-style-thirty{
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
.picker-style-unit{
width: 85% !important;
}
/*入库弹窗底部按钮样式*/ /*入库弹窗底部按钮样式*/
.dialog-footer-drug{ .dialog-footer-drug{
margin-right: 0.3rem; margin-right: 0.3rem;
......
...@@ -733,20 +733,23 @@ ...@@ -733,20 +733,23 @@
<el-form ref="form" :model="form" label-width="5.5rem"> <el-form ref="form" :model="form" label-width="5.5rem">
<!-- 1-- 药品信息--标签头 --> <!-- 1-- 药品信息--标签头 -->
<div class="title-paragraph"> <div class="title-paragraph">
<span class="title-text">基本信息</span> <span class="title-text">药品信息</span>
</div> </div>
<div style="margin-left: 1rem;"> <div style="margin-left: 1rem;">
<el-row :gutter="41" class="input-bottom-style"> <el-row :gutter="41" class="input-bottom-style">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="当前库存"> <el-form-item label="当前库存">
<span :class="{ 'test': currentQtyClass }"> <span :class="{ 'test': currentQtyClass }">
<el-input v-model.trim="form.currentQty" placeholder="-" disabled /> <el-input v-model.trim="form.currentQty" placeholder="-" class="picker-style-unit" disabled />
<span style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</span> </span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="安全库存"> <el-form-item label="安全库存">
<el-input v-model.trim="form.safeQty" placeholder="-" disabled /> <el-input v-model.trim="form.safeQty" placeholder="-" class="picker-style-unit" disabled />
<span style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -812,7 +815,7 @@ ...@@ -812,7 +815,7 @@
</el-form> </el-form>
<el-form ref="addForm" :model="addForm" :rules="addRules" label-width="4.9rem"> <el-form ref="addForm" :model="addForm" :rules="addRules" label-width="4.9rem">
<!-- 1-- 药品信息--标签头 --> <!-- 1-- 药品信息--标签头 -->
<div class="title-paragraph"> <div class="title-paragraph" style="margin-top: 10px">
<span class="title-text">入库信息</span> <span class="title-text">入库信息</span>
</div> </div>
<div style="margin-left: 1rem;"> <div style="margin-left: 1rem;">
...@@ -848,7 +851,7 @@ ...@@ -848,7 +851,7 @@
<el-date-picker <el-date-picker
v-model="addForm.periodValidityDate" v-model="addForm.periodValidityDate"
type="date" type="date"
class="picker-style-time" class="picker-style"
placeholder="请选择保质期" placeholder="请选择保质期"
value-format="yyyy/MM/dd" value-format="yyyy/MM/dd"
/> />
...@@ -1324,21 +1327,6 @@ export default { ...@@ -1324,21 +1327,6 @@ export default {
//right: 0; //right: 0;
//left: 0; //left: 0;
} }
.title-paragraph {
margin-bottom: 20px;
border-left: 5px solid #5FB54B;
.title-text {
margin-left: 10px;
}
.title {
color: #666666;
font-weight: 600;
font-size: 17px
}
}
.headerTitle { .headerTitle {
width: 100%; width: 100%;
...@@ -1408,8 +1396,13 @@ export default { ...@@ -1408,8 +1396,13 @@ export default {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
.dialogClass{ .dialogClass{
.title-paragraph { ::v-deep.el-dialog__body {
margin-top: 40px; padding: 1.875rem 1.25rem 1.25rem 1.25rem;
color: #606266;
font-size: 0.875rem;
word-break: break-all;
}
::v-deep.title-paragraph {
margin-bottom: 30px; margin-bottom: 30px;
border-left: 3px solid #5FB54B; border-left: 3px solid #5FB54B;
border-radius: 2px; border-radius: 2px;
...@@ -1417,18 +1410,13 @@ export default { ...@@ -1417,18 +1410,13 @@ export default {
.title-text { .title-text {
font-weight: bold; font-weight: bold;
margin-left: 10px; margin-left: 12px;
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
line-height: 24px; line-height: 24px;
} }
} }
::v-deep.el-dialog__body {
padding: 1.875rem 1.25rem 1.25rem 1.25rem;
color: #606266;
font-size: 0.875rem;
word-break: break-all;
}
} }
/*输入框下边距应为24*/ /*输入框下边距应为24*/
.input-bottom-style{ .input-bottom-style{
...@@ -1450,6 +1438,9 @@ export default { ...@@ -1450,6 +1438,9 @@ export default {
display: flex; display: flex;
justify-content: end; justify-content: end;
} }
.picker-style-unit{
width: 85% !important;
}
/*底部表格样式*/ /*底部表格样式*/
.ward-table-style{ .ward-table-style{
margin-left: 1rem!important; margin-left: 1rem!important;
......
...@@ -185,14 +185,14 @@ ...@@ -185,14 +185,14 @@
<span <span
v-if=" scope.row.currentQty <scope.row.safeQty" v-if=" scope.row.currentQty <scope.row.safeQty"
style="color: #DB4747 " style="color: #DB4747 "
>{{ scope.row.currentQty || "0" }}</span> >{{ scope.row.currentQty + scope.row.stockUnit || "0" }}</span>
<span v-else>{{ scope.row.currentQty || "0" }}</span> <span v-else>{{ scope.row.currentQty + scope.row.stockUnit || "0" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安全库存" align="left" prop="safeQty" show-overflow-tooltip> <el-table-column label="安全库存" align="left" prop="safeQty" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.safeQty || "-" }}</span> <span>{{ scope.row.safeQty+ scope.row.stockUnit || "-" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="left" prop="status"> <el-table-column label="状态" align="left" prop="status">
...@@ -256,16 +256,20 @@ ...@@ -256,16 +256,20 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="当前库存"> <el-form-item label="当前库存">
<span v-if="form.currentQty < form.safeQty" class="test"> <span v-if="form.currentQty < form.safeQty" class="test">
<el-input v-model.trim="form.currentQty" disabled /> <el-input v-model.trim="form.currentQty" class="number-style" disabled />
<span class="span-style">{{ form.stockUnit }}</span>
</span> </span>
<span v-else> <span v-else>
<el-input v-model.trim="form.currentQty" disabled /> <el-input v-model.trim="form.currentQty" class="number-style" disabled />
<span class="span-style">{{ form.stockUnit }}</span>
</span> </span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="安全库存"> <el-form-item label="安全库存">
<el-input v-model.trim="form.safeQty" disabled /> <el-input v-model.trim="form.safeQty" class="number-style" disabled />
<span class="span-style">{{ form.stockUnit }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -961,7 +965,12 @@ export default { ...@@ -961,7 +965,12 @@ export default {
.picker-style { .picker-style {
width: 100% !important; width: 100% !important;
} }
.number-style{
width: 85% !important;
}
.span-style{
margin-left: 10px;
}
/*基本信息整体表单布局*/ /*基本信息整体表单布局*/
.base-message-module { .base-message-module {
margin-left: -2.5rem !important; margin-left: -2.5rem !important;
......
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