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

药品bug

parent 5d581f8a
...@@ -77,25 +77,4 @@ export function drugOut(data) { ...@@ -77,25 +77,4 @@ export function drugOut(data) {
data: data data: data
}) })
} }
// 药品导入下载模板
// export function upload(query) {
// return request({
// url: '/finance/common/download/template',
// method: 'get',
// params: query
// })
// }
export function uploadName(query) {
return request({
url: '/finance/common/getTemplate',
method: 'get',
params: query
})
}
// export function addMin(data) {
// return request({
// url: '/business/common//uploadMinioPublic',
// method: 'post',
// data: data
// })
// }
...@@ -315,6 +315,79 @@ ...@@ -315,6 +315,79 @@
>药品信息 >药品信息
</div> </div>
</div> </div>
<el-row gutter="41" class="input-bottom-style">
<el-col :span="8">
<el-form-item label="当前库存">
<span :class="{ 'test': currentQtyClass }">
<div style="display: flex;align-items: center;">
<el-input v-model.trim="form.currentQty" class="picker-style-unit" disabled />
<span class="unit-text-price" style="margin-left: 0.625rem">{{ form.stockUnit }}</span>
</div></span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="安全库存">
<el-input v-model.trim="form.safeQty" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="货位">
<el-input v-model.trim="form.location" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row gutter="41" class="input-bottom-style">
<el-col :span="8">
<el-form-item label="药品名称">
<el-input v-model.trim="form.name" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批准文号">
<el-input v-model.trim="form.approvalNum" placeholder="-" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="条码">
<el-input v-model.trim="form.barCode" placeholder="-" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row gutter="41" class="input-bottom-style">
<el-col :span="8">
<el-form-item label="处方药">
<el-select
v-model="form.prescription"
class="picker-style"
placeholder="-"
disabled
>
<el-option
v-for="(item,index) in prescriptionList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态">
<el-select
v-model="form.status"
class="picker-style"
disabled
>
<el-option
v-for="(item,index) in drugStatus"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div style="margin-left: 1rem !important;"> <div style="margin-left: 1rem !important;">
<el-row gutter="41" class="input-bottom-style"> <el-row gutter="41" class="input-bottom-style">
<el-col :span="8"> <el-col :span="8">
...@@ -1045,7 +1118,7 @@ export default { ...@@ -1045,7 +1118,7 @@ export default {
/*选择框(带单位)样式*/ /*选择框(带单位)样式*/
.picker-style-unit { .picker-style-unit {
width: 1000% !important; width: 700% !important;
} }
/*基本信息整体表单布局*/ /*基本信息整体表单布局*/
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
<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="规格" prop=""> <el-form-item label="规格" prop="">
<span v-if="form.normsNum !=0 &&form.normsUnit!=''&&form.stockUnit"> <span v-if="parseStrEmpty(form.normsNum)!=''&& form.normsNum !=0 &&form.normsUnit!=''&&form.stockUnit">
<el-input :value="form.normsNum +form.normsUnit+'/'+ form.stockUnit" placeholder="-" disabled /> <el-input :value="form.normsNum +form.normsUnit+'/'+ form.stockUnit" placeholder="-" disabled />
<!-- {{ form.normsNum +form.normsUnit+"/"+ form.stockUnit }}--> <!-- {{ form.normsNum +form.normsUnit+"/"+ form.stockUnit }}-->
</span> </span>
...@@ -365,6 +365,7 @@ ...@@ -365,6 +365,7 @@
append-to-body append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
@close="close"
> >
<el-form ref="InStoreForm" :model="form" label-width="5.5rem"> <el-form ref="InStoreForm" :model="form" label-width="5.5rem">
<!-- 1-- 药品信息--标签头 --> <!-- 1-- 药品信息--标签头 -->
...@@ -527,6 +528,7 @@ ...@@ -527,6 +528,7 @@
import { deepClone } from '@/utils' import { deepClone } from '@/utils'
import { addDrug } from '../../../api/financial/drug' import { addDrug } from '../../../api/financial/drug'
import backBtn from '@/components/BackBtn/index.vue' import backBtn from '@/components/BackBtn/index.vue'
import { parseStrEmpty } from '@/utils/ruoyi'
export default { export default {
name: 'EquipmentAdd', name: 'EquipmentAdd',
...@@ -791,6 +793,7 @@ export default { ...@@ -791,6 +793,7 @@ export default {
created() { created() {
}, },
methods: { methods: {
parseStrEmpty,
// 单位时段服务数不可以输入小数 // 单位时段服务数不可以输入小数
handleuseNum() { handleuseNum() {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="base-message-module"> <div class="base-message-module">
<!-- 1--> <!-- 1-->
<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="药品名称" prop="name"> <el-form-item label="药品名称" prop="name">
<el-input v-model.trim="form.name" placeholder="请输入药品名称" maxlength="30" /> <el-input v-model.trim="form.name" placeholder="请输入药品名称" maxlength="30" />
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<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="规格" prop=""> <el-form-item label="规格" prop="">
<span v-if="form.normsNum !=0 &&form.normsUnit!=''&&form.stockUnit"> <span v-if="parseStrEmpty(form.normsNum)!=''&& form.normsNum !=0 &&form.normsUnit!=''&&form.stockUnit">
<el-input :value="form.normsNum +form.normsUnit+'/'+ form.stockUnit" placeholder="-" disabled /> <el-input :value="form.normsNum +form.normsUnit+'/'+ form.stockUnit" placeholder="-" disabled />
<!-- {{ form.normsNum +form.normsUnit+"/"+ form.stockUnit }}--> <!-- {{ form.normsNum +form.normsUnit+"/"+ form.stockUnit }}-->
</span> </span>
...@@ -707,22 +707,23 @@ ...@@ -707,22 +707,23 @@
{{ scope.row.batchNumber ||'-' }} {{ scope.row.batchNumber ||'-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="100" label="货单" align="left"> <template slot-scope="scope"> <!-- <el-table-column min-width="100" label="货单" align="left"> <template slot-scope="scope">-->
<span <!-- <span-->
v-if="scope.row.type === '0'" <!-- v-if="scope.row.type === '0'"-->
style=" color: #5FB54B;" <!-- style=" color: #5FB54B;"-->
>{{ "打印出库单" }}</span> <!-- >{{ "打印出库单" }}</span>-->
<span <!-- <span-->
v-else-if="scope.row.type === '1'" <!-- v-else-if="scope.row.type === '1'"-->
style=" color: #5FB54B;" <!-- style=" color: #5FB54B;"-->
>{{ "打印入库单" }}</span> <!-- >{{ "打印入库单" }}</span>-->
</template></el-table-column> <!-- </template></el-table-column>-->
</el-table> </el-table>
</div> </div>
<pagination <pagination
v-show="openTotal>=10" v-show="openTotal>10"
:total="openTotal" :total="openTotal"
:page-sizes="[10, 20, 50]"
:page.sync="query.pageNum" :page.sync="query.pageNum"
:limit.sync="query.pageSize" :limit.sync="query.pageSize"
@pagination="getDrugInventoryList" @pagination="getDrugInventoryList"
...@@ -737,8 +738,8 @@ ...@@ -737,8 +738,8 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<el-dialog title="入库" :visible.sync="isShow" width="60%" append-to-body :close-on-click-modal="false" :close-on-press-escape="false"> <el-dialog title="入库" :visible.sync="isShow" width="60%" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" @close="close">
<el-form ref="form" :model="form" label-width="4.9rem"> <el-form ref="form" :model="form" label-width="5.5rem">
<!-- 1-- 药品信息--标签头 --> <!-- 1-- 药品信息--标签头 -->
<div class="tip-green-drug-all"> <div class="tip-green-drug-all">
<div class="tip-green-drug" /> <div class="tip-green-drug" />
...@@ -747,6 +748,78 @@ ...@@ -747,6 +748,78 @@
>药品信息 >药品信息
</div> </div>
</div> </div>
<el-row :gutter="41" class="input-bottom-style">
<el-col :span="8">
<el-form-item label="当前库存">
<span :class="{ 'test': currentQtyClass }">
<el-input v-model.trim="form.currentQty" placeholder="-" disabled />
</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="安全库存">
<el-input v-model.trim="form.safeQty" placeholder="-" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="货位">
<el-input v-model.trim="form.location" placeholder="-" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="41" class="input-bottom-style">
<el-col :span="8">
<el-form-item label="药品名称">
<el-input v-model.trim="form.name" placeholder="-" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批准文号">
<el-input v-model.trim="form.approvalNum" placeholder="-" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="条码">
<el-input v-model.trim="form.barCode" placeholder="-" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="41" class="input-bottom-style">
<el-col :span="8">
<el-form-item label="规格">
<el-input v-model.trim="form.barCode" placeholder="-" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="处方药">
<el-select
v-model="form.prescription"
class="picker-style"
placeholder="-"
disabled
>
<el-option
v-for="(item,index) in prescriptionList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态">
<el-select v-model="form.status" class="picker-style" disabled>
<el-option
v-for="(item,index) in statusList"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<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">
...@@ -887,7 +960,7 @@ ...@@ -887,7 +960,7 @@
import { deepClone } from '@/utils' import { deepClone } from '@/utils'
import { addQty, getDrug, getDrugInventory, updateDrug } from '../../../api/financial/drug' import { addQty, getDrug, getDrugInventory, updateDrug } from '../../../api/financial/drug'
import { parseTime } from '../../../utils/ruoyi' import { parseStrEmpty, parseTime } from '../../../utils/ruoyi'
import { moneyFormat } from '../../../utils' import { moneyFormat } from '../../../utils'
import backBtn from '@/components/BackBtn/index.vue' import backBtn from '@/components/BackBtn/index.vue'
...@@ -923,6 +996,7 @@ export default { ...@@ -923,6 +996,7 @@ export default {
disabledOrder: false, disabledOrder: false,
// 是否医院自有药品 // 是否医院自有药品
loading: false, loading: false,
currentQtyClass: false,
option: [ option: [
{ {
value: '0', value: '0',
...@@ -1149,6 +1223,7 @@ export default { ...@@ -1149,6 +1223,7 @@ export default {
this.getDrugInventoryList() this.getDrugInventoryList()
}, },
methods: { methods: {
parseStrEmpty,
// 显示数字后两位 // 显示数字后两位
fun(val) { fun(val) {
return Number(val).toFixed(2) return Number(val).toFixed(2)
...@@ -1227,6 +1302,10 @@ export default { ...@@ -1227,6 +1302,10 @@ export default {
console.log() console.log()
this.form.buyingPrice = moneyFormat(this.form.buyingPrice) this.form.buyingPrice = moneyFormat(this.form.buyingPrice)
this.form.sellingPrice = moneyFormat(this.form.sellingPrice) this.form.sellingPrice = moneyFormat(this.form.sellingPrice)
if (this.form.currentQty < this.form.safeQty) {
console.log('为真了')
this.currentQtyClass = true
}
console.log('res', res) console.log('res', res)
console.log('this.form.sellingPrice', this.form.sellingPrice) console.log('this.form.sellingPrice', this.form.sellingPrice)
console.log(' this.form.buyingPrice', this.form.buyingPrice) console.log(' this.form.buyingPrice', this.form.buyingPrice)
...@@ -1285,6 +1364,7 @@ export default { ...@@ -1285,6 +1364,7 @@ export default {
this.$modal.msgSuccess('新增成功') this.$modal.msgSuccess('新增成功')
this.close() this.close()
this.getDrugInventoryList() this.getDrugInventoryList()
this.getDetail()
}) })
} }
}) })
...@@ -1400,7 +1480,7 @@ export default { ...@@ -1400,7 +1480,7 @@ export default {
width: 90% !important; width: 90% !important;
} }
.picker-style1 { .picker-style1 {
width: 80% !important; width: 70% !important;
} }
/*基本信息整体表单布局*/ /*基本信息整体表单布局*/
.base-message-module { .base-message-module {
...@@ -1433,5 +1513,10 @@ export default { ...@@ -1433,5 +1513,10 @@ export default {
margin-left: 3rem!important; margin-left: 3rem!important;
margin-right: 3rem!important; margin-right: 3rem!important;
} }
.test {
::v-deep.el-input.is-disabled .el-input__inner {
color: #DB4747;
}
}
</style> </style>
...@@ -315,18 +315,18 @@ ...@@ -315,18 +315,18 @@
{{ scope.row.batchNumber ||'-' }} {{ scope.row.batchNumber ||'-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="80" label="货单" align="left"> <!-- <el-table-column min-width="80" label="货单" align="left">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span <!-- <span-->
v-if="scope.row.type === '0'" <!-- v-if="scope.row.type === '0'"-->
style=" color: #5FB54B;" <!-- style=" color: #5FB54B;"-->
>{{ "打印出库单" }}</span> <!-- >{{ "打印出库单" }}</span>-->
<span <!-- <span-->
v-else-if="scope.row.type === '1'" <!-- v-else-if="scope.row.type === '1'"-->
style=" color: #5FB54B;" <!-- style=" color: #5FB54B;"-->
>{{ "打印入库单" }}</span> <!-- >{{ "打印入库单" }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
<script> <script>
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import { getDrugInventory, listDrug, uploadName } from '../../../api/financial/drug' import { getDrugInventory, listDrug } from '../../../api/financial/drug'
import { getToken } from '../../../utils/auth' import { getToken } from '../../../utils/auth'
import { parseStrEmpty } from '../../../utils/ruoyi' import { parseStrEmpty } from '../../../utils/ruoyi'
...@@ -743,14 +743,14 @@ export default { ...@@ -743,14 +743,14 @@ export default {
handleUploadError() { handleUploadError() {
this.$modal.msgError('上传文件失败,请重试') this.$modal.msgError('上传文件失败,请重试')
}, },
getTemplateInfo() { // getTemplateInfo() {
const query = { // const query = {
fileName: '药品库存.xlsx' // fileName: '药品库存.xlsx'
} // }
uploadName(query).then(response => { // uploadName(query).then(response => {
console.log('response名字', response) // console.log('response名字', response)
}) // })
}, // },
// 选择全部 // 选择全部
checkAll() { checkAll() {
......
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