diff --git a/src/api/reagent/management.js b/src/api/reagent/management.js index 34dce6c..6d9f987 100644 --- a/src/api/reagent/management.js +++ b/src/api/reagent/management.js @@ -80,3 +80,30 @@ export function set_drug_empty_bottle(data) { }) } + +// /api/drug/get_medicament_image +export function get_medicament_image(data) { + return request({ + url: '/api/drug/get_medicament_image', + method: 'post', + data + }) +} + +// /api/drug/del_medicament_image +export function del_medicament_image(data) { + return request({ + url: '/api/drug/del_medicament_image', + method: 'post', + data + }) +} + +// /api/drug/use_gaopaiyi +export function use_gaopaiyi(data) { + return request({ + url: '/api/drug/use_gaopaiyi', + method: 'post', + data + }) +} diff --git a/src/icons/svg/创建申请.svg b/src/icons/svg/创建申请.svg index 04cc60b..4b83df1 100644 --- a/src/icons/svg/创建申请.svg +++ b/src/icons/svg/创建申请.svg @@ -1,4 +1,12 @@ - - - + + + diff --git a/src/icons/svg/申请管理.svg b/src/icons/svg/申请管理.svg index 1d641d4..2115da6 100644 --- a/src/icons/svg/申请管理.svg +++ b/src/icons/svg/申请管理.svg @@ -1,4 +1,12 @@ - - - + + + diff --git a/src/icons/svg/称重登记.svg b/src/icons/svg/称重登记.svg index 99ad2ff..deb97e9 100644 --- a/src/icons/svg/称重登记.svg +++ b/src/icons/svg/称重登记.svg @@ -1,4 +1,12 @@ - - - + + + diff --git a/src/router/modules/reagent.js b/src/router/modules/reagent.js index 9743326..778e2af 100644 --- a/src/router/modules/reagent.js +++ b/src/router/modules/reagent.js @@ -103,7 +103,7 @@ const reagentRouter = [ path: '/reagent/receiving', component: Layout, redirect: '/reagent/receiving/index', - meta: { classification: 'reagent', module_code: 'YRYBDangerousUseView' }, + meta: { classification: 'reagent', module_code: 'DrugUseView' }, children: [ { path: 'index', @@ -117,7 +117,7 @@ const reagentRouter = [ path: '/reagent/sendback', component: Layout, redirect: '/reagent/sendback/index', - meta: { classification: 'reagent', module_code: 'YRYBDangerousReturnView' }, + meta: { classification: 'reagent', module_code: 'DrugReturnView' }, children: [ { path: 'index', @@ -173,7 +173,7 @@ const reagentRouter = [ // path: '/reagent/weighing', // component: Layout, // redirect: '/reagent/weighing/index', - // meta: { classification: 'reagent', module_code: 'YRYBDangerousWeigh' }, + // meta: { classification: 'reagent', module_code: 'DrugWeigh' }, // children: [ // { // path: 'index', @@ -221,7 +221,7 @@ const reagentRouter = [ path: '/reagent/management', component: Layout, redirect: '/reagent/management/index', - meta: { title: '高危化品管理', icon: '试剂管理', classification: 'reagent', module_code: 'YRYBDangerousIndex' }, + meta: { title: '高危化品管理', icon: '试剂管理', classification: 'reagent', module_code: 'DrugIndex' }, children: [ { path: 'index', @@ -245,25 +245,25 @@ const reagentRouter = [ // } // ] // }, - // { - // path: '/reagent/envrecord', - // component: Layout, - // redirect: '/reagent/envrecord/index', - // meta: { classification: 'reagent', module_code: 'HumitureIndex' }, - // children: [ - // { - // path: 'index', - // name: 'EnvRecord', - // component: () => import('@/views/reagent/envrecord/index'), - // meta: { title: '环境记录', icon: '雪花', classification: 'reagent' } - // } - // ] - // }, + { + path: '/reagent/envrecord', + component: Layout, + redirect: '/reagent/envrecord/index', + meta: { classification: 'reagent', module_code: 'HumitureIndex' }, + children: [ + { + path: 'index', + name: 'EnvRecord', + component: () => import('@/views/reagent/envrecord/index'), + meta: { title: '环境记录', icon: '雪花', classification: 'reagent' } + } + ] + }, // { // path: '/reagent/form', // component: Layout, // redirect: '/reagent/form/index', - // meta: { classification: 'reagent', module_code: 'YRYBDangerousCustomForm' }, + // meta: { classification: 'reagent', module_code: 'DrugCustomForm' }, // children: [ // { // path: 'index', diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 6c4a975..85da09f 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -271,6 +271,8 @@ export default { console.log(func_map[item]) client_list(stringify({ 'func_type': func_map[item] })).then( res => { + + console.log(res,'11111111111111') const cls = this.$store.getters.clientOptions console.log(cls, 1233124124) cls[item] = res.data.data_list diff --git a/src/views/reagent/applymanagement/index.vue b/src/views/reagent/applymanagement/index.vue index f54e90b..ffc4156 100644 --- a/src/views/reagent/applymanagement/index.vue +++ b/src/views/reagent/applymanagement/index.vue @@ -63,34 +63,21 @@ />
- - -
- - - - - -
-
-
+
+ 2小时 + 4小时 + 6小时 + 8小时 +
- 取消 + 取消 确定
@@ -137,8 +124,9 @@ export default { data() { return { // drugStockForm:[], + radio1:'2', page: 1, - page_size: 15, + page_size: 10, total: 0, client_id: '', dialogVisible: false, @@ -158,6 +146,7 @@ export default { history_total: 100, statusColorMap: ['warning','success'], statusMap: ['未处理', '已处理'], + row:'' } }, created () { @@ -179,78 +168,37 @@ export default { }, handleClick(row){ var that =this + that.row=row + that.dialogVisible=true + }, + handelConfirm(){ + var that=this const data={ - id:row.id + id:that.row.id, + t:that.radio1 } update_solve(stringify(data)).then(rsp => { console.log(rsp) if (rsp.status === 0) { this.$message.success("审批成功!") this.handleRefresh() - // this.get_stock_list() + that.radio1='2' + that.dialogVisible=false } else { this.$message.error(rsp.msg) } }) - }, pageChange(page) { this.page = page - this.get_stock_list() + this.get_apply() }, handleSelectionChange(val) { this.handleSelectionSelection = val }, - // handleHistory() { - // console.log(this.handleSelectionSelection,'1111') - // if(this.handleSelectionSelection.length ===1){ - // this.dialogHistoryVisible = true - // }else{ - // alert('请勾选单条申请!') - // } - // }, handleRefresh() { this.get_apply() }, - handleDel() { - if (this.handleSelectionSelection.length === 1) { - const data = { - id:this.handleSelectionSelection[0].id - } - del_stock(stringify(data)).then(rsp => { - if (rsp.status === 0) { - this.$message.success("删除成功!") - this.get_stock_list() - } else { - this.$message.error(rsp.msg) - } - }) - - } else { - this.$message.warning("选择一条记录操作") - } - }, - // 录入库存 - handleAddReagent() { - const data = { - client_id: this.client_id - } - get_drug_list(stringify(data)).then(rsp => { - this.multipleSelection = rsp.data - }) - this.dialogVisible = true - }, - - handleApply() { - const data = { - client_id: this.client_id - } - get_drug_list(stringify(data)).then(rsp => { - this.multipleSelection = rsp.data - }) - this.dialogVisible = true - }, - // 查看 录入信息 handleCheck() { if (this.handleSelectionSelection.length === 1) { @@ -265,37 +213,6 @@ export default { this.dialogHistoryVisible = false this.historyData = [] }, - onClose() { - this.multipleSelection = [] - }, - close() { - this.dialogVisible = false - this.multipleSelection = [] - }, - handelConfirm() { - const stock_info = {} - for (let i = 0; i < this.multipleSelection.length; i++) { - stock_info[this.multipleSelection[i].name] = this.multipleSelection[i].input_num == "" ? 0: parseInt(this.multipleSelection[i].input_num) - } - const data = { - stock_info: JSON.stringify(stock_info), - client_id: this.client_id, - client_code: this.client_code - } - set_stock(stringify(data)).then(rsp => { - console.log(rsp) - if (rsp.status == 0) { - this.$message.success(rsp.msg) - this.dialogVisible = false - this.get_stock_list() - } else { - this.$message.error(rsp.msg) - } - }) - }, - searchHistory() { - - } } } diff --git a/src/views/reagent/createapply/index.vue b/src/views/reagent/createapply/index.vue index 275ee52..4bced46 100644 --- a/src/views/reagent/createapply/index.vue +++ b/src/views/reagent/createapply/index.vue @@ -3,6 +3,28 @@
创建申请
申请 + 详情查看 + + +
+ + + + + + + + + +
+
@@ -19,10 +41,9 @@
- - 搜索 + + 搜索
-
@@ -65,7 +86,6 @@ 取消 提交申请
-
@@ -121,7 +141,8 @@ export default { data() { return { page: 1, - page_size: 15, + page_size: 10, + seach_word:'', total: 0, total1: 0, client_id: '', @@ -156,10 +177,32 @@ export default { }, created () { this.client_id = this.$store.getters.currentOptions[0].client_id + this.get_apply() this.get_drug_group() this.get_pt_user() }, methods: { + //勾选 + handleSelection(selection){ + var that =this + that.handleSelectionSelection =selection + }, + // 查看详情 + handleCheck() { + if (this.handleSelectionSelection.length === 1) { + this.dialogHistoryVisible = true + this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content) + } else { + this.$message.warning("选择一条记录操作!") + } + }, + //查看详情关闭 + dialogHistoryClose() { + this.dialogHistoryVisible = false + this.historyData = [] + }, + + //添加申请列表 handleClick(row){ var that =this that.$prompt('请输入数量', '提示', { @@ -175,8 +218,19 @@ export default { }); }else{ row.num =value - that.checkList.push(row) - that.tableData.splice(row.$index, 1) + console.log(row.name,that.checkList) + var result = that.checkList.filter(x => x.name === row.name); + console.log(result,'111') + if (result.length>0){ + that.$message({ + type: 'info', + message: '禁止重复添加' + }); + }else{ + that.checkList.push(row) + } + + // that.tableData.splice(row.$index, 1) } }).catch(() => { that.$message({ @@ -184,46 +238,45 @@ export default { message: '取消输入' }); }); - // that.tableData.slice(row) - console.log(row) - }, + //取消试剂申请 cancelClick(row){ var that =this - that.tableData.push(row) - that.checkList.splice(row.$index, 1) - console.log(row) - }, - handleSelection(selection){ - var that =this - that.checkList =selection + let getLocation = that.checkList.indexOf(row); + that.checkList.splice(getLocation, 1) }, + //获取试剂列表 get_drug_group: function() { const data = { - client_id: this.client_id, + page:1, + seach_word:this.seach_word, + page_size: 10000 + } + get_drug_group_list(stringify(data)).then(rsp => { + console.log("rsp.data.data_list>>", rsp.data.data_list) + this.tableData = this.addDataIndex(rsp.data.data_list) + this.total = rsp.data.total_count + }) + }, + + //获取申请列表 + get_apply(){ + const data = { page:this.page, page_size: this.page_size } - get_apply_list(stringify(data)).then(rsp => { console.log("apply>>>", rsp) this.tableData1 = rsp.data.data_list this.total1 = rsp.data.total_count }) - - get_drug_group_list(stringify(data)).then(rsp => { - console.log("rsp.data.data_list>>", rsp.data.data_list) - rsp.data.data_list.forEach((value , index) => { - value['num'] = 1 - }) - this.tableData = this.addDataIndex(rsp.data.data_list) - this.total = rsp.data.total_count - }) }, + + //陪同用户 get_pt_user() { console.log("jjj") const data = { - page: this.page, + page: 1, page_size: 10000, user_id:this.$store.state.user.id, user_code: this.user_code, @@ -238,6 +291,7 @@ export default { }) console.log("giao") }, + //提交申请 create_apply(pt_from){ var that =this let datalist = that.checkList.map((item) => { @@ -262,9 +316,10 @@ export default { }) } }, + //申请页翻页 pageChange(page) { this.page = page - this.get_drug_group() + this.get_apply() }, addDataIndex(initData){ for (let i = 0; i < initData.length; i++) { @@ -272,31 +327,20 @@ export default { } return initData }, + //申请 handleRefresh() { + this.get_apply() this.get_drug_group() }, - handleApply() { - const data = { - client_id: this.client_id - } - get_drug_list(stringify(data)).then(rsp => { - this.multipleSelection = rsp.data - }) - this.dialogVisible = true - }, - onClose() { - this.multipleSelection = [] - }, - close() { - this.dialogVisible = false - this.multipleSelection = [] - }, + //打开申请列表 openDialogTableVisible(){ this.dialogTableVisible = true }, + //关闭申请列表 dialogTableClose() { this.user_id_pt = '' this.dialogTableVisible = false + this.checkList=[] }, } } diff --git a/src/views/reagent/envrecord/index.vue b/src/views/reagent/envrecord/index.vue index 4e8b864..c8852f2 100644 --- a/src/views/reagent/envrecord/index.vue +++ b/src/views/reagent/envrecord/index.vue @@ -39,7 +39,7 @@
每日温度记录
- + - + 保存
- + import('element-ui/packages/upload/src/upload-list'), - // 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'), + 'el-upload-list': () => import('element-ui/packages/upload/src/upload-list'), + 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'), 'mother-liquir-form': () => import('@/views/reagent/management/motherliquir/index'), Scannner // 'get-code-scanner' : () => import('@/components/Scannner/index') @@ -891,6 +894,7 @@ export default { const url = this.getImageUrl(item) this.srcViewrList = [url] this.imgViewerVisible = true + console.log(this.srcViewrList) }, // 上传成功 uploadSuccess(response, file, fileList) { diff --git a/src/views/reagent/receivingandreturn/index copy.vue b/src/views/reagent/receivingandreturn/index copy.vue new file mode 100644 index 0000000..7327174 --- /dev/null +++ b/src/views/reagent/receivingandreturn/index copy.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/src/views/reagent/receivingandreturn/index.vue b/src/views/reagent/receivingandreturn/index.vue index 7327174..ed9b40f 100644 --- a/src/views/reagent/receivingandreturn/index.vue +++ b/src/views/reagent/receivingandreturn/index.vue @@ -1,15 +1,6 @@ @@ -80,54 +135,71 @@ + diff --git a/src/views/reagent/report/record/index.vue b/src/views/reagent/report/record/index.vue index f52a29e..839d6c1 100644 --- a/src/views/reagent/report/record/index.vue +++ b/src/views/reagent/report/record/index.vue @@ -4,6 +4,15 @@
返回上一级 + + + +
返回上一级 + + + + + + + + + 搜索
@@ -59,6 +78,8 @@ export default { name: 'StoreInfo', data() { return { + place:"", + client_id:"", selectReagentValue: '', headerStyle: { 'background': '#E6E6E6' }, page: 1, @@ -76,6 +97,8 @@ export default { handleExport() { const data = { name: this.selectReagentValue, + client_id: this.client_id, + palce:this.place, page: this.page, page_size: this.page_size, download_type: 1, @@ -104,6 +127,8 @@ export default { this.loadingReagent = true stock_data_info(stringify({ name: this.selectReagentValue, + client_id: this.client_id, + palce:this.place, page: this.page, page_size: this.page_size })).then(res => { diff --git a/src/views/reagent/report/warehousinginfo/index.vue b/src/views/reagent/report/warehousinginfo/index.vue index 7a64453..0c3a6ae 100644 --- a/src/views/reagent/report/warehousinginfo/index.vue +++ b/src/views/reagent/report/warehousinginfo/index.vue @@ -4,8 +4,25 @@
返回上一级 + + + + + + + - + 确 定 + + +
+
+
    +
  • + + + + + + + + + + + + +
  • +
+
+
+
+ 请上传 +
+ +
+ + 普通上传 + + 高拍仪上传 +
+
+
@@ -329,12 +409,20 @@ import { put_in_tmp, pring_bar_code, enter_db_client_list } from '@/api/reagent/warehousing' +import { + get_medicament_image, + del_medicament_image, + use_gaopaiyi +} from '@/api/reagent/management' import stringify from '@/utils/stringify' import { throttle } from '@/utils' export default { name: 'Warehousing', - components: { ReagentForm, Scanner }, + components: { + 'el-upload-list': () => import('element-ui/packages/upload/src/upload-list'), + 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'), + ReagentForm, Scanner }, data() { return { // 打印模板 @@ -360,6 +448,8 @@ export default { }, { type: 'number', message: '条码必须为数字值' }] }, dialogTableVisible: false, + dialogImageVisible:false, + srcList: [], headerStyle: { 'background': '#E6E6E6' }, tableData: [], client_id: '', @@ -404,7 +494,11 @@ export default { // 导入入库模板 fileList: [], dialogImportVisible: false, - importFile: undefined + loadingImageList: false, + importFile: undefined, + currentItem: {}, + imgViewerVisible:false, + UPLOAD_URL: process.env.VUE_APP_BASE_API + '/api/drug/save_drug_img' } }, created() { @@ -414,6 +508,85 @@ export default { this.getTmpList() }, methods: { +/* 图片信息展示*/ + // 高拍仪请求 + handleGaoPiYi() { + this.loadingImageList = true + const data = { + variety_id: this.currentItem.variety_id, + medicament_id: this.currentItem.medicament_id + } + use_gaopaiyi(stringify(data)).then(res => { + this.$message.success(res.msg) + this.getImageList() + }).finally(() => { this.loadingImageList = false }) + }, + // 得到图片数据 + getImageList() { + const data = { + variety_id: this.currentItem.variety_id, + medicament_id: this.currentItem.medicament_id + } + this.loadingImageList = true + get_medicament_image(stringify(data)).then(res => { + this.srcList = res.data + }).finally(() => { + this.loadingImageList = false + }) + }, + // 获取图片url + getImageUrl(file) { + return process.env.VUE_APP_BASE_API + '/api/drug/get_img_info/' + file.pic_url + }, + // 显示全部图片 + // handleShowImage(row) { + // this.currentItem = row + // this.getImageList() + // this.dialogImageVisible = true + // }, + // 图片大图预览 + handleImageView(item) { + const url = this.getImageUrl(item) + this.srcViewrList = [url] + this.imgViewerVisible = true + console.log(this.srcViewrList) + }, + // 上传成功 + uploadSuccess(response, file, fileList) { + this.getImageList() + this.loadingImageList = false + }, + // 上传失败 + // eslint-disable-next-line handle-callback-err + uploadErr(err, file, fileList) { + this.loadingImageList = false + }, + // 上传之前 + beforeUpload(file) { + this.loadingImageList = true + }, + // 删除图片 + handleDelFile(image_id) { + const data = { image_id } + this.loadingImageList = true + del_medicament_image(stringify(data)).then( + res => { + this.$message.success(res.msg) + this.getImageList() + } + ).finally(() => { this.loadingImageList = false }) + }, + // 关闭图片预览 + closeImgViewer() { + this.imgViewerVisible = false + }, + // 弹窗关闭清理工作 + handleImageClose() { + this.srcList = [] + this.srcViewrList = [] + this.currentItem = {} + }, + putindata(){ if(this.radio1 !='' && this.radio2 !=''){ const data = JSON.parse(JSON.stringify(this.currentRow)) @@ -431,6 +604,13 @@ export default { this.$set(this.bindToDBData, id, { ...this.bindToDBData[id], status: true }) this.$message.success('入库成功!') this.detailVisible=false + + if(this.$store.state.app.title==='对照品'){ + this.dialogImageVisible = true + this.currentItem = res.data + this.getImageList() + } + // 判断是否是最后一行,不是最后一行自动选择下一行 if (id < this.bindToDBData.length - 1) { // 将下一行自动选中 diff --git a/src/views/reagent/weightregistration/index.vue b/src/views/reagent/weightregistration/index.vue index 260f522..0c9c3cd 100644 --- a/src/views/reagent/weightregistration/index.vue +++ b/src/views/reagent/weightregistration/index.vue @@ -1,7 +1,7 @@