| | |
| | | |
| | | handleRequest() { |
| | | this.getOrganizationSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getPrentOrganization() |
| | | } |
| | | // if (res.code === '200') { |
| | | // this.getPrentOrganization() |
| | | // } |
| | | }) |
| | | }, |
| | | async getOrganizationSearch() { |
| | |
| | | return this.$message.info('当前用户无新增权限!') |
| | | } |
| | | |
| | | await this.getPrentOrganization() |
| | | |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | |
| | | // this.dialogForm.OrgType = '生产线' |
| | | // } |
| | | this.$nextTick(() => { |
| | | this.changeRadio(this.dialogForm.OrgType) |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | |
| | | this.usergroupArr = res |
| | | }, |
| | | // 新增按钮 |
| | | add(operation) { |
| | | async add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | // this.dialogForm.StuOrg = getCookie('stu_torgcode') |
| | | // this.$refs.dialogCascader.checkedValue = [getCookie('stu_torgcode')] |
| | | |
| | | this.getUserOrganization2() |
| | | await this.getUserOrganization2() |
| | | |
| | | if (this.$store.state.settings.orgType !== '') { |
| | | this.getStorgGroupSelect(getCookie('stu_torgcode'), this.StuOrgArr2.find(i => i.code === getCookie('stu_torgcode')) ? 'D' : 'W') |
| | | await this.getStorgGroupSelect(getCookie('stu_torgcode'), this.StuOrgArr2.find(i => i.code === getCookie('stu_torgcode')) ? 'D' : 'W') |
| | | } |
| | | }, |
| | | // 修改按钮 |
| | |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'cavity_qty', |
| | | prop: 'unprice', |
| | | label: '计件单价', |
| | | id: 17, |
| | | show: true, |
| | |
| | | async getStepSelectArr() { |
| | | const { data: res } = await StepSelect({ WorkShop: this.dialogForm.wkshopcode }) |
| | | this.routeArr = res |
| | | console.log('执行了!') |
| | | }, |
| | | // 处理下拉选择 |
| | | handleSelect(item, tag) { |
| | |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | if (this.$store.state.settings.orgType === 'W') { |
| | | await this.getStepSelectArr() |
| | | } |
| | | // if (this.$store.state.settings.orgType === 'W') { |
| | | |
| | | // } |
| | | |
| | | const { data: res } = await ViewRoute({ routecode: row.code }) |
| | | // 待改 |
| | | this.dynamicTags = [] |
| | | this.routeSelectedArr = [] |
| | | this.$nextTick(() => { |
| | | |
| | | this.dialogForm.code = res[0].code |
| | | this.dialogForm.name = res[0].name |
| | | this.dialogForm.enable = res[0].enable |
| | | this.dialogForm.description = res[0].description |
| | | this.dialogForm.wkshopcode = res[0].wkshopcode |
| | | await this.getStepSelectArr() |
| | | |
| | | this.$nextTick(() => { |
| | | res[0].Data.forEach((item, index) => { |
| | | this.dynamicTags.push( |
| | | { seq: item.seq, stepname: item.stepname, stepcode: item.stepcode, editDisabled: true, effect: index === res[0].Data.length - 1 ? 'dark' : 'light' } |
| | |
| | | this.dialogForm.name = '' |
| | | this.dialogForm.enable = 'Y' |
| | | this.dialogForm.description = '' |
| | | this.dialogForm.wkshopcode = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode'), // 所属车间 |
| | | this.dialogForm.wkshopcode = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode') // 所属车间 |
| | | this.dialogForm.Data = [] |
| | | |
| | | this.dynamicTags = [ |
| | |
| | | }, |
| | | // 扫码键盘回车事件 |
| | | async enterNative(val, belong) { |
| | | if (getCookie('description') !== 'W') { |
| | | return this.$message.info('该角色无此操作权限!') |
| | | } |
| | | |
| | | console.log(val, belong, 89898989) |
| | | // 开工:code="200" count=0 |
| | | // 报工:code="200" count=1 |
| | |
| | | // this.submitButtonIsDisabled = false |
| | | }, |
| | | // 工艺路线值改变 |
| | | async routecodeChange(partcode, routecode) { |
| | | // const data = { |
| | | // partcode, |
| | | // routecode |
| | | // } |
| | | async routecodeChange() { |
| | | const data = { |
| | | partcode: this.dialogForm.partcode, |
| | | routecode: this.dialogForm.routecode, |
| | | wkshopcode: this.dialogForm.wkshopcode |
| | | } |
| | | await SelectRouteOrWkshop(data).then((res) => { |
| | | // console.log(res, 1) |
| | | this.submitButtonIsDisabled = false |
| | | }).catch(err => { |
| | | // console.log(err, 2) |
| | | this.submitButtonIsDisabled = true |
| | | }) |
| | | }, |
| | | // 生产车间值改变时 |
| | | async wkshopcodeChange(wkshopcode, partcode) { |
| | |
| | | |
| | | if (res.length === 1) { |
| | | this.dialogForm.routecode = res[0].code |
| | | await this.routecodeChange() |
| | | } else { |
| | | this.dialogForm.routecode = '' |
| | | } |
| | |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <div style="height: 300px;width: 100%;background-color: aliceblue;padding:20px"> |
| | | <el-tag |
| | |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | }, |
| | | // 修改按钮 |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | const res = await GroupSalaryReportSearchUser({ id: row.id }) |
| | | this.tagArr = res.data.map(r => r.username) |
| | | // this.tagArr = ['楼李俊', '张三', '李四'] |
| | | // this.$nextTick(() => { |
| | | // this.dialogForm.OrgCode = row.org_code |
| | | // this.dialogForm.OrgName = row.org_name |
| | | // this.dialogForm.SupUnit = row.parent_id |
| | | // }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |