Browse Source

fix:[资源库管理]给药制剂发放记录使用量

lkf
15881625488@163.com 3 months ago
parent
commit
1fac81d55a
4 changed files with 284 additions and 12 deletions
  1. +141
    -6
      src/views/business/resource/gyzj/comps/ffjlList.vue
  2. +1
    -0
      src/views/business/resource/gyzj/comps/gyzjList.vue
  3. +141
    -6
      src/views/business/resource/mjy/comps/ffjlList.vue
  4. +1
    -0
      src/views/business/resource/mjy/comps/mjyList.vue

+ 141
- 6
src/views/business/resource/gyzj/comps/ffjlList.vue View File

@ -79,7 +79,7 @@
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" :disabled="multiple" @click="handleDc"
<el-button type="primary" @click="exportExcel"
v-hasPermi="['business:resource:gyzj:ffjldc']">{{
$t('form.export') }}</el-button>
</el-col>
@ -94,8 +94,8 @@
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span>
<span v-else>{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span>
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span>
<span v-else>{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gyzj.zytj')" align="center" prop="ffzytj"
@ -209,6 +209,7 @@ import Jd from "./ffjl/Jd";
import Xq from "./ffjl/Xq";
import Jq from "./ffjl/Jq";
import moment from "moment";
import { deepClone } from "@/utils/index";
export default {
name: "FfjlList",
@ -245,9 +246,143 @@ export default {
this.getList()
},
methods: {
//
handleDc() {
exportExcel() {
let that = this
that.$modal.loading()
let params = deepClone(this.queryParams)
params.pageSize = 999999
list(params).then(response => {
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.mc') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.bh') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.md') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.zytj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.cksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.rksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.ckmz') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.rkmz') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.syl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.lqr1') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.lqr2') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.kgy1') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.kgy2') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.zcg') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.jlzt') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gyzj.jyzt') + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(response.rows, function (value) {
let jlzt = ''
switch (value.jlzt) {
case 1:
jlzt = that.$t('page.business.resource.resource.jlzt.wsd')
break
case 3:
jlzt = that.$t('page.business.resource.resource.jlzt.ysd')
break
case 5:
jlzt = that.$t('page.business.resource.resource.jlzt.dgd')
break
case 7:
jlzt = that.$t('page.business.resource.resource.jlzt.gd')
break
case 9:
jlzt = that.$t('page.business.resource.resource.jlzt.djd')
break
default: zjzt = ''
}
let jyzt = ''
switch (value.jyzt) {
case 1:
jyzt = that.$t('page.business.resource.resource.jyzt.wjy')
break
case 3:
jyzt = that.$t('page.business.resource.resource.jyzt.djy')
break
case 5:
jyzt = that.$t('page.business.resource.resource.jyzt.jyz')
break
default: jyzt = ''
}
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.mc +
'</td>' +
' <td>' +
'&nbsp;'+value.bh +
'</td>' +
' <td>' +
(value.mdMcs&&value.mdMcs!=''&&value.mdOther&&value.mdOther!=''? (value.mdMcs +","+value.mdOther) :(value.mdMcs +value.mdOther))+
'</td>' +
' <td>' +
value.ffzytj +
'</td>' +
' <td>' +
value.ffrq +
'</td>' +
' <td>' +
value.ghrq +
'</td>' +
' <td>' +
value.ckl +value.ckldw+
'</td>' +
' <td>' +
value.rkl+value.rkldw +
'</td>' +
' <td>' +
value.syl+value.syldw +
'</td>' +
' <td>' +
value.lqr1Mc +
'</td>' +
' <td>' +
value.lqr2Mc +
'</td>' +
' <td>' +
value.jsr1Mc +
'</td>' +
' <td>' +
value.jsr2Mc +
'</td>' +
' <td>' +
value.zcgMc +
'</td>' +
' <td>' +
jlzt +
'</td>' +
' <td>' +
jyzt +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = that.$t('page.business.resource.gyzj.ffhsjl')
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
that.$modal.closeLoading()
}).finally(() => {
that.$modal.closeLoading()
})
},
//
handleJq(row) {

+ 1
- 0
src/views/business/resource/gyzj/comps/gyzjList.vue View File

@ -338,6 +338,7 @@ export default {
break
case 11:
zjzt = that.$t('page.business.resource.resource.zjzt.djd')
break
default: zjzt = ''
}
let jyzt = ''

+ 141
- 6
src/views/business/resource/mjy/comps/ffjlList.vue View File

@ -79,7 +79,7 @@
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" :disabled="multiple" @click="handleDc"
<el-button type="primary" @click="exportExcel"
v-hasPermi="['business:resource:mjy:ffjldc']">{{
$t('form.export') }}</el-button>
</el-col>
@ -93,8 +93,8 @@
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gyzj.md')" align="center" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span>
<span v-else>{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span>
<span v-if="scope.row.mdOther && scope.row.mdOther != ''&&scope.row.mdMcs && scope.row.mdMcs != ''">{{ scope.row.mdMcs }},{{ scope.row.mdOther }}</span>
<span v-else>{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.zytj')" align="center" prop="ffzytj"
@ -207,6 +207,7 @@ import Jd from "./ffjl/Jd";
import Xq from "./ffjl/Xq";
import Jq from "./ffjl/Jq";
import moment from "moment";
import { deepClone } from "@/utils/index";
export default {
name: "FfjlList",
@ -243,9 +244,143 @@ export default {
this.getList()
},
methods: {
//
handleDc() {
exportExcel() {
let that = this
that.$modal.loading()
let params = deepClone(this.queryParams)
params.pageSize = 999999
list(params).then(response => {
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.mc') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.bh') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.md') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.zytj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.cksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.rksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.ckmz') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.rkmz') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.syl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.lqr1') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.lqr2') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.kgy1') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.kgy2') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.zcg') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.jlzt') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.mjy.jyzt') + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(response.rows, function (value) {
let jlzt = ''
switch (value.jlzt) {
case 1:
jlzt = that.$t('page.business.resource.resource.jlzt.wsd')
break
case 3:
jlzt = that.$t('page.business.resource.resource.jlzt.ysd')
break
case 5:
jlzt = that.$t('page.business.resource.resource.jlzt.dgd')
break
case 7:
jlzt = that.$t('page.business.resource.resource.jlzt.gd')
break
case 9:
jlzt = that.$t('page.business.resource.resource.jlzt.djd')
break
default: zjzt = ''
}
let jyzt = ''
switch (value.jyzt) {
case 1:
jyzt = that.$t('page.business.resource.resource.jyzt.wjy')
break
case 3:
jyzt = that.$t('page.business.resource.resource.jyzt.djy')
break
case 5:
jyzt = that.$t('page.business.resource.resource.jyzt.jyz')
break
default: jyzt = ''
}
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.mc +
'</td>' +
' <td>' +
'&nbsp;'+value.bh +
'</td>' +
' <td>' +
(value.mdMcs&&value.mdMcs!=''&&value.mdOther&&value.mdOther!=''? (value.mdMcs +","+value.mdOther) :(value.mdMcs +value.mdOther))+
'</td>' +
' <td>' +
value.ffzytj +
'</td>' +
' <td>' +
value.ffrq +
'</td>' +
' <td>' +
value.ghrq +
'</td>' +
' <td>' +
value.ckmz +value.ckmzdw+
'</td>' +
' <td>' +
value.rkmz+value.rkmzdw +
'</td>' +
' <td>' +
value.syl+value.syldw +
'</td>' +
' <td>' +
value.lqr1Mc +
'</td>' +
' <td>' +
value.lqr2Mc +
'</td>' +
' <td>' +
value.jsr1Mc +
'</td>' +
' <td>' +
value.jsr2Mc +
'</td>' +
' <td>' +
value.zcgMc +
'</td>' +
' <td>' +
jlzt +
'</td>' +
' <td>' +
jyzt +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = that.$t('page.business.resource.mjy.ffhsjl')
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
that.$modal.closeLoading()
}).finally(() => {
that.$modal.closeLoading()
})
},
//
handleJq(row) {

+ 1
- 0
src/views/business/resource/mjy/comps/mjyList.vue View File

@ -337,6 +337,7 @@ export default {
break
case 11:
zjzt = that.$t('page.business.resource.resource.zjzt.djd')
break
default: zjzt = ''
}
let jyzt = ''

Loading…
Cancel
Save