| | |
| | | SavaMesOrderStepStart, |
| | | SavaMesOrderStepReport |
| | | } from '@/api/scgl' |
| | | import { urlAddRandomNo, webapp_ws_ajax_run } from '@/utils/grwebapp' |
| | | import { urlAddRandomNo, webapp_urlprotocol_startup, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp' |
| | | import { MesOrderPrintSearch1 } from '@/api/utils' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | |
| | | WXform: { // 外协表单 |
| | | // PO202206280001_4;Step01 |
| | | orderstepqrcode: '', // 扫描的二维码信息 |
| | | prop: 'wo_code', // 排序字段 |
| | | prop: 'wo_code', // 排序字段z |
| | | order: 'asc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']")[0].focus() |
| | | }) |
| | | // webapp_urlprotocol_startup() |
| | | webapp_ws_autoupdate(true) |
| | | }, |
| | | methods: { |
| | | async getMesOrderStepSearch() { |
| | |
| | | // 收料:code="200" count=3 |
| | | // 走列表形式 code="200" count=4 |
| | | if (belong === 'produceCode') { |
| | | const orderstepqrcode = this.form.orderstepqrcode |
| | | const data = { |
| | | OperType: 'ZZ', |
| | | orderstepqrcode: this.form.orderstepqrcode, |
| | | orderstepqrcode: orderstepqrcode, |
| | | SelectType: '' |
| | | } |
| | | console.log(this.form.orderstepqrcode, 21) |
| | | const res = await MesOrderStepStart(data) |
| | | if (res.code === '200' && res.count === 0) { |
| | | await this.ZZstart(res.data) |
| | |
| | | } |
| | | } |
| | | if (belong === 'WXproduceCode') { |
| | | const orderstepqrcode = this.WXform.orderstepqrcode |
| | | const data = { |
| | | OperType: 'WX', |
| | | orderstepqrcode: this.WXform.orderstepqrcode, |
| | | orderstepqrcode: orderstepqrcode, |
| | | SelectType: this.WXSelected// OUT、IN |
| | | } |
| | | const res = await MesOrderStepStart(data) |
| | |
| | | inuser: this.dialogForm.inuser, // 发料人员 |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | sqty: this.dialogForm.sqty, // 收料数量 |
| | | ngqty: this.dialogForm.noputqty, // 不良数量 |
| | | ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 不良数量 |
| | | badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 不良原因 |
| | | } |
| | | SavaMesOrderStepIn(data).then(res => { |
| | | if (res.code === '200') { |
| | | // this.WXprint() |
| | | this.WXprint() |
| | | this.$message.success('收料成功!') |
| | | this.dialogVisible = false |
| | | this.tabClick() |
| | |
| | | } |
| | | SavaMesOrderStepStart(data).then(res => { |
| | | if (res.code === '200') { |
| | | // this.WXprint() |
| | | this.$message.success('开工成功!') |
| | | this.dialogVisible = false |
| | | this.tabClick() |
| | |
| | | startqty: this.dialogForm.reportqty, // 开工数量 |
| | | // reportqty: this.dialogForm.reportqty, // 报工数量 |
| | | reportqty: this.dialogForm.startqty, // 报工数量 |
| | | ngqty: this.dialogForm.noputqty, // 不良数量 |
| | | ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 不良数量 |
| | | badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 不良原因 |
| | | } |
| | | SavaMesOrderStepReport(data).then(res => { |
| | | if (res.code === '200') { |
| | | // this.ZZprint() |
| | | this.ZZprint() |
| | | this.$message.success('报工成功!') |
| | | this.dialogVisible = false |
| | | this.tabClick() |