loulijun2021
2022-07-16 392f9468875a8721c17c4e15c288333017cac4a1
src/views/scgl/scdd.vue
@@ -121,7 +121,7 @@
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="reset('update')"
          @click="syncERP"
        >同步ERP
        </el-button>
        <el-button
@@ -206,6 +206,12 @@
          <el-table-column
            prop="qty"
            label="订单数量"
            width="150"
            sortable="custom"
          />
          <el-table-column
            prop="relse_qty"
            label="已下单数量"
            width="150"
            sortable="custom"
          />
@@ -498,12 +504,33 @@
      this.form.prop = prop
      this.getErpOrderSearch()
    },
    // 同步ERP
    async  syncERP() {
      const loading = this.$loading({
        lock: true,
        text: '正在同步ERP,请稍等...',
        spinner: 'el-icon-loading',
        customClass: 'osloading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      setTimeout(() => {
        loading.close()
      }, 2000)
      // const res = await xxx()
      // if (res.code==='200'){
      setTimeout(() => {
        loading.close()
        this.getErpOrderSearch()
      }, 2000)
      // }
    },
    // 查询
    search() {
      this.getErpOrderSearch()
    },
    // 重置
    reset(val) {
    reset() {
      this.form.erporderstus = ''
      this.form.erpordercode = ''
      this.form.partcode = ''
@@ -513,9 +540,6 @@
      this.form.creatuser = ''
      this.form.createdate = ''
      this.getErpOrderSearch()
      if (val.length > 0) {
        this.$message.success('ERP已同步!')
      }
    },
    // 单选框选中获取当前行信息
    getCurrentRow(wo) {
@@ -820,3 +844,8 @@
}
</style>
<style>
.osloading{
  font-size: 40px;
}
</style>