| | |
| | | export function outputExport(params) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/output/list/export', |
| | | responseType: 'blob', // 指定响应数据类型为Blob |
| | | // responseType: 'blob', // 指定响应数据类型为Blob |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | <template> |
| | | <div> |
| | | <el-input |
| | | style='margin-bottom: 8px;width:100%' |
| | | placeholder='搜索' |
| | | prefix-icon='el-icon-search' |
| | | v-model='searchValue' |
| | | clearable> |
| | | </el-input> |
| | | <div class='tree-box'> |
| | | <div style="display: flex;margin-bottom: 8px;"> |
| | | <el-input |
| | | style='flex: 1' |
| | | placeholder='搜索' |
| | | prefix-icon='el-icon-search' |
| | | v-model='searchValue' |
| | | clearable> |
| | | </el-input> |
| | | <div class='refresh-btn' v-if='treeList.length>0' @click='refshData'> |
| | | 重置<i class='el-icon-refresh'></i> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class='tree-box'> |
| | | |
| | | <el-tree |
| | | ref='tree' |
| | | :data='treeList' |
| | |
| | | |
| | | .refresh-btn { |
| | | cursor: pointer; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | font-size: 14px; |
| | | z-index: 101; |
| | | line-height: 40px; |
| | | line-height: 32px; |
| | | color: #999; |
| | | text-align: right; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .refresh-btn:hover { |
| | |
| | | this.getAuditList() |
| | | this.getWarningList() |
| | | getGoodsNumPrice().then(res => { |
| | | this.goodsNumPrice = res |
| | | if(res){ |
| | | this.goodsNumPrice = res |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | methods: { |
| | |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import {mapGetters} from 'vuex'; |
| | | import * as dataExport from "@/api/exportExcel" |
| | | import {downLoad} from "@/utils/base"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | dataExport[api](params) |
| | | .then((res) => { |
| | | const blob = new Blob([res], {type: 'application/vnd.ms-excel'}); |
| | | if ('download' in document.createElement('a')) { |
| | | /*if ('download' in document.createElement('a')) { |
| | | // 非IE下载 |
| | | const elink = document.createElement('a'); |
| | | elink.download = `${fileName}.xls`; |
| | |
| | | } else { |
| | | // IE10+下载 |
| | | navigator.msSaveBlob(blob, `${fileName}.xls`); |
| | | } |
| | | }*/ |
| | | downLoad(res) |
| | | this.$message.success('导出成功!'); |
| | | loading.close(); |
| | | }) |
| | |
| | | }, |
| | | rules: { |
| | | sysDeptId: [ |
| | | {required: true, message: '请输入', trigger: 'blur'} |
| | | {required: true, message: '请选择部门', trigger: 'change'} |
| | | ], |
| | | userName: [ |
| | | {required: true, message: '请输入人员姓名', trigger: 'blur'} |
| | |
| | | if (this.setting.id) { |
| | | // 编辑接口 |
| | | departmentEdit(params).then((res) => { |
| | | if (res) { |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | } else { |
| | | this.$message.error('保存失败'); |
| | | } |
| | | |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }); |
| | | } else { |
| | | departmentAdd(params).then((res) => { |
| | | if (res) { |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | } else { |
| | | this.$message.error('保存失败'); |
| | | } |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }); |
| | | } |
| | | } else { |