loulijun2021
2022-07-15 869f6c069e86c2ff90393c1441854a6f05989481
src/views/scgl/sckbg.vue
@@ -667,7 +667,7 @@
  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]+$/
@@ -714,7 +714,7 @@
      WXform: { // 外协表单
        // PO202206280001_4;Step01
        orderstepqrcode: '', // 扫描的二维码信息
        prop: 'wo_code', // 排序字段
        prop: 'wo_code', // 排序字段z
        order: 'asc', // 排序字段
        page: 1, // 第几页
        rows: 20 // 每页多少条
@@ -821,6 +821,8 @@
    this.$nextTick(() => {
      $("input[name='produceCode']")[0].focus()
    })
    // webapp_urlprotocol_startup()
    webapp_ws_autoupdate(true)
  },
  methods: {
    async getMesOrderStepSearch() {
@@ -897,12 +899,12 @@
      // 收料: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)
@@ -912,9 +914,10 @@
        }
      }
      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)
@@ -1245,12 +1248,12 @@
              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()
@@ -1272,7 +1275,6 @@
            }
            SavaMesOrderStepStart(data).then(res => {
              if (res.code === '200') {
                // this.WXprint()
                this.$message.success('开工成功!')
                this.dialogVisible = false
                this.tabClick()
@@ -1310,12 +1312,12 @@
              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()