gaoluyang
2025-02-25 5ac986165547583cbcbec1a773b120f6bc9c4db1
Merge remote-tracking branch 'origin/dev' into dev
已修改2个文件
已添加8个文件
13949 ■■■■■ 文件已修改
pnpm-lock.yaml 12829 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/externalService/supplierManage/supplierManage.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/process/demand/demand.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/styles/element-ui.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/externalService/supplierManage/component/formDia.vue 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/externalService/supplierManage/index.vue 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/demand/AddContracts.vue 418 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/demand/Edit.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/demand/index.vue 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterial/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pnpm-lock.yaml
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
src/api/cnas/externalService/supplierManage/supplierManage.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
import request from '@/utils/request'
// åˆ†é¡µæŸ¥è¯¢
export function selectQualifiedSupplierManagementPage(query) {
  return request({
    url: '/supplierManagement/selectQualifiedSupplierManagementPage',
    method: 'get',
    params: query
  })
}
// ç¼–辑供应商
export function updateSupplierManagement(query) {
  return request({
    url: '/supplierManagement/updateSupplierManagement',
    method: 'post',
    data: query
  })
}
// æ–°å¢žä¾›åº”商
export function addSupplierManagement(query) {
  return request({
    url: '/supplierManagement/addSupplierManagement',
    method: 'post',
    data: query
  })
}
// å¯¼å‡ºä¾›åº”商
export function exportSupplierManagement(query) {
  return request({
    url: "/supplierManagement/exportSupplierManagement",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
// åˆ é™¤ä¾›åº”商
export function delSupplierManagement(query) {
  return request({
    url: '/supplierManagement/delSupplierManagement',
    method: 'delete',
    params: query
  })
}
src/api/cnas/process/demand/demand.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
// å®žéªŒå®¤çš„æ£€æµ‹èƒ½åŠ›æ¡£æ¡ˆç›¸å…³æŽ¥å£
import request from "@/utils/request";
// å§”托单检验分页查询
export const getInspectionOrder = (params) => {
    return request({
        url: "/inspectionOrder/pageInspectionOrder",
        method: "get",
        params: params
    })
}
src/assets/styles/element-ui.scss
@@ -106,10 +106,10 @@
  content: "";
  display: inline-block;
  width: 4px;
  height: 28px;
  height: 16px;
  background: #3a7bfa;
  border-radius: 10px;
  margin-left: 32px;
  margin-left: 20px;
  margin-right: 8.5px;
}
@@ -117,7 +117,7 @@
  content: "";
  display: inline-block;
  width: 4px;
  height: 28px;
  height: 16px;
  background: #3a7bfa;
  border-radius: 10px;
  margin-left: 20px;
src/views/CNAS/externalService/supplierManage/component/formDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,188 @@
<template>
  <div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
               :title="operationType === 'edit' ? '编辑' : '新增'"
               :visible.sync="formDia"
               width="90%" @close="closeDia">
      <el-form :model="model" ref="modelForm" label-width="150px" :rules="rules">
        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商" prop="supplierName">
              <el-input v-model="model.supplierName" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="编号" prop="supplierRef">
              <el-input v-model="model.supplierRef" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="供应商物品服务名称" prop="supplierItemServiceName">
              <el-input v-model="model.supplierItemServiceName" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="邮编">
              <el-input v-model="model.postalCode" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="地址">
              <el-input v-model="model.adress" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="联系人">
              <el-input v-model="model.contacts" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系电话">
              <el-input v-model="model.phone" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="户名">
              <el-input v-model="model.householdName" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="传真">
              <el-input v-model="model.fax" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="开户行">
              <el-input v-model="model.openingName" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="网址">
              <el-input v-model="model.website" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="账号">
              <el-input v-model="model.accountName" placeholder="请输入" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="Email">
              <el-input v-model="model.email" placeholder="请输入" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer">
            <el-button @click="closeDia">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="submit" :loading="editLoad">保 å­˜</el-button>
        </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  addSupplierManagement,
  updateSupplierManagement
} from '@/api/cnas/externalService/supplierManage/supplierManage'
export default {
  name: "formDia",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      operationType: '',
      formDia: false,
      model: {
        supplierName: '',
        supplierRef: '',
        supplierItemServiceName: '',
        postalCode: '',
        adress: '',
        contacts: '',
        phone: '',
        householdName: '',
        fax: '',
        openingName: '',
        website: '',
        accountName: '',
        email: '',
        supplierManagementId: '',
      },
      rules: {
        supplierName: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
        supplierRef: [{ required: true, message: '请输入供应商编号', trigger: 'blur' }],
      },
      editLoad: false,
    }
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    openDialog (type, row) {
      this.operationType = type
      this.formDia = true
      if (this.operationType === 'edit') {
        this.model = this.HaveJson(row)
      }
    },
    // æäº¤è¡¨å•
    submit () {
      this.$refs.modelForm.validate((valid) => {
        if (valid) {
          this.editLoad = true
          if (this.operationType === 'edit') {
            updateSupplierManagement(this.model).then(res => {
              this.editLoad = false
              if (res.code === 200){
                this.$message.success('修改成功')
                this.closeDia()
              }
            }).catch(err => {
              console.log('err---', err);
              this.editLoad = false
            })
          } else {
            addSupplierManagement(this.model).then(res => {
              this.editLoad = false
              if (res.code === 200){
                this.$message.success('新增成功')
                this.closeDia()
              }
            }).catch(err => {
              console.log('err---', err);
              this.editLoad = false
            })
          }
        }
      })
    },
    closeDia () {
      this.$refs.modelForm.resetFields()
      this.formDia = false
      this.$emit('closeDia')
    }
  },
}
</script>
<style scoped>
</style>
src/views/CNAS/externalService/supplierManage/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,189 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
          <el-form-item label="名称" prop="supplierName">
            <el-input v-model="searchForm.supplierName" clearable size="small"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="getTableData">查 è¯¢</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">重 ç½®</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div>
        <el-button size="medium" @click="exportExcel">导 å‡º</el-button>
        <el-button size="medium" type="primary" @click="showDialog('add')">新 å¢ž</el-button>
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <form-dia ref="formDia" v-if="formDia" @closeDia="closeDia"></form-dia>
  </div>
