From 989785fddcacac088f8800535e1e1bd9474352f7 Mon Sep 17 00:00:00 2001
From: qiezi <15576055375@163.com>
Date: Wed, 25 Sep 2024 10:43:42 +0800
Subject: [PATCH] 20240925
---
src/views/modules/fanuc/currency.vue | 67 ++----
src/views/modules/fanuc/fanuc.vue | 313 ++++++++++++-------------
src/views/modules/fanuc/fanucGroup.vue | 38 +--
3 files changed, 185 insertions(+), 233 deletions(-)
diff --git a/src/views/modules/fanuc/currency.vue b/src/views/modules/fanuc/currency.vue
index 755deae..c3e0ca0 100644
--- a/src/views/modules/fanuc/currency.vue
+++ b/src/views/modules/fanuc/currency.vue
@@ -7,7 +7,7 @@
-
+
@@ -73,11 +73,11 @@
fixed="right"
header-align="center"
align="center"
- width="160"
+ min-width="120"
label="操作">
- 修改
- 删除
+ 修改
+ 删除
@@ -191,7 +191,7 @@
-
+
@@ -230,19 +230,10 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
参考货币
@@ -250,23 +241,11 @@
-
+
-
-
-
-
-
-
@@ -279,7 +258,7 @@
-
+
@@ -464,7 +443,7 @@ export default {
serialNumber: '501004TableSite',
tableId: '501004Table',
tableName: '工厂编码',
- columnWidth: 160,
+ columnWidth: 100,
columnProp: 'site',
headerAlign: 'center',
align: 'center',
@@ -482,7 +461,7 @@ export default {
serialNumber: '501004TableCurrency',
tableId: '501004Table',
tableName: '货币',
- columnWidth: 160,
+ columnWidth: 120,
columnProp: 'currency',
headerAlign: 'center',
align: 'left',
@@ -500,7 +479,7 @@ export default {
serialNumber: '501004TableCurrencyDesc',
tableId: '501004Table',
tableName: '货币描述',
- columnWidth: 160,
+ columnWidth: 180,
columnProp: 'currencyDesc',
headerAlign: 'center',
align: 'left',
@@ -518,7 +497,7 @@ export default {
serialNumber: '501004TableBaseCurrencyFlag',
tableId: '501004Table',
tableName: '本位币',
- columnWidth: 160,
+ columnWidth: 120,
columnProp: 'baseCurrencyFlag',
headerAlign: 'center',
align: 'center',
@@ -536,7 +515,7 @@ export default {
serialNumber: '501004TableActive',
tableId: '501004Table',
tableName: '状态',
- columnWidth: 160,
+ columnWidth: 100,
columnProp: 'active',
headerAlign: 'center',
align: 'center',
@@ -593,7 +572,7 @@ export default {
columnWidth: 160,
columnProp: 'updateDate',
headerAlign: 'center',
- align: 'left',
+ align: 'center',
columnLabel: '修改时间',
columnHidden: false,
columnImage: false,
@@ -628,11 +607,11 @@ export default {
serialNumber: '501004TableCurrency',
tableId: '501004Table',
tableName: '货币',
- columnWidth: 160,
+ columnWidth: 100,
columnProp: 'currency',
headerAlign: 'center',
align: 'left',
- columnLabel: '货币',
+ columnLabel: '参考货币',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -650,7 +629,7 @@ export default {
columnProp: 'currencyDesc',
headerAlign: 'center',
align: 'left',
- columnLabel: '货币描述',
+ columnLabel: '参考货币描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -664,10 +643,10 @@ export default {
serialNumber: '501004TableCreatDate',
tableId: '501004Table',
tableName: '最近汇率日期',
- columnWidth: 160,
+ columnWidth: 120,
columnProp: 'createDate',
headerAlign: 'center',
- align: 'left',
+ align: 'center',
columnLabel: '最近汇率日期',
columnHidden: false,
columnImage: false,
@@ -702,10 +681,10 @@ export default {
serialNumber: '501004TableActivationDate',
tableId: '501004Table',
tableName: '启用日期',
- columnWidth: 140,
+ columnWidth: 100,
columnProp: 'activationDate',
headerAlign: 'center',
- align: 'left',
+ align: 'center',
columnLabel: '启用日期',
columnHidden: false,
columnImage: false,
@@ -720,7 +699,7 @@ export default {
serialNumber: '501004TableCreateDate',
tableId: '501004Table',
tableName: '录入时间',
- columnWidth: 110,
+ columnWidth: 140,
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
diff --git a/src/views/modules/fanuc/fanuc.vue b/src/views/modules/fanuc/fanuc.vue
index ecda596..ab17c97 100644
--- a/src/views/modules/fanuc/fanuc.vue
+++ b/src/views/modules/fanuc/fanuc.vue
@@ -41,7 +41,7 @@
- {{ scope.row[item.columnProp] === 'Y'? '启用' : '停用' }}
+ {{ scope.row[item.columnProp] === 'Y' ? '启用' : '停用' }}
{{ scope.row[item.columnProp] }}
-
+
@@ -79,101 +80,97 @@
layout="total, sizes, prev, pager, next, jumper">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
新增
-
-
+
@@ -247,17 +243,20 @@
-
+
-
+
-
+
@@ -272,7 +271,7 @@
-
+
-
-
+
+
@@ -297,25 +296,26 @@
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -344,7 +344,7 @@ import BuSelect from "../../../components/selector/select/BuSelect.vue";
export default {
components: {BuSelect},
- data () {
+ data() {
return {
activeName: 'detail',
currentRow: {},
@@ -449,7 +449,7 @@ export default {
serialNumber: '501002TableSite',
tableId: "501002Table",
tableName: "工厂编码",
- columnWidth: 130,
+ columnWidth: 80,
columnProp: 'site',
headerAlign: 'center',
align: "center",
@@ -471,7 +471,7 @@ export default {
columnProp: 'buDesc',
headerAlign: 'center',
align: "left",
- columnLabel: 'Bu',
+ columnLabel: 'BU',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -575,7 +575,7 @@ export default {
serialNumber: '501002TableActive',
tableId: "501002Table",
tableName: "状态",
- columnWidth: 130,
+ columnWidth: 80,
columnProp: 'active',
headerAlign: 'center',
align: "center",
@@ -1097,7 +1097,7 @@ export default {
status: true,
fixed: '',
},
- ],
+ ],
rules: {
prodLineNo: [
{
@@ -1159,7 +1159,7 @@ export default {
}
},
- mounted () {
+ mounted() {
this.$nextTick(() => {
this.height = (window.innerHeight - 260) / 2
})
@@ -1175,7 +1175,7 @@ export default {
}
},
- created () {
+ created() {
//页面在加载的时候就调用查询方法
this.getDataList()
// 获取用户的 site 和 bu
@@ -1195,12 +1195,12 @@ export default {
},
- validateInput () {
+ validateInput() {
// 只保留数字
this.inputValue = this.inputValue.replace(/\D/g, '');
},
// 获取用户的bu
- getSiteAndBuByUserName () {
+ getSiteAndBuByUserName() {
let tempData = {
username: this.$store.state.user.name,
}
@@ -1212,7 +1212,7 @@ export default {
},
// 查询获取数据列表
- getDataList () {
+ getDataList() {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
findAll(this.searchData).then(({data}) => {
@@ -1222,28 +1222,28 @@ export default {
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
- if (this.dataList.length > 0) {
- this.currentRow = this.dataList[0]
- this.refreshCurrentTabTable()
- }
+ if (this.dataList.length > 0) {
+ this.currentRow = this.dataList[0]
+ this.refreshCurrentTabTable()
+ }
})
},
// 每页数
- sizeChangeHandle (val) {
+ sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
- currentChangeHandle (val) {
+ currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
//页签二插查询
- tabClick (tab, event) {
+ tabClick(tab, event) {
// 刷新列表数据
if (this.activeName == 'detail') {
this.refreshCurrentTabTable()
@@ -1254,7 +1254,7 @@ export default {
}
},
- changeData (row) {
+ changeData(row) {
this.currentRow = JSON.parse(JSON.stringify(row));
// this.headerData = row;
@@ -1267,13 +1267,13 @@ export default {
}
},
- rowStyle ({row}) {
+ rowStyle({row}) {
if (this.currentRow.workCenterNo === row.workCenterNo) {
- return { 'background-color': '#E8F7F6', cursor: 'pointer' };
+ return {'background-color': '#E8F7F6', cursor: 'pointer'};
}
},
- refreshCurrentTabTable () {
+ refreshCurrentTabTable() {
findFanuc(this.currentRow).then(({data}) => {
//区分请求成功和失败的状况
@@ -1285,7 +1285,7 @@ export default {
});
},
- refreshCurrentTabTable2 () {
+ refreshCurrentTabTable2() {
queryByCost(this.currentRow).then(({data}) => {
//区分请求成功和失败的状况
@@ -1297,7 +1297,7 @@ export default {
});
},
- refreshCurrentTabTable3 () {
+ refreshCurrentTabTable3() {
queryResourceInfo(this.currentRow).then(({data}) => {
//区分请求成功和失败的状况
if (data && data.code == 0) {
@@ -1309,7 +1309,7 @@ export default {
},
// 新增按钮
- addModal () {
+ addModal() {
this.modalData1 = {
flag: '1',
site: this.$store.state.user.site,
@@ -1329,7 +1329,7 @@ export default {
},
// 修改按钮
- updateModal (row) {
+ updateModal(row) {
this.modalData1 = {
flag: '2',
site: this.$store.state.user.site,
@@ -1349,7 +1349,7 @@ export default {
},
// 删除方法
- deleteModal (row) {
+ deleteModal(row) {
this.$confirm(`是否删除此数据?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -1358,7 +1358,7 @@ export default {
deleteByCost(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
- this.refreshCurrentTabTable2 ()
+ this.refreshCurrentTabTable2()
this.$message({
message: '操作成功',
type: 'success',
@@ -1377,7 +1377,7 @@ export default {
},
// 新增/修改方法
- saveData () {
+ saveData() {
if (this.modalData1.flag === '1') { // 新增
if (this.modalData1.workCenterNo == null || this.modalData1.workCenterNo === '') {
this.$message.warning('请选择一条加工中心数据!')
@@ -1387,7 +1387,7 @@ export default {
this.$message.warning('请选择启用日期!')
return
}
- if (this.modalData1.unitCost == null || this.modalData1.unitCost <0) {
+ if (this.modalData1.unitCost == null || this.modalData1.unitCost < 0) {
this.$message.warning('单位成本不能小于0!')
return
}
@@ -1432,7 +1432,7 @@ export default {
}
},
//加工中心
- updateModal1 (row) {
+ updateModal1(row) {
this.modalData = {
flag: '2',
site: this.$store.state.user.site,
@@ -1464,7 +1464,7 @@ export default {
this.modalDisableFlag1 = true
this.modalFlag1 = true
},
- saveData1 () {
+ saveData1() {
if (this.modalData.flag === '2') { // 修改
updateFanuc(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@@ -1490,7 +1490,7 @@ export default {
// 查询检验类型
- inspectionTypeSearch () {
+ inspectionTypeSearch() {
let tempData = {
site: this.$store.state.user.site
}
@@ -1502,7 +1502,7 @@ export default {
},
// 校验用户是否收藏
- favoriteIsOk () {
+ favoriteIsOk() {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
@@ -1517,7 +1517,7 @@ export default {
},
// 收藏 OR 取消收藏
- favoriteFunction () {
+ favoriteFunction() {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
@@ -1537,7 +1537,7 @@ export default {
},
//导出excel
- async createExportData () {
+ async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await findAll(this.searchData).then(({data}) => {
@@ -1546,13 +1546,13 @@ export default {
return this.exportList
},
- startDownload () {
+ startDownload() {
},
- finishDownload () {
+ finishDownload() {
},
- fields () {
+ fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
@@ -1567,7 +1567,7 @@ export default {
},
// 动态列开始 获取 用户保存的 格式列
- async getTableUserColumn (tableId, columnId) {
+ async getTableUserColumn(tableId, columnId) {
let queryTableUser = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
@@ -1599,7 +1599,7 @@ export default {
},
// 获取 tableDefault 列
- async getColumnList (tableId, columnId) {
+ async getColumnList(tableId, columnId) {
let queryTable = {
functionId: this.$route.meta.menuId,
tableId: tableId,
@@ -1628,7 +1628,7 @@ export default {
},
//获取按钮的权限数据
- getButtonAuthData () {
+ getButtonAuthData() {
let searchFlag = this.isAuth(this.menuId + ":search")
let saveFlag = this.isAuth(this.menuId + ":save")
let updateFlag = this.isAuth(this.menuId + ":update")
@@ -1644,20 +1644,11 @@ export default {