loulijun2021
2022-07-14 bd3410da8a13682ec0bc888539dc35209a2196ba
src/views/scgl/gd.vue
@@ -424,10 +424,11 @@
      <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"
@@ -470,7 +471,8 @@
      <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>
@@ -563,6 +565,9 @@
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 {
@@ -787,7 +792,7 @@
      this.dialogForm.wkshopcode = ''
    },
    // 工艺路线值改变
    async   routecodeChange(val) {
    async routecodeChange(val) {
      const data = {
        partcode: this.dialogForm.partcode,
        routecode: this.dialogForm.routecode
@@ -798,7 +803,7 @@
      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
@@ -956,9 +961,11 @@
            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()
@@ -968,6 +975,25 @@
          })
        }
      })
    },
    // 派发打印
    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() {
@@ -1048,6 +1074,7 @@
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.dialogVisibleSearch ::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}