</template>
<script>
// import ZTTable from "../caorui/ZTTable/index.vue";
// import TableCard from "../caorui/TableCard/index.vue";
// import axios from "axios";
import FormDia from "../supplierManage/component/formDia.vue";
import limsTable from '@/components/Table/lims-table.vue'
import {
  selectQualifiedSupplierManagementPage,
  exportSupplierManagement,
  delSupplierManagement
} from '@/api/cnas/externalService/supplierManage/supplierManage'
export default {
  name: "a6-supplier-manage-new",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {
    limsTable,
    FormDia
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        supplierName: ''
      },
      tableLoading: false,
      tableColumn: [
        {
          label: "供应商编号",
          prop: "supplierRef"
        },
        {
          label: "供应商",
          prop: "supplierName"
        },
        {
          label: "供应物品(服务)名称",
          prop: "supplierItemServiceName"
        },
        {
          label: "地址",
          prop: "adress"
        },
        {
          label: "联系电话",
          prop: "phone"
        },
        {
          dataType: 'action',
          fixed: "right",
          minWidth: '60',
          label: '操作',
          operation: [
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.showDialog('edit', row);
              },
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.deleteRow(row);
              },
            }
          ]
        }
      ],
      tableData: [],
      page: {
        total: 0,
        size: 10,
        current: 1
      },
      formDia: false,
    }
  },
  mounted() {
    this.getTableData()
  },
  // æ–¹æ³•集合
  methods: {
    // èŽ·å–è¡¨æ ¼æ•°æ®
    async getTableData() {
      this.tableLoading = true;
      selectQualifiedSupplierManagementPage(this.searchForm).then(res => {
          this.tableLoading = false;
          if(res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total
          }
      }).catch(err => {
        this.tableLoading = false
      })
    },
    // é‡ç½®
    resetSearchForm () {
      this.pagination.current = 1
      this.pagination.pageSize = 20
      this.searchForm.supplierName = ''
      this.getTableData()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.getTableData();
    },
    // æ‰“开新增弹框
    showDialog(type, row) {
      this.formDia = true
      this.$nextTick(() => {
        this.$refs.formDia.openDialog(type, row)
      })
    },
    // å…³é—­å¼¹æ¡†
    closeDia () {
      this.formDia = false
      this.getTableData()
    },
    // åˆ é™¤è®°å½•
    deleteRow (row) {
      this.$confirm('此操作将永久删除该文件, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        delSupplierManagement({supplierManagementId:row.supplierManagementId}).then(res => {
          if (res.code === 200) {
            this.$message.success('删除成功!')
            this.getTableData()
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // å¯¼å‡ºexcel
    async exportExcel() {
      exportSupplierManagement({deviceId:this.clickNodeVal.value}).then(res => {
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '合格供应商.xlsx')
        this.$message.success('导出成功')
      })
    }
  },
}
</script>
<style scoped>
.search {
  height: 46px;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/CNAS/process/demand/AddContracts.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,418 @@
<template>
    <el-dialog title="新增检验委托单" :visible.sync="visible" width="1200px">
        <div id="dialogBody">
            <div style="max-height: 75vh;overflow-y: auto;">
                <div id="dialogBody">
                    <table border="1" cellpadding="10" class="tables heads">
                        <tr>
                            <td rowspan="2">
                                <img alt="" :src="ZTTLogo" style="width: 80%;">
                            </td>
                            <td>
                                <p>记录名称:检验委托单</p>
                            </td>
                            <td>
                                <p>保存期限:6å¹´</p>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <p>记录编号: ZTT/QR-16-04-a</p>
                            </td>
                            <td>
                                <p>归档部门:综合室</p>
                            </td>
                        </tr>
                    </table>
                    <h4 class="table_h4">
                        æ£€ éªŒ å§” æ‰˜ å•
                    </h4>
                    <p
                        v-if="operationType !== 'view'"
                        style="margin-left: 560px;display: flex;align-items: center">
                        <span style="width: 100px">委托编号:</span>
                        <el-input clearable size="small"></el-input>
                    </p>
                    <p v-else  style="margin-top: 16px;margin-left: 600px;">
                        å§”托编号:{{ currentInfo.entrustCode }}
                    </p>
                    <table border="1" cellpadding="10" class="tables">
                        <tr>
                            <td colspan="2">
                                <p>试样名称</p>
                            </td>
                            <td >
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleName" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.sampleName }}</span>
                            </td>
                            <td>
                                <p>委托时间</p>
                            </td>
                            <td>
                                <el-date-picker
                                    v-if="operationType !== 'view'"
                                    v-model="currentInfo.commissionDate"
                                    clearable
                                    format="yyyy-MM-dd"
                                    placeholder="选择日期"
                                    size="small"
                                    style="width: 100%"
                                    type="date"
                                    value-format="yyyy-MM-dd">
                                </el-date-picker>
                                <span v-else>{{ currentInfo.commissionDate }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>型 å·</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.modelNo" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.modelNo }}</span>
                            </td>
                            <td>
                                <p>委托单位</p>
                            </td>
                            <td>
                                <el-input  v-if="operationType !== 'view'" v-model="currentInfo.commissionUnit" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.commissionUnit }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>生产单位</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.production" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.production }}</span>
                            </td>
                            <td>
                                <p>委托人</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.commissionUser }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>样品数量</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.quantity" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.quantity }}</span>
                            </td>
                            <td>
                                <p>样品状态</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleStatus" clearable size="small"></el-input>
                                <span v-else>{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>是否留样</p>
                            </td>
                            <td>
                                <el-radio-group
                                    v-if="operationType !== 'view'"
                                    v-model="currentInfo.isLeave"
                                    v-removeAriaHidden
                                >
                                    <el-radio :label="1">是</el-radio>
                                    <el-radio :label="0">否</el-radio>
                                </el-radio-group>
                                <div v-else>
                                    <span v-if="currentInfo.isLeave==1">是</span>
                                    <span v-else>否</span>
                                </div>
                            </td>
                            <td>
                                <p>样品处理方式</p>
                            </td>
                            <td v-if="operationType !== 'view'">
                                <el-radio-group v-model="currentInfo.processing" v-removeAriaHidden>
                                    <el-radio :label="0">委托单位取回</el-radio>
                                    <el-radio :label="1">实验室处理</el-radio>
                                </el-radio-group>
                            </td>
                            <td v-else>
                                <span v-if="currentInfo.processing==0">委托单位取回</span>
                                <span v-else>实验室处理</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>约定完成时间(报告日期)</p>
                            </td>
                            <td>
                                <el-date-picker
                                    v-if="operationType !== 'view'"
                                    v-model="currentInfo.appointed"
                                    clearable
                                    format="yyyy-MM-dd"
                                    placeholder="选择日期"
                                    size="small"
                                    style="width: 100%"
                                    type="date"
                                    value-format="yyyy-MM-dd">
                                </el-date-picker>
                                <span v-else>
                                    {{ currentInfo.appointed }}
                                </span>
                            </td>
                            <td>
                                <p>报告发送方式</p>
                            </td>
                            <td >
                                <el-radio-group
                                    v-if="operationType !== 'view'"
                                    v-model="currentInfo.send" v-removeAriaHidden
                                >
                                    <el-radio :label="1">自取</el-radio>
                                    <el-radio :label="0">其他</el-radio>
                                </el-radio-group>
                                <div v-else>
                                    <span v-if="currentInfo.send==1">自取</span>
                                    <span v-else>其他</span>
                                </div>
                            </td>
                        </tr>
                        <el-button class="add_btn" size="small" type="primary" @click="addOrderDetailList">添加</el-button>
                        <tr>
                            <td>
                                <p>序号</p>
                            </td>
                            <td>
                                <p>样品编号</p>
                            </td>
                            <td>
                                <p>试验项目</p>
                            </td>
                            <td>
                                <p>检验依据</p>
                            </td>
                            <td>
                                <p>备注</p>
                            </td>
                        </tr>
                        <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" >
                            <td>{{ index+1 }}</td>
                            <td>
                                <el-input  v-if="operationType !== 'view'" v-model="item.sampleNumber" clearable size="small"></el-input>
                                <span v-else>{{ item.sampleNumber }}</span>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'"v-model="item.testItem" clearable size="small"></el-input>
                                <span v-else>{{ item.testItem }}</span>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="item.testStandard" clearable size="small"></el-input>
                                <span v-else>{{ item.testStandard }}</span>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="item.remark" clearable size="small"></el-input>
                                <span v-else>{{ item.remark }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>判定规则</p>
                            </td>
                            <td v-if="operationType !== 'view'" colspan="3">
                                <el-radio-group v-model="currentInfo.criterionRule" v-removeAriaHidden>
                                    <el-radio :label="0">不考虑不确定度</el-radio>
                                    <el-radio :label="1">考虑不确定度</el-radio>
                                </el-radio-group>
                                <span v-if="currentInfo.criterionRule === 1">
                                    <el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>
                                    %
                                </span>
                            </td>
                            <td v-else colspan="3">
                                <span v-if="currentInfo.criterionRule===0">不考虑不确定度</span>
                                <span v-if="currentInfo.criterionRule===1">考虑不确定度</span>
                                <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>委托人签名</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input>
                                <span v-else>{{currentInfo.commissionUser}}</span>
                            </td>
                            <td>
                                <p>委托日期</p>
                            </td>
                            <td>
                                <el-date-picker
                                    v-if="operationType !== 'view'"
                                    v-model="currentInfo.commissionDate"
                                    clearable
                                    format="yyyy-MM-dd"
                                    placeholder="选择日期"
                                    size="small"
                                    style="width: 100%"
                                    type="date"
                                    value-format="yyyy-MM-dd">
                                </el-date-picker>
                                <span v-else>{{ currentInfo.commissionDate }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>委托人联系电话</p>
                            </td>
                            <td colspan="3">
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionPhone" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.commissionPhone }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>综合室签名</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input>
                                <span v-else>{{currentInfo.generalOfficeUser}}</span>
                            </td>
                            <td>
                                <p>接收日期</p>
                            </td>
                            <td>
                                <el-date-picker
                                    v-if="operationType !== 'view'"
                                    v-model="currentInfo.receiptData"
                                    clearable
                                    format="yyyy-MM-dd"
                                    placeholder="选择日期"
                                    size="small"
                                    style="width: 100%"
                                    type="date"
                                    value-format="yyyy-MM-dd">
                                </el-date-picker>
                                <span v-else>{{ currentInfo.receiptData }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p>领样员签名</p>
                            </td>
                            <td>
                                <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input>
                                <span v-else>{{ currentInfo.sampleTakerUser }}</span>
                            </td>
                            <td>
                                <p>领样日期</p>
                            </td>
                            <td v-if="operationType !== 'view'">
                                <el-date-picker
                                v-model="currentInfo.sampleData"
                                clearable
                                format="yyyy-MM-dd"
                                placeholder="选择日期"
                                size="small"
                                style="width: 100%"
                                type="date"
                                value-format="yyyy-MM-dd">
                                </el-date-picker>
                            </td>
                            <td v-else>{{ currentInfo.sampleData }}</td>
                        </tr>
                        <tr>
                            <td colspan="2" rowspan="3">
                                <p>检测机构信息</p>
                            </td>
                            <td colspan="3">
                                <p>江苏中天科技股份有限公司检测中心</p>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <p>地址:江苏省南通市经济技术开发区新开南路 19 å·</p>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <p>电话:0513-89059043</p>
                            </td>
                        </tr>
                    </table>
                    <p style="margin-top: 10px;margin-left: 20px;">注:本检验委托单一式二份,一份综合室归档,一份委托单位留存。</p>
                </div>
            </div>
        </div>
        <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
            <el-button @click="detailDialogVisible = false">取 æ¶ˆ</el-button>
            <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">
                ç¡® å®š
            </el-button>
            <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">
                ç¡® å®š
            </el-button>
        </span>
    </el-dialog>
</template>
<script>
import ZTTLogo from "@/assets/logo/ZTTlogo.png"
export default {
    name: 'AddContracts',
    data() {
        return {
            ZTTLogo,
            visible: false,
            operationType: '',
            currentInfo:{
                orderDetailList: []
            },
        }
    },
    methods: {
        open() {
            this.visible = true
        }
    }
}
</script>
<style lang="scss" scoped>
.tables {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse; /* å…³é”®å±žæ€§ï¼šåˆå¹¶è¾¹æ¡† */
  td {
    height: 40px;
    width: 100px;
    text-align: center;
    font-size: 14px;
    word-wrap: break-word;
    white-space: normal;
    p {
        margin: unset
    }
  }
}
.heads {
    td {
        border: 1px dashed black; /* å•元格的虚线 */
        padding: 8px;
        text-align: left;
    }
}
.table_h4 {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0 10px 0;
}
.add_btn {
    margin: 10px 0 10px 10px;
}
</style>
src/views/CNAS/process/demand/Edit.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
<template>
    <div>
        <el-dialog title="新增检验任务单" :visible.sync="visible">
            <el-form :model="search" :inline="true">
                <el-form-item label="委托编号:">
                    <el-input placeholder="请输入委托编号"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary">查 è¯¢</el-button>
                    <el-button>重 ç½®</el-button>
                </el-form-item>
            </el-form>
            <lims-table
                :column="column"
                :tableData="tableData"
                :page="page"
            />
        </el-dialog>
        <AddContracts ref="addContractsRef" />
    </div>
</template>
<script>
    import limsTable from "@/components/Table/lims-table.vue";
    import AddContracts from "./AddContracts.vue";
    export default {
        name: 'EditDemand',
        components: {
            limsTable,
            AddContracts
        },
        data() {
            return {
                visible: false,
                search: {},
                column: [
                    { label: '序号', minWidth: '100px' },
                    { label: '委托编号', minWidth: '100px' },
                    { label: '样品名称', minWidth: '100px' },
                    {
                        dataType: "action",
                        fixed: "right",
                        label: "操作",
                        operation: [
                            {
                                name: "新增委托单",
                                type: "text",
                                clickFun: (row) => {
                                    this.$refs.addContractsRef.open()
                                }
                            }
                        ],
                    },
                ],
                tableData: [{}],
                page: {
                    total: 0,
                    size: 10,
                    current: 1,
                },
            }
        },
        methods: {
            open() {
                this.visible = true
            }
        }
    }
</script>
src/views/CNAS/process/demand/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,160 @@
<style lang="scss" scoped>
.standard_method {
    padding: 20px;
}
.search {
  background-color: #fff;
  height: 80px;
  display: flex;
  align-items: center;
}
.search_thing {
//   width: 350px;
  display: flex;
  align-items: center;
}
.search_label {
  width: 110px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 110px);
}
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
}
</style>
<template>
    <div class="standard_method">
        <el-form :model="model" :inline="true" label-width="auto">
            <el-form-item label="试样名称:">
                <el-input size="small"
                    placeholder="请输入"
                    clearable
                    @change="refreshTable()"
                />
            </el-form-item>
            <el-form-item label="委托单位:">
                <el-input size="small"
                    placeholder="请输入"
                    clearable
                    @change="refreshTable()"
                />
            </el-form-item>
            <el-form-item label="生产单位:">
                <el-input size="small"
                    placeholder="请输入"
                    clearable
                    @change="refreshTable()"
                />
            </el-form-item>
            <el-form-item label="委托人:">
                <el-input size="small"
                    placeholder="请输入"
                    clearable
                    @change="refreshTable()"
                />
            </el-form-item>
            <el-form-item>
                <el-button size="small">
                    é‡ ç½®
                </el-button>
                <el-button size="small" type="primary">
                    æŸ¥ è¯¢
                </el-button>
            </el-form-item>
        </el-form>
        <div style="margin-bottom: 10px">
            <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog">
                æ–° å¢ž
            </el-button>
        </div>
        <lims-table
            :column="column"
            :tableData="tableData"
            :height="'calc(100vh - 250px)'"
            :page="page"
        />
        <Edit ref="editRef" />
    </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import Edit from './Edit.vue'
import { getInspectionOrder } from "@/api/cnas/process/demand/demand.js"
export default {
    name: 'Demand',
    components: {
        limsTable,
        Edit
    },
    data() {
        return {
            queryParams: {
                code: ''
            },
            model: {},
            column: [
                { label: '序号', minWidth: '100px' },
                { label: '试样名称', minWidth: '100px' },
                { label: '委托编号' },
                { label: '委托时间' },
                { label: '型号' },
                { label: '委托单位' },
                { label: '生产单位' },
                { label: '委托人' },
                { label: '样品数量' },
                { label: '样品状态' },
                { label: '是否留样' },
                { label: '样品处理方式' },
                {
                    dataType: "action",
                    fixed: "right",
                    label: "操作",
                    operation: [
                        {
                            name: "编 è¾‘",
                            type: "text"
                        }
                    ],
                },
            ],
            tableData: [], // è¡¨æ ¼æ•°æ®
            page: {
                total: 0,
                size: 10,
                current: 1,
            },
        }
    },
    mounted() {
        this.refreshTable()
    },
    methods: {
        /**
         * @desc åˆ·æ–°è¡¨æ ¼
         */
        async refreshTable() {
            await getInspectionOrder({ ...this.page })
        },
        /**
         * @desc æ‰“开模态框
         */
        openDialog() {
            this.$refs.editRef.open()
        }
    }
}
</script>
src/views/CNAS/resourceDemand/standardMaterial/index.vue
@@ -191,31 +191,8 @@
      exportOfStandardSubstanceList(this.searchForm).then(res =>{
        this.outLoading = false
        const blob = new Blob([res], {type: 'application/octet-stream'},false);
        let reader = new FileReader();
        reader.readAsText(blob, 'utf-8');
        reader.onload = () => {
          try {
            let result = JSON.parse(reader.result);
            if (result.message) {
              this.$message.error(result.message);
            } else {
              const url = URL.createObjectURL(blob);
              const link = document.createElement('a');
              link.href = url;
              link.download = '标准物质清单.xlsx';
              link.click();
              this.$message.success('导出成功')
            }
          } catch (err) {
            console.log(err);
            const url = URL.createObjectURL(blob);
            const link = document.createElement('a');
            link.href = url;
            link.download = '标准物质清单.xlsx';
            link.click();
            this.$message.success('导出成功')
          }
        }
        this.$download.saveAs(blob, '标准物质清单.xlsx')
        this.$message.success('导出成功')
      })
    },
    // æŸ¥è¯¢åˆ—表