diff --git a/src/api/ManufacturingCenter/maintainInformation.js b/src/api/ManufacturingCenter/maintainInformation.js new file mode 100644 index 0000000..6bcf509 --- /dev/null +++ b/src/api/ManufacturingCenter/maintainInformation.js @@ -0,0 +1,192 @@ +import request from '@/utils/request' +import state from '@/store' +import router from '@/router' + +// 获取工位 表1 +export function getTableData1() { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '3', + name: 'SELECT * FROM [基础数据_设备工位点检表]inner join dbo.基础数据_点检类型名称 on [基础数据_设备工位点检表].点检表类型 = 基础数据_点检类型名称.点检表类型流水号' + } + }) +} +// 点检类型 表2 +export function getTableData2() { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '3', + name: 'select * from 基础数据_点检类型名称' + } + }) +} +// 点检内容 表3 +export function getTableData3(num) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '3', + name: `select * from 基础数据_点检内容 where 点检表类型 = ${num}` + } + }) +} +// 表1 编辑 +export function editType(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: `update [基础数据_设备工位点检表] set 点检表类型 = ${num1} where ID = ${num2}` + } + }) +} +export function confirmEdit1(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: `update [基础数据_点检类型名称] set 点检表类型名称 = '${num1}' where 点检表类型流水号 = ${num2}` + } + }) +} +export function confirmEdit2(num1, num2, num3) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: `update 基础数据_点检内容 set 保养周期 = ${num1} ,保养项目 = '${num2}' where ID = ${num3}` + } + }) +} +export function openDelete1(num1) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: `delete 基础数据_点检类型名称 where 点检表类型流水号 = ${num1}` + } + }) +} +export function selectCount(num1) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '3', + name: `SELECT 工位号 FROM [基础数据_设备工位点检表] where 点检表类型 = ${num1}` + } + }) +} +export function openDelete2(num1) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: `delete 基础数据_点检内容 where ID = ${num1}` + } + }) +} +export function submit1(num1) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: `insert into 基础数据_点检类型名称 (点检表类型名称) values ('${num1}')` + } + }) +} +export function submit2(num1, num2, num3) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '4', + name: ` declare @id int = 0 + SELECT top 1 @id = ID FROM [dbo].基础数据_点检内容 order by ID desc + set @id = @id + 1 + insert into 基础数据_点检内容 (点检任务编号,点检表类型,保养项目,保养周期) values (@id,${num1},'${num2}',${num3})` + } + }) +} +export function exportOut(num1, num2, num3) { + return request({ + url: '', + method: 'post', + data: { + UserID: state.state.user.id, + ModularID: router.currentRoute.path, + type: '3', + name: `SELECT * + ,case when [FN1] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN1]) else '' end as [姓名1] + ,case when [FN2] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN2]) else '' end as [姓名2] + ,case when [FN3] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN3]) else '' end as [姓名3] + ,case when [FN4] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN4]) else '' end as [姓名4] + ,case when [FN5] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN5]) else '' end as [姓名5] + ,case when [FN6] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN6]) else '' end as [姓名6] + ,case when [FN7] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN7]) else '' end as [姓名7] + ,case when [FN8] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN8]) else '' end as [姓名8] + ,case when [FN9] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN9]) else '' end as [姓名9] + ,case when [FN10] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN10]) else '' end as [姓名10] + ,case when [FN11] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN11]) else '' end as [姓名11] + ,case when [FN12] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN12]) else '' end as [姓名12] + ,case when [FN13] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN13]) else '' end as [姓名13] + ,case when [FN14] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN14]) else '' end as [姓名14] + ,case when [FN15] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN15]) else '' end as [姓名15] + ,case when [FN16] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN16]) else '' end as [姓名16] + ,case when [FN17] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN17]) else '' end as [姓名17] + ,case when [FN18] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN18]) else '' end as [姓名18] + ,case when [FN19] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN19]) else '' end as [姓名19] + ,case when [FN20] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN20]) else '' end as [姓名20] + ,case when [FN21] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN21]) else '' end as [姓名21] + ,case when [FN22] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN22]) else '' end as [姓名22] + ,case when [FN23] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN23]) else '' end as [姓名23] + ,case when [FN24] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN24]) else '' end as [姓名24] + ,case when [FN25] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN25]) else '' end as [姓名25] + ,case when [FN26] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN26]) else '' end as [姓名26] + ,case when [FN27] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN27]) else '' end as [姓名27] + ,case when [FN28] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN28]) else '' end as [姓名28] + ,case when [FN29] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN29]) else '' end as [姓名29] + ,case when [FN30] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN30]) else '' end as [姓名30] + ,case when [FN31] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN31]) else '' end as [姓名31] + FROM + [基础数据_设备工位点检表] inner join [工位日点检任务记录] + on [基础数据_设备工位点检表].工位号 = [工位日点检任务记录].工位号 + inner join [基础数据_点检内容] + on [工位日点检任务记录].点检任务编号 = [基础数据_点检内容].点检任务编号 + where [基础数据_设备工位点检表].工位号 = '${num1}' and 年 = '${num2}' and 月 = '${num3}' order by [工位日点检任务记录].点检任务编号` + } + }) +} diff --git a/src/assets/img/HELI.jpg b/src/assets/img/HELI.jpg new file mode 100644 index 0000000..06a3b4d Binary files /dev/null and b/src/assets/img/HELI.jpg differ diff --git a/src/assets/img/HELILOGO.png b/src/assets/img/HELILOGO.png new file mode 100644 index 0000000..9fa09c3 Binary files /dev/null and b/src/assets/img/HELILOGO.png differ diff --git a/src/assets/img/SiyuanLOGO.png b/src/assets/img/SiyuanLOGO.png new file mode 100644 index 0000000..a80b0e5 Binary files /dev/null and b/src/assets/img/SiyuanLOGO.png differ diff --git a/src/views/BasicData/DistributionStation/index.vue b/src/views/BasicData/DistributionStation/index.vue index 1aa5a56..a12e37e 100644 --- a/src/views/BasicData/DistributionStation/index.vue +++ b/src/views/BasicData/DistributionStation/index.vue @@ -11,7 +11,7 @@ :value="item.value" size="mini"/> -
+
{ + this.ExecDatabase(Data).then(response => { + if (response.data[0].result === '1') { + console.log('1') + resolve(1) + } else { + console.log('0') + reject(2) + } + }) + }) + }, + async deleteAdd(val) { + var param = [] + param[0] = ['UserId', this.peopleValue] + param[1] = ['OpName', val] + console.log(param) + var Data = this.CreateData('12', 'MES_Web_User_Delete', param) + return new Promise((resolve, reject) => { + this.ExecDatabase(Data).then(response => { + if (response.data[0].result === '1') { + console.log('1') + resolve(1) + } else { + console.log('0') + reject(2) + } + }) + }) } } } diff --git a/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue b/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue index 2ce9890..f4b0837 100644 --- a/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue +++ b/src/views/BasicDataMaintenance/StationInformationMaintenance/index.vue @@ -485,7 +485,7 @@ size="55%"> - + @@ -793,8 +793,7 @@ export default { dataTypeValue: '' }, rules: { // 表单验证规则 - dataTypeValue: [{ required: true, message: '请选择', trigger: 'change' }], - name: [{ required: true, message: '请输入', trigger: 'blur' }] + dataTypeValue: [{ required: true, message: '请选择', trigger: 'change' }] }, formData: { ID: '', // ID @@ -877,6 +876,13 @@ export default { this.searchTable() }, methods: { + selectCode(val) { + for (let i = 0; i < this.tableData.length; i++) { + if (val === this.tableData[i].工位代码) { + this.$message.error('工位代码重复,请重新输入!') + } + } + }, handleClose(done) { this.$confirm('确认关闭?') .then(_ => { diff --git a/src/views/EquipmentOperationAnalysis/EquipmentMaintenancePlan/index.vue b/src/views/EquipmentOperationAnalysis/EquipmentMaintenancePlan/index.vue index 3049a16..ebdd42a 100644 --- a/src/views/EquipmentOperationAnalysis/EquipmentMaintenancePlan/index.vue +++ b/src/views/EquipmentOperationAnalysis/EquipmentMaintenancePlan/index.vue @@ -2,6 +2,15 @@
+ 保存设置 @@ -77,6 +86,7 @@ export default { return { tableData: [], dateValue: '', + monthValue: new Date(), checked: '', value: new Date(), multipleSelection: '', @@ -85,39 +95,7 @@ export default { } }, created() { - for (let i = 1; i < 32; i++) { - let h = i - h = h < 10 ? ('0' + h) : h - this.dataC['2022-07-' + h] = { - banCheck: false, banTime: '11:00:00', - dayCheck: false, dayTime: '11:00:00', - weekCheck: false, weekTime: '11:00:00', - monthCheck: false, monthTime: '11:00:00', - yearCheck: false, yearTime: '11:00:00' - } - } - for (let i = 1; i < 32; i++) { - let h = i - h = h < 10 ? ('0' + h) : h - this.dataC['2022-08-' + h] = { - banCheck: false, banTime: '11:00:00', - dayCheck: false, dayTime: '11:00:00', - weekCheck: false, weekTime: '11:00:00', - monthCheck: false, monthTime: '11:00:00', - yearCheck: false, yearTime: '11:00:00' - } - } - for (let i = 1; i < 32; i++) { - let h = i - h = h < 10 ? ('0' + h) : h - this.dataC['2022-09-' + h] = { - banCheck: false, banTime: '11:00:00', - dayCheck: false, dayTime: '11:00:00', - weekCheck: false, weekTime: '11:00:00', - monthCheck: false, monthTime: '11:00:00', - yearCheck: false, yearTime: '11:00:00' - } - } + this.initializationDate() this.getStationNumber() }, mounted() { @@ -134,6 +112,55 @@ export default { window.dataC = this.dataC }, methods: { + initializationDate() { + const date = this.monthValue + const month = date.getMonth() < 10 ? ('0' + date.getMonth()) : date.getMonth() + const month1 = date.getMonth() + 1 < 10 ? ('0') + (date.getMonth() + 1) : date.getMonth() + 1 + const month2 = date.getMonth() + 2 < 10 ? ('0') + (date.getMonth() + 2) : date.getMonth() + 2 + const time1 = date.getFullYear() + '-' + month1 + '-' + let time2, time + console.log(month, 'month') + if (month === '00') { + time = (date.getFullYear() - 1) + '-' + '12' + '-' + } else { + time = date.getFullYear() + '-' + month + '-' + } + if (month2 === 13) { + time2 = (date.getFullYear() + 1) + '-' + '01' + '-' + } else { + time2 = date.getFullYear() + '-' + month2 + '-' + } + console.log(time, time1, time2) + for (let i = 1; i < 32; i++) { + let h = i + h = h < 10 ? ('0' + h) : h + this.dataC[time + h] = { + banCheck: false, banTime: '11:00:00', + dayCheck: false, dayTime: '11:00:00', + weekCheck: false, weekTime: '11:00:00', + monthCheck: false, monthTime: '11:00:00', + yearCheck: false, yearTime: '11:00:00' + } + this.dataC[time1 + h] = { + banCheck: false, banTime: '11:00:00', + dayCheck: false, dayTime: '11:00:00', + weekCheck: false, weekTime: '11:00:00', + monthCheck: false, monthTime: '11:00:00', + yearCheck: false, yearTime: '11:00:00' + } + this.dataC[time2 + h] = { + banCheck: false, banTime: '11:00:00', + dayCheck: false, dayTime: '11:00:00', + weekCheck: false, weekTime: '11:00:00', + monthCheck: false, monthTime: '11:00:00', + yearCheck: false, yearTime: '11:00:00' + } + } + }, + changeMonth() { + this.value = new Date(this.monthValue) + this.initializationDate() + }, selectBox(a) { // a[0].isSelected = !a[0].isSelected console.log('[data.day]', a) @@ -215,30 +242,12 @@ export default { /deep/.el-calendar-table:not(.is-range) td.next, .el-calendar-table:not(.is-range) td.prev{ pointer-events: none; } - /*/deep/.el-calendar-day{*/ - /* pointer-events: none;*/ - /*}*/ - /*.el-calendar-table:not(.is-range) td.prev,*/ - /*.el-calendar-table:not(.is-range) td.next{*/ - /* pointer-events: none;*/ - /*}*/ - /*.prev>.el-calendar-day>p{*/ - /* display: none;*/ - /*}*/ - /*.next>.el-calendar-day>p{*/ - /* display: none;*/ - /*}*/ - /*.el-calendar-table:not(.is-range) td.next, .el-calendar-table:not(.is-range) td.prev{*/ - /* pointer-events: none;*/ - /*}*/ - /*/deep/.el-table{*/ - /* border: 1px solid black!important;*/ - /*}*/ - /*/deep/.el-table th, .el-table tr{*/ - /* border-color: black!important;*/ - /*}*/ - /*/deep/.el-table--enable-row-transition .el-table__body td{*/ - /* border-color: black!important;*/ - /*}*/ - + .elDataPicker>>>.el-input__inner{ + height: 32px!important; + padding-left: 30px!important; + padding-right: 0!important; + } + /deep/.el-button-group{ + display: none!important; + } diff --git a/src/views/EquipmentOperationAnalysis/RoutineCheckInformationMaintenance/index.vue b/src/views/EquipmentOperationAnalysis/RoutineCheckInformationMaintenance/index.vue new file mode 100644 index 0000000..b16cb4c --- /dev/null +++ b/src/views/EquipmentOperationAnalysis/RoutineCheckInformationMaintenance/index.vue @@ -0,0 +1,772 @@ + + + + + diff --git a/src/views/ProcessManagement/StepContentMaintenance/index.vue b/src/views/ProcessManagement/StepContentMaintenance/index.vue index 6dd855f..35d4c24 100644 --- a/src/views/ProcessManagement/StepContentMaintenance/index.vue +++ b/src/views/ProcessManagement/StepContentMaintenance/index.vue @@ -24,6 +24,7 @@ 查询 新增 + 复制工步
- + 确定
+ + + + + + + + + + + + + + +
@@ -126,11 +155,11 @@ export default { return { tableData: [], // 总数据数组 stationNumber: [], - stationNumberValue: 'OP1005', - stationName: '扫描上线工位', + stationNumberValue: '', + stationName: '', moduleDescription: [], moduleDescriptionValue: '', - engineTypeValue: 'SGM-5P', + engineTypeValue: '', engineTypeValue1: '', engineTypeName: '', engineType: [], @@ -160,6 +189,7 @@ export default { labelNumber: '', dialogFormVisible: false, dialogFormVisible1: false, + dialogFormVisible4: false, title: '', form: { stationNumber: '', @@ -180,6 +210,14 @@ export default { rules1: { number: [{ required: true, message: '请输入序号', trigger: 'blur' }], text: [{ required: true, message: '请输入操作内容', trigger: 'blur' }] + }, + form4: { + engineTypeValue: '', + stationNumberValue: '' + }, + rules4: { // 订单下发验证 + engineTypeValue: [{ required: true, message: '请选择机型', trigger: 'blur' }], + stationNumberValue: [{ required: true, message: '请选择工位号', trigger: 'blur' }] } } }, @@ -207,23 +245,30 @@ export default { for (let i = 0; i < this.engineType.length; i++) { if (this.engineType[i].value === this.engineTypeValue1) { this.engineTypeName = this.engineType[i].labelName - this.form.moduleDescription = this.engineType[i].label console.log(this.engineTypeName, 'this.engineTypeName') } } } }, created() { - this.searchTable() this.getStationNumber() this.getEndStation() }, + mounted() { + setTimeout(() => { + this.searchTable() + }, 300) + }, methods: { getStationNumber() { this.stationNumber = [] var param = [] var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param) this.ExecDatabase(Data).then(response => { + if (response.data.length) { + this.stationNumberValue = response.data[0].工位号 + this.stationName = response.data[0].工序名称 + } for (let i = 0; i < response.data.length; i++) { this.stationNumber.push({ label: response.data[i].工位号, @@ -239,6 +284,7 @@ export default { var param = [] var Data = this.CreateData('11', 'MES_基本变量_机型代码_查询', param) this.ExecDatabase(Data).then(response => { + if (response.data.length) this.engineTypeValue = response.data[0].发动机型号 for (let i = 0; i < response.data.length; i++) { this.engineType.push({ label: response.data[i].发动机型号, @@ -275,6 +321,59 @@ export default { } }) }, + copyOrder(formName) { + if (this.tableData.length) { + if (this.$refs[formName] !== undefined) { + this.$refs[formName].resetFields() + } + this.dialogFormVisible4 = true + } else { + this.$message({ + message: '暂无可复制的数据!', + type: 'error' + }) + } + }, + async submitAdd4() { + let number, text + for (let i = 0; i < this.tableData.length; i++) { + number = this.tableData[i].工步号 + text = this.tableData[i].操作内容 + await this.submitAdd5(number, text) + } + this.$message({ + message: '增加成功', + type: 'success' + }) + this.dialogFormVisible4 = false + this.engineTypeValue = this.form4.engineTypeValue + this.stationNumberValue = this.form4.stationNumberValue + this.searchTable() + }, + async submitAdd5(number, text) { + var param = [] + param[0] = ['工位号', this.form4.stationNumberValue] + param[1] = ['产品型号代码', this.form4.engineTypeValue] + param[2] = ['工步号', number] + param[3] = ['操作内容', text] + param[4] = ['发动机型号', this.form4.engineTypeValue] + console.log(param) + var Data = this.CreateData('12', '电子看板_工序内容_增加', param) + return new Promise((resolve, reject) => { + this.ExecDatabase(Data).then(response => { + if (response.data[0].result === '1') { + console.log('1') + resolve(1) + } else { + console.log('0') + reject(2) + } + }) + }) + }, + callOff4() { + this.dialogFormVisible4 = false + }, addTo() { this.title = '添加' this.dialogFormVisible = true @@ -287,7 +386,7 @@ export default { param[1] = ['产品型号代码', this.form.moduleDescription] param[2] = ['工步号', this.form.number] param[3] = ['操作内容', this.form.text] - param[4] = ['发动机型号', this.engineTypeName] + param[4] = ['发动机型号', this.form.moduleDescription] console.log(param) var Data = this.CreateData('12', '电子看板_工序内容_增加', param) this.ExecDatabase(Data).then(response => { diff --git a/src/views/ProcessParameterMaintenance/MaintenanceTighteningPosition/index.vue b/src/views/ProcessParameterMaintenance/MaintenanceTighteningPosition/index.vue index a82c48c..6113883 100644 --- a/src/views/ProcessParameterMaintenance/MaintenanceTighteningPosition/index.vue +++ b/src/views/ProcessParameterMaintenance/MaintenanceTighteningPosition/index.vue @@ -77,6 +77,7 @@ 预览全部 全部清除 + 复制工步
@@ -189,6 +190,34 @@ + + + + + + + + + + + + + + +
@@ -237,6 +266,15 @@ export default { explain: '' }, rules: { + }, + dialogFormVisible4: false, + form4: { + engineTypeValue: '', + stationNumberValue: '' + }, + rules4: { // 订单下发验证 + engineTypeValue: [{ required: true, message: '请选择机型', trigger: 'blur' }], + stationNumberValue: [{ required: true, message: '请选择工位号', trigger: 'blur' }] } } }, @@ -337,6 +375,77 @@ export default { } }) }, + copyOrder(formName) { + if (this.tableData.length) { + if (this.$refs[formName] !== undefined) { + this.$refs[formName].resetFields() + } + this.dialogFormVisible4 = true + } else { + this.$message({ + message: '暂无可复制的数据!', + type: 'error' + }) + } + }, + async submitAdd4() { + let serialNumber, positionX, positionY, measureWidth, measureHeight, groupNumber, orderNumber, sleeveNumber, torque, measureType, explain + for (let i = 0; i < this.tableData.length; i++) { + serialNumber = this.tableData[i].序号 + positionX = this.tableData[i].测量位置X + positionY = this.tableData[i].测量位置Y + measureWidth = this.tableData[i].控件宽度 + measureHeight = this.tableData[i].控件高度 + groupNumber = this.tableData[i].组号 + orderNumber = this.tableData[i].工作顺序 + sleeveNumber = this.tableData[i].套筒号 + torque = this.tableData[i].扭矩 + measureType = this.tableData[i].控件类型 + explain = this.tableData[i].说明 + await this.submitAdd5(serialNumber, positionX, positionY, measureWidth, measureHeight, groupNumber, orderNumber, sleeveNumber, torque, measureType, explain) + } + this.$message({ + message: '增加成功', + type: 'success' + }) + this.dialogFormVisible4 = false + this.engineTypeValue = this.form4.engineTypeValue + this.stationNumberValue = this.form4.stationNumberValue + this.searchTable() + this.searchTable1() + }, + async submitAdd5(serialNumber, positionX, positionY, measureWidth, measureHeight, groupNumber, orderNumber, sleeveNumber, torque, measureType, explain) { + var param = [] + param[0] = ['工位号', this.form4.stationNumberValue] + param[1] = ['发动机型号', this.form4.engineTypeValue] + param[2] = ['序号', serialNumber] + param[3] = ['测量位置X', positionX] + param[4] = ['测量位置Y', positionY] + param[5] = ['控件宽度', measureWidth] + param[6] = ['控件高度', measureHeight] + param[7] = ['组号', groupNumber] + param[8] = ['工作顺序', orderNumber] + param[9] = ['套筒号', sleeveNumber] + param[10] = ['扭矩', torque] + param[11] = ['控件类型', measureType] + param[12] = ['说明', explain] + console.log(param) + var Data = this.CreateData('12', '电子看板_工位机型_质量数据测量位置_增加', param) + return new Promise((resolve, reject) => { + this.ExecDatabase(Data).then(response => { + if (response.data[0].result === '1') { + console.log('1') + resolve(1) + } else { + console.log('0') + reject(2) + } + }) + }) + }, + callOff4() { + this.dialogFormVisible4 = false + }, submitAdd(formName) { this.$refs[formName].validate((valid) => { if (valid) { diff --git a/src/views/RecipeManagement/RecipeManagement/index.vue b/src/views/RecipeManagement/RecipeManagement/index.vue index 63c03df..f734244 100644 --- a/src/views/RecipeManagement/RecipeManagement/index.vue +++ b/src/views/RecipeManagement/RecipeManagement/index.vue @@ -32,11 +32,11 @@ {{ scope.row.发动机机型标志 }} - - - + + + + +