From 7062a9f097202368ceed0a22d33c769126ecda98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E5=A5=89=E6=BA=90?= <1976974459@qq.com>
Date: Tue, 25 Jul 2023 13:16:14 +0800
Subject: [PATCH] 2023-07-25
---
src/api/knifemold/tool-info.js | 2 +
src/views/main-sidebar.vue | 69 +-
src/views/modules/knifemold/tool-info.vue | 1144 ++++++++++++-----
.../modules/knifemold/toolOperatorRecord.vue | 896 +++++++++++++
.../knifemold/toolOperatorRecord_old.vue | 1094 ++++++++++++++++
5 files changed, 2865 insertions(+), 340 deletions(-)
create mode 100644 src/views/modules/knifemold/toolOperatorRecord.vue
create mode 100644 src/views/modules/knifemold/toolOperatorRecord_old.vue
diff --git a/src/api/knifemold/tool-info.js b/src/api/knifemold/tool-info.js
index 31d72cb..e7227d4 100644
--- a/src/api/knifemold/tool-info.js
+++ b/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 queryToolOperatorRecord = data => createAPI(`toolInfo/queryToolOperatorRecord`, 'POST', data)
+
diff --git a/src/views/main-sidebar.vue b/src/views/main-sidebar.vue
index ae703a6..bdb0e4d 100644
--- a/src/views/main-sidebar.vue
+++ b/src/views/main-sidebar.vue
@@ -42,12 +42,12 @@
import {userFavoriteList} from '@/api/userFavorite.js'
import {treeDataTranslate} from '@/utils'
import {
- searchFunctionButtonList,
- } from "@/api/sysLanguage.js"
+ searchFunctionButtonList
+ } from '@/api/sysLanguage.js'
import pubsub from 'pubsub-js'
export default {
- data() {
+ data () {
return {
dynamicMenuRoutes: [],
search: '',
@@ -66,46 +66,45 @@
},
computed: {
sidebarLayoutSkin: {
- get() {
+ get () {
return this.$store.state.common.sidebarLayoutSkin
}
},
sidebarFold: {
- get() {
+ get () {
return this.$store.state.common.sidebarFold
}
},
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: {
- get() {
+ get () {
return this.$store.state.common.menuActiveName
},
- set(val) {
+ set (val) {
this.$store.commit('common/updateMenuActiveName', val)
}
},
mainTabs: {
- get() {
-
+ get () {
return this.$store.state.common.mainTabs
},
- set(val) {
+ set (val) {
this.$store.commit('common/updateMainTabs', val)
}
},
mainTabsActiveName: {
- get() {
+ get () {
return this.$store.state.common.mainTabsActiveName
},
- set(val) {
+ set (val) {
this.$store.commit('common/updateMainTabsActiveName', val)
}
}
@@ -113,7 +112,7 @@
watch: {
$route: 'routeHandle'
},
- created() {
+ created () {
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.userFavorites()
@@ -121,15 +120,15 @@
this.routeHandle(this.$route)
this.getFunctionButtonList()
},
- mounted() {//在模板编译完成后执行
+ mounted () { // 在模板编译完成后执行
pubsub.subscribe('userFavorite', (msgName, data) => {
- this.userFavorites()
+ // this.userFavorites()
})
},
methods: {
// 获取 首页菜单
// 获取页面多语言数据
- getFunctionButtonList() {
+ getFunctionButtonList () {
let queryButton = {
functionId: 'systemInformation',
tableId: 'systemInformation',
@@ -143,7 +142,7 @@
})
},
// 用户收藏夹
- userFavorites() {
+ userFavorites () {
let query = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
@@ -156,9 +155,9 @@
},
// 更具 当前节点id 获取上级节点
- getParent(val, sum) {
+ getParent (val, sum) {
if (val == 0) {
- return;
+ return
}
let parent = this.list.filter(item => item.menuId == val)
if (parent.length > 0) {
@@ -168,8 +167,8 @@
}
},
// 搜索菜单方式1 start
- searchMenu1() {
- if (this.search == "") {
+ searchMenu1 () {
+ if (this.search == '') {
this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]').filter(item => item.menuId != 999)
} else {
let menuPlus = []
@@ -179,8 +178,8 @@
// 转换成list
this.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)
let menuSum = []
for (let data of this.menuList) {
@@ -190,14 +189,14 @@
menuSum = Array.from(new Set([...menuSum]))
if (menuSum.length > 0) {
- let menuList = menuSum.filter(item => item.parentId == 0);
+ let menuList = menuSum.filter(item => item.parentId == 0)
this.menuList = menuList
this.treeList(menuList, menuSum)
}
}
},
// 封装树形结构
- treeList(menuList, menuSum) {
+ treeList (menuList, menuSum) {
for (let m1 of menuList) {
for (let m2 of menuSum) {
if (m1.menuId == m2.parentId) {
@@ -208,7 +207,7 @@
}
},
// 搜索菜单方式1 树结构菜单转换list
- treeFindPath(tree, path = []) {
+ treeFindPath (tree, path = []) {
if (!tree) return []
for (const data of tree) {
path.push(data)
@@ -221,11 +220,11 @@
return path
},
// 搜索菜单方式1 去重
- distinct(a, b) {
+ distinct (a, b) {
return Array.from(new Set([...a, ...b]))
},
// 路由操作
- routeHandle(route) {
+ routeHandle (route) {
if (route.meta.isTab) {
// tab选中, 不存在先添加
var tab = this.mainTabs.filter(item => item.name === route.name)[0]
diff --git a/src/views/modules/knifemold/tool-info.vue b/src/views/modules/knifemold/tool-info.vue
index 6a627a0..efeb5d1 100644
--- a/src/views/modules/knifemold/tool-info.vue
+++ b/src/views/modules/knifemold/tool-info.vue
@@ -69,7 +69,7 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
@@ -413,7 +467,8 @@ import {
saveToolInfoDetail,
editToolHeader,
saveToolHeader,
- deleteToolHeader
+ deleteToolHeader,
+ queryToolOperatorRecord
} from '@/api/knifemold/tool-info.js'
import {printToolData} from '@/api/knifemold/receive.js'
import {searchProcessRouteTool} from '@/api/base/productProcessRoute.js'
@@ -423,7 +478,7 @@ export default {
column,
Chooselist
},
- data () {
+ data() {
return {
menuId: this.$route.meta.menuId,
queryButton: {
@@ -988,66 +1043,780 @@ export default {
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
- addOrUpdateVisible: false
- }
- },
- watch: {
- editData: {
- deep: true,
- handler: function (newV, oldV) {
- if (this.editData.locationId) {
- this.editData.locationId = this.editData.locationId.toUpperCase()
- }
- }
- },
- editHeaderData: {
- deep: true,
- handler: function (newV, oldV) {
- if (this.editHeaderData.toolId) {
- this.editHeaderData.toolId = this.editHeaderData.toolId.toUpperCase()
+ addOrUpdateVisible: false,
+ toolOperatorData: 'TR',
+ toolOperatorDataList: [],
+ toolColumnList: [],
+ 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: '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
}
- }
- }
- },
- mounted () {
- this.$nextTick(() => {
- this.height = window.innerHeight - 310
- })
- },
- activated () {
- this.getHeaderData()
- this.getLanguageList()
- },
- methods: {
- // 删除 工具主表信息
- deleteToolHeader () {
- this.$confirm('确定进行删除操作?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let dto = {
- site: this.site,
- toolId: this.headerData.toolId
+ ],
+ 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
}
- // 删除工具主记录
- deleteToolHeader(dto).then(({data}) => {
- if (data.code === 0) {
- this.$message.success(data.msg)
- } else {
- this.$message.warning(data.msg)
+ ],
+ 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: '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
+ }
+ ]
+ }
+ },
+ watch: {
+ editData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ if (this.editData.locationId) {
+ this.editData.locationId = this.editData.locationId.toUpperCase()
+ }
+ }
+ },
+ editHeaderData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ if (this.editHeaderData.toolId) {
+ this.editHeaderData.toolId = this.editHeaderData.toolId.toUpperCase()
+ }
+ }
+ }
+ },
+ mounted() {
+ this.$nextTick(() => {
+ this.height = window.innerHeight - 310
+ })
+ },
+ activated() {
+ this.getHeaderData()
+ // this.getLanguageList()
+ },
+ methods: {
+ // 每页数
+ sizeChangeHandle(val) {
+ this.pageSize = val
+ this.pageIndex = 1
+ this.toolOperatorChange()
+ },
+ // 当前页
+ currentChangeHandle(val) {
+ this.pageIndex = val
+ this.toolOperatorChange()
+ },
+ // 多选
+ selectionChangeHandle(val) {
+ this.dataListSelections = val
+ },
+ /**
+ * 工具实例操作记录内容改变事件
+ */
+ toolOperatorChange() {
+ let queryData = {
+ limit: this.pageSize,
+ page: this.pageIndex,
+ typeFlag: this.toolOperatorData,
+ site: this.site,
+ toolInstanceId: this.currentDetailData.toolInstanceId
+ }
+ queryToolOperatorRecord(queryData).then(({data}) => {
+ if (data.code === 0) {
+ if (queryData.typeFlag === 'TR' || queryData.typeFlag === 'TJF' || queryData.typeFlag === 'TB' || queryData.typeFlag === 'TLF') {
+ this.toolColumnList = this.toolBorrowingReturnList;
+ } else if (queryData.typeFlag === 'TW') {
+ this.toolColumnList = this.toolRepairList;
+ } else if (queryData.typeFlag === 'TWF') {
+ this.toolColumnList = this.toolRepairReturnList;
+ } else if (queryData.typeFlag === 'TJ') {
+ this.toolColumnList = this.toolBorrowingList;
+ } else if (queryData.typeFlag === 'TC') {
+ this.toolColumnList = this.toolOutOfLibraryList;
+ } else if (queryData.typeFlag === 'TL') {
+ this.toolColumnList = this.toolRequisitionList;
+ }
+ this.toolOperatorDataList = data.page.list
+ }
+ })
+ },
+ // 删除工具主表信息
+ deleteToolHeader() {
+ this.$confirm('确定进行删除操作?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let dto = {
+ site: this.site,
+ toolId: this.headerData.toolId
+ }
+ // 删除工具主记录
+ deleteToolHeader(dto).then(({data}) => {
+ if (data.code === 0) {
+ this.$message.success(data.msg)
+ } else {
+ this.$message.warning(data.msg)
}
})
})
},
- // 选在 tab 时触发
- selectTabs () {
+ /**
+ * 选在 tab 时触发
+ */
+ selectTabs() {
if (this.activeName === 'tool') {
this.getToolRouteList()
+ } else if (this.activeName === 'toolOperate') {
+ this.toolOperatorChange()
}
},
- // 获取工具对应的使用工序信息
- getToolRouteList () {
+ /**
+ * 获取工具对应的使用工序信息
+ */
+ getToolRouteList() {
let query = {
site: this.site,
toolID: this.headerData.toolId,
@@ -1057,7 +1826,7 @@ export default {
this.toolRouteDataList = data.rows
})
},
- printMethod (val) {
+ printMethod(val) {
if (!this.currentDetailData.toolInstanceId) {
this.$alert('请选择工具信息!', '提示', {
confirmButtonText: '确定',
@@ -1098,7 +1867,7 @@ export default {
}
})
},
- labelPrintWB (printDataList) {
+ labelPrintWB(printDataList) {
const LODOP = getLodop()
if (LODOP) {
// 循环调用打印机
@@ -1127,7 +1896,7 @@ export default {
LODOP.PREVIEW()
}
},
- labelPrintGJ (printDataList) {
+ labelPrintGJ(printDataList) {
const LODOP = getLodop()
if (LODOP) {
// 循环调用打印机
@@ -1173,7 +1942,7 @@ export default {
LODOP.PREVIEW()
}
},
- getBaseData (val) {
+ getBaseData(val) {
if (this.tagNo === 70) {
this.headerData.toolId = val.ToolID
this.getHeaderData()
@@ -1191,7 +1960,7 @@ export default {
}
},
// 获取基础数据列表
- getBaseList (val, number) {
+ getBaseList(val, number) {
this.number = number
this.tagNo = val
this.$nextTick(() => {
@@ -1211,7 +1980,7 @@ export default {
this.$refs.baseList.init(val, strVal)
})
},
- getTime (date) {
+ getTime(date) {
let jsonDate = new Date(date).toJSON()
return new Date(new Date(jsonDate) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
},
@@ -1219,7 +1988,7 @@ export default {
* 新增工具实例
* @param val
*/
- initToolModel (val) {
+ initToolModel(val) {
this.setUp.toolEditFlag = true
this.setUp.saveToolFlag = false
if (val === 'N') {
@@ -1240,7 +2009,7 @@ export default {
this.editData.status = '未投用'
}
},
- async saveAndUpdateToolDetail () {
+ async saveAndUpdateToolDetail() {
this.setUp.saveToolFlag = true
this.editData.purchaseDate = this.editData.strPurchaseDate
this.editData.phaseInDate = this.editData.strPhaseInDate
@@ -1278,7 +2047,7 @@ export default {
* 新增工具信息
* @param val
*/
- initToolHeaderModel (val) {
+ initToolHeaderModel(val) {
this.toolHeaderShow = true
if (val === 'Y') {
this.toolDetailAddOrEdit = true
@@ -1289,7 +2058,7 @@ export default {
this.editHeaderData.active = this.headerData.active === 'Y' ? true : false
}
},
- saveAndUpdateToolHeader () {
+ saveAndUpdateToolHeader() {
if (!this.editHeaderData.toolId) {
this.$message.warning('工具编号不能为空,请选择')
return
@@ -1328,15 +2097,10 @@ export default {
})
}
},
- getToolHeaderList () {
- getToolHeaderList(this.queryHeaderData).then(({data}) => {
- this.toolHeaderList = data.rows
- })
- },
/**
* 获取工具使用记录
*/
- getSfdcToolingHistList () {
+ getSfdcToolingHistList() {
let queryData = {
site: this.site,
toolInstanceId: this.currentDetailData.toolInstanceId
@@ -1348,7 +2112,7 @@ export default {
/**
* 获取工具维修记录
*/
- getToolInstanceIdUseHist () {
+ getToolInstanceIdUseHist() {
let queryData = {
site: this.site,
toolInstanceId: this.currentDetailData.toolInstanceId
@@ -1360,7 +2124,7 @@ export default {
/**
* 工具实例编码改变时,获取工具实例的使用和维修记录
*/
- toolInstanceIdChange () {
+ toolInstanceIdChange() {
this.sfdcToolingHistList = []
this.toolInstanceIdUseHist = []
let queryData = {
@@ -1380,7 +2144,7 @@ export default {
* 获取实例信息
* @returns {Promise}
*/
- async getDetailList () {
+ async getDetailList() {
this.currentDetailData = {}
this.selectList.select4 = []
this.sfdcToolingHistList = []
@@ -1408,7 +2172,7 @@ export default {
/**
* 获取主记录信息
*/
- getHeaderData () {
+ getHeaderData() {
let queryData = {
site: this.site,
toolId: this.headerData.toolId
@@ -1420,214 +2184,7 @@ export default {
}
})
},
- // 打印方式
- printReport () {
- alert(this.$store.state.user.site)
- //
- // const LODOP = getLodop()
- // if (LODOP) {
- // var strBodyStyle = '' //设置打印样式
- // var strFormHtml = strBodyStyle + '' + document.getElementById('commmon').innerHTML + '' //获取打印内容
- //
- // LODOP.PRINT_INIT('') //初始化
- // LODOP.PRINT_DESIGN();
- // //LODOP.PREVIEW();
- // //LODOP.PRINT();
- //
- // LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') //设置横向
- // LODOP.ADD_PRINT_HTM('1%', '1%', '98%', '98%', strFormHtml) //设置打印内容
- // LODOP.SET_PREVIEW_WINDOW(2, 0, 0, 800, 600, '') //设置预览窗口模式和大小
- // LODOP.PREVIEW()
- // }
- },
- // 校验用户是否收藏
- favoriteIsOk () {
- let userFavorite = {
- userId: this.$store.state.user.id,
- languageCode: this.$i18n.locale
- }
- userFavoriteList(userFavorite).then(({data}) => {
- let size = data.list.filter(item => item.menuId === this.$route.meta.menuId).length
- if (size > 0) {
- this.favorite = true
- } else {
- this.favorite = false
- }
- })
- },
- // 收藏 OR 取消收藏
- favoriteFunction () {
- let userFavorite = {
- userId: this.$store.state.user.id,
- functionId: 106001003
- }
- if (this.favorite) {
- // 取消收藏
- this.$confirm('是否取消收藏?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- removeUserFavorite(userFavorite).then(({data}) => {
- this.$message.success(data.msg)
- this.favorite = false
- })
- })
- } else {
- // 收藏
- saveUserFavorite(userFavorite).then(({data}) => {
- this.$message.success(data.msg)
- this.favorite = true
- })
- }
- },
- // // 保存语言编辑
- // saveLanguageList (val) {
- // saveSysLanguageOne(val).then(({data}) => {
- // if (data.code == 0) {
- // this.$message.success(data.msg)
- // } else {
- // this.$message.error(data.msg)
- // }
- // })
- // },
- // // 编辑语言
- // addLanguageFun() {
- // if (this.querySysLanguagePack.languageCode) {
- // this.addLanguage = true
- // this.languageColumnList = []
- // let query = {
- // functionId: 106001003,
- // tableId: "common1002",
- // languageCode: this.$i18n.locale
- // }
- // getTableDefaultListLanguage(query).then(({data}) => {
- // if (data.rows.length > 0) {
- // this.languageColumnList = data.rows
- // }
- // })
- // this.languageColumnList = this.columnList
- // searchLanguageListByLanguageCode(this.querySysLanguagePack).then(({data}) => {
- // this.languageDataList = data.rows
- // })
- // } else {
- // this.$message('请选中一种语言')
- // }
- // },
- // // 获取多语言列表
- // getLanguageList() {
- // searchSysLanguage(this.queryLanguage).then(({data}) => {
- // this.languageList = data.rows
- // })
- // },
- // // 获取button的词典
- // getFunctionButtonList() {
- // //首先查询当前按钮的多语言
- // searchFunctionButtonList(this.queryButton).then(({data}) => {
- // if (data && data.code == 0) {
- // this.buttons = data.data
- // } else {
- // // saveButtonList(this.buttonList).then(({data}) => {
- // // })
- // }
- // })
- // // 其次查询当前标签的多语言
- // searchFunctionButtonList(this.queryLabel).then(({data}) => {
- // if (data && data.code == 0) {
- // this.labels = data.data
- // } else {
- // // saveButtonList(this.buttonList).then(({data}) => {
- // // })
- // }
- // })
- // },
- // // 获取语言词典
- // getSysLanguageParamList() {
- // searchSysLanguageParam(this.querySysLanguageParam).then(({data}) => {
- // this.sysLanguageParams = data.rows
- // })
- // },
- // 打开页面设置
- userSetting () {
- this.visible = true
- let queryTable = {
- userId: this.$store.state.user.name,
- functionId: 106001003,
- tableId: 'toolInfo106001003',
- languageCode: this.$i18n.locale
- }
- this.$nextTick(() => {
- this.$refs.column.init(queryTable)
- })
- },
- // // 获取 用户保存的 格式列
- // getTableUserColumn() {
- // getTableUserListLanguage(this.queryTableUser).then(({data}) => {
- // if (data.rows.length > 0) {
- // this.columnList = data.rows
- // } else {
- // this.getColumnList()
- // }
- // })
- // },
- // // 获取数据列表
- // getDataList () {
- // this.dataListLoading = true
- // searchSysLanguagePackList(this.querySysLanguagePack).then(({data}) => {
- // if (data && data.code === 0) {
- // this.dataList = data.page.list
- // this.totalPage = data.page.totalCount
- // } else {
- // this.dataList = []
- // this.totalPage = 0
- // }
- // this.dataListLoading = false
- // })
- // },
- // 每页数
- sizeChangeHandle (val) {
- this.pageSize = val
- this.pageIndex = 1
- // this.getDataList()
- },
- // 当前页
- currentChangeHandle (val) {
- this.pageIndex = val
- // this.getDataList()
- },
- // 多选
- selectionChangeHandle (val) {
- this.dataListSelections = val
- },
- // 删除
- deleteHandle (id) {
- var ids = id ? [id] : this.dataListSelections.map(item => {
- return item.id
- })
- this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.$http({
- url: this.$http.adornUrl('//prd/delete'),
- method: 'post',
- data: this.$http.adornData(ids, false)
- }).then(({data}) => {
- if (data && data.code === 0) {
- this.$message.success('操作成功')
- // this.getDataList()
- } else {
- this.$message.error(data.msg)
- }
- })
- })
- },
- fields () {
+ fields() {
let json = '{'
this.columnList.forEach((item, index) => {
if (index === this.columnList.length - 1) {
@@ -1639,30 +2196,7 @@ export default {
json += '}'
let s = eval('(' + json + ')')
return s
- },
- createExportData () {
- // 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据
- // TODO:构造需要下载的数据返回
- if (this.dataListSelections.length > 0) {
- return this.dataListSelections
- }
- return this.dataList
- },
- startDownload () {
- },
- finishDownload () {
}
- },
- created () {
- // this.getTableUserColumn2('toolUseHist106001003', 1)
- // this.getTableUserColumn2('service106001003', 2)
- // this.getTableUserColumn2('106001003Table3', 3)
- // 获取按钮的权限
- // this.getButtonAuthData();
- // this.getTableUserColumn()
- // this.getSysLanguageParamList()
- // this.getFunctionButtonList()
- this.favoriteIsOk()
}
}
diff --git a/src/views/modules/knifemold/toolOperatorRecord.vue b/src/views/modules/knifemold/toolOperatorRecord.vue
new file mode 100644
index 0000000..1717736
--- /dev/null
+++ b/src/views/modules/knifemold/toolOperatorRecord.vue
@@ -0,0 +1,896 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+ 导出
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/knifemold/toolOperatorRecord_old.vue b/src/views/modules/knifemold/toolOperatorRecord_old.vue
new file mode 100644
index 0000000..4c55861
--- /dev/null
+++ b/src/views/modules/knifemold/toolOperatorRecord_old.vue
@@ -0,0 +1,1094 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+ 导出
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
+
+
+
+