| | |
| | | <div v-if="row.status==='ALLO'">已派发</div> |
| | | <div v-if="row.status==='START'">开工</div> |
| | | <div v-if="row.status==='CLOSED'">完工</div> |
| | | <div v-if="row.status==='NOSCHED'">待排程</div> |
| | | <div v-if="row.status==='SCHED'">已排程</div> |
| | | <!-- <div v-if="row.status==='NOSCHED'">待排程</div>--> |
| | | <!-- <div v-if="row.status==='SCHED'">已排程</div>--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="printcount" |
| | | label="打印次数" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | min-width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产品编码" |
| | |
| | | :style="{color:$store.state.settings.theme}" |
| | | class="el-icon-printer" |
| | | style="cursor: pointer;margin-right: 15px" |
| | | @click="handlePrint(row.wo_code)" |
| | | @click="handlePrint(row.wo_code,row.saleOrderCode)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | |
| | | show-tooltip-when-overflow |
| | | prop="ng_qty" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="打印工序" placement="top"> |
| | | <i |
| | | v-if="tableDataDetail.length!==row.seq" |
| | | class="el-icon-printer" |
| | | :style="{color:$store.state.settings.theme}" |
| | | style="cursor: pointer;margin-right: 15px" |
| | | @click="supplementSmallClick(row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="补打生产入库条码" placement="top"> |
| | | <i |
| | | v-if="tableDataDetail.length===row.seq" |
| | | class=" el-icon-camera" |
| | | :style="{color:$store.state.settings.theme}" |
| | | style="cursor: pointer;margin-right: 15px" |
| | | @click="getProductInHouseLabCode(row.wo_code)" |
| | | /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- label="操作"--> |
| | | <!-- width="120"--> |
| | | <!-- fixed="right"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div class="operationClass">--> |
| | | <!-- <el-tooltip class="item" effect="dark" content="打印工序" placement="top">--> |
| | | <!-- <i--> |
| | | <!-- v-if="tableDataDetail.length!==row.seq"--> |
| | | <!-- class="el-icon-printer"--> |
| | | <!-- :style="{color:$store.state.settings.theme}"--> |
| | | <!-- style="cursor: pointer;margin-right: 15px"--> |
| | | <!-- @click="supplementSmallClick(row)"--> |
| | | <!-- />--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- <el-tooltip class="item" effect="dark" content="补打生产入库条码" placement="top">--> |
| | | <!-- <i--> |
| | | <!-- v-if="tableDataDetail.length===row.seq"--> |
| | | <!-- class=" el-icon-camera"--> |
| | | <!-- :style="{color:$store.state.settings.theme}"--> |
| | | <!-- style="cursor: pointer;margin-right: 15px"--> |
| | | <!-- @click="getProductInHouseLabCode(row.wo_code)"--> |
| | | <!-- />--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="工价管控" required> |
| | | <el-switch |
| | | v-model="dialogForm.is_steprice" |
| | | active-color="#13ce66" |
| | | inactive-color="#eee" |
| | | @change="routecodeChange" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="是否排程" prop="isAps">--> |
| | | <!-- <el-radio-group v-model="dialogForm.isAps" style="width:200px" @change="changeIsAps">--> |
| | | <!-- <el-radio key="Y" label="Y" value="Y">是</el-radio>--> |
| | |
| | | <!-- </el-form-item>--> |
| | | |
| | | </el-form> |
| | | <div style="display: flex;justify-content: flex-end"> |
| | | <div style="display: flex;justify-content: flex-end;margin-top: -50px;"> |
| | | {{ routeStepArr }} |
| | | </div> |
| | | |
| | |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="工单编号:" class="formContent"> |
| | | {{ formApprove.mesordercode }} |
| | | <el-form-item label="销售单号:" class="formContent"> |
| | | {{ formApprove.saleOrderCode }} |
| | | </el-form-item> |
| | | <el-form-item label="源单单号:" class="formContent"> |
| | | {{ formApprove.m_po }} |
| | | </el-form-item> |
| | | <el-form-item label="工单编号:" class="formContent"> |
| | | {{ formApprove.mesordercode }} |
| | | </el-form-item> |
| | | <el-form-item label="产品编码:" class="formContent"> |
| | | {{ formApprove.partcode }} |
| | |
| | | <el-button v-waves @click="dialogVisibleBackPreview">返 回</el-button> |
| | | <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">确 定</el-button>--> |
| | | <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定/打 印</el-button>--> |
| | | <el-button v-waves v-print="printObj" type="primary">打 印</el-button> |
| | | <el-button v-waves v-print="printObj" type="primary" @click="printObjGetApi">打 印</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, MesBadOrderSearch, JobCreationSonAddVison, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SelectRouteOrWkshop, |
| | | SelectRouteStep, AddMesOrderCodeSearch, ProductInHouseLabCode |
| | | SelectRouteStep, AddMesOrderCodeSearch, ProductInHouseLabCode, UpdateMesOrderPrintCount |
| | | } from '@/api/produceManager' |
| | | import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/makeModel' |
| | | import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global' |
| | |
| | | // { code: 'CREATED', name: '已关闭' } |
| | | { code: 'ALLO', name: '已派发' }, |
| | | { code: 'START', name: '开工' }, |
| | | { code: 'CLOSED', name: '完工' }, |
| | | { code: 'NOSCHED', name: '待排程' }, |
| | | { code: 'SCHED', name: '已排程' } |
| | | { code: 'CLOSED', name: '完工' } |
| | | // { code: 'NOSCHED', name: '待排程' }, |
| | | // { code: 'SCHED', name: '已排程' } |
| | | ], |
| | | total: 10, |
| | | radioSelected: '', |
| | |
| | | mesqty: '', // 工单数量 |
| | | |
| | | routecode: '', // 工艺路线编码 |
| | | |
| | | is_steprice: false, // 是否工价管理 |
| | | |
| | | wkshopcode: '', // 生产车间编码 |
| | | planstartdate: '', // 计划开始时间 |
| | | planenddate: '', // 计划完成时间 |
| | |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | | vue.printLoading = true |
| | | console.log('打开之前') |
| | | console.log() |
| | | console.log('打开之前8888') |
| | | }, |
| | | openCallback(vue) { |
| | | vue.printLoading = false |
| | | console.log('执行了打印') |
| | | console.log('执行了打印9999') |
| | | }, |
| | | clickMounted(vue) { |
| | | console.log('点击了打印按钮1223451') |
| | | // vue.printContent.popTitle = vue.tableHead // 动态设置页眉 |
| | | } |
| | | }, |
| | | |
| | |
| | | // vue.dialogVisible = false |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | | // window.print() |
| | | vue.printLoading = true |
| | | console.log('打开之前') |
| | | console.log() |
| | | console.log('打开之前000') |
| | | }, |
| | | openCallback(vue) { |
| | | vue.printLoading = false |
| | | console.log('执行了打印') |
| | | console.log('执行了打印eee') |
| | | }, |
| | | clickMounted(vue) { |
| | | console.log('点击了打印按钮1111') |
| | | // vue.printContent.popTitle = vue.tableHead // 动态设置页眉 |
| | | } |
| | | }, |
| | | qrForm: { |
| | |
| | | this.form.paydate = '' |
| | | this.form.creatuser = '' |
| | | this.form.sourceorder = '' |
| | | this.form.saleordercode = '' |
| | | this.form.creatuser = '' |
| | | this.form.ordertype = '' |
| | | this.getMesOrderSearch() |
| | |
| | | }, |
| | | // 工艺路线值改变 |
| | | async routecodeChange() { |
| | | const data = { |
| | | partcode: this.dialogForm.partcode, |
| | | routecode: this.dialogForm.routecode, |
| | | wkshopcode: this.dialogForm.wkshopcode |
| | | } |
| | | await SelectRouteOrWkshop(data).then((res) => { |
| | | console.log(res, 1) |
| | | if (this.dialogForm.routecode) { |
| | | const data = { |
| | | partcode: this.dialogForm.partcode, |
| | | routecode: this.dialogForm.routecode, |
| | | wkshopcode: this.dialogForm.wkshopcode, |
| | | is_steprice: this.dialogForm.is_steprice ? 'Y' : 'N' |
| | | } |
| | | await SelectRouteOrWkshop(data).then((res) => { |
| | | console.log(res, 1) |
| | | |
| | | SelectRouteStep({ routecode: this.dialogForm.routecode }).then(res2 => { |
| | | console.log(res2) |
| | | this.routeStepArr = res2.data.map(i => i.stepname).join(',') |
| | | SelectRouteStep({ routecode: this.dialogForm.routecode }).then(res2 => { |
| | | console.log(res2) |
| | | this.routeStepArr = res2.data.map(i => i.stepname).join(',') |
| | | }) |
| | | |
| | | this.submitButtonIsDisabled = false |
| | | }).catch(err => { |
| | | // console.log(err, 2) |
| | | this.submitButtonIsDisabled = true |
| | | }) |
| | | |
| | | this.submitButtonIsDisabled = false |
| | | }).catch(err => { |
| | | // console.log(err, 2) |
| | | this.submitButtonIsDisabled = true |
| | | }) |
| | | } |
| | | }, |
| | | // 生产车间值改变时 |
| | | async wkshopcodeChange(wkshopcode, partcode) { |
| | | async wkshopcodeChange(wkshopcode, partcode) { |
| | | const data = { |
| | | partcode, |
| | | wkshopcode |
| | |
| | | console.log('工单关闭事件') |
| | | this.tableData.forEach(item => { |
| | | if (item.wo_code === this.radioSelected) { |
| | | if (item.status === 'START') { |
| | | return this.$message.info('当前工单未完工,无法关闭!') |
| | | } else if (item.status === 'CLOSED') { |
| | | // if (item.status === 'START') { |
| | | // return this.$message.info('当前工单未完工,无法关闭!') |
| | | // } else |
| | | if (item.status === 'CLOSED') { |
| | | return this.$message.info('工单已关闭,无需再关闭!') |
| | | } else { |
| | | this.$confirm('是否确认关闭工单?', '提示', { |
| | |
| | | |
| | | this.dialogForm.routecode = '' // 工艺路线编码 |
| | | this.dialogForm.wkshopcode = '' // 生产车间编码 |
| | | this.dialogForm.is_steprice = false// 是否工价管理 |
| | | this.dialogForm.planstartdate = '' // 计划开始时间 |
| | | this.dialogForm.planenddate = '' // 计划完成时间 |
| | | this.dialogForm.orderlev = '' // 工单等级 |
| | |
| | | this.dialogVisibleSearch = false |
| | | }, |
| | | // 处理打印 |
| | | handlePrint(wo_code) { |
| | | handlePrint(wo_code, saleOrderCode) { |
| | | // const number = Math.random() * Math.random() |
| | | // this.number = number === 0 ? (10 + Math.random()) : number |
| | | // console.log(number) |
| | | |
| | | console.log(this.formApprove.saleOrderCode, 321) |
| | | this.formApprove.saleOrderCode = this.formApprove.saleOrderCode !== '' ? this.formApprove.saleOrderCode : saleOrderCode |
| | | const data2 = { |
| | | username: getCookie('admin'), |
| | | mesordercode: wo_code || this.dialogForm.mesordercode |
| | |
| | | |
| | | dialogVisibleConfirmClose() { |
| | | // this.dialogForm.mesordercode = '' |
| | | this.formApprove.saleOrderCode = '' |
| | | this.formApprove.mesordercode = '' |
| | | this.formApprove.m_po = '' |
| | | this.formApprove.partcode = '' |
| | |
| | | |
| | | this.tableDataPrint = [] |
| | | }, |
| | | |
| | | async printObjGetApi() { |
| | | const res = await UpdateMesOrderPrintCount({ wo_code: this.formApprove.mesordercode }) |
| | | if (res.code === '200') { |
| | | this.getMesOrderSearch() |
| | | } |
| | | }, |
| | | |
| | | // 补打按钮 |
| | | supplementClick() { |
| | | this.dialogVisibleTask = false |
| | |
| | | }, |
| | | // 行点击事件 |
| | | async rowClick(row, event, column) { |
| | | this.formApprove.saleOrderCode = row.saleOrderCode |
| | | this.radioSelected = row.wo_code ? row.wo_code : this.radioSelected |
| | | const { data: res } = await SearchWorkStep({ wo_code: this.radioSelected, storg_code: this.$store.state.settings.orgType === 'W' ? (this.switchButton ? '' : getCookie('stu_torgcode')) : '' }) |
| | | const { data: res } = await SearchWorkStep({ |
| | | wo_code: this.radioSelected, |
| | | storg_code: this.$store.state.settings.orgType === 'W' ? (this.switchButton ? '' : getCookie('stu_torgcode')) : '' |
| | | }) |
| | | this.tableDataDetail = res |
| | | }, |
| | | // 打印工单 |