Browse Source

fix:[资源库管理][试剂管理]权限

master
HanLong 2 days ago
parent
commit
f3815a84fb
10 changed files with 149 additions and 128 deletions
  1. +4
    -4
      src/api/business/sj/sj.js
  2. +9
    -0
      src/api/business/yq/yq.js
  3. +48
    -51
      src/lang/en/business/resource/sj.js
  4. +10
    -9
      src/lang/en/business/resource/yq.js
  5. +1
    -3
      src/lang/zh/business/resource/sj.js
  6. +2
    -1
      src/lang/zh/business/resource/yq.js
  7. +2
    -2
      src/views/business/resource/sj/comps/Bj.vue
  8. +22
    -22
      src/views/business/resource/sj/list.vue
  9. +49
    -34
      src/views/business/resource/yq/list.vue
  10. +2
    -2
      vue.config.js

+ 4
- 4
src/api/business/sj/sj.js View File

@ -1,6 +1,6 @@
import request from '@/utils/request'
// 查询试剂库存列表
// 查询试剂列表
export function sj_list(query) {
return request({
url: '/system/business/sj/list',
@ -27,10 +27,10 @@ export function sj_info(query) {
})
}
// 保存试剂
export function sj_save(data) {
// 试剂编辑
export function sj_bj(data) {
return request({
url: '/system/business/sj/save',
url: '/system/business/sj/bj',
method: 'post',
data: data
})

+ 9
- 0
src/api/business/yq/yq.js View File

@ -27,6 +27,15 @@ export function yq_save(data) {
})
}
// 编辑仪器管理
export function yq_update(data) {
return request({
url: '/system/business/yq/update',
method: 'post',
data: data
})
}
export function yqJcgj_list(query) {
return request({
url: '/system/business/yq/jcgj/list',

+ 48
- 51
src/lang/en/business/resource/sj.js View File

@ -1,60 +1,57 @@
export default {
sdts: '请确认是否锁定以下麻精药',
gdts: '请确认是否归档以下麻精药',
mc: '名称',
bh: '编号',
ssbm: '所属部门',
gxsjk: '更新试剂库',
jyzt: '借阅状态',
zjzt: '制剂状态',
sxrq: '失效日期',
nd: '浓度/含量/纯度',
kcl: '库存量',
gg: '规格',
ly: '来源',
sssy: '所属试验',
ph: '批号',
yxzq: '有效周期',
mc: 'Name',
bh: 'ID',
ssbm: 'Department',
gxsjk: 'Refresh',
jyzt: 'Check-out',
zjzt: 'Form',
sxrq: 'Expiration',
nd: 'Concentration/Purity',
kcl: 'Inventory',
gg: 'Specification',
ly: 'Source',
sssy: 'Study',
ph: 'Batch Num',
yxzq: 'Validity Period',
zcgMc: '暂存柜',
cctj: '存储条件',
ccwz: '存储位置',
sxr: '失效日',
pzrq: '配置日期',
plcz: '批量处置',
plsd: '批量锁定',
plgd: '批量归档',
cctj: 'Storage Condition',
ccwz: 'Storage Location',
sxr: 'Expiration',
pzrq: 'Formulation Date',
plcz: 'Batch Dispose',
plsd: 'Batch Dispose',
plgd: 'Batch Dispose',
cz: '处置',
sjczfs: '试剂处置方式',
czl: '处置量',
yuanyin: '原因',
lock: '锁定',
unlock: '解锁',
detail: '详情',
guidang: '归档',
jiedang: '解档',
jieyue: '借阅',
guihuan: '归还',
fafang: '发放',
ysff: '钥匙发放',
czrq: '处置容器',
czyj: '处置药剂',
xgkc: '修改库存',
shxgkc: '审核修改库存',
shbj: '审核编辑',
cz: 'Dispose',
sjczfs: 'Dispose Method',
czl: 'Amount',
yuanyin: 'Reason',
lock: 'Lock',
unlock: 'Unlock',
detail: 'Enter',
guidang: 'Archived',
jiedang: 'De-archive',
jieyue: 'Check out',
guihuan: 'Return',
fafang: 'Distribute',
ysff: 'Key',
xgkc: 'Change Inventory',
shxgkc: 'Approve Inventory Change',
shbj: 'Approve Edit',
ssbd: '所属表单',
bdsssy: '表单所属试验',
bdssr: '表单所属人',
bdssbm: '表单所属部门',
ssbd: 'In Record',
bdsssy: 'In Study',
bdssr: 'By User',
bdssbm: 'Department',
tz: '试剂台账',
tz: '试剂台账',
qmr: '签名人',
czlx: '操作类型',
czl: '操作量',
bz: '备注/原因',
czsj: '操作时间',
tz: 'Reagent Table',
qmr: 'Signed By',
czlx: 'Action',
czl: 'Amount',
bz: 'Comment/Reason',
czsj: 'Datetime',
jcgj: '稽查轨迹',
jcgj: 'Track Record',
}

+ 10
- 9
src/lang/en/business/resource/yq.js View File

@ -1,10 +1,11 @@
export default {
yqbh: '仪器编号',
yqmc: '仪器名称',
xcjzrq: '下次校准日期',
ssbm: '所属部门',
yqxh: '仪器型号',
yqly: '仪器来源'
}
refresh: 'Refresh',
add: 'Add',
yqbh: 'ID',
yqmc: 'Name',
xcjzrq: 'Next Calibration',
ssbm: 'Department',
yqxh: 'Type',
yqly: 'Source',
wc: 'Compartment'
}

+ 1
- 3
src/lang/zh/business/resource/sj.js View File

@ -19,7 +19,7 @@ export default {
cctj: '存储条件',
ccwz: '存储位置',
sxr: '失效日',
pzrq: '配日期',
pzrq: '配日期',
plcz: '批量处置',
plsd: '批量锁定',
plgd: '批量归档',
@ -38,8 +38,6 @@ export default {
guihuan: '归还',
fafang: '发放',
ysff: '钥匙发放',
czrq: '处置容器',
czyj: '处置药剂',
xgkc: '修改库存',
shxgkc: '审核修改库存',
shbj: '审核编辑',

+ 2
- 1
src/lang/zh/business/resource/yq.js View File

@ -1,5 +1,6 @@
export default {
refresh: '更新仪器库',
add: '新增',
yqbh: '仪器编号',
yqmc: '仪器名称',
xcjzrq: '下次校准日期',

+ 2
- 2
src/views/business/resource/sj/comps/Bj.vue View File

@ -94,7 +94,7 @@
</template>
<script>
import { sj_save } from "@/api/business/sj/sj"
import { sj_bj } from "@/api/business/sj/sj"
import { mapGetters } from 'vuex'
import SelectList from "./SelectList";
import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
@ -160,7 +160,7 @@ export default {
save() {
this.$refs["form"].validate(valid => {
if (valid) {
sj_save(this.form).then(response => {
sj_bj(this.form).then(response => {
this.open = false
this.$emit('callback')
})

+ 22
- 22
src/views/business/resource/sj/list.vue View File

@ -56,26 +56,26 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- 更新试剂库 -->
<el-button type="primary" v-hasPermi="['business:resource:mjy:ff']">{{
<el-button type="primary" v-hasPermi="['business:resource:sj:gxsjk']">{{
$t('page.business.resource.sj.gxsjk') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量处置 -->
<el-button type="primary" :disabled="multiple" @click="handlePlcz"
v-hasPermi="['business:resource:mjy:czyj']">{{
v-hasPermi="['business:resource:sj:cz']">{{
$t('page.business.resource.sj.plcz') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量锁定 -->
<el-button type="primary" :disabled="multiple" @click="handlePlsd"
v-hasPermi="['business:resource:mjy:sd']">{{
$t('page.business.resource.mjy.plsd') }}</el-button>
v-hasPermi="['business:resource:sj:sd']">{{
$t('page.business.resource.sj.plsd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量归档 -->
<el-button type="primary" :disabled="multiple" @click="handlePlgd"
v-hasPermi="['business:resource:mjy:gd']">{{
$t('page.business.resource.mjy.plgd') }}</el-button>
v-hasPermi="['business:resource:sj:gd']">{{
$t('page.business.resource.sj.plgd') }}</el-button>
</el-col>
</el-row>
@ -106,7 +106,7 @@
<el-table-column :label="$t('page.business.resource.mjy.cctj')" align="center" prop="cctj" width="130px" />
<el-table-column :label="$t('page.business.resource.mjy.ccwz')" align="center" prop="ccwz" width="130px" />
<el-table-column :label="$t('page.business.resource.mjy.zjzt')" align="center" width="150px" fixed="right">
<el-table-column :label="$t('page.business.resource.mjy.zjzt')" align="center" width="150px" fixed="right">
<template slot-scope="scope">
<span v-if="scope.row.zjzt == 1">{{ $t('page.business.resource.resource.zjzt.rk') }}</span>
<span v-if="scope.row.zjzt == 3">{{ $t('page.business.resource.resource.zjzt.yff') }}</span>
@ -116,7 +116,7 @@
<span v-if="scope.row.zjzt == 11">{{ $t('page.business.resource.resource.zjzt.djd') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.jyzt')" align="center" width="150px" fixed="right">
<el-table-column :label="$t('page.business.resource.mjy.jyzt')" align="center" width="150px" fixed="right">
<template slot-scope="scope">
<span v-if="scope.row.jyzt == 1">{{ $t('page.business.resource.resource.jyzt.wjy') }}</span>
<span v-if="scope.row.jyzt == 3">{{ $t('page.business.resource.resource.jyzt.djy') }}</span>
@ -129,39 +129,39 @@
<!-- 详情 -->
<template
v-if="scope.row.zjzt == 1 || scope.row.zjzt == 5 || (scope.row.zjzt == 9 && scope.row.jyzt == 5)">
<el-button type="text" @click="handleXq(scope.row)">{{
<el-button type="text" @click="handleXq(scope.row)" v-hasPermi="['business:resource:sj:xq']">{{
$t('page.business.resource.sj.detail') }}</el-button>
</template>
<!-- 处置 -->
<template v-if="scope.row.zjzt == 1">
<el-button type="text" @click="handleCz(scope.row)">{{
<el-button type="text" @click="handleCz(scope.row)" v-hasPermi="['business:resource:sj:cz']">{{
$t('page.business.resource.sj.cz') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 1">
<!-- 编辑 -->
<el-button type="text" @click="handleBj(scope.row)">{{
<el-button type="text" @click="handleBj(scope.row)" v-hasPermi="['business:resource:sj:bj']">{{
$t('form.edit') }}</el-button>
<!-- 修改库存 -->
<el-button type="text" @click="handleXgkc(scope.row)">{{
<el-button type="text" @click="handleXgkc(scope.row)" v-hasPermi="['business:resource:sj:xgkc']">{{
$t('page.business.resource.sj.xgkc') }}</el-button>
<!-- 锁定 -->
<el-button type="text" @click="handleSd(scope.row)">{{
<el-button type="text" @click="handleSd(scope.row)" v-hasPermi="['business:resource:sj:sd']">{{
$t('page.business.resource.sj.lock') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 5">
<!-- 解锁 -->
<el-button type="text" @click="handleJs(scope.row)">{{
<el-button type="text" @click="handleJs(scope.row)" v-hasPermi="['business:resource:sj:js']">{{
$t('page.business.resource.sj.unlock') }}</el-button>
<!-- 归档 -->
<el-button type="text" @click="handleGd(scope.row)">{{
<el-button type="text" @click="handleGd(scope.row)" v-hasPermi="['business:resource:sj:gd']">{{
$t('page.business.resource.sj.guidang') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 1">
<!-- 解档 -->
<el-button type="text" @click="handleJd(scope.row)">{{
<el-button type="text" @click="handleJd(scope.row)" v-hasPermi="['business:resource:sj:jd']">{{
$t('page.business.resource.sj.jiedang') }}</el-button>
<!-- 借阅 -->
<el-button type="text" @click="handleJy(scope.row)">{{
<el-button type="text" @click="handleJy(scope.row)" v-hasPermi="['business:resource:sj:jy']">{{
$t('page.business.resource.sj.jieyue') }}</el-button>
</template>
@ -274,13 +274,13 @@ export default {
},
//
handleXq(row) {
this.showDetail=true
this.$emit('showDetail',this.showDetail)
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
},
closeXq(){
this.showDetail=false
this.$emit('showDetail',this.showDetail)
closeXq() {
this.showDetail = false
this.$emit('showDetail', this.showDetail)
this.handleQuery()
},
//

+ 49
- 34
src/views/business/resource/yq/list.vue View File

@ -27,7 +27,10 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain @click="handleAdd">{{ $t('form.add') }}</el-button>
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:gxsjk']">{{
$t('page.business.resource.yq.refresh') }}</el-button>
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['business:resource:yq:xz']">{{
$t('page.business.resource.yq.add') }}</el-button>
</el-col>
</el-row>
@ -44,8 +47,10 @@
<el-table-column :label="$t('page.business.resource.yq.ssbm')" align="center" prop="bmMc" />
<el-table-column :label="$t('form.operate')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.row)">{{ $t('form.detail') }}</el-button>
<el-button type="text" @click="handleUpdate(scope.row)">{{ $t('form.edit') }}</el-button>
<el-button type="text" @click="handleDetail(scope.row)" v-hasPermi="['business:resource:yq:xq']">{{
$t('form.detail') }}</el-button>
<el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:resource:yq:bj']">{{
$t('form.edit') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -59,24 +64,24 @@
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.yq.yqmc')" prop="mc">
<el-input v-model="form.mc" :placeholder="$t('form.placeholderInput')" maxlength="50"/>
<el-input v-model="form.mc" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.yq.yqbh')" prop="bh">
<el-input v-model="form.bh" :placeholder="$t('form.placeholderInput')" maxlength="50"/>
<el-input v-model="form.bh" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.yq.yqxh')" prop="xh">
<el-input v-model="form.xh" :placeholder="$t('form.placeholderInput')" maxlength="50"/>
<el-input v-model="form.xh" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.yq.yqly')" prop="ly">
<el-input v-model="form.ly" :placeholder="$t('form.placeholderInput')" maxlength="50"/>
<el-input v-model="form.ly" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
@ -104,7 +109,8 @@
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')" maxlength="500" />
<el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')"
maxlength="500" />
</el-form-item>
</el-col>
</el-row>
@ -120,26 +126,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<el-input v-model="form.qmrmm" :placeholder="$t('form.placeholderInput')" type="password" maxlength="20"/>
<el-input v-model="form.qmrmm" :placeholder="$t('form.placeholderInput')" type="password"
maxlength="20" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('form.saveConfirm')}}</el-button>
<el-button @click="cancel">{{$t('form.cancel')}}</el-button>
<el-button type="primary" @click="submitForm">{{ $t('form.saveConfirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
<!-- 仪器详情 -->
<YqDetail ref="YqDetail" />
<YqDetail ref="YqDetail" />
</div>
</template>
<script>
import { yq_list, yq_info, yq_save, yqJcgj_list } from '@/api/business/yq/yq'
import { yq_list, yq_info, yq_save, yq_update } from '@/api/business/yq/yq'
import YqDetail from './comps/detail'
import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectDept from '@/views/business/comps/select/SelectDept';
@ -189,40 +196,40 @@ export default {
//
rules: {
mc: [
{ required: true, message: this.$t('page.business.resource.yq.yqmc')+ this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqmc')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' }
{ required: true, message: this.$t('page.business.resource.yq.yqmc') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqmc') + this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
bh: [
{ required: true, message: this.$t('page.business.resource.yq.yqbh')+ this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqbh')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' }
{ required: true, message: this.$t('page.business.resource.yq.yqbh') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqbh') + this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
xh: [
{ required: true, message: this.$t('page.business.resource.yq.yqxh')+ this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqxh')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' }
{ required: true, message: this.$t('page.business.resource.yq.yqxh') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqxh') + this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
ly: [
{ required: true, message: this.$t('page.business.resource.yq.yqly')+ this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqly')+ this.$t('form.lengthLimit') + '50', trigger: 'blur' }
{ required: true, message: this.$t('page.business.resource.yq.yqly') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('page.business.resource.yq.yqly') + this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
jzrq: [
{ required: true, message: this.$t('page.business.resource.yq.xcjzrq')+ this.$t('form.notEmpty'), trigger: "change" },
{ required: true, message: this.$t('page.business.resource.yq.xcjzrq') + this.$t('form.notEmpty'), trigger: "change" },
],
bmMc: [
{ required: true, message: this.$t('page.business.resource.yq.ssbm')+ this.$t('form.notEmpty'), trigger: "change" },
{ required: true, message: this.$t('page.business.resource.yq.ssbm') + this.$t('form.notEmpty'), trigger: "change" },
],
wc: [
{ required: true, message: this.$t('page.business.resource.yq.wc')+ this.$t('form.notEmpty'), trigger: "change" },
{ required: true, message: this.$t('page.business.resource.yq.wc') + this.$t('form.notEmpty'), trigger: "change" },
],
qmrmm: [
{ required: true, message: this.$t('form.signerPsw')+ this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 20, message: this.$t('form.signerPsw')+ this.$t('form.lengthLimit') + '20', trigger: 'blur' }
{ required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 20, message: this.$t('form.signerPsw') + this.$t('form.lengthLimit') + '20', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'nickName','name'
'nickName', 'name'
]),
},
created() {
@ -281,7 +288,7 @@ export default {
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
yq_info({id: id}).then((response) => {
yq_info({ id: id }).then((response) => {
this.form = response.data
this.form.qmyy = '编辑仪器'
this.open = true
@ -295,11 +302,19 @@ export default {
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
yq_save(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
if (this.form.id) {
yq_update(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
} else {
yq_save(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
}
}
})
},

+ 2
- 2
vue.config.js View File

@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`,
// target: `http://39.99.251.173:8080`,
// target: `http://localhost:8080`,
target: `http://39.99.251.173:8080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save