| | |
| | | v-waves |
| | | icon="el-icon-thumb" |
| | | type="primary" |
| | | :disabled="radioSelected===''" |
| | | @click="report()" |
| | | >报工 |
| | | </el-button> |
| | |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-thumb" |
| | | @click="sendOut" |
| | | :disabled="radioSelected===''" |
| | | @click="sendOut()" |
| | | >发料 |
| | | </el-button> |
| | | <el-button |
| | |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-thumb" |
| | | @click="takeIn" |
| | | :disabled="radioSelected===''" |
| | | @click="takeIn()" |
| | | >收料 |
| | | </el-button> |
| | | <el-button |
| | |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-thumb" |
| | | @click="handleBad" |
| | | :disabled="radioSelected===''" |
| | | @click="handleBad()" |
| | | >处理 |
| | | </el-button> |
| | | </div> |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" style=" display: flex;"> |
| | | <el-input v-model="form.partcode" placeholder="请输入" style="width: 200px" /> |
| | | <el-input |
| | | v-model="form.partcode" |
| | | placeholder="请输入" |
| | | style="width: 200px" |
| | | @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="form.partname" placeholder="请输入" style="width: 200px" /> |
| | | <el-input |
| | | v-model="form.partname" |
| | | placeholder="请输入" |
| | | style="width: 200px" |
| | | @keyup.enter.native="val=>enterNative(val,'produceCode' + item.code)" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="规格型号" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.partspec" placeholder="请输入" style="width: 200px" />--> |
| | |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="工单号" |
| | | width="160" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="110px"> |
| | | <el-divider v-if="activeName==='生产列表'||activeName==='外协收料'||activeName==='不良待处理'" content-position="left">基本信息</el-divider> |
| | | <el-divider v-if="activeName==='生产列表'||activeName==='外协收料'||activeName==='不良待处理'" content-position="left">基本信息 |
| | | </el-divider> |
| | | <el-form-item label="工单编号" class="dialogFormItem"> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.wo_code }}</div> |
| | | </el-form-item> |
| | |
| | | <div class="dialogFormItemDiv">{{ dialogForm.partname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号" class="dialogFormItem"> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.partspec }}</div> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.partspec? dialogForm.partspec:'/' }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="当前工序" class="dialogFormItem"> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.stepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="下道工序" class="dialogFormItem"> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.nextstepname }}</div> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.nextstepname?dialogForm.nextstepname :'/' }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="任务数量" class="dialogFormItem"> |
| | | <div class="dialogFormItemDiv">{{ dialogForm.planqty }}</div> |
| | |
| | | <el-table |
| | | v-if="activeName==='生产列表'||activeName==='外协收料'" |
| | | ref="defectTableDataRef" |
| | | key="defectTableDataKey" |
| | | :data="defectTableData" |
| | | border |
| | | row-class-name="custom-row" |
| | |
| | | <div |
| | | style="color: #fff;width: 22px;height: 22px;display: flex;justify-content: center;align-items: center;border-radius: 50%" |
| | | :style="{backgroundColor:$store.state.settings.theme}" |
| | | >{{ index+1 }}</div> |
| | | >{{ index + 1 }} |
| | | </div> |
| | | <div style="margin-left:30px;width: 160px;" class="ellipsis"> |
| | | {{ item.tp }} |
| | | </div> |
| | | <div style="margin-left:30px;"> |
| | | 可收数量:{{ item.fqty }} |
| | | 可收数量:{{ item.acceptQty }} |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <el-table |
| | | v-if="activeName==='不良待处理'" |
| | | ref="badTableDataDataRef" |
| | | key="badTableDataDataKey" |
| | | :data="badTableData" |
| | | border |
| | | row-class-name="custom-row" |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { |
| | | EditOrderNgStepSeave, |
| | | MesOrderNgStepSearch, |
| | | MesOrderNgSubStepSearch, |
| | | MesOrderStepSearch, MesOrderStepStart, |
| | |
| | | break |
| | | } |
| | | this.enterNative(this.form.wocode, belong) |
| | | this.search() |
| | | // this.search() |
| | | this.radioSelected = '' |
| | | }, |
| | | enterNative(val, belong) { |
| | |
| | | $('input[name=\'produceCodeBAD\']')[0].focus() |
| | | }) |
| | | } |
| | | this.search() |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | |
| | | // 不良处理 生产开报工扫码获取工单对应工序任务(不良明细) |
| | | async handleBad(row) { |
| | | const data = { |
| | | wocode: row.wo_code, |
| | | stepcode: row.stepcode |
| | | wocode: row ? row.wo_code : this.tableData.find(i => i.id === this.radioSelected).wo_code, |
| | | stepcode: row ? row.stepcode : this.tableData.find(i => i.id === this.radioSelected).stepcode |
| | | } |
| | | let res = await MesOrderNgSubStepSearch(data) |
| | | if (res.code === '200') { |
| | |
| | | this.dialogForm.eqpcode = res.data1.eqpcode |
| | | this.dialogForm.eqpname = res.data1.eqpname |
| | | |
| | | this.badTableData = res.data2 |
| | | |
| | | // 下周回来写不良处理保存接口 |
| | | this.badTableData.forEach(item => { |
| | | res.data2.forEach(item => { |
| | | item.repair_qty = 0 |
| | | item.bad_qty = 0 |
| | | item.laborbad_qty = 0 |
| | | item.materielbad_qty = 0 |
| | | }) |
| | | |
| | | this.badTableData = res.data2 |
| | | |
| | | this.dialogVisible = true |
| | | } |
| | |
| | | this.dialogForm.eqpcode = res.eqpcode |
| | | this.dialogForm.eqpname = res.eqpname |
| | | |
| | | this.dialogForm.list = res.list |
| | | this.dialogForm.list = [] |
| | | res.list.forEach(i => { |
| | | i.acceptQty = parseFloat(i.fqty) - parseFloat(i.sqty) - parseFloat(i.ng_qty) - parseFloat(i.laborbad_qty) - parseFloat(i.materielbad_qty) |
| | | if (i.acceptQty > 0) { |
| | | this.dialogForm.list.push(i) |
| | | } |
| | | }) |
| | | |
| | | // this.dialogForm.list = res.list |
| | | |
| | | this.dialogVisible = true |
| | | } |
| | |
| | | const res = await SavaMesOrderStepReport(data) |
| | | if (res.code === '200') { |
| | | this.$notify.success('报工成功!') |
| | | await this.search() |
| | | // await this.search() |
| | | await this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.dialogVisible = false |
| | | } else { |
| | |
| | | if (this.activeName === '外协发料') { |
| | | if (parseFloat(this.dialogForm.fqty) < 1) { |
| | | return this.$message.info('发料数量不能为零!') |
| | | } |
| | | if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) { |
| | | return this.$message.info('发料数量不能大于未发数量!') |
| | | } |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, |
| | |
| | | const res = await SavaMesOrderStepOut(data) |
| | | if (res.code === '200') { |
| | | this.$notify.success('发料成功!') |
| | | await this.search() |
| | | // await this.search() |
| | | await this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.dialogVisible = false |
| | | } else { |
| | |
| | | } |
| | | |
| | | if (this.dialogForm.list.find(i => i.name === this.dialogForm.wxcode)) { |
| | | if (this.dialogForm.list.find(i => i.name === this.dialogForm.wxcode).fqty < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) { |
| | | if (this.dialogForm.list.find(i => i.name === this.dialogForm.wxcode).acceptQty < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) { |
| | | return this.$message.info('收料数量加不良数量不能大于该供应商可收数量!') |
| | | } |
| | | } else { |
| | |
| | | const res = await SavaMesOrderStepIn(data) |
| | | if (res.code === '200') { |
| | | this.$notify.success('收料成功!') |
| | | await this.search() |
| | | // await this.search() |
| | | await this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.dialogVisible = false |
| | | } else { |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.$notify.error('收料失败!') |
| | | } |
| | | } |
| | | |
| | | if (this.activeName === '不良待处理') { |
| | | let flag = false |
| | | this.badTableData.forEach(i => { |
| | | if (parseFloat(i.repair_qty) + parseFloat(i.laborbad_qty) + parseFloat(i.materielbad_qty) > parseFloat(i.ng_qty)) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | return this.$message.info('维修合格数量+工废数量+料废数量不能大于不良数量!') |
| | | } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const res = await EditOrderNgStepSeave({ Data: this.badTableData }) |
| | | if (res.code === '200') { |
| | | this.$notify.success('提交成功!') |
| | | // await this.search() |
| | | await this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.dialogVisible = false |
| | | } else { |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.$notify.error('提交失败!') |
| | | } |
| | | } |
| | | } |
| | |
| | | this.form.partcode = '' |
| | | this.form.partname = '' |
| | | this.form.partspec = '' |
| | | this.search() |
| | | }, |
| | | |
| | | headerCellStyle() { |
| | |
| | | width: 200px; |
| | | } |
| | | |
| | | ::v-deep .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | </style> |