loulijun2021
2024-04-26 ccffb8caa1f618d41887f4c346e8941c7203598b
1. 工单列表    打印的时候自动派发工单
已修改1个文件
16 ■■■■ 文件已修改
src/views/workOrder/workOrderList.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/workOrder/workOrderList.vue
@@ -1372,7 +1372,7 @@
          <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="sendMesOrderDistribution">打 印</el-button>
        </div>
      </span>
    </el-dialog>
@@ -2134,7 +2134,7 @@
          console.log('执行了打印')
        }
      },
      sendMesOrderWoCode: '',
      formApprove: {
        m_po: '', // 源单单号
        mesordercode: '',
@@ -2278,6 +2278,16 @@
    // })
  },
  methods: {
    // 打印的时候执行派发事件
    sendMesOrderDistribution() {
      MesOrderDistribution([this.sendMesOrderWoCode]).then(res => {
        if (res.code === '200') {
          this.$notify.success('派发成功!')
          this.getMesOrderSearch()
        }
      })
    },
    setSort() {
      const el = this.$refs.stepTableDataRef.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
      this.sortable = Sortable.create(el, {
@@ -2725,11 +2735,13 @@
      // const number = Math.random() * Math.random()
      // this.number = number === 0 ? (10 + Math.random()) : number
      // console.log(number)
      this.formApprove.saleOrderCode = this.formApprove.saleOrderCode !== '' ? this.formApprove.saleOrderCode : saleOrderCode
      const data2 = {
        mesordercode: wo_code || this.dialogForm.mesordercode
      }
      this.sendMesOrderWoCode = wo_code || this.dialogForm.mesordercode
      MesOrderPrintSearch(data2).then(res2 => {
        if (res2.code === '200') {
          const res3 = res2.data.recordset