| | |
| | | <el-form-item label="所属组织" style=" display: flex;"> |
| | | <el-cascader |
| | | ref="cascader" |
| | | v-model="form.StuOrg" |
| | | filterable |
| | | popper-class="elCascader" |
| | | :options="StuOrgArr" |
| | | :props="defaultProps" |
| | | @change="cascaderChange" |
| | | /> |
| | | <!-- @change="cascaderChange"--> |
| | | <!-- @focus="getUserOrganization"--> |
| | | |
| | | </el-form-item> |
| | |
| | | <el-cascader |
| | | ref="dialogCascader" |
| | | key="cascaderKey" |
| | | v-model="dialogForm.StuOrg" |
| | | filterable |
| | | popper-class="elCascader" |
| | | :options="StuOrgArr2" |
| | |
| | | style="width: 200px;" |
| | | @change="dialogCascaderChange" |
| | | /> |
| | | |
| | | </el-form-item> |
| | | <el-form-item label="所属班组" prop="groupcode"> |
| | | <el-select |
| | |
| | | v-el-drag-dialog |
| | | title="生产班组" |
| | | :visible.sync="workingDialogVisible" |
| | | width="800px" |
| | | width="1000px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | class="workingDialogVisible" |
| | |
| | | label="序号" |
| | | prop="RowNum" |
| | | /> |
| | | <el-table-column |
| | | v-if="$store.state.settings.orgType!=='W'" |
| | | prop="stu_torgcode" |
| | | label="车间名称" |
| | | |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-input--> |
| | | <!-- v-if="row.isVisible===1"--> |
| | | <!-- v-model="row.group_code"--> |
| | | <!-- oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')"--> |
| | | <!-- placeholder="请输入"--> |
| | | <!-- />--> |
| | | <el-cascader |
| | | v-if="row.isVisible===1" |
| | | ref="dialogCascader" |
| | | key="cascaderKey" |
| | | v-model="row.storg_code" |
| | | filterable |
| | | popper-class="elCascader" |
| | | :options="StuOrgArr2" |
| | | :props="defaultProps" |
| | | style="width: 200px;" |
| | | /> |
| | | <div v-else> {{ row.org_name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="group_code" |
| | | label="班组编码" |
| | |
| | | import { MesOrderStepReportSelectUserGroup } from '@/api/produceManager' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | import { StorgGroupSelect } from '@/api/basicInfo' |
| | | |
| | | export default { |
| | | name: 'YYQD', |
| | |
| | | form: { |
| | | UserCode: '', // 用户编码 |
| | | UserName: '', // 用户名称 |
| | | StuOrg: '', // 所属组织 |
| | | StuOrg: getCookie('stu_torgcode'), // 所属组织 |
| | | wagetype: '', // 工资类型 |
| | | Enable: '', // 在职状态 |
| | | prop: 'lm_date', // 排序字段 |
| | |
| | | checkStrictly: true, |
| | | value: 'code', |
| | | label: 'name', |
| | | children: 'children' |
| | | children: 'children', |
| | | emitPath: false |
| | | }, |
| | | EnableArr: [ |
| | | { value: 'Y', label: '在职' }, |
| | |
| | | UserName: '', |
| | | Password: '123456', |
| | | Enable: 'Y', |
| | | StuOrg: '', |
| | | StuOrg: getCookie('stu_torgcode'), |
| | | Mobile: '', |
| | | Email: '', |
| | | groupcode: '', |
| | |
| | | // 获取所属组织 |
| | | async getUserOrganization() { |
| | | const { data: res } = await UserOrganization() |
| | | |
| | | this.StuOrgArr = clearAllChildren(res) |
| | | }, |
| | | // 获取所属组织对话框 |
| | |
| | | reset() { |
| | | this.form.UserCode = '' |
| | | this.form.UserName = '' |
| | | this.form.StuOrg = '' |
| | | this.form.Enable = 'Y' |
| | | this.form.Enable = '' |
| | | this.form.wagetype = '' |
| | | this.form.StuOrg = getCookie('stu_torgcode') |
| | | this.$refs.cascader.checkedValue = ''// 级联选择器的清空 |
| | | this.getUserSearch() |
| | | }, |
| | | // 级联选择器改变事件 |
| | | cascaderChange(val) { |
| | | console.log(val) |
| | | this.form.StuOrg = val[val.length - 1] |
| | | // this.$refs.cascader.checkValue |
| | | }, |
| | | dialogCascaderChange(val) { |
| | | this.dialogForm.StuOrg = val[val.length - 1] |
| | | console.log(val) |
| | | this.dialogForm.groupcode = '' |
| | | this.getStorgGroupSelect(val) |
| | | }, |
| | | // 获取下拉生产班组 |
| | | async getMesOrderStepReportSelectUserGroup() { |
| | | const { data: res } = await MesOrderStepReportSelectUserGroup() |
| | | async getStorgGroupSelect(stu_torgcode) { |
| | | const data = { |
| | | stu_torgcode, |
| | | description: this.StuOrgArr2.find(i => i.code === stu_torgcode) ? 'D' : 'W' |
| | | } |
| | | const { data: res } = await StorgGroupSelect(data) |
| | | this.usergroupArr = res |
| | | }, |
| | | // 新增按钮 |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | // this.dialogForm.StuOrg = getCookie('stu_torgcode') |
| | | // this.$refs.dialogCascader.checkedValue = [getCookie('stu_torgcode')] |
| | | |
| | | this.getUserOrganization2() |
| | | this.getMesOrderStepReportSelectUserGroup() |
| | | |
| | | if (this.$store.state.settings.orgType !== '') { |
| | | this.getStorgGroupSelect(getCookie('stu_torgcode'), this.StuOrgArr2.find(i => i.code === getCookie('stu_torgcode')) ? 'D' : 'W') |
| | | } |
| | | }, |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | |
| | | this.dialogForm.Email = row.email |
| | | this.dialogForm.wagetype = row.wagetype |
| | | }) |
| | | this.getMesOrderStepReportSelectUserGroup() |
| | | this.getStorgGroupSelect() |
| | | this.getUserOrganization2() |
| | | }, |
| | | // 删除按钮 |
| | |
| | | this.dialogForm.UserName = '' |
| | | this.dialogForm.Password = '123456' |
| | | this.dialogForm.Enable = 'Y' |
| | | this.$refs.dialogCascader.checkedValue = '' |
| | | this.dialogForm.StuOrg = '' |
| | | this.$refs.dialogCascader.checkedValue = getCookie('stu_torgcode') |
| | | this.dialogForm.StuOrg = getCookie('stu_torgcode') |
| | | this.dialogForm.Mobile = '' |
| | | this.dialogForm.Email = '' |
| | | this.dialogForm.groupcode = '' |
| | | this.dialogForm.wagetype = '2' |
| | | this.usergroupArr = [] |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | workingTramClick() { |
| | | this.workingDialogVisible = true |
| | | this.getUserGroupSearch() |
| | | this.getUserOrganization2() |
| | | // 页面加载完后重新渲染表格 |
| | | this.$nextTick(() => { |
| | | this.$refs.workingTableData.doLayout() |
| | |
| | | this.workingTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | this.getMesOrderStepReportSelectUserGroup() |
| | | // this.getStorgGroupSelect() |
| | | }, |
| | | // 生产班组排序 |
| | | sortChangeOfWorking({ column, prop, order }) { |
| | |
| | | |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number } |
| | | const data = { storg_code: getCookie('stu_torgcode'), group_code: '', group_name: '', description: '', isVisible: 1, number: number } |
| | | this.workingTableData.unshift(data) |
| | | }, |
| | | // 删除 |
| | |
| | | }, |
| | | // 保存 |
| | | async saveWorking(row) { |
| | | if (row.storg_code.trim().length < 1) { |
| | | return this.$message.info('车间不能为空!') |
| | | } |
| | | if (row.group_code.trim().length < 1) { |
| | | return this.$message.info('班组编码不能为空!') |
| | | } |
| | |
| | | // return this.$message.info('班组描述不能为空!') |
| | | // } |
| | | const data = { |
| | | storg_code: row.storg_code, |
| | | code: row.group_code, |
| | | name: row.group_name, |
| | | flag: row.description |