| | |
| | | <div> |
| | | <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <el-tabs type="border-card"> |
| | | <el-tabs ref="elTabs" type="border-card" @tab-click="tabClick"> |
| | | <el-tab-pane label="生产列表"> |
| | | <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between"> |
| | | <div style="display: flex;align-items: center"> |
| | |
| | | /> |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | | <el-button><svg-icon icon-class="start_time" style="margin-right: 2px" />开始</el-button> |
| | | <el-button><svg-icon icon-class="report_work" style="margin-right: 2px" />报工</el-button> |
| | | <el-button @click="ZZstart"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | 开始 |
| | | </el-button> |
| | | <el-button @click="ZZreport"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | 报工 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 70px">工序码:</div> |
| | | <el-input |
| | | v-model="produceCode" |
| | | v-model="WXproduceCode" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | name="produceCode" |
| | | name="WXproduceCode" |
| | | style="width: 500px" |
| | | /> |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | | <el-button><svg-icon icon-class="start_time" style="margin-right: 2px" />发料</el-button> |
| | | <el-button><svg-icon icon-class="report_work" style="margin-right: 2px" />收料</el-button> |
| | | <el-button @click="WXsend"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | 发料 |
| | | </el-button> |
| | | <el-button @click="WXback"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | 收料 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :data="WXtableData" |
| | | :height="tableHeight" |
| | | border |
| | | stripe |
| | |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | v-show="WXtotal>0" |
| | | :total="WXtotal" |
| | | :page.sync="WXform.page" |
| | | :limit.sync="WXform.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :title="dialogTitle" |
| | | :visible.sync="dialogVisible" |
| | | width="60%" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | width="70%" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @closed="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="组织类型" prop="OrgType" /> |
| | | <el-form-item label="组织编码" prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | <el-form ref="dialogForm" inline :model="dialogForm" label-width="110px"> |
| | | <el-form-item label="工单编号:"> |
| | | <!-- <el-input v-model="dialogForm.name"></el-input>--> |
| | | <div style="width: 200px">PO2022050500001</div> |
| | | </el-form-item> |
| | | <el-form-item label="组织名称" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | <el-form-item label="产品编码:"> |
| | | <div style="width: 200px">427100</div> |
| | | </el-form-item> |
| | | <el-form-item prop="SupUnit" label="上级单位"> |
| | | <el-form-item label="产品名称:"> |
| | | <div style="width: 200px">机箱板底</div> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格:"> |
| | | <div style="width: 200px">机箱底板&1</div> |
| | | </el-form-item> |
| | | <el-form-item label="当前工序:"> |
| | | <div style="width: 200px">激光切割</div> |
| | | </el-form-item> |
| | | <el-form-item label="工序描述:"> |
| | | <el-tooltip class="item" effect="dark" content="原材料切按材料切按材料切按时打卡数据的卡" placement="top-start"> |
| | | <div style="width: 200px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"> |
| | | 原材料切按材料切按材料切按时打卡数据的卡 |
| | | </div> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item label="任务数量:"> |
| | | <div style="width: 200px">1000</div> |
| | | </el-form-item> |
| | | <el-form-item label="未报/已报:"> |
| | | <div style="width: 200px">900/100</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制开始'" label="开工数量:"> |
| | | <div style="width: 200px">1000</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制开始'" label="生产设备:"> |
| | | <el-select |
| | | v-model="dialogForm.SupUnit" |
| | | style="width: 200px" |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in SupUnitArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协发料'" label="外协供方:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协发料'" label="发料人员:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协发料'" label="发料数量:"> |
| | | <el-input v-model="dialogForm.OrgName" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="下道工序:"> |
| | | <div style="width: 200px">B工序</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="设备名称:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="生产班组:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="报工数量:"> |
| | | <el-input v-model="dialogForm.OrgName" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="不良数量:"> |
| | | <el-input v-model="dialogForm.OrgName" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="不良原因:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div v-if="dialogTitle==='自制报工'"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 人员列表 |
| | | <el-button type="primary" style="margin: 10px 0">增行</el-button> |
| | | <el-table |
| | | :data="userTableData" |
| | | border |
| | | stripe |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | height="180" |
| | | highlight-current-row |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="人员名称" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row }}</div> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="操作" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="userDel(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="userSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="userCancel(row)">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--分页--> |
| | | <pagination |
| | | v-show="UserTotal>0" |
| | | :total="UserTotal" |
| | | :page.sync="Userform.page" |
| | | :limit.sync="Userform.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getMesOrderStepSearch" |
| | | /> |
| | | </div> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="下道工序:"> |
| | | <div style="width: 200px">B工序</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="外协供方:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="收料人员:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="收料数量:"> |
| | | <el-input |
| | | v-model="dialogForm.OrgName" |
| | | style="width: 200px" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='外协收料'" label="不良原因:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <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" @click="dialogVisible = false">确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | produceCode: '', // 工序码 |
| | | WXproduceCode: '', // 外协工序码 |
| | | form: { |
| | | orderstepqrcode: '', // 扫描的二维码信息 |
| | | prop: 'lm_date', // 排序字段 |
| | |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | WXform: { // 外协表单 |
| | | orderstepqrcode: '', // 扫描的二维码信息 |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | WXtotal: 10, // 外协表单总数 |
| | | WXtableData: [], // 外协表 |
| | | |
| | | dialogVisible: false, |
| | | dialogTitle: '', |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// 上级单位 |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请输入名称', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | ] |
| | | userTableData: [ |
| | | |
| | | ], // 人员列表 |
| | | UserTotal: 0, |
| | | Userform: { |
| | | |
| | | } |
| | | // operation: '', |
| | | // dialogFormRules: { |
| | | // OrgType: [ |
| | | // { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] } |
| | | // ], |
| | | // OrgCode: [ |
| | | // { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | // ], |
| | | // OrgName: [ |
| | | // { required: true, message: '请输入名称', trigger: ['blur', 'change'] } |
| | | // ], |
| | | // SupUnit: [ |
| | | // { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | // ] |
| | | // } |
| | | |
| | | } |
| | | }, |
| | |
| | | this.getHeight() |
| | | |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']").focus() |
| | | $("input[name='produceCode']")[0].focus() |
| | | }) |
| | | }, |
| | | methods: { |
| | |
| | | getCurrentRow() { |
| | | |
| | | }, |
| | | tabClick(val, d) { |
| | | console.log(val, d, 1) |
| | | if (this.$refs.elTabs.currentName === '0') { |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']")[0].focus() |
| | | }) |
| | | } |
| | | if (this.$refs.elTabs.currentName === '1') { |
| | | this.$nextTick(() => { |
| | | $("input[name='WXproduceCode']")[0].focus() |
| | | }) |
| | | } |
| | | }, |
| | | // 查询 |
| | | search() { |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | upload() { |
| | | // 自制开始 |
| | | ZZstart() { |
| | | this.dialogTitle = '自制开始' |
| | | this.dialogVisible = true |
| | | }, |
| | | // 自制报工 |
| | | ZZreport() { |
| | | this.dialogTitle = '自制报工' |
| | | this.dialogVisible = true |
| | | }, |
| | | // 外协发料 |
| | | WXsend() { |
| | | this.dialogTitle = '外协发料' |
| | | this.dialogVisible = true |
| | | }, |
| | | // 外协收料 |
| | | WXback() { |
| | | this.dialogTitle = '外协收料' |
| | | this.dialogVisible = true |
| | | }, |
| | | // 用户列表删除 |
| | | userDel() { |
| | | |
| | | }, |
| | | // 用户列表保存 |
| | | userSave() { |
| | | |
| | | }, |
| | | // 用户列表取消 |
| | | userCancel() { |
| | | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.dialogTitle = '' |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | |
| | | // 新增按钮 |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | this.$confirm('是否确认删除?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | this.getMesOrderStepSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消删除') |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | // if (this.dialogTitle === '自制开始'||this.dialogTitle === '自制报工') { |
| | | // this.tabClick('0') |
| | | // } |
| | | // if (this.dialogTitle === '外协发料'||this.dialogTitle === '外协收料') { |
| | | // this.tabClick('1') |
| | | // } |
| | | this.tabClick() |
| | | }, |
| | | // 对话框确认 |
| | | dialogVisibleConfirm() { |
| | |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.getMesOrderStepSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |
| | | }) |
| | | this.tabClick() |
| | | // AddUpdateOrganization(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // // this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | // this.dialogVisible = false |
| | | // this.getMesOrderStepSearch() |
| | | // } else { |
| | | // // this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | // } |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.tableHeight = this.mainHeight - 80 |
| | | }) |
| | | } |
| | | } |
| | |
| | | border: none; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary:hover { |
| | | border: none; |
| | | } |
| | | |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus{ |
| | | ::v-deep .el-select .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected{ |
| | | ::v-deep .el-select-dropdown__item.selected { |
| | | color: $main_color; |
| | | } |
| | | ::v-deep .el-checkbox__inner:hover{ |
| | | |
| | | ::v-deep .el-checkbox__inner:hover { |
| | | border-color: $main_color; |
| | | } |
| | | ::v-deep .el-textarea__inner:focus{ |
| | | |
| | | ::v-deep .el-textarea__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |