| | |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | name="produceCode" |
| | | style="width: 500px" |
| | | @keyup.enter.native="val=>enterNative(val,'produceCode')" |
| | | /> |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | name="WXproduceCode" |
| | | style="width: 500px" |
| | | @keyup.enter.native="val=>enterNative(val,'WXproduceCode')" |
| | | /> |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | width="800" |
| | | class="dialogVisible" |
| | | :top="dialogTitle==='自制报工'?'5vh':'15vh'" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @closed="handleClose" |
| | |
| | | /> |
| | | </el-select> |
| | | </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.group_code" |
| | | :label="item.group_name" |
| | | :value="item.group_code" |
| | | /> |
| | | </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" @click="userAdd">增行</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="name" |
| | | label="人员名称" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.name }}</div> |
| | | <el-input v-if="row.isVisible===1" v-model="row.name" /> |
| | | <!-- <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="外协供方:"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | |
| | | <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> |
| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="dialogVisible = false">确 定</el-button> |
| | | <el-button v-if="dialogTitle==='自制开始'" type="primary" @click="dialogVisibleConfirm">开 工</el-button> |
| | | <el-button v-if="dialogTitle==='自制报工'" type="primary" @click="dialogVisibleConfirm">提交/打印</el-button> |
| | | <el-button v-if="dialogTitle==='外协发料'" type="primary" @click="dialogVisibleConfirm">发料</el-button> |
| | | <el-button v-if="dialogTitle==='外协收料'" type="primary" @click="dialogVisibleConfirm">收料/打印</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import $ from 'jquery' |
| | | import { MesOrderStepSearch } from '@/api/scgl' |
| | | import { MesOrderStepReportSelectUserGroup, MesOrderStepSearch, MesOrderStepStartSelectEqp } from '@/api/scgl' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | WXtableData: [], // 外协表 |
| | | |
| | | dialogVisible: false, |
| | | dialogTitle: '', |
| | | dialogTitle: '', // 自制开始、自制报工、外协发料、外协收料 |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | |
| | | SupUnit: ''// 上级单位 |
| | | }, |
| | | userTableData: [ |
| | | |
| | | { RowNum: 1, name: '张三' }, |
| | | { RowNum: 2, name: '李四' } |
| | | ], // 人员列表 |
| | | UserTotal: 0, |
| | | Userform: { |
| | |
| | | getCurrentRow() { |
| | | |
| | | }, |
| | | // tab按钮切换鼠标自动聚焦 |
| | | tabClick(val, d) { |
| | | console.log(val, d, 1) |
| | | if (this.$refs.elTabs.currentName === '0') { |
| | |
| | | this.$nextTick(() => { |
| | | $("input[name='WXproduceCode']")[0].focus() |
| | | }) |
| | | } |
| | | }, |
| | | async enterNative(val, belong) { |
| | | console.log(val, belong) |
| | | if (belong === 'produceCode') { |
| | | this.ZZreport() |
| | | // 查找设备 |
| | | // const {data:res} = await MesOrderStepStartSelectEqp({ orderstepqrcode: this.produceCode }) |
| | | // this.xxx=res |
| | | // 查找班组 |
| | | // const { data: res2 } = await MesOrderStepReportSelectUserGroup() |
| | | } |
| | | if (belong === 'WXproduceCode') { |
| | | |
| | | } |
| | | }, |
| | | // 查询 |
| | |
| | | ZZreport() { |
| | | this.dialogTitle = '自制报工' |
| | | this.dialogVisible = true |
| | | this.getUserTableData() |
| | | }, |
| | | // 外协发料 |
| | | WXsend() { |
| | |
| | | this.dialogTitle = '外协收料' |
| | | this.dialogVisible = true |
| | | }, |
| | | // 报工查询用户表 |
| | | async getUserTableData() { |
| | | // const res = await MesOrderGroupSelectUser({usergroupcode:this.}) |
| | | this.userTableData.forEach(item => { |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | item.isVisible = 0 |
| | | item.number = number |
| | | }) |
| | | }, |
| | | // 用户添加 |
| | | userAdd() { |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | this.userTableData.unshift({ name: '', isVisible: 1, number: number }) |
| | | }, |
| | | // 用户列表删除 |
| | | userDel() { |
| | | |
| | | userDel(row) { |
| | | this.userTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.userTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | // 用户列表保存 |
| | | userSave() { |
| | | |
| | | userSave(row) { |
| | | this.userTableData.forEach(item => { |
| | | if (item.number === row.number) { |
| | | item.isVisible = 0 |
| | | } |
| | | }) |
| | | }, |
| | | // 用户列表取消 |
| | | userCancel() { |
| | | |
| | | userCancel(row) { |
| | | this.userTableData.forEach((item, index) => { |
| | | if (item.number === row.number) { |
| | | this.userTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | |
| | | }, |
| | | // 对话框确认 |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | Operator: getCookie('admin') |
| | | } |
| | | 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' ? '添加失败!' : '修改失败!') |
| | | // } |
| | | // }) |
| | | } |
| | | }) |
| | | // this.$refs.dialogForm.validate(valid => { |
| | | // if (valid) { |
| | | // const data = { |
| | | // OrganCode: this.dialogForm.OrgCode, |
| | | // OrganName: this.dialogForm.OrgName, |
| | | // Operator: getCookie('admin') |
| | | // } |
| | | // // 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' ? '添加失败!' : '修改失败!') |
| | | // // } |
| | | // // }) |
| | | // } |
| | | // }) |
| | | this.tabClick() |
| | | this.dialogVisible = false |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | |
| | | 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; |
| | |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | .dialogVisible{ |
| | | ::v-deep .el-select .el-input .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | </style> |