Browse Source

2023-07-25

master
杨奉源 3 years ago
parent
commit
7062a9f097
  1. 2
      src/api/knifemold/tool-info.js
  2. 69
      src/views/main-sidebar.vue
  3. 1144
      src/views/modules/knifemold/tool-info.vue
  4. 896
      src/views/modules/knifemold/toolOperatorRecord.vue
  5. 1094
      src/views/modules/knifemold/toolOperatorRecord_old.vue

2
src/api/knifemold/tool-info.js

@ -53,6 +53,8 @@ export const updateToolDetailInfo = data => createAPI(`toolInfo/updateToolDetail
// 修改工具接收编码 // 修改工具接收编码
export const updateReceiveToolDetail = data => createAPI(`PRHeader/updateReceiveToolDetail`, 'POST', data) export const updateReceiveToolDetail = data => createAPI(`PRHeader/updateReceiveToolDetail`, 'POST', data)
export const queryToolOperatorRecord = data => createAPI(`toolInfo/queryToolOperatorRecord`, 'POST', data)

69
src/views/main-sidebar.vue

@ -42,12 +42,12 @@
import {userFavoriteList} from '@/api/userFavorite.js' import {userFavoriteList} from '@/api/userFavorite.js'
import {treeDataTranslate} from '@/utils' import {treeDataTranslate} from '@/utils'
import { import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
searchFunctionButtonList
} from '@/api/sysLanguage.js'
import pubsub from 'pubsub-js' import pubsub from 'pubsub-js'
export default { export default {
data() {
data () {
return { return {
dynamicMenuRoutes: [], dynamicMenuRoutes: [],
search: '', search: '',
@ -66,46 +66,45 @@
}, },
computed: { computed: {
sidebarLayoutSkin: { sidebarLayoutSkin: {
get() {
get () {
return this.$store.state.common.sidebarLayoutSkin return this.$store.state.common.sidebarLayoutSkin
} }
}, },
sidebarFold: { sidebarFold: {
get() {
get () {
return this.$store.state.common.sidebarFold return this.$store.state.common.sidebarFold
} }
}, },
menuList: menuList:
{
get() {
return this.$store.state.common.menuList
},
set(val) {
this.$store.commit('common/updateMenuList', val)
}
{
get () {
return this.$store.state.common.menuList
}, },
set (val) {
this.$store.commit('common/updateMenuList', val)
}
},
menuActiveName: { menuActiveName: {
get() {
get () {
return this.$store.state.common.menuActiveName return this.$store.state.common.menuActiveName
}, },
set(val) {
set (val) {
this.$store.commit('common/updateMenuActiveName', val) this.$store.commit('common/updateMenuActiveName', val)
} }
}, },
mainTabs: { mainTabs: {
get() {
get () {
return this.$store.state.common.mainTabs return this.$store.state.common.mainTabs
}, },
set(val) {
set (val) {
this.$store.commit('common/updateMainTabs', val) this.$store.commit('common/updateMainTabs', val)
} }
}, },
mainTabsActiveName: { mainTabsActiveName: {
get() {
get () {
return this.$store.state.common.mainTabsActiveName return this.$store.state.common.mainTabsActiveName
}, },
set(val) {
set (val) {
this.$store.commit('common/updateMainTabsActiveName', val) this.$store.commit('common/updateMainTabsActiveName', val)
} }
} }
@ -113,7 +112,7 @@
watch: { watch: {
$route: 'routeHandle' $route: 'routeHandle'
}, },
created() {
created () {
this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId != 999) this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId != 999)
this.favoriteList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId == 999) this.favoriteList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId == 999)
this.userFavorites() this.userFavorites()
@ -121,15 +120,15 @@
this.routeHandle(this.$route) this.routeHandle(this.$route)
this.getFunctionButtonList() this.getFunctionButtonList()
}, },
mounted() {//
mounted () { //
pubsub.subscribe('userFavorite', (msgName, data) => { pubsub.subscribe('userFavorite', (msgName, data) => {
this.userFavorites()
// this.userFavorites()
}) })
}, },
methods: { methods: {
// //
// //
getFunctionButtonList() {
getFunctionButtonList () {
let queryButton = { let queryButton = {
functionId: 'systemInformation', functionId: 'systemInformation',
tableId: 'systemInformation', tableId: 'systemInformation',
@ -143,7 +142,7 @@
}) })
}, },
// //
userFavorites() {
userFavorites () {
let query = { let query = {
userId: this.$store.state.user.id, userId: this.$store.state.user.id,
languageCode: this.$i18n.locale languageCode: this.$i18n.locale
@ -156,9 +155,9 @@
}, },
// id // id
getParent(val, sum) {
getParent (val, sum) {
if (val == 0) { if (val == 0) {
return;
return
} }
let parent = this.list.filter(item => item.menuId == val) let parent = this.list.filter(item => item.menuId == val)
if (parent.length > 0) { if (parent.length > 0) {
@ -168,8 +167,8 @@
} }
}, },
// 1 start // 1 start
searchMenu1() {
if (this.search == "") {
searchMenu1 () {
if (this.search == '') {
this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId != 999) this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId != 999)
} else { } else {
let menuPlus = [] let menuPlus = []
@ -179,8 +178,8 @@
// list // list
this.list = this.treeFindPath(this.menuList) this.list = this.treeFindPath(this.menuList)
let list = this.treeFindPath(this.menuList) let list = this.treeFindPath(this.menuList)
list = this.distinct(list, list);
// list
list = this.distinct(list, list)
// list
this.menuList = list.filter(item => item.name.indexOf(this.search) != -1) this.menuList = list.filter(item => item.name.indexOf(this.search) != -1)
let menuSum = [] let menuSum = []
for (let data of this.menuList) { for (let data of this.menuList) {
@ -190,14 +189,14 @@
menuSum = Array.from(new Set([...menuSum])) menuSum = Array.from(new Set([...menuSum]))
if (menuSum.length > 0) { if (menuSum.length > 0) {
let menuList = menuSum.filter(item => item.parentId == 0);
let menuList = menuSum.filter(item => item.parentId == 0)
this.menuList = menuList this.menuList = menuList
this.treeList(menuList, menuSum) this.treeList(menuList, menuSum)
} }
} }
}, },
// //
treeList(menuList, menuSum) {
treeList (menuList, menuSum) {
for (let m1 of menuList) { for (let m1 of menuList) {
for (let m2 of menuSum) { for (let m2 of menuSum) {
if (m1.menuId == m2.parentId) { if (m1.menuId == m2.parentId) {
@ -208,7 +207,7 @@
} }
}, },
// 1 list // 1 list
treeFindPath(tree, path = []) {
treeFindPath (tree, path = []) {
if (!tree) return [] if (!tree) return []
for (const data of tree) { for (const data of tree) {
path.push(data) path.push(data)
@ -221,11 +220,11 @@
return path return path
}, },
// 1 // 1
distinct(a, b) {
distinct (a, b) {
return Array.from(new Set([...a, ...b])) return Array.from(new Set([...a, ...b]))
}, },
// //
routeHandle(route) {
routeHandle (route) {
if (route.meta.isTab) { if (route.meta.isTab) {
// tab, // tab,
var tab = this.mainTabs.filter(item => item.name === route.name)[0] var tab = this.mainTabs.filter(item => item.name === route.name)[0]

1144
src/views/modules/knifemold/tool-info.vue
File diff suppressed because it is too large
View File

896
src/views/modules/knifemold/toolOperatorRecord.vue

@ -0,0 +1,896 @@
<template>
<div class="mod-config">
<!-- 查询条件 -->
<el-form :inline="true" label-position="top">
<el-form-item :label="'工具编码'">
<el-input style="width: 100px" v-model="queryTool.toolId" ></el-input>
</el-form-item>
<el-form-item :label="'工具实例编码'">
<el-input style="width: 100px" v-model="queryTool.toolInstanceId" ></el-input>
</el-form-item>
<el-form-item :label="'库位编码'">
<el-input style="width: 100px" v-model="queryTool.locationId"></el-input>
</el-form-item>
<el-form-item :label="'操作日期'">
<el-date-picker style="width: 120px" v-model="queryTool.startDate" value-format='yyyy-MM-dd' format = 'yyyy-MM-dd'></el-date-picker> -
<el-date-picker style="width: 120px" v-model="queryTool.endDate" value-format='yyyy-MM-dd' format = 'yyyy-MM-dd'></el-date-picker>
</el-form-item>
<el-form-item label="操作类型">
<el-select v-model="queryTool.typeFlag" style="width: 120px">
<el-option label="工具入库" value="TR"></el-option>
<el-option label="工具出库" value="TC"></el-option>
<el-option label="工具报废" value="TB"></el-option>
<el-option label="工具维修" value="TW"></el-option>
<el-option label="工具维修返回" value="TWF"></el-option>
<el-option label="工具借用" value="TJ"></el-option>
<el-option label="工具借用返回" value="TJF"></el-option>
<el-option label="工具领用" value="TL"></el-option>
<el-option label="工具领用返回" value="TLF"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()" type="primary">查询</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
导出
</download-excel>
</el-form-item>
</el-form>
<!-- 数据列表 -->
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</template>
<script>
import getLodop from '@/utils/LodopFuncs.js'
import {queryToolOperatorRecord} from '@/api/knifemold/tool-info.js'
export default {
data () {
return {
height: 0,
//
tagNo: '',
dataListLoading: false,
queryTool: {
limit: 500,
page: 1,
supplierId: '',
toolId: '',
toolInstanceId: '',
locationId: '',
startDate: '',
endDate: '',
typeFlag: 'TR'
},
pageIndex: 1,
pageSize: 100,
totalPage: 0,
//
dataList: [],
//
columnList: [],
// ------------ end ----------
// start
exportData: [],
exportName: this.$route.meta.title,
exportHeader: [this.$route.meta.title],
exportFooter: [],
exportDefaultValue: '',
toolRepairList: [
{
columnProp: 'transNo',
headerAlign: 'center',
align: 'center',
columnLabel: '单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'toolInstanceId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具实例编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'wareHouseId',
headerAlign: 'center',
align: 'center',
columnLabel: '库房编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'locationId',
headerAlign: 'center',
align: 'center',
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierId',
headerAlign: 'center',
align: 'center',
columnLabel: '供应商编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '供应商名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '操作人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdDate',
headerAlign: 'center',
align: 'center',
columnLabel: '操作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
toolRepairReturnList: [
{
columnProp: 'transNo',
headerAlign: 'center',
align: 'center',
columnLabel: '单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'toolInstanceId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具实例编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'wareHouseId',
headerAlign: 'center',
align: 'center',
columnLabel: '库房编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'locationId',
headerAlign: 'center',
align: 'center',
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'estUseQty',
headerAlign: 'center',
align: 'center',
columnLabel: '维修寿命',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transPrice',
headerAlign: 'center',
align: 'center',
columnLabel: '维修金额',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '操作人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdDate',
headerAlign: 'center',
align: 'center',
columnLabel: '操作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
toolBorrowingList: [
{
columnProp: 'transNo',
headerAlign: 'center',
align: 'center',
columnLabel: '单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'toolInstanceId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具实例编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'wareHouseId',
headerAlign: 'center',
align: 'center',
columnLabel: '库房编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'locationId',
headerAlign: 'center',
align: 'center',
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierId',
headerAlign: 'center',
align: 'center',
columnLabel: '借用部门',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '操作人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdDate',
headerAlign: 'center',
align: 'center',
columnLabel: '操作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
toolBorrowingReturnList: [
{
columnProp: 'transNo',
headerAlign: 'center',
align: 'center',
columnLabel: '单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'toolInstanceId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具实例编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'wareHouseId',
headerAlign: 'center',
align: 'center',
columnLabel: '库房编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'locationId',
headerAlign: 'center',
align: 'center',
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '操作人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdDate',
headerAlign: 'center',
align: 'center',
columnLabel: '操作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
toolOutOfLibraryList: [
{
columnProp: 'transNo',
headerAlign: 'center',
align: 'center',
columnLabel: '单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'toolInstanceId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具实例编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'wareHouseId',
headerAlign: 'center',
align: 'center',
columnLabel: '库房编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'locationId',
headerAlign: 'center',
align: 'center',
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierId',
headerAlign: 'center',
align: 'center',
columnLabel: '机台编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '机台名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '操作人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdDate',
headerAlign: 'center',
align: 'center',
columnLabel: '操作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
toolRequisitionList: [
{
columnProp: 'transNo',
headerAlign: 'center',
align: 'center',
columnLabel: '单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'toolInstanceId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具实例编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'wareHouseId',
headerAlign: 'center',
align: 'center',
columnLabel: '库房编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'locationId',
headerAlign: 'center',
align: 'center',
columnLabel: '库位编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '领用人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '操作人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createdDate',
headerAlign: 'center',
align: 'center',
columnLabel: '操作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
]
}
},
created () {
this.getDataList()
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 220;
this.changeColumn();
})
},
methods: {
/**
* 操作类型内容改变事件
*/
changeColumn(){
if(this.queryTool.typeFlag === 'TR' || this.queryTool.typeFlag === 'TJF' || this.queryTool.typeFlag === 'TB' || this.queryTool.typeFlag === 'TLF'){
this.columnList = this.toolBorrowingReturnList;
}
},
/**
* 查询基础数据
*/
getDataList () {
this.dataListLoading = true
this.queryTool.limit = this.pageSize
this.queryTool.page = this.pageIndex
queryToolOperatorRecord (this.queryTool).then(({data}) => {
if (data.code === 0) {
if(this.queryTool.typeFlag === 'TR' || this.queryTool.typeFlag === 'TJF' || this.queryTool.typeFlag === 'TB' || this.queryTool.typeFlag === 'TLF'){
this.columnList = this.toolBorrowingReturnList
} else if (this.queryTool.typeFlag === 'TW') {
this.columnList = this.toolRepairList
} else if (this.queryTool.typeFlag === 'TWF') {
this.columnList = this.toolRepairReturnList
} else if (this.queryTool.typeFlag === 'TJ') {
this.columnList = this.toolBorrowingList
} else if (this.queryTool.typeFlag === 'TC') {
this.columnList = this.toolOutOfLibraryList
} else if (this.queryTool.typeFlag === 'TL') {
this.columnList = this.toolRequisitionList
}
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
},
// --------- ----------
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// --------- end ----------
// --------- ----------
fields () {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
createExportData () {
// ,,
return this.dataList
},
startDownload () {
},
finishDownload () {
}
// --------- end ----------
}
}
</script>
<style>
</style>

1094
src/views/modules/knifemold/toolOperatorRecord_old.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save