| | |
| | | <template> |
| | | <div class="add_wordshop"> |
| | | <el-dialog :title="editConfig.dialogTitle + '车间管理'" :visible.sync="editConfig.visible" width="30%" |
| | | <el-dialog :title="form.title + '薪资方案'" :visible.sync="islook" width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" |
| | | ref="ruleForm"> |
| | | <el-form label-width="120px" style="width: 100%;" :model="form" :rules="rules" |
| | | ref="form"> |
| | | <el-form-item label="方案名称" style="width: 100%;" prop="groupNumber"> |
| | | <el-input v-model="editConfig.infomitton.workshop" placeholder="请输入内容"></el-input> |
| | | <el-input v-model="form.workshop" placeholder="请输入内容"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="workshop" label="工种" style="width: 100%;" > |
| | | <el-select |
| | | :disabled="this.editConfig.dialogTitle==='查看'" v-model="editConfig.infomitton.workshop" value-key="name" placeholder="请选择车间"> |
| | | v-model="form.workshop" value-key="name" placeholder="请选择车间"> |
| | | <el-option |
| | | v-for="item in workshopList" |
| | | :key="item.ID" |
| | |
| | | </el-form-item> |
| | | <el-form-item prop="workshop" label="薪资类型" style="width: 100%;" > |
| | | <el-select |
| | | :disabled="this.editConfig.dialogTitle==='查看'" v-model="editConfig.infomitton.groupNumber" value-key="name" placeholder="请选择车间"> |
| | | v-model="form.groupNumber" value-key="name" placeholder="请选择车间"> |
| | | <el-option |
| | | v-for="item in workshopList" |
| | | :key="item.ID" |
| | |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4}" |
| | | placeholder="请输入内容" |
| | | v-model="editConfig.infomitton.workshop"> |
| | | v-model="form.workshop"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editConfig.visible = false">取 消</el-button> |
| | | <el-button type="primary" @click="commitForm('ruleForm')">确 定</el-button> |
| | | <el-button type="cancel" @click="cancelMethod()">取消</el-button> |
| | | <el-button type="primary" @click="commitForm('form')">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | // import {} from "@/api/systemSetting/workshopManage" |
| | | export default { |
| | | props: { |
| | | editDiaConfig: { |
| | | editRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | visible: false, |
| | | dialogTitle: "添加", |
| | | isReadonly: true, |
| | | infomitton: { |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | editConfig: this.editDiaConfig, |
| | | form: {}, |
| | | workshopList: [], |
| | | carFlagList: [ |
| | | ], |
| | | rules: { |
| | | workshopNumber: [ |
| | | { required: true, message: '请选择车间', trigger: 'change' } |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | handleClose(done) { |
| | | done(); |
| | | }, |
| | | setParams() { |
| | | let params = { |
| | | workshopNumber: this.editConfig.infomitton.workshopNumber + '', |
| | | groupNumber: Number(this.editConfig.infomitton.groupNumber), |
| | | startCarNumber: Number(this.editConfig.infomitton.startCarNumber), |
| | | endCarNumber: Number(this.editConfig.infomitton.endCarNumber), |
| | | carFlag: Number(this.editConfig.infomitton.carFlag), |
| | | notes: this.editConfig.infomitton.notes, |
| | | // id:Number(this.editConfig.infomitton.workshopId), |
| | | } |
| | | return params |
| | | }, |
| | | |
| | | async commitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | |
| | | |
| | | |
| | | } |
| | | }, |
| | | components: { |
| | | |
| | | }, |
| | | }; |
| | | </script> |