gaoluyang
2025-02-19 7e35455e4bbad2edfe64bf6f56beff105c94eb94
src/views/business/materialOrder/index.vue
@@ -110,14 +110,6 @@
        </div>
      </div>
    </div>
<!--    <div style="width: 100%;height: 100%;">-->
<!--      <CustomsInspection :active="active"-->
<!--                         :currentId="currentId"-->
<!--                         :customsInspection="customsInspection" :orderType="orderType" />-->
<!--    </div>-->
<!--    <div style="width: 100%;height: 100%;">-->
<!--      <CopperOrder :active="active" :currentId="currentId"></CopperOrder>-->
<!--    </div>-->
    <!-- 确认免检弹框 -->
    <el-dialog :visible.sync="exemptionVisible" title="确认免检" width="42%">
      <div style="display: flex">
@@ -211,11 +203,18 @@
import DownFileDialog from "@/views/business/materialOrderComponents/materialOrder/downFileDialog.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {
  concessionRelease,
  getIfsByAll,
  getIfsByOver,
  getIfsByQuarter,
  getIfsByStateOne,
  getPurchaseOrder
  getPurchaseOrder,
  rawAllExport,
  rawOrderRelease,
  repealEnterRawOrder,
  repealQuarterRawOrder,
  revokeInspectionReport,
  updateEntrustCode
} from "@/api/business/rawMaterialOrder";
import {getWarehouseSubmit} from "@/api/business/materialInspection";
// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
@@ -405,7 +404,7 @@
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '300px',
          width: '420px',
          operation: [
            {
              name: '季度检验',
@@ -847,7 +846,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.post(this.$api.materialInspection.concessionRelease+'?ifsInventoryId='+row.id).then(res => {
        concessionRelease({ifsInventoryId: row.id}).then(res => {
          if (res.code === 200) {
            this.$message({
              type: 'success',
@@ -870,7 +869,7 @@
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$axios.post(this.$api.rawMaterialOrder.repealQuarterRawOrder + '?quarterOrderId=' + row.quarterOrderId).then(res => {
        repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => {
          if (res.code === 200) {
            this.$message.success('撤销成功')
            this.refreshTable('page')
@@ -940,14 +939,9 @@
    // 提交免检信息
    submitExemption () {
      this.exemptionLoading = true
      this.$axios.post(this.$api.rawMaterialOrder.rawOrderRelease, {
      rawOrderRelease({
        ifsInventoryId: this.exemptionInfo.id,
        partDetail: this.exemptionInfo.partDetail
      }, {
        headers: {
          'Content-Type': 'application/json'
        },
        noQs: true
      }).then(res => {
        if (res.code === 200) {
          this.exemptionVisible = false
@@ -967,12 +961,10 @@
    },
    // 提交撤销报检申请
    submitDeclare () {
      this.$axios.post(this.$api.rawMaterialOrder.revokeInspectionReport, {
        id: this.insOrderRow.id
      }).then(res => {
      revokeInspectionReport({id: this.insOrderRow.id}).then(res => {
        if (res.code === 200) {
          this.declareDialogVisible = false
          this.refreshTable('page')
          this.refreshTable()
          this.$message.success("撤销报检成功")
        }
      }).catch(err => {
@@ -989,7 +981,7 @@
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.$axios.post(this.$api.rawMaterialOrder.repealEnterRawOrder + '?enterOrderId=' + row.enterOrderId).then(res => {
          repealEnterRawOrder({enterOrderId: row.enterOrderId}).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
@@ -1002,7 +994,7 @@
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.$axios.post(this.$api.rawMaterialOrder.repealQuarterRawOrder + '?quarterOrderId=' + row.quarterOrderId).then(res => {
          repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
@@ -1013,21 +1005,33 @@
      this.insOrderRow = row
    },
    cancelQuashOrder (type) {
      const url = type === 'enterOrderId' ? this.$api.rawMaterialOrder.repealEnterRawOrder : this.$api.rawMaterialOrder.repealQuarterRawOrder
      const name = type === 'enterOrderId' ? 'enterOrderId' : 'quarterOrderId'
      const paramInfo = type === 'enterOrderId' ? this.insOrderRow.enterOrderId : this.insOrderRow.quarterOrderId
      this.$confirm('是否撤销当前数据?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$axios.post(url + `?${name}=` + paramInfo).then(res => {
          if (res.code === 200) {
            this.$message.success('撤销成功')
            this.refreshTable('page')
          }
        })
      }).catch(() => {})
      if (type === 'enterOrderId') {
        this.$confirm('是否撤销当前数据?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          repealEnterRawOrder({enterOrderId: this.insOrderRow.enterOrderId}).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
            }
          })
        }).catch(() => {})
      } else {
        this.$confirm('是否撤销当前数据?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          repealQuarterRawOrder({quarterOrderId: this.insOrderRow.quarterOrderId}).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
            }
          })
        }).catch(() => {})
      }
    },
    // 点击样品名称查看详情
    selectAllByOne(row) {
@@ -1056,28 +1060,6 @@
    closeFilesLook () {
      this.filesDialogVisible = false
    },
    // 附件下载
    handleDown(row){
      this.$axios.post(this.$api.insOrderPlan.downFile, {
        id: row.id,
      }).then(res => {
        if (res.code === 200) {
          let url = '';
          if(res.data.type==1){
            url = this.javaApi+'/img/'+res.data.fileUrl
            file.downloadIamge(url,row.fileName)
          }else{
            url = this.javaApi+'/word/'+res.data.fileUrl
            const link = document.createElement('a');
            link.href = url;
            link.download = row.fileName;
            link.click();
          }
        }
      }).catch(error => {
      })
    },
    // 报告下载
    download(row) {
      this.downFileDialogVisible = true
@@ -1104,13 +1086,9 @@
      let entity = this.tabIndex === 3 ? {...this.entity, isInspect: 2} : {...this.entity,state: 2, orderState: 4,}
      delete entity.orderBy
      this.outLoading = true
      this.$axios.post(this.$api.rawMaterialOrder.rawAllExport,{
      rawAllExport({
        entity:entity
      },{
        headers: {
          'Content-Type': 'application/json'
        }
        ,responseType: "blob"}).then(res => {
      },{responseType: "blob"}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res],{ type: 'application/octet-stream' });
@@ -1121,16 +1099,13 @@
        link.click();
      })
    },
    // 提交修改委托编号信息
    submitCode () {
      this.submitCodeLoading = true
      try {
        this.$axios.post(this.$api.insOrderPlan.updateEntrustCode, {
        updateEntrustCode({
          id: this.entrustCodeInfo.id,
          entrustCode: this.entrustCodeInfo.entrustCode,
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          if (res.code === 200) {
            this.entrustCodeVisible = false