From 39aa16827f8f007dc0278b2622387f2546978688 Mon Sep 17 00:00:00 2001
From: qiezi <15576055375@163.com>
Date: Thu, 26 Sep 2024 11:16:57 +0800
Subject: [PATCH] 20240926
---
src/views/modules/fanuc/currency.vue | 256 ++++++++++++++-------------
src/views/modules/fanuc/fanuc.vue | 30 +---
src/views/modules/fanuc/labor.vue | 81 ++++-----
src/views/modules/quote/index.vue | 4 +
4 files changed, 179 insertions(+), 192 deletions(-)
diff --git a/src/views/modules/fanuc/currency.vue b/src/views/modules/fanuc/currency.vue
index c3e0ca0..61fad3c 100644
--- a/src/views/modules/fanuc/currency.vue
+++ b/src/views/modules/fanuc/currency.vue
@@ -7,18 +7,19 @@
-
+
-
+
-
+
@@ -43,7 +44,7 @@
- {{ scope.row[item.columnProp] === 'Y'? '启用' : '停用' }}
+ {{ scope.row[item.columnProp] === 'Y' ? '启用' : '停用' }}
{{ scope.row[item.columnProp] }}
-
+
@@ -73,7 +75,7 @@
fixed="right"
header-align="center"
align="center"
- min-width="120"
+ min-width="100"
label="操作">
修改
@@ -93,17 +95,17 @@
-
-
-
-
-
+
+
+
+
+
参考货币
新增
@@ -127,26 +129,25 @@
fixed="right"
header-align="center"
align="center"
- width="160"
+ width="80"
label="操作">
-
+
删除
-
-
-
-
-
-
+
+
+
+
+
货币汇率
-
+
新增
-
+
删除
-
-
+
+
-
+
-
+
-
+
@@ -199,17 +201,17 @@
-
+
-
+
-
+
@@ -231,7 +233,7 @@
-
+
@@ -255,13 +257,15 @@
-
+
-
+
-
+
-
+
-
+
-
+
查询
@@ -357,7 +361,7 @@ import {
} from '@/api/fanucGroup/currency.js'
export default {
- data () {
+ data() {
return {
activeName: 'detail',
currentRow: '',
@@ -443,7 +447,7 @@ export default {
serialNumber: '501004TableSite',
tableId: '501004Table',
tableName: '工厂编码',
- columnWidth: 100,
+ columnWidth: 80,
columnProp: 'site',
headerAlign: 'center',
align: 'center',
@@ -461,7 +465,7 @@ export default {
serialNumber: '501004TableCurrency',
tableId: '501004Table',
tableName: '货币',
- columnWidth: 120,
+ columnWidth: 80,
columnProp: 'currency',
headerAlign: 'center',
align: 'left',
@@ -479,7 +483,7 @@ export default {
serialNumber: '501004TableCurrencyDesc',
tableId: '501004Table',
tableName: '货币描述',
- columnWidth: 180,
+ columnWidth: 160,
columnProp: 'currencyDesc',
headerAlign: 'center',
align: 'left',
@@ -497,7 +501,7 @@ export default {
serialNumber: '501004TableBaseCurrencyFlag',
tableId: '501004Table',
tableName: '本位币',
- columnWidth: 120,
+ columnWidth: 80,
columnProp: 'baseCurrencyFlag',
headerAlign: 'center',
align: 'center',
@@ -515,7 +519,7 @@ export default {
serialNumber: '501004TableActive',
tableId: '501004Table',
tableName: '状态',
- columnWidth: 100,
+ columnWidth: 80,
columnProp: 'active',
headerAlign: 'center',
align: 'center',
@@ -533,7 +537,7 @@ export default {
serialNumber: '501004TableCreateDate',
tableId: '501004Table',
tableName: '录入时间',
- columnWidth: 160,
+ columnWidth: 120,
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@@ -551,7 +555,7 @@ export default {
serialNumber: '501004TableCreateBy',
tableId: '501004Table',
tableName: '录入人',
- columnWidth: 160,
+ columnWidth: 80,
columnProp: 'createBy',
headerAlign: 'center',
align: 'left',
@@ -569,7 +573,7 @@ export default {
serialNumber: '501004TableUpdateDate',
tableId: '501004Table',
tableName: '修改时间',
- columnWidth: 160,
+ columnWidth: 120,
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
@@ -587,7 +591,7 @@ export default {
serialNumber: '501004TableUpdateBy',
tableId: '501004Table',
tableName: '修改人',
- columnWidth: 160,
+ columnWidth: 80,
columnProp: 'updateBy',
headerAlign: 'center',
align: 'left',
@@ -607,7 +611,7 @@ export default {
serialNumber: '501004TableCurrency',
tableId: '501004Table',
tableName: '货币',
- columnWidth: 100,
+ columnWidth: 80,
columnProp: 'currency',
headerAlign: 'center',
align: 'left',
@@ -625,7 +629,7 @@ export default {
serialNumber: '501004TableCurrencyDesc',
tableId: '501004Table',
tableName: '货币描述',
- columnWidth: 160,
+ columnWidth: 140,
columnProp: 'currencyDesc',
headerAlign: 'center',
align: 'left',
@@ -663,7 +667,7 @@ export default {
serialNumber: '501004TableExchangeRate',
tableId: '501004Table',
tableName: '汇率',
- columnWidth: 110,
+ columnWidth: 80,
columnProp: 'exchangeRate',
headerAlign: 'center',
align: 'right',
@@ -699,7 +703,7 @@ export default {
serialNumber: '501004TableCreateDate',
tableId: '501004Table',
tableName: '录入时间',
- columnWidth: 140,
+ columnWidth: 120,
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@@ -717,7 +721,7 @@ export default {
serialNumber: '501004TableCreateBy',
tableId: '501004Table',
tableName: '录入人',
- columnWidth: 110,
+ columnWidth: 80,
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
@@ -761,28 +765,27 @@ export default {
authDelete: false,
menuId: this.$route.meta.menuId,
- siteList:[],
- currencyVisible:false,
- currency:{
+ siteList: [],
+ currencyVisible: false,
+ currency: {
site: '',
currency: '',
currencyDesc: '',
},
- currencyList:[],
+ currencyList: [],
no: 1,
size: 20,
total: 0,
}
},
- mounted () {
+ mounted() {
this.$nextTick(() => {
this.height = (window.innerHeight - 260) / 2
})
},
-
//货币自动转化成大写
watch: {
modalData: {
@@ -795,12 +798,12 @@ export default {
}
},
- 'modalData1.currency'(newVal,oldVal){
+ 'modalData1.currency'(newVal, oldVal) {
this.modalData1.currency = newVal.toUpperCase();
}
},
- created () {
+ created() {
this.handleQuerySite()
//页面在加载的时候就调用查询方法
this.getDataList()
@@ -822,7 +825,7 @@ export default {
},
// 查询获取数据列表
- getDataList () {
+ getDataList() {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
findCurrency(this.searchData).then(({data}) => {
@@ -836,24 +839,25 @@ export default {
},
// 每页数
- sizeChangeHandle (val) {
+ sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
- currentChangeHandle (val) {
+ currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
//货币参考
- changeData (row) {
+ changeData(row) {
this.currentRow = JSON.parse(JSON.stringify(row))
this.headerData = row
this.refreshCurrentTabTable()
+ this.changeData2({})
},
- refreshCurrentTabTable () {
+ refreshCurrentTabTable() {
findRefCurrency(this.currentRow).then(({data}) => {
//区分请求成功和失败的状况
if (data && data.code === 0) {
@@ -864,12 +868,12 @@ export default {
})
},
//货币汇率
- changeData2 (row) {
+ changeData2(row) {
this.currentRow2 = JSON.parse(JSON.stringify(row))
this.headerData2 = row
this.refreshCurrentTabTable2()
},
- refreshCurrentTabTable2 () {
+ refreshCurrentTabTable2() {
findExchangeCurrency(this.currentRow2).then(({data}) => {
//区分请求成功和失败的状况
if (data && data.code == 0) {
@@ -881,7 +885,7 @@ export default {
},
//货币
// 新增按钮
- addModal () {
+ addModal() {
this.handleQuerySite();
this.modalData = {
flag: '1',
@@ -901,7 +905,7 @@ export default {
},
// 修改按钮
- updateModal (row) {
+ updateModal(row) {
this.modalData = {
flag: '2',
id: row.id,
@@ -918,7 +922,7 @@ export default {
this.modalDisableFlag = true
this.modalFlag = true
},
- saveData () {
+ saveData() {
if (this.modalData.baseCurrencyFlag) {
this.modalData.baseCurrencyFlag = 'Y'
} else {
@@ -962,7 +966,7 @@ export default {
})
}
},
- deleteModal (row) {
+ deleteModal(row) {
this.$confirm(`是否删除此数据?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -990,8 +994,8 @@ export default {
//货币参考
// 新增按钮
- addModal1 () {
- if (!this.currentRow){
+ addModal1() {
+ if (!this.currentRow) {
this.$message.warning('请选择货币记录!')
return
}
@@ -1009,7 +1013,7 @@ export default {
this.modalFlag1 = true
},
// 修改按钮
- updateModal1 (row) {
+ updateModal1(row) {
this.modalData1 = {
flag1: '2',
id: row.id,
@@ -1023,7 +1027,7 @@ export default {
this.modalFlag1 = true
},
// 删除方法
- deleteModal1 (row) {
+ deleteModal1(row) {
this.$confirm(`是否删除此数据?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -1031,7 +1035,7 @@ export default {
}).then(() => {
deleteRefCurrency(row).then(({data}) => {
if (data && data.code === 0) {
- this.refreshCurrentTabTable ()
+ this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
@@ -1049,7 +1053,7 @@ export default {
})
},
// 新增/修改方法
- saveData1 () {
+ saveData1() {
if (this.modalData1.flag1 === '1') { // 新增
if (this.modalData1.currencyId == null || this.modalData1.currencyId === '') {
this.$message.warning('请选择一条货币数据!')
@@ -1058,7 +1062,7 @@ export default {
addRefCurrency(this.modalData1).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
- this.refreshCurrentTabTable ()
+ this.refreshCurrentTabTable()
this.modalFlag1 = false
this.$message({
message: '操作成功',
@@ -1077,7 +1081,7 @@ export default {
updateRefCurrency(this.modalData1).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
- this.refreshCurrentTabTable ()
+ this.refreshCurrentTabTable()
this.modalFlag1 = false
this.$message({
message: '操作成功',
@@ -1097,8 +1101,8 @@ export default {
//货币汇率
// 新增按钮
- addModal2 () {
- if (!this.currentRow2){
+ addModal2() {
+ if (!this.currentRow2) {
this.$message.warning('请选择参考货币记录!')
return
}
@@ -1119,7 +1123,7 @@ export default {
},
// 修改按钮
- updateModal2 (row) {
+ updateModal2(row) {
this.modalData2 = {
flag: '2',
id: row.id,
@@ -1130,9 +1134,9 @@ export default {
this.modalDisableFlag2 = true
this.modalFlag2 = true
},
- saveData2 () {
+ saveData2() {
if (this.modalData2.flag === '1') { // 新增
- if (this.modalData2.currency==null || this.modalData2.currency==='') {
+ if (this.modalData2.currency == null || this.modalData2.currency === '') {
this.$message.warning('请选择一条货币参考数据!')
return
}
@@ -1177,7 +1181,7 @@ export default {
}
},
- deleteModal2 (row) {
+ deleteModal2(row) {
this.$confirm(`是否删除此数据?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -1204,7 +1208,7 @@ export default {
},
// 查询检验类型
- inspectionTypeSearch () {
+ inspectionTypeSearch() {
let tempData = {
site: this.$store.state.user.site
}
@@ -1216,7 +1220,7 @@ export default {
},
// 校验用户是否收藏
- favoriteIsOk () {
+ favoriteIsOk() {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
@@ -1231,7 +1235,7 @@ export default {
},
// 收藏 OR 取消收藏
- favoriteFunction () {
+ favoriteFunction() {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
@@ -1251,7 +1255,7 @@ export default {
},
//导出excel
- async createExportData () {
+ async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await findAll1(this.searchData).then(({data}) => {
@@ -1260,13 +1264,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) {
@@ -1281,7 +1285,7 @@ export default {
},
// 动态列开始 获取 用户保存的 格式列
- async getTableUserColumn (tableId, columnId) {
+ async getTableUserColumn(tableId, columnId) {
let queryTableUser = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
@@ -1313,7 +1317,7 @@ export default {
},
// 获取 tableDefault 列
- async getColumnList (tableId, columnId) {
+ async getColumnList(tableId, columnId) {
let queryTable = {
functionId: this.$route.meta.menuId,
tableId: tableId,
@@ -1342,7 +1346,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')
@@ -1353,31 +1357,31 @@ export default {
this.authUpdate = !updateFlag
this.authDelete = !deleteFlag
},
- handleQuerySite(){
+ handleQuerySite() {
let params = {
username: this.$store.state.user.name,
}
- queryUserSite(params).then(({data})=>{
- if (data && data.code === 0){
+ queryUserSite(params).then(({data}) => {
+ if (data && data.code === 0) {
this.siteList = data.row2
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- rowStyle({row}){
+ rowStyle({row}) {
if (this.currentRow.site === row.site && this.currentRow.currency === row.currency) {
- return { 'background-color': '#E8F7F6', cursor: 'pointer' };
+ return {'background-color': '#E8F7F6', cursor: 'pointer'};
}
},
- rowStyle2({row}){
+ rowStyle2({row}) {
if (this.currentRow2.id === row.id) {
- return { 'background-color': '#E8F7F6', cursor: 'pointer' };
+ return {'background-color': '#E8F7F6', cursor: 'pointer'};
}
},
- handleBlurCurrency(){
+ handleBlurCurrency() {
let params = {
site: this.modalData1.site,
currency: this.modalData1.currency,
@@ -1385,52 +1389,52 @@ export default {
limit: this.searchData.limit,
}
findCurrency(params).then(({data}) => {
- if ( data && data.code === 0) {
- if (data.page.list.length === 1){
+ if (data && data.code === 0) {
+ if (data.page.list.length === 1) {
this.modalData1.currency = this.dataList[0].currency
this.modalData1.currencyDesc = this.dataList[0].currencyDesc
- }else {
+ } else {
this.modalData1.currencyDesc = ''
}
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- handleClickCurrency(){
+ handleClickCurrency() {
this.currency.site = this.modalData1.site
this.currency.currency = this.modalData1.currency
this.queryCurrency();
this.currencyVisible = true
},
- queryCurrency(){
+ queryCurrency() {
let params = {
...this.currency,
page: this.no,
limit: this.size,
}
findCurrency(params).then(({data}) => {
- if ( data && data.code === 0) {
+ if (data && data.code === 0) {
this.currencyList = data.page.list
this.total = data.page.totalCount
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- handleSizeChange(val){
+ handleSizeChange(val) {
this.size = val
this.queryCurrency()
},
- handleCurrentChange(val){
+ handleCurrentChange(val) {
this.no = val
this.queryCurrency()
},
- handleDblclick(row){
+ handleDblclick(row) {
this.modalData1.currency = row.currency
this.modalData1.currencyDesc = row.currencyDesc
this.currencyVisible = false
@@ -1440,15 +1444,17 @@ export default {