Commit 174846ff authored by 高宇's avatar 高宇

删除菜单

parent 1dc0b97e
......@@ -26,10 +26,11 @@ export function findSingleLogDetail(singleLogIdAndPn) {
}
/* TODO: 用来导出表单信息 */
export function exportInventoryRecord() {
export function exportInventoryRecord(params) {
return request({
url: '/wbwarehouselog/exportLogWithDetails',
method: 'get',
params,
responseType: 'blob'
})
}
......@@ -47,10 +47,11 @@ export function deleteLogical(id) {
})
}
// 导出信息接口
export function exporTable() {
export function exporTable(params) {
return request({
url: '/wbchemistrybaseinfo/export',
method: 'get',
params,
responseType: 'blob'
})
}
......@@ -26,10 +26,11 @@ export function findSingleLogDetail(singleLogIdAndPn) {
}
/* TODO: 用来导出表单信息 */
export function exportInventoryRecord() {
export function exportInventoryRecord(params) {
return request({
url: '/wbchemistrylog/export',
method: 'get',
params,
responseType: 'blob'
})
}
......@@ -208,7 +208,7 @@
</template>
<script>
import {add, listBasicInfo, updataInfo, getDetailById, deleteLogical, exportBasicInfo} from '@/api/equipment/basicInfo'
import { add, listBasicInfo, updataInfo, getDetailById, deleteLogical, exportBasicInfo } from '@/api/equipment/basicInfo'
import { parseTime } from '@/utils'
import { getDictData } from '@/api/equipment/application'
export default {
......@@ -511,28 +511,30 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.$confirm('是否确认导出工序库信息?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportBasicInfo({ ptype: '2' }).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '设备库基本信息' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
const obj = {
page: this.queryParams.page,
rows: this.queryParams.rows,
pn: this.queryParams.pn,
pgx: this.queryParams.pgx,
delFlag: 0,
ptype: this.queryParams.ptype
}
exportBasicInfo(obj).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '设备库基本信息' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
}
}
......
......@@ -641,27 +641,33 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.$confirm('是否确认导出设备管理信息?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportdevice({ ptype: 1 }).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '设备管理信息' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
})
console.log('1111')
const obj = {
page: this.queryParams.page,
rows: this.queryParams.rows,
pn: this.queryParams.pn,
lot: this.queryParams.lot,
plocation: this.queryParams.plocation,
pstatus: this.queryParams.pstatus,
ptype: this.queryParams.ptype,
delFlag: this.queryParams.delFlag
}
console.log('obj',obj)
exportdevice(obj).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '设备管理信息' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
})
}
}
......
......@@ -181,7 +181,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="parnk:" prop="prank">
<el-input v-model.trim="singleDetails.prank" :readonly="true" :maxlength="100"/>
<el-input v-model.trim="singleDetails.prank" :readonly="true" :maxlength="100" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -699,28 +699,31 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.$confirm('是否确认导出工序库信息?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportdevice({ ptype: '2' }).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '设备工序库信息' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
const obj = {
page: this.queryParams.page,
rows: this.queryParams.rows,
lot: this.queryParams.lot,
plocation: this.queryParams.plocation,
pstatus: this.queryParams.pstatus,
ptype: this.queryParams.ptype,
delFlag: this.queryParams.delFlag
}
exportdevice(obj).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '设备工序库信息' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
}
}
......
......@@ -82,6 +82,7 @@
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="handleChange"
/>
</div>
</el-form-item>
......@@ -288,7 +289,9 @@ export default {
dateRange: [],
queryParams: {
page: 1,
rows: 10
rows: 10,
beginTime: '',
endTime: ''
},
queryEntity: {
......@@ -452,6 +455,16 @@ export default {
this.$refs.autoGetFocusInput.focus()
},
methods: {
handleChange() {
console.log('dateRange', this.dateRange)
if (this.dateRange !== null) {
this.queryParams.beginTime = this.dateRange[0] + ' 00:00:00'
this.queryParams.endTime = this.dateRange[1] + ' 23:59:00'
} else {
this.queryParams.beginTime = ''
this.queryParams.endTime = ''
}
},
replace(value) {
return this.dictList.find(item => item.dictLabel === value).dictValue
},
......@@ -573,28 +586,33 @@ export default {
this.openDetails = true
},
handleExport() {
this.$confirm('是否确认导出所有出入库记录信息?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportInventoryRecord().then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '出入库记录' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
const obj = {
page: this.queryParams.page,
rows: this.queryParams.rows,
beginTime: this.queryParams.beginTime,
endTime: this.queryParams.endTime,
pn: this.queryEntity.entity.pn,
lot: this.queryEntity.entity.lot,
plocation: this.queryEntity.entity.plocation,
poperate: this.queryEntity.entity.poperate,
ptype: this.queryEntity.entity.ptype
}
return exportInventoryRecord(obj).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '出入库记录' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
}
}
......
......@@ -315,28 +315,28 @@ export default {
this.title = '添加基础信息表单'
},
handleExport() {
this.$confirm('是否确认导出所有样品库记录信息?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exporTable().then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '样品库记录' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
const obj = {
page: this.queryParams.page,
rows: this.queryParams.rows,
pn: this.queryParams.pn,
name: this.queryParams.name
}
exporTable(obj).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '样品库记录' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
}
}
......
......@@ -53,6 +53,7 @@
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="handleChange"
/>
</div>
</el-form-item>
......@@ -218,7 +219,9 @@ export default {
dateRange: [],
queryParams: {
page: 1,
rows: 10
rows: 10,
beginTime: '',
endTime: ''
},
queryEntity: {
......@@ -364,6 +367,16 @@ export default {
this.$refs.autoGetFocusInput.focus()
},
methods: {
handleChange() {
console.log('dateRange', this.dateRange)
if (this.dateRange !== null) {
this.queryParams.beginTime = this.dateRange[0] + ' 00:00:00'
this.queryParams.endTime = this.dateRange[1] + ' 23:59:00'
} else {
this.queryParams.beginTime = ''
this.queryParams.endTime = ''
}
},
// 回车跳转下一个输入框
focusNextInput(form) {
this.$nextTick(() => {
......@@ -455,28 +468,31 @@ export default {
this.openDetails = true
},
handleExport() {
this.$confirm('是否确认导出所有出入库记录信息?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportInventoryRecord().then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '出入库记录' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
const obj = {
page: this.queryParams.page,
row: this.queryParams.rows,
beginTime: this.queryParams.beginTime,
endTime: this.queryParams.endTime,
pn: this.queryEntity.entity.pn,
lot: this.queryEntity.entity.lot,
poperate: this.queryEntity.entity.poperate
}
exportInventoryRecord(obj).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
// TODO: 创建下载的链接
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
// TODO: 下载后文件名
downloadElement.download = '出入库记录' + '.xls'
document.body.appendChild(downloadElement)
// TODO: 点击下载
downloadElement.click()
// TODO: 下载完成移除元素
document.body.removeChild(downloadElement)
// TODO: 释放掉blob对象
window.URL.revokeObjectURL(href)
// this.download(response.msg);
})
}
}
......
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