| | |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button icon="el-icon-menu" @click="workingTramClick">生产班组</el-button> |
| | | <el-button icon="el-icon-download" @click="upload">导入</el-button> |
| | | |
| | | <div style="display: flex"> |
| | | <el-button icon="el-icon-menu" @click="workingTramClick">生产班组</el-button> |
| | | <el-button icon="el-icon-download" @click="upload">导入</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | label="所属组织" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.org_name">{{ row.org_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="group_name" |
| | | label="生产班组" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.group_name">{{ row.group_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wagetype" |
| | | label="工资类型" |
| | |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请输入" /> |
| | | <el-input v-if="row.isVisible===1" v-model="row.group_code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="请输入" /> |
| | | <div v-else> {{ row.group_code }}</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-table> |
| | | <!--分页--> |
| | | <pagination |
| | | v-show="workingTableDataLength>0" |
| | | :total="workingTableDataLength" |
| | | :page.sync="formWorking.page" |
| | | :limit.sync="formWorking.rows" |
| | |
| | | } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import $ from 'jquery' |
| | | import clearAllChildren from '@/utils/global' |
| | | import clearAllChildren, { validateCode } from '@/utils/global' |
| | | import { MesOrderStepReportSelectUserGroup } from '@/api/scgl' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'YYQD', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请输入编码')) |
| | | } else { |
| | | if (SER_HZ.test(value)) { |
| | | return callback(new Error('编码不能为中文')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const validateMobile = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback() |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return { |
| | | isIpad: false, |
| | | mainHeight: 0, |
| | |
| | | id: '', |
| | | UserCode: '', |
| | | UserName: '', |
| | | Password: '', |
| | | Password: '123456', |
| | | Enable: 'Y', |
| | | StuOrg: '', |
| | | Mobile: '', |
| | |
| | | groupcode: '', |
| | | Operator: '', |
| | | OperType: '', |
| | | wagetype: '' |
| | | wagetype: '2' |
| | | }, |
| | | usergroupArr: [], // 生产班组数组 |
| | | wagetypeArr: [ |
| | |
| | | operation: '', |
| | | dialogFormRules: { |
| | | UserCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | | UserName: [ |
| | | { required: true, message: '请输入用户名称', trigger: ['blur', 'change'] } |
| | |
| | | DeleteUser({ Userid: id }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getUserSearch() |
| | | } |
| | | }) |
| | |
| | | this.dialogForm.UserCode = '' |
| | | this.dialogForm.UserCode = '' |
| | | this.dialogForm.UserName = '' |
| | | this.dialogForm.Password = '' |
| | | this.dialogForm.Password = '123456' |
| | | this.dialogForm.Enable = 'Y' |
| | | this.$refs.dialogCascader.checkedValue = '' |
| | | this.dialogForm.StuOrg = '' |
| | | this.dialogForm.Mobile = '' |
| | | this.dialogForm.Email = '' |
| | | this.dialogForm.groupcode = '' |
| | | this.dialogForm.wagetype = '' |
| | | this.dialogForm.wagetype = '2' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | UserGroupDelete({ UserGrupCode: row.group_code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.formWorking.page > 1 && this.workingTableData.length === 1) { |
| | | this.formWorking.page-- |
| | | } |
| | | this.getUserGroupSearch() |
| | | } |
| | | }) |
| | |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | |
| | | ::v-deep .el-button--text{ |
| | | font-size: 14px ; |
| | | cursor: pointer ; |
| | | } |
| | | .el-icon-share ,.el-icon-delete,.el-icon-edit-outline{ |
| | | color: $main_color; |
| | | cursor: pointer; |