gaoluyang
2025-02-19 bf7a41f935889055d802c757a29cd2ff6d565844
1.成品下单页面迁移
已修改5个文件
414 ■■■■ 文件已修改
src/api/business/productOrder.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/customsInspection.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/index.vue 342 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/productOrder.js
@@ -78,6 +78,14 @@
  return request({
    url: '/insOrder/delInsOrder',
    method: 'delete',
    data: query
    params: query
  })
}
// 将待审核更新成撤销状态
export function selectNoProducts(query) {
  return request({
    url: '/insOrder/selectNoProducts',
    method: 'get',
    params: query
  })
}
src/views/business/materialOrder/customsInspection.vue
@@ -431,7 +431,6 @@
</template>
<script>
import ValueTable from "@/components/Table/value-table.vue";
import {
  addInsOrder,
  addRawMaterOrderTemplate, delRawMaterOrderTemplate,
@@ -444,9 +443,7 @@
export default {
  name: "CustomsInspection",
  dicts: ['check_type', 'urgency_level'],
  components: {
    ValueTable,
  },
  components: {},
  props: {
    currentId: {
      type: Number,
src/views/business/materialOrder/index.vue
@@ -195,7 +195,6 @@
</template>
<script>
import CustomsInspection from "./customsInspection.vue";
import PrintDialog from "@/views/business/materialOrderComponents/materialOrder/printDialog.vue";
import ShowInfo from "@/views/business/materialOrderComponents/materialOrder/showInfo.vue";
import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
@@ -206,9 +205,7 @@
  concessionRelease,
  getIfsByAll,
  getIfsByOver,
  getIfsByQuarter,
  getIfsByStateOne,
  getPurchaseOrder,
  rawAllExport,
  rawOrderRelease,
  repealEnterRawOrder,
@@ -222,7 +219,7 @@
export default {
  name: "b1-material-inspection-order",
  // import 引入的组件需要注入到对象中才能使用
  components: {limsTable,DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog, CustomsInspection},
  components: {limsTable,DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog},
  data() {
    // 这里存放数据
    return {
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -17,9 +17,9 @@
        </el-upload>
      </div>
      <div v-if="filesDialogVisible">
        <lims-table :tableData="tableData" :column="column"
                    @pagination="pagination" height="500px" key="tableData"
                    :page="page" :tableLoading="tableLoading"></lims-table>
        <lims-table :tableData="tableDataFile" :column="columnFile"
                    @pagination="paginationFile" height="500px" key="tableDataFile"
                    :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
      </div>
    </el-dialog>
  </div>
@@ -48,20 +48,18 @@
  data() {
    // 这里存放数据
    return {
      tableData: [],
      tableLoading: false,
      column: [
      tableDataFile: [],
      tableLoadingFile: false,
      columnFile: [
        {
          dataType: 'tag',
          label: '类型',
          prop: 'type',
          formatData: (params) => {
            if (params == 1) {
              return '合格'
            } else if (params == 0) {
              return '不合格'
            } else if (params == 3) {
              return '不判定'
              return '图片'
            } else if (params == 2) {
              return '文件'
            } else {
              return ''
            }
@@ -69,11 +67,9 @@
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else if (params == 0) {
              return 'danger'
            } else if (params == 3) {
              return ''
            }  else {
            } else if (params == 2) {
              return 'warning'
            } else {
              return ''
            }
          }
@@ -104,7 +100,7 @@
          ]
        }
      ],
      page: {
      pageFile: {
        total:0,
        size:10,
        current:1
@@ -127,37 +123,37 @@
    }
  },
  mounted() {
    this.refreshTable()
    this.getFileList()
  },
  // 方法集合
  methods: {
    // 切换数据查看tab栏
    handleDataVisibleTab (m, i) {
      this.dataVisibleIndex = i
      this.refreshTable()
      this.getFileList()
    },
    // 查询回调
    refreshTable() {
    getFileList() {
      if (this.dataVisibleIndex === 0) {
        this.entity.insOrderId = this.filesLookInfo.enterOrderId
      } else {
        this.entity.insOrderId = this.filesLookInfo.quarterOrderId
      }
      this.tableLoading = true
      this.tableLoadingFile = true
      const params = {...this.entity}
      getFileList(params).then(res => {
        this.tableLoading = false
        this.tableLoadingFile = false
        if (res.code === 200) {
          this.tableData = res.data.records
          this.page.total = res.data.total
          this.tableDataFile = res.data.records
          this.pageFile.total = res.data.total
        }
      }).catch(err => {
        this.tableLoading = false
        this.tableLoadingFile = false
      })
    },
    pagination (page) {
      this.page.size = page.limit
      this.refreshTable()
    paginationFile (page) {
      this.pageFile.size = page.limit
      this.getFileList()
    },
    // 下载
    handleDown(row){
src/views/business/productOrder/index.vue
@@ -64,7 +64,7 @@
    <div class="table">
      <lims-table :tableData="tableData" :column="column"
                  :isSelection="true" :handleSelectionChange="selectMethod"
                  @pagination="pagination" :height="'calc(100vh - 290px)'" key="tableData"
                  @pagination="pagination" :height="'calc(100vh - 280px)'" key="tableData"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <div>
@@ -148,34 +148,33 @@
                </span>
      </el-dialog>
      <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%">
        <div v-if="dataDialogVisible" style="height: 70vh;overflow-y: auto;">
          <ValueTable ref="ValueTableDataLook" :componentData="componentDataDataLook" :rowKey="'insProductId'"
                      :url="$api.insOrder.selectSampleAndProductByOrderId"/>
        <div v-if="dataDialogVisible">
          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn"
                      @pagination="tableDataLookPagination" height="500px" key="tableDataLook"
                      :page="tableDataLookPage" :tableLoading="tableDataLookTableLoading"></lims-table>
        </div>
      </el-dialog>
      <el-dialog :visible.sync="filesDialogVisible" title="附件查看" width="80%">
        <div v-if="filesDialogVisible" style="height: 70vh;overflow-y: auto;">
          <ValueTable :key="upIndex" ref="fileList"
                      :componentData="componentData0"
                      :url="$api.insOrderPlan.getFileList"
                      class="value-table"/>
        <div v-if="filesDialogVisible">
          <lims-table :tableData="tableDataFile" :column="columnFile"
                      @pagination="paginationFile" height="500px" key="tableDataFile"
                      :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
        </div>
      </el-dialog>
      <el-dialog :title="deleteTilte" :visible.sync="deleteDialogVisible" width="80%">
        <div v-if="deleteDialogVisible" style="height: 70vh;overflow-y: auto;">
          <ValueTable ref="ValueTableDataDelete" :componentData="componentDataDelete"
                      :isColumnWidth="true" :url="$api.insOrder.selectNoProducts+'?orderId='+orderId+'&ids='+this.revocationInsProductIds"/>
          <lims-table :tableData="componentDataDelete" :column="columnDelete"
                      :isSelection="true" :handleSelectionChange="selectDelete"
                      @pagination="paginationDelete" height="500px" key="componentDataDelete"
                      :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button @click="handleNo">{{deleteTilte=='撤销'?'取 消':'不通过'}}</el-button>
          <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='撤销'?'确 定':'通 过'}}</el-button>
        </el-row>
      </span>
          <el-row>
            <el-button @click="handleNo">{{deleteTilte=='撤销'?'取 消':'不通过'}}</el-button>
            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='撤销'?'确 定':'通 过'}}</el-button>
          </el-row>
        </span>
      </el-dialog>
    </div>
    <div>
<!--      <Add v-if="active<4" :active="active" :currentId="currentId" :examine = "examine" :tabIndex="tabIndex" />-->
    </div>
    <el-dialog :visible.sync="printDialogVisible" title="标签打印" top="5vh" width="40%">
      <div v-loading="loadPint" style="width:100%;height: 400px;overflow-y: auto;">
@@ -307,17 +306,15 @@
import PrintDialog from "@/views/business/productOrder/components/printDialog.vue";
import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {getWarehouseSubmit} from "@/api/business/materialInspection";
import {
  checkUpdate, delInsOrder,
  rawAllInsOrderExport,
  selectInsOrderParameter, selectOrderManDay,
  selectInsOrderParameter, selectNoProducts, selectOrderManDay,
  updateInspected,
  updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2
} from "@/api/business/productOrder";
import {Message} from "element-ui";
import {selectUserCondition} from "@/api/performance/class";
import {downFile} from "@/api/business/rawMaterialOrder";
import {downFile, getFileList, selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder";
// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
export default {
  components: {
@@ -533,7 +530,104 @@
      quashDialogVisible: false,
      issuedDialogVisible: false,
      dataDialogVisible: false, // 数据查看弹框
      tableDataLookTableLoading: false, // 数据查看弹框
      tableDataLook: [],
      tableDataLookPage: {
        total:0,
        size:10,
        current:1
      },
      tableDataLookColumn: [
        {label: '样品编号', prop: 'sampleCode'},
        {label: '样品名称', prop: 'sample'},
        {label: '检验项分类', prop: 'inspectionItemClass'},
        {label: '检验项', prop: 'inspectionItem'},
        {label: '检验子项', prop: 'inspectionItemSubclass'},
        {label: '单位', prop: 'unit'},
        {label: '样品型号', prop: 'model'},
        {label: '条件', prop: 'radius'},
        {label: '电缆标识', prop: 'cableTag'},
        {label: '试验要求', prop: 'tell'},
        {label: '检验结果', prop: 'lastValue'},
        {
          dataType: 'tag',
          label: '结果判定',
          prop: 'insResult',
          formatData: (params) => {
            if (params == 1) {
              return '合格'
            } else if (params == 0) {
              return '不合格'
            } else if (params == 3) {
              return '不判定'
            } else {
              return ''
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else if (params == 0) {
              return 'danger'
            } else if (params == 3) {
              return ''
            }  else {
              return ''
            }
          }
        },
      ],
      filesDialogVisible: false, // 附件查看弹框
      tableDataFile: [],
      tableLoadingFile: false,
      columnFile: [
        {
          dataType: 'tag',
          label: '类型',
          prop: 'type',
          formatData: (params) => {
            if (params == 1) {
              return '图片'
            } else if (params == 2) {
              return '文件'
            } else {
              return ''
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else if (params == 2) {
              return 'warning'
            } else {
              return ''
            }
          }
        },
        {label: '附件名称', prop: 'fileName'},
        {label: '上传人', prop: 'name'},
        {label: '上传时间', prop: 'createTime'},
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '170px',
          operation: [
            {
              name: '下载',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row);
              }
            }
          ]
        }
      ],
      pageFile: {
        total:0,
        size:10,
        current:1
      },
      formData: {},
      formData0: {},
      formData1: {},
@@ -551,130 +645,25 @@
      personList: [],
      orderId:'',
      revocationInsProductIds:'',
      componentDataDataLook: {
        entity: {
          id: 0,
          orderBy: {
            field: 'sampleCode',
            order: 'asc'
          }
        },
        isIndex: false,
        showSelect: false,
        select: false,
        do: [],
        tagField: {
          insState: {
            select: []
          },
          insResult: {
            select: [{
              value: 1,
              label: '合格',
              type: 'success'
            },{
              value: 0,
              label: '不合格',
              type: 'danger'
            },{
              value: 3,
              label: '不判定',
              type: ''
            }]
          }
        },
        selectField: {},
        spanConfig:{
          rows:[
            {
              name:'sampleCode',
              index:0
            },
            {
              name:'sample',
              index:1
            },
            {
              name:'model',
              index:6
            }
          ]
        },
        requiredAdd: [],
        requiredUp: []
      },
      componentData0: {
        entity: {
          insOrderId:''
        },
        isIndex: true,
        showSelect: false,
        select: false,
        sort: false,
        init:false,
        do: [
          {
            id: 'parent',
            font: '下载',
            type: 'text',
            method: 'handleDown'
          }
        ],
        isPage: false,
        linkEvent: {},
        tagField: {
          type:{
            select:[
              {
                value: 1,
                label: '图片'
              },
              {
                value: 2,
                label: '文件'
              }
            ]
          }
        },
        currentId: '',
        selectField: {},
        requiredAdd: [],
        requiredUp: []
      },
      componentDataDelete: {
        entity: {
          // orderId: '',
          // orderBy: {
          //     field: 'sampleCode',
          //     order: 'asc'
          // }
        },
        isPage:true,
        isIndex: false,
        showSelect: true,
        select: true,
        selectMethod: 'selectDelete',
        do: [],
        tagField: {
          insState: {
            select: []
          },
          insResult: {
            select: [{
              value: 1,
              label: '合格',
              type: 'success'
            },{
              value: 0,
              label: '不合格',
              type: 'danger'
            }]
          }
        },
        selectField: {},
        spanConfig:{},
        requiredAdd: [],
        requiredUp: []
      componentDataDelete: [],
      tableLoadingDelete: false,
      columnDelete: [
        {label: '样品编号', prop: 'sampleCode'},
        {label: '检验项分类', prop: 'inspectionItemClass'},
        {label: '检验项', prop: 'inspectionItem'},
        {label: '检验项子类', prop: 'inspectionItemSubclass'},
        {label: '样品分类', prop: 'sampleType'},
        {label: '样品', prop: 'sample'},
        {label: '型号', prop: 'model'},
        {label: '线芯', prop: 'cableTag'},
        {label: '试验室', prop: 'sonLaboratory'},
        {label: '要求值', prop: 'ask'},
        {label: '要求描述', prop: 'tell'},
      ],
      pageDelete: {
        total:0,
        size:10,
        current:1
      },
      deleteDialogVisible:false,
      upLoad: false,
@@ -935,16 +924,46 @@
    },
    // 数据查看
    handleDataLook(row) {
      this.componentDataDataLook.entity.id = row.id
      this.dataDialogVisible = true;
      this.getDataTableList(row)
    },
    // 查询数据查看列表数据
    getDataTableList (row) {
      this.tableDataLookTableLoading = true
      selectSampleAndProductByOrderId({id: row.id}).then(res => {
        this.tableDataLookTableLoading = false
        if (res.code === 200) {
          this.tableDataLook = res.data.records
          this.tableDataLookPage.total = res.data.total
        }
      }).catch(err => {
        this.tableDataLookTableLoading = false
      })
    },
    tableDataLookPagination (page) {
      this.tableDataLookPage.size = page.limit
      this.getDataTableList()
    },
    // 附件查看
    handleFileLook (row) {
      this.componentData0.entity.insOrderId = row.id;
      this.filesDialogVisible = true
      this.$nextTick(() => {
        this.$refs.fileList.selectList()
      this.getFileList(row)
    },
    getFileList(row) {
      this.tableLoadingFile = true
      getFileList({insOrderId: row.id}).then(res => {
        this.tableLoadingFile = false
        if (res.code === 200) {
          this.tableDataFile = res.data.records
          this.pageFile.total = res.data.total
        }
      }).catch(err => {
        this.tableLoadingFile = false
      })
    },
    paginationFile (page) {
      this.pageFile.size = page.limit
      this.getFileList()
    },
    // 附件下载
    handleDown(row){
@@ -993,14 +1012,26 @@
        this.quashDialogVisible = true;
        this.insOrderRow=row
      }else{
        // this.componentDataDelete.entity.orderId = row.id
        this.orderId = row.id
        this.revocationInsProductIds = ''
        this.componentDataDelete.showSelect= true
        this.componentDataDelete.select= true
        this.deleteTilte = '撤销'
        this.deleteDialogVisible = true;
        this.deleteDialogVisible = true
        this.getDeleteList()
      }
    },
    getDeleteList () {
      this.tableLoadingDelete = true
      selectNoProducts({orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds}).then(res => {
        this.tableLoadingDelete = false
        this.componentDataDelete = res.data.records
        this.pageDelete.total = res.data.total
      }).catch(err => {
        this.tableLoadingDelete = false
      })
    },
    paginationDelete (page) {
      this.pageDelete.size = page.limit
      this.getDeleteList()
    },
    selectDelete(arr){
      this.deleteList = arr;
@@ -1033,7 +1064,6 @@
      }
    },
    handlEquashCheck(row){
      // this.componentDataDelete.entity.orderId = row.id
      this.orderId = row.id
      this.revocationInsProductIds = row.revocationInsProductIds
      this.componentDataDelete.showSelect= false