| | |
| | | prop="partspec" |
| | | label="物料规格" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="routeDialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="routeDialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="routeDialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const data = { |
| | | id: this.dialogForm.id, |
| | | materialcode: this.dialogForm.materialcode, |
| | |
| | | } |
| | | AddUpdateInventoryFile(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.getInventoryFileSelect() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |
| | |
| | | }, |
| | | /* 点击关联工艺路线模块*/ |
| | | // 工艺路线点击 |
| | | async routeClick(row) { |
| | | console.log(row) |
| | | routeClick(row) { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在加载数据,请稍等...', |
| | | spinner: 'el-icon-loading', |
| | | customClass: 'osloading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | |
| | | this.defaultroute_code = row.default_route |
| | | this.dialogFormRoute.projectCode = row.partcode |
| | | this.dialogFormRoute.projectName = row.partname |
| | | this.dialogVisibleRoute = true |
| | | const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }) |
| | | this.dialogFormRoute.routeOperationArr = res |
| | | // let waitFlag = false// 回显等待是否放行 |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | item.isSelected1 = false |
| | | item.isSelected2 = false |
| | | if (index === 0) { |
| | | item.isSelected1 = true |
| | | this.projectTableData = item.Data |
| | | } |
| | | if (item.flag === 'Y') { |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', true) |
| | | }) |
| | | InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }).then(res => { |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | loading.close() |
| | | this.dialogVisibleRoute = true |
| | | this.dialogFormRoute.routeOperationArr = res.data |
| | | // let waitFlag = false// 回显等待是否放行 |
| | | |
| | | // const interval = setInterval(() => { |
| | | // if ($('input:checkbox').length > 0) { |
| | | // waitFlag = true |
| | | // } |
| | | // if (waitFlag) { |
| | | // clearInterval(interval) |
| | | // this.$nextTick(() => { |
| | | // $('input:checkbox').eq(index).prop('checked', true) |
| | | // }) |
| | | // } |
| | | // }, 100) |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | item.isSelected1 = false |
| | | item.isSelected2 = false |
| | | if (index === 0) { |
| | | item.isSelected1 = true |
| | | this.projectTableData = item.Data |
| | | } |
| | | if (item.flag === 'Y') { |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', true) |
| | | }) |
| | | |
| | | // const interval = setInterval(() => { |
| | | // if ($('input:checkbox').length > 0) { |
| | | // waitFlag = true |
| | | // } |
| | | // if (waitFlag) { |
| | | // clearInterval(interval) |
| | | // this.$nextTick(() => { |
| | | // $('input:checkbox').eq(index).prop('checked', true) |
| | | // }) |
| | | // } |
| | | // }, 100) |
| | | } |
| | | }) |
| | | |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y') |
| | | }, 1000) |
| | | } else { |
| | | loading.close() |
| | | } |
| | | }) |
| | | |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y') |
| | | |
| | | console.log(this.defaultroute_codeArr, 123) |
| | | }, |
| | | // 对话框关闭 |
| | | handleCloseRoute() { |
| | |
| | | data.push({ code: item.code, name: item.name }) |
| | | } |
| | | }) |
| | | |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data) |
| | | if (res.code === '200') { |
| | | this.dialogVisibleRoute = false |
| | | this.$message.success('保存成功!') |
| | | await this.getInventoryFileSelect() |
| | | this.dialogVisibleRoute = false |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } |
| | | }, |
| | | // 大盒子点击事件 |
| | |
| | | } |
| | | </style> |
| | | <style> |
| | | .osloading{ |
| | | font-size: 26px !important; |
| | | } |
| | | |
| | | .el-loading-text{ |
| | | font-size: 26px !important; |
| | | } |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |