| | |
| | | <el-dialog |
| | | title="工序" |
| | | :visible.sync="dialogVisibleSearch" |
| | | width="540px" |
| | | top="25vh" |
| | | width="840px" |
| | | top="20vh" |
| | | class="dialogVisibleSearch" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-table |
| | | :data="searchTableData" |
| | |
| | | <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 v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button v-else type="primary" @click="dialogVisibleConfirm">确 定/打 印</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | import { WorkShopSelect } from '@/api/sbgl' |
| | | import { PartSelect, PartSelectRpute } from '@/api/zzmx' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { MesOrderPrintSearch1 } from '@/api/utils' |
| | | import { urlAddRandomNo, webapp_ws_ajax_run } from '@/utils/grwebapp' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | this.dialogForm.wkshopcode = '' |
| | | }, |
| | | // 工艺路线值改变 |
| | | async routecodeChange(val) { |
| | | async routecodeChange(val) { |
| | | const data = { |
| | | partcode: this.dialogForm.partcode, |
| | | routecode: this.dialogForm.routecode |
| | |
| | | this.dialogForm.wkshopcode = '' |
| | | }, |
| | | // 工序任务 |
| | | async check(row) { |
| | | async check(row) { |
| | | this.dialogVisibleTask = true |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.taskTableData = res |
| | |
| | | orderlev: this.dialogForm.orderlev, // 工单等级 |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | console.log(data, 1) |
| | | AddUpdateMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | if (this.operation !== 'add') { |
| | | // this.sendPrint() |
| | | } |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '派发成功!') |
| | | this.dialogVisible = false |
| | | this.getMesOrderSearch() |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 派发打印 |
| | | async sendPrint() { |
| | | const data = { |
| | | username: getCookie('admin'), |
| | | mesordercode: this.dialogForm.mesordercode |
| | | } |
| | | const res = await MesOrderPrintSearch1(data) |
| | | if (res.code === '200') { |
| | | // 参数具体说明请参考帮助文档中的“WEB报表(B/S报表)->WEB报表客户端->启动参数说明”部分 |
| | | var args = { |
| | | type: 'print', // preview print |
| | | showOptionDlg: false, // 如果不显示打印对话框而直接打印,将此行注释去掉即可 |
| | | report: urlAddRandomNo('./static/grf/产品流传单A4.grf'), |
| | | data: res.data |
| | | } |
| | | |
| | | webapp_ws_ajax_run(args) |
| | | } |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | .dialogVisibleSearch ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |