diff --git a/src/views/modules/fanuc/currency.vue b/src/views/modules/fanuc/currency.vue index c6cb2ca..ba3d6a7 100644 --- a/src/views/modules/fanuc/currency.vue +++ b/src/views/modules/fanuc/currency.vue @@ -10,17 +10,17 @@ - + - + - + - + @@ -99,89 +99,95 @@ - - - - - 货币参考 + + + + + + 参考货币 + + 新增 + + + + + + + + + - 新增 - - - - - - - - - - - - - 货币汇率 + + + + + 货币汇率 + + 新增 + + + + + + + + - 新增 - - - - - - - - - - + + + + @@ -198,11 +204,13 @@ - + + + - + @@ -232,16 +240,18 @@ + - + + @@ -253,20 +263,20 @@ - + - - + + @@ -614,7 +624,7 @@ export default { columnWidth: 110, columnProp: 'exchangeRate', headerAlign: 'center', - align: 'center', + align: 'right', columnLabel: '汇率', columnHidden: false, columnImage: false, @@ -753,12 +763,18 @@ export default { }) }, - //编码自动转化成大写 + + + //货币自动转化成大写 watch: { modalData: { deep: true, handler: function (newV, oldV) { - // this.modalData.currency = this.modalData.currency.toUpperCase() + this.modalData.currency = this.modalData.currency.toUpperCase() + this.$nextTick(() => { + this.modalData1.currency = this.modalData1.currency.toUpperCase(); + }); + } } }, @@ -772,6 +788,17 @@ export default { methods: { + formatDate(date) { + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + // const hours = date.getHours().toString().padStart(2, '0'); + // const minutes = date.getMinutes().toString().padStart(2, '0'); + // const seconds = date.getSeconds().toString().padStart(2, '0'); + // return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + return `${year}-${month}-${day}`; + }, + // 查询获取数据列表 getDataList () { this.searchData.limit = this.pageSize @@ -855,10 +882,11 @@ export default { this.modalData = { flag: '2', id: row.id, + site: this.$store.state.user.site, currency: row.currency, currencyDesc: row.currencyDesc, active: row.active, - baseCurrencyFlag: row.baseCurrencyFlag, + baseCurrencyFlag: row.baseCurrencyFlag === 'Y', createDate: row.createDate, createBy: row.createBy, updateDate: row.updateDate, @@ -977,6 +1005,8 @@ export default { deleteRefCurrency(row).then(({data}) => { if (data && data.code === 0) { this.changeData() + this.refreshCurrentTabTable () + this.changeData (row) this.$message({ message: '操作成功', type: 'success', @@ -1003,6 +1033,7 @@ export default { addRefCurrency(this.modalData1).then(({data}) => { if (data && data.code === 0) { this.getDataList() + this.refreshCurrentTabTable () this.modalFlag1 = false this.$message({ message: '操作成功', @@ -1021,6 +1052,7 @@ export default { updateRefCurrency(this.modalData1).then(({data}) => { if (data && data.code === 0) { this.getDataList() + this.refreshCurrentTabTable () this.modalFlag1 = false this.$message({ message: '操作成功', @@ -1045,12 +1077,13 @@ export default { flag: '1', id: '', currency: this.currentRow2.currency, - activationDate: '', + activationDate: this.formatDate(new Date()), exchangeRate: '', createDate: '', createBy: '', updateDate: '', updateBy: '', + currencyRateRefcurrencyId: this.currentRow2.id, } this.modalDisableFlag2 = false this.modalFlag2 = true @@ -1077,6 +1110,8 @@ export default { addExchangeCurrency(this.modalData2).then(({data}) => { if (data && data.code === 0) { this.getDataList() + this.refreshCurrentTabTable() + this.refreshCurrentTabTable2() this.modalFlag2 = false this.$message({ message: '操作成功', @@ -1095,6 +1130,7 @@ export default { updateExchangeCurrency(this.modalData2).then(({data}) => { if (data && data.code === 0) { this.getDataList() + this.refreshCurrentTabTable2() this.modalFlag2 = false this.$message({ message: '操作成功', @@ -1121,6 +1157,7 @@ export default { deleteExchangeCurrency(row).then(({data}) => { if (data && data.code === 0) { this.changeData2() + this.refreshCurrentTabTable2() this.$message({ message: '操作成功', type: 'success', @@ -1288,6 +1325,22 @@ export default { this.authUpdate = !updateFlag this.authDelete = !deleteFlag }, + } } + + diff --git a/src/views/modules/fanuc/fanuc.vue b/src/views/modules/fanuc/fanuc.vue index 3f63024..889f470 100644 --- a/src/views/modules/fanuc/fanuc.vue +++ b/src/views/modules/fanuc/fanuc.vue @@ -10,23 +10,23 @@ - + - + - + - + - + - + @@ -55,6 +55,7 @@ :height="height" :data="dataList" @row-click="changeData" + border style="width: 100%;"> @@ -97,28 +98,60 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -165,34 +198,28 @@ - - - - - - - + - + - + - + - + @@ -201,18 +228,12 @@ - - - - - - @@ -224,7 +245,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + @@ -233,22 +281,24 @@ + + diff --git a/src/views/modules/fanuc/fanucGroup.vue b/src/views/modules/fanuc/fanucGroup.vue index 7f8765e..c7ad9e2 100644 --- a/src/views/modules/fanuc/fanucGroup.vue +++ b/src/views/modules/fanuc/fanucGroup.vue @@ -10,13 +10,13 @@ - + - + - + @@ -24,6 +24,12 @@ + + + + + + 查询 新增 @@ -89,25 +95,24 @@ - + - + - + - {{ i.sitename }} - + {{ i.buDesc }} @@ -115,17 +120,17 @@ - + - + - + - + @@ -458,11 +463,11 @@ export default { created () { //页面在加载的时候就调用查询方法 - this.getDataList() // 获取用户的 site 和 bu this.getSiteAndBuByUserName() }, + methods: { // 获取用户的bu getSiteAndBuByUserName () { @@ -473,6 +478,7 @@ export default { if (data.code === 0) { this.userBuList = data.rows } + this.getDataList() }) }, diff --git a/src/views/modules/fanuc/labor.vue b/src/views/modules/fanuc/labor.vue index 7b769af..a32368e 100644 --- a/src/views/modules/fanuc/labor.vue +++ b/src/views/modules/fanuc/labor.vue @@ -10,23 +10,23 @@ - + - + - + - + - + - + @@ -99,30 +99,51 @@ layout="total, sizes, prev, pager, next, jumper"> - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -163,21 +184,20 @@ - + - + - + - {{ i.sitename }} {{ i.buDesc }} @@ -186,20 +206,20 @@ - + - + - + - + @@ -219,30 +239,24 @@ - - + + - - - - - - - + - + @@ -251,19 +265,12 @@ - - - - - - - @@ -716,34 +723,34 @@ export default { }, ], columnList2: [ + // { + // userId: this.$store.state.user.name, + // functionId: 501003, + // serialNumber: '501003TableSite', + // tableId: "501003Table", + // tableName: "工厂编码", + // columnWidth: 130, + // columnProp: 'site', + // headerAlign: 'center', + // align: "center", + // columnLabel: '工厂编码', + // columnHidden: false, + // columnImage: false, + // columnSortable: false, + // sortLv: 0, + // status: true, + // fixed: '', + // }, { userId: this.$store.state.user.name, functionId: 501003, - serialNumber: '501003TableSite', - tableId: "501003Table", - tableName: "工厂编码", - columnWidth: 130, - columnProp: 'site', - headerAlign: 'center', - align: "center", - columnLabel: '工厂编码', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - userId: this.$store.state.user.name, - functionId: 501003, - serialNumber: '501003TableId', + serialNumber: '501003TableSerialNo', tableId: "501003Table", tableName: "序号", columnWidth: 130, - columnProp: 'id', + columnProp: 'serialNo', headerAlign: 'center', - align: "left", + align: "right", columnLabel: '序号', columnHidden: false, columnImage: false, @@ -752,24 +759,24 @@ export default { status: true, fixed: '', }, - { - userId: this.$store.state.user.name, - functionId: 501003, - serialNumber: '501003TableUnitCost', - tableId: "501003Table", - tableName: "单位成本", - columnWidth: 130, - columnProp: 'unitCost', - headerAlign: 'center', - align: "center", - columnLabel: '单位成本', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, + // { + // userId: this.$store.state.user.name, + // functionId: 501003, + // serialNumber: '501003TableUnitCost', + // tableId: "501003Table", + // tableName: "单位成本", + // columnWidth: 130, + // columnProp: 'unitCost', + // headerAlign: 'center', + // align: "right", + // columnLabel: '单位成本', + // columnHidden: false, + // columnImage: false, + // columnSortable: false, + // sortLv: 0, + // status: true, + // fixed: '', + // }, { userId: this.$store.state.user.name, functionId: 501003, @@ -779,7 +786,7 @@ export default { columnWidth: 130, columnProp: 'overheadCost', headerAlign: 'center', - align: "center", + align: "right", columnLabel: '单位制造费用成本', columnHidden: false, columnImage: false, @@ -797,7 +804,7 @@ export default { columnWidth: 130, columnProp: 'laborCost', headerAlign: 'center', - align: "center", + align: "right", columnLabel: '单位人工成本', columnHidden: false, columnImage: false, @@ -939,6 +946,23 @@ export default { }, methods: { + formatDate(date) { + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + // const hours = date.getHours().toString().padStart(2, '0'); + // const minutes = date.getMinutes().toString().padStart(2, '0'); + // const seconds = date.getSeconds().toString().padStart(2, '0'); + // return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + return `${year}-${month}-${day}`; + }, + + + validateInput () { + // 只保留数字 + this.inputValue = this.inputValue.replace(/\D/g, ''); + }, + // 获取用户的bu getSiteAndBuByUserName () { let tempData = { @@ -1001,7 +1025,7 @@ export default { findByLabor(this.currentRow).then(({data}) => { //区分请求成功和失败的状况 if (data && data.code == 0) { - this.dataList1 = data.rows + this.dataList1 = data.rows[0] } else { this.dataList1 = []; } @@ -1143,10 +1167,9 @@ export default { overheadCost: '', laborCost: '', umId: '', - beginDate: '', + beginDate: this.formatDate(new Date()), endDate: '', remark: '', - } this.modalDisableFlag1 = false this.modalFlag1 = true @@ -1181,7 +1204,8 @@ export default { }).then(() => { deleteByCost(row).then(({data}) => { if (data && data.code === 0) { - this.changeData() + // this.changeData() + this.refreshCurrentTabTable2() this.$message({ message: '操作成功', type: 'success', @@ -1209,6 +1233,7 @@ export default { appendByCost(this.modalData1).then(({data}) => { if (data && data.code === 0) { this.getDataList() + this.refreshCurrentTabTable2() this.modalFlag1 = false this.$message({ message: '操作成功', @@ -1227,6 +1252,7 @@ export default { amendByCost(this.modalData1).then(({data}) => { if (data && data.code === 0) { this.getDataList() + this.refreshCurrentTabTable2() this.modalFlag1 = false this.$message({ message: '操作成功', @@ -1397,3 +1423,18 @@ export default { } } + +