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

删除菜单

parent 1dc0b97e
...@@ -26,10 +26,11 @@ export function findSingleLogDetail(singleLogIdAndPn) { ...@@ -26,10 +26,11 @@ export function findSingleLogDetail(singleLogIdAndPn) {
} }
/* TODO: 用来导出表单信息 */ /* TODO: 用来导出表单信息 */
export function exportInventoryRecord() { export function exportInventoryRecord(params) {
return request({ return request({
url: '/wbwarehouselog/exportLogWithDetails', url: '/wbwarehouselog/exportLogWithDetails',
method: 'get', method: 'get',
params,
responseType: 'blob' responseType: 'blob'
}) })
} }
...@@ -47,10 +47,11 @@ export function deleteLogical(id) { ...@@ -47,10 +47,11 @@ export function deleteLogical(id) {
}) })
} }
// 导出信息接口 // 导出信息接口
export function exporTable() { export function exporTable(params) {
return request({ return request({
url: '/wbchemistrybaseinfo/export', url: '/wbchemistrybaseinfo/export',
method: 'get', method: 'get',
params,
responseType: 'blob' responseType: 'blob'
}) })
} }
...@@ -26,10 +26,11 @@ export function findSingleLogDetail(singleLogIdAndPn) { ...@@ -26,10 +26,11 @@ export function findSingleLogDetail(singleLogIdAndPn) {
} }
/* TODO: 用来导出表单信息 */ /* TODO: 用来导出表单信息 */
export function exportInventoryRecord() { export function exportInventoryRecord(params) {
return request({ return request({
url: '/wbchemistrylog/export', url: '/wbchemistrylog/export',
method: 'get', method: 'get',
params,
responseType: 'blob' responseType: 'blob'
}) })
} }
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
</template> </template>
<script> <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 { parseTime } from '@/utils'
import { getDictData } from '@/api/equipment/application' import { getDictData } from '@/api/equipment/application'
export default { export default {
...@@ -511,12 +511,15 @@ export default { ...@@ -511,12 +511,15 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.$confirm('是否确认导出工序库信息?', '警告', { const obj = {
confirmButtonText: '确定', page: this.queryParams.page,
cancelButtonText: '取消', rows: this.queryParams.rows,
type: 'warning' pn: this.queryParams.pn,
}).then(function() { pgx: this.queryParams.pgx,
return exportBasicInfo({ ptype: '2' }).then(response => { delFlag: 0,
ptype: this.queryParams.ptype
}
exportBasicInfo(obj).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
// TODO: 创建下载的链接 // TODO: 创建下载的链接
...@@ -533,7 +536,6 @@ export default { ...@@ -533,7 +536,6 @@ export default {
window.URL.revokeObjectURL(href) window.URL.revokeObjectURL(href)
// this.download(response.msg); // this.download(response.msg);
}) })
})
} }
} }
} }
......
...@@ -641,12 +641,19 @@ export default { ...@@ -641,12 +641,19 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.$confirm('是否确认导出设备管理信息?', '警告', { console.log('1111')
confirmButtonText: '确定', const obj = {
cancelButtonText: '取消', page: this.queryParams.page,
type: 'warning' rows: this.queryParams.rows,
}).then(function() { pn: this.queryParams.pn,
return exportdevice({ ptype: 1 }).then(response => { 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 blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
// TODO: 创建下载的链接 // TODO: 创建下载的链接
...@@ -662,7 +669,6 @@ export default { ...@@ -662,7 +669,6 @@ export default {
// TODO: 释放掉blob对象 // TODO: 释放掉blob对象
window.URL.revokeObjectURL(href) window.URL.revokeObjectURL(href)
}) })
})
} }
} }
} }
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="parnk:" prop="prank"> <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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -699,12 +699,16 @@ export default { ...@@ -699,12 +699,16 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.$confirm('是否确认导出工序库信息?', '警告', { const obj = {
confirmButtonText: '确定', page: this.queryParams.page,
cancelButtonText: '取消', rows: this.queryParams.rows,
type: 'warning' lot: this.queryParams.lot,
}).then(function() { plocation: this.queryParams.plocation,
return exportdevice({ ptype: '2' }).then(response => { pstatus: this.queryParams.pstatus,
ptype: this.queryParams.ptype,
delFlag: this.queryParams.delFlag
}
exportdevice(obj).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
// TODO: 创建下载的链接 // TODO: 创建下载的链接
...@@ -721,7 +725,6 @@ export default { ...@@ -721,7 +725,6 @@ export default {
window.URL.revokeObjectURL(href) window.URL.revokeObjectURL(href)
// this.download(response.msg); // this.download(response.msg);
}) })
})
} }
} }
} }
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@change="handleChange"
/> />
</div> </div>
</el-form-item> </el-form-item>
...@@ -288,7 +289,9 @@ export default { ...@@ -288,7 +289,9 @@ export default {
dateRange: [], dateRange: [],
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10 rows: 10,
beginTime: '',
endTime: ''
}, },
queryEntity: { queryEntity: {
...@@ -452,6 +455,16 @@ export default { ...@@ -452,6 +455,16 @@ export default {
this.$refs.autoGetFocusInput.focus() this.$refs.autoGetFocusInput.focus()
}, },
methods: { 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) { replace(value) {
return this.dictList.find(item => item.dictLabel === value).dictValue return this.dictList.find(item => item.dictLabel === value).dictValue
}, },
...@@ -573,12 +586,18 @@ export default { ...@@ -573,12 +586,18 @@ export default {
this.openDetails = true this.openDetails = true
}, },
handleExport() { handleExport() {
this.$confirm('是否确认导出所有出入库记录信息?', '警告', { const obj = {
confirmButtonText: '确定', page: this.queryParams.page,
cancelButtonText: '取消', rows: this.queryParams.rows,
type: 'warning' beginTime: this.queryParams.beginTime,
}).then(function() { endTime: this.queryParams.endTime,
return exportInventoryRecord().then(response => { 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 blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
// TODO: 创建下载的链接 // TODO: 创建下载的链接
...@@ -595,7 +614,6 @@ export default { ...@@ -595,7 +614,6 @@ export default {
window.URL.revokeObjectURL(href) window.URL.revokeObjectURL(href)
// this.download(response.msg); // this.download(response.msg);
}) })
})
} }
} }
} }
......
...@@ -315,12 +315,13 @@ export default { ...@@ -315,12 +315,13 @@ export default {
this.title = '添加基础信息表单' this.title = '添加基础信息表单'
}, },
handleExport() { handleExport() {
this.$confirm('是否确认导出所有样品库记录信息?', '警告', { const obj = {
confirmButtonText: '确定', page: this.queryParams.page,
cancelButtonText: '取消', rows: this.queryParams.rows,
type: 'warning' pn: this.queryParams.pn,
}).then(function() { name: this.queryParams.name
return exporTable().then(response => { }
exporTable(obj).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
// TODO: 创建下载的链接 // TODO: 创建下载的链接
...@@ -337,7 +338,6 @@ export default { ...@@ -337,7 +338,6 @@ export default {
window.URL.revokeObjectURL(href) window.URL.revokeObjectURL(href)
// this.download(response.msg); // this.download(response.msg);
}) })
})
} }
} }
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@change="handleChange"
/> />
</div> </div>
</el-form-item> </el-form-item>
...@@ -218,7 +219,9 @@ export default { ...@@ -218,7 +219,9 @@ export default {
dateRange: [], dateRange: [],
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10 rows: 10,
beginTime: '',
endTime: ''
}, },
queryEntity: { queryEntity: {
...@@ -364,6 +367,16 @@ export default { ...@@ -364,6 +367,16 @@ export default {
this.$refs.autoGetFocusInput.focus() this.$refs.autoGetFocusInput.focus()
}, },
methods: { 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) { focusNextInput(form) {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -455,12 +468,16 @@ export default { ...@@ -455,12 +468,16 @@ export default {
this.openDetails = true this.openDetails = true
}, },
handleExport() { handleExport() {
this.$confirm('是否确认导出所有出入库记录信息?', '警告', { const obj = {
confirmButtonText: '确定', page: this.queryParams.page,
cancelButtonText: '取消', row: this.queryParams.rows,
type: 'warning' beginTime: this.queryParams.beginTime,
}).then(function() { endTime: this.queryParams.endTime,
return exportInventoryRecord().then(response => { 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 blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
// TODO: 创建下载的链接 // TODO: 创建下载的链接
...@@ -477,7 +494,6 @@ export default { ...@@ -477,7 +494,6 @@ export default {
window.URL.revokeObjectURL(href) window.URL.revokeObjectURL(href)
// this.download(response.msg); // 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