chenrui
2025-02-25 e1b4d3c1d49782a1e0a8cc39fb7a9641fadb6474
Merge remote-tracking branch 'origin/dev' into dev
已修改4个文件
已添加9个文件
14278 ■■■■■ 文件已修改
pnpm-lock.yaml 12829 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/unpass.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/unqualifiedHandler.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/process/demand/demand.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/styles/element-ui.scss 6 ●●●● 补丁 | 查看 | 原始文档 | 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/business/inspectionTask/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/OAProcess.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/index-manage.vue 324 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/index.vue 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/premises/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pnpm-lock.yaml
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
src/api/business/unpass.js
@@ -1,5 +1,4 @@
// ä¸åˆæ ¼ç®¡ç†ç›¸å…³æŽ¥å£
import request from "@/utils/request";
//查询进货验证信息
@@ -73,3 +72,11 @@
    data: data,
  });
}
// æŸ¥è¯¢ä¸åˆæ ¼æ ·å“æ•°æ®
export function pageInsUnPass(data) {
  return request({
    url: "/unPass/pageInsUnPass",
    method: "post",
    data: data,
  });
}
src/api/business/unqualifiedHandler.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
// ä¸åˆæ ¼å¤„理相关接口
import request from "@/utils/request";
//查询不合格处理
export function page(query) {
  return request({
    url: "/unqualifiedHandler/page",
    method: "get",
    params: query,
  });
}
//删除不合格处理
export function deleteUnqualifiedHandler(query) {
  return request({
    url: "/unqualifiedHandler/deleteUnqualifiedHandler",
    method: "delete",
    params: query,
  });
}
//删除不合格处理
export function pushOA(query) {
  return request({
    url: "/unqualifiedHandler/pushOA",
    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/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/business/inspectionTask/index.vue
@@ -567,7 +567,6 @@
  },
  mounted() {
    this.queryParams.userId = this.userId;
    // this.getPower();
    this.refreshTable();
  },
  methods: {
@@ -626,40 +625,6 @@
    handleDataLook(row) {
      this.lookInfo = row;
      this.getLookList();
    },
    // æƒé™åˆ†é…
    getPower(radio) {
      let power = JSON.parse(sessionStorage.getItem("power"));
      let inspection = false;
      let connect = false;
      let review = false;
      let claim = false;
      for (var i = 0; i < power.length; i++) {
        if (power[i].menuMethod == "doInsOrder") {
          inspection = true;
        }
        if (power[i].menuMethod == "upPlanUser") {
          connect = true;
        }
        if (power[i].menuMethod == "verifyPlan") {
          review = true;
        }
        if (power[i].menuMethod == "claimInsOrderPlan") {
          claim = true;
        }
      }
      if (!claim) {
        this.componentData.do.splice(3, 1);
      }
      if (!review) {
        this.componentData.do.splice(2, 1);
      }
      if (!connect) {
        this.componentData.do.splice(1, 1);
      }
      if (!inspection) {
        this.componentData.do.splice(0, 1);
      }
    },
    changeCheckBox(val) {
      this.queryParams.userId = val ? 0 : null;
src/views/business/unpass/components/OAProcess.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,250 @@
<template>
  <div>
    <el-dialog :close-on-press-escape="false" :visible.sync="isShow" title="不合格处理"
               width="1040px"
               @close="$emit('closeOAProcess')">
      <table :border='true' class="table">
        <tr>
          <th class="th-title">1检验员</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{oneOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{oneInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{oneName}}<span v-if="oneName">:</span>{{oneTime}}</th>
        </tr>
        <tr>
          <th class="th-title">2检测主管确认</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{twoOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{twoInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{twoName}}<span v-if="twoName">:</span>{{twoTime}}</th>
        </tr>
        <tr>
          <th class="th-title">3物流部确认</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{threeOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{threeInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{threeName}}<span v-if="threeName">:</span>{{threeTime}}</th>
        </tr>
        <tr>
          <th class="th-title">4产品工程师处理意见</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{fourOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{fourInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{fourName}}<span v-if="fourName">:</span>{{fourTime}}</th>
        </tr>
        <tr>
          <th class="th-title">5.总工或者副经理的处理意见</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{fiveOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{fiveInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{fiveName}}<span v-if="fiveName">:</span>{{fiveTime}}</th>
        </tr>
        <tr>
          <th class="th-title">6质量部</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{sixOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{sixInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{sixName}}<span v-if="sixName">:</span>{{sixTime}}</th>
        </tr>
        <tr>
          <th class="th-title">7质量部经理</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{sevenOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{sevenInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{sevenName}}<span v-if="sevenName">:</span>{{sevenTime}}</th>
        </tr>
        <tr>
          <th class="th-title">8核算员</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{eightOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{eightInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{eightName}}<span v-if="eightName">:</span>{{eightTime}}</th>
        </tr>
        <tr>
          <th class="th-title">9物流部索赔结果</th>
          <th class="th-titleSec">处理结果</th>
          <th class="th-info1">{{nineOperation}}</th>
          <th class="th-titleSec">处理意见</th>
          <th class="th-info" colspan="3">{{nineInfo}}</th>
          <th style="display:none;"></th>
          <th style="display:none;"></th>
          <th >{{nineName}}<span v-if="nineName">:</span>{{nineTime}}</th>
        </tr>
      </table>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "OAProcess",
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  props: {
    OAProcess: {
      type: Boolean,
      default: () => false
    },
  },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      isShow: this.OAProcess,
      oneInfo: '',
      twoInfo: '',
      threeInfo: '',
      fourInfo: '',
      fiveInfo: '',
      sixInfo: '',
      sevenInfo: '',
      eightInfo: '',
      nineInfo: '',
      oneTime: '',
      twoTime: '',
      threeTime: '',
      fourTime: '',
      fiveTime: '',
      sixTime: '',
      sevenTime: '',
      eightTime: '',
      nineTime: '',
      oneName: '',
      twoName: '',
      threeName: '',
      fourName: '',
      fiveName: '',
      sixName: '',
      sevenName: '',
      eightName: '',
      nineName: '',
      oneOperation: '',
      twoOperation: '',
      threeOperation: '',
      fourOperation: '',
      fiveOperation: '',
      sixOperation: '',
      sevenOperation: '',
      eightOperation: '',
      nineOperation: '',
    }
  },
  // æ–¹æ³•集合
  methods: {
    getInfo (id) {
      this.$axios.post(this.$api.unqualifiedHandler.getOaFlow, {
        id: id
      }).then(res => {
        if (res.code === 200) {
          const data = res.data
          if (data.length > 0) {
            data.forEach(item => {
              if (item.nodeName === '1检验员') {
                this.oneInfo = item.approvalOpinion
                this.oneTime = item.approvalDate
                this.oneName = item.approver
                this.oneOperation = item.operation
              } else if (item.nodeName === '2检测主管确认') {
                this.twoInfo = item.approvalOpinion
                this.twoTime = item.approvalDate
                this.twoName = item.approver
                this.twoOperation = item.operation
              } else if (item.nodeName === '3物流部确认') {
                this.threeInfo = item.approvalOpinion
                this.threeTime = item.approvalDate
                this.threeName = item.approver
                this.threeOperation = item.operation
              } else if (item.nodeName === '4产品工程师处理意见') {
                this.fourInfo = item.approvalOpinion
                this.fourTime = item.approvalDate
                this.fourName = item.approver
                this.fourOperation = item.operation
              } else if (item.nodeName === '5.总工或者副经理的处理意见') {
                this.fiveInfo = item.approvalOpinion
                this.fiveTime = item.approvalDate
                this.fiveName = item.approver
                this.fiveOperation = item.operation
              } else if (item.nodeName === '6质量部') {
                this.sixInfo = item.approvalOpinion
                this.sixTime = item.approvalDate
                this.sixName = item.approver
                this.sixOperation = item.operation
              } else if (item.nodeName === '7质量部经理') {
                this.sevenInfo = item.approvalOpinion
                this.sevenTime = item.approvalDate
                this.sevenName = item.approver
                this.sevenOperation = item.operation
              } else if (item.nodeName === '8核算员') {
                this.eightInfo = item.approvalOpinion
                this.eightTime = item.approvalDate
                this.eightName = item.approver
                this.eightOperation = item.operation
              } else if (item.nodeName === '9物流部索赔结果') {
                this.nineInfo = item.approvalOpinion
                this.nineTime = item.approvalDate
                this.nineName = item.approver
                this.nineOperation = item.operation
              }
            })
          }
        }
      }).catch(err => {
        this.submitDeclareLoading = false
        console.log(err)
      })
    }
  },
}
</script>
<style scoped>
.table {
  width: 100%;
  height: 500px;
}
.th-title {
  width: 160px;
  text-align: left;
  background-color: #e0eaf5;
  font-size: 16px;
}
.th-titleSec {
  width: 70px;
  background-color: #e0eaf5;
  font-size: 16px;
}
.th-info {
  width: 210px;
  text-align: left;
  font-size: 16px;
}
.th-info1 {
  width: 100px;
  text-align: center;
  font-size: 16px;
}
</style>
src/views/business/unpass/index-manage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,324 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="规格型号" prop="model">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.model"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item label="样品名称" prop="sample">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.sample"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 è¯¢</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 ç½®</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <div>
      <lims-table :tableData="tableData" :column="column"
                  :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <el-dialog
      title="提交"
      :show-close="false"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      :visible.sync="dialogVisible"
      width="30%">
      <span>是否确认提交OA?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="submitOA" :loading="submitOALoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="删除"
      :show-close="false"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      :visible.sync="deleteVisible"
      width="30%">
      <span>是否确认<span style="color: #FF4902">删除</span>OA?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deleteVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="cancelOA" :loading="cancelOALoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <UnPassDialog ref="unPassDialog" v-if="unPassDialog"
                  :orderId="orderId"
                  @resetForm="resetForm1"
                  :unPassDialog="unPassDialog"></UnPassDialog>
    <OAProcess ref="OAProcess"
               :OAProcess="OAProcess"
               @closeOAProcess="closeOAProcess"
               v-if="OAProcess"></OAProcess>
  </div>
</template>
<script>
import UnPassDialog from "./components/unPassDialog.vue";
import OAProcess from "./components/OAProcess.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {deleteUnqualifiedHandler, page, pushOA} from "@/api/business/unqualifiedHandler";
import ValueTable from "@/components/Table/value-table.vue";
export default {
  components: {
    limsTable,
    OAProcess,
    UnPassDialog,
    ValueTable
  },
  data() {
    return {
      handlerId: null,
      entity: {
        sample: null,
        model: null,
      },
      tableData: [],
      tableLoading: false,
      column: [
        { label: '编号', prop: 'no' },
        {
          label: "OA审核状态",
          prop: "oaState",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 1) {
              return "待审核";
            } else if(params == 2) {
              return "审核中";
            }  else if(params == 3) {
              return "通过";
            } else {
              return "驳回";
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return "warning";
            } else if(params == 2) {
              return "info";
            }  else if(params == 3) {
              return "success";
            } else {
              return "danger";
            }
          },
        },
        { label: '订单号', prop: 'orderNo' },
        {
          label: "零件号",
          prop: "partNo",
          width: "160px",
          dataType: "link",
          linkMethod: "openUnPassDialog",
        },
        { label: '零件描述', prop: 'partDesc' },
        { label: '物料名称', prop: 'materialName' },
        { label: '生产批次', prop: 'productionBatch' },
        { label: '到货数量', prop: 'cargoQuantity' },
        { label: '规格型号', prop: 'specsModels' },
        { label: '报检日期', prop: 'inspectTime' },
        { label: '状态', prop: 'statusDB' },
        { label: '反馈人', prop: 'feedbackUser' },
        { label: '要检验的采购数量', prop: 'qtyToInspect' },
        { label: '反馈日期', prop: 'feedbackTime' },
        {
          label: "分类",
          prop: "classification",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "一类不合格";
            } else if(params == 1) {
              return "二类不合格";
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "warning";
            } else if(params == 1) {
              return "info";
            } else {
              return "null";
            }
          },
        },
        { label: '供应商名称', prop: 'supplierName' },
        {
          label: "不合格归属",
          prop: "offGradeAscription",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "生产反馈不合格";
            } else if(params == 1) {
              return "检测不合格";
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "warning";
            } else if(params == 1) {
              return "info";
            } else {
              return "null";
            }
          },
        },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '180px',
          operation: [
            {
              name: '提交OA',
              type: 'text',
              clickFun: (row) => {
                this.openOA(row);
              },
              disabled: (row, index) => {
                return row.requestId !== null  // æœ‰requestId说明已经提交过OA,不可再次提交
              }
            },
            {
              name: '查看OA流程',
              type: 'text',
              clickFun: (row) => {
                this.OAView(row);
              },
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
                this.deleteOA(row);
              },
              disabled: (row, index) => {
                return row.requestId !== null  // æœ‰requestId说明已经提交过OA,不可再次提交
              }
            },
          ]
        }
      ],
      page: {
        total: 0,
        size: 10,
        current: 1
      },
      statusList: [],
      dialogVisible: false, // ç¡®è®¤æäº¤OA弹框
      unPassDialog: false, // ä¸åˆæ ¼å¤„理弹框
      orderId: '',
      OAProcess: false, // OA流程弹框
      submitOALoading: false, // OA流程弹框提交按钮loading
      deleteVisible: false, // OA流程删除弹框
      cancelOALoading: false, // OA流程删除弹框提交按钮loading
    };
  },
  mounted() {
    this.refreshTable()
  },
  methods: {
    refreshTable() {
      this.tableLoading = true
      page({ ...this.page, ...this.entity }).then(res => {
        this.tableLoading = false
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        this.tableLoading = false
      })
    },
    // é‡ç½®
    refresh() {
      this.resetForm('entity')
      this.refreshTable()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
    },
    // æ‰“开不合格处理弹框
    openUnPassDialog (row) {
      this.unPassDialog = true
      this.$nextTick(() => {
        this.$refs.unPassDialog.getInsOrder('view', row)
      })
    },
    // å…³é—­ä¸åˆæ ¼å¤„理弹框
    resetForm1 () {
      this.$refs.unPassDialog.$refs['unPassForm'].resetFields();
      this.unPassDialog = false
    },
    // æ‰“开删除OA确认弹框
    deleteOA (row) {
      this.handlerId = row.handlerId
      this.deleteVisible = true
    },
    // æäº¤åˆ é™¤ç”³è¯·
    cancelOA () {
      this.de = true
      deleteUnqualifiedHandler({id: this.handlerId,}).then(res => {
        this.cancelOALoading = false
        if (res.code === 200) {
          this.deleteVisible = false
          this.$message.success('删除成功')
          this.refreshTable('page')
        }
      }).catch(error => {
        this.cancelOALoading = false
        console.error(error);
      });
    },
    // æŸ¥çœ‹æäº¤OA的数据
    openOA (row) {
      this.handlerId = row.handlerId
      this.dialogVisible = true
    },
    // æŸ¥çœ‹OA流程
    OAView (row) {
      this.OAProcess = true
      this.$nextTick(() => {
        this.$refs.OAProcess.getInfo(row.handlerId)
      })
    },
    // å…³é—­æŸ¥çœ‹OA流程的弹框
    closeOAProcess () {
      this.OAProcess = false
    },
    //提交OA
    submitOA(row) {
      // æäº¤OA
      this.submitOALoading = true
      pushOA({handlerId: this.handlerId,}).then(res => {
        this.submitOALoading = false
        if (res.code === 200) {
          this.dialogVisible = false
          this.$message.success('提交成功')
          this.refreshTable('page')
        }
      }).catch(error => {
        this.submitOALoading = false
        console.error(error);
      });
    }
  }
};
</script>
src/views/business/unpass/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,135 @@
<template>
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="规格型号" prop="model">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.model"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item label="样品名称" prop="sample">
            <el-input size="small" placeholder="请输入" clearable v-model="entity.sample"
                      @keyup.enter.native="refreshTable()"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 è¯¢</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 ç½®</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <div>
      <lims-table :tableData="tableData" :column="column"
                  :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import {pageInsUnPass} from "@/api/business/unpass";
export default {
  components: {limsTable},
  data() {
    return {
      entity: {
        sample: null,
        model: null,
      },
      tableData: [],
      tableLoading: false,
      column: [
        { label: '编号', prop: 'no' },
        {
          label: "OA审核状态",
          prop: "oaState",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            if (params == 0) {
              return "否";
            } else {
              return "是";
            }
          },
          formatType: (params) => {
            if (params == 0) {
              return "danger";
            } else {
              return "primary";
            }
          },
        },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '180px',
          operation: [
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openAdd('edit', row);
              },
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
                this.delete(row);
              },
            },
            {
              name: '印章管理',
              type: 'text',
              clickFun: (row) => {
                this.fileManagement(row);
              },
            },
          ]
        }
      ],
      page: {
        total: 0,
        size: 10,
        current: 1
      },
    }
  },
  mounted() {
    this.refreshTable()
  },
  methods :{
    refreshTable() {
      this.tableLoading = true
      pageInsUnPass({ ...this.page, ...this.entity }).then(res => {
        this.tableLoading = false
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        this.tableLoading = false
      })
    },
    // é‡ç½®
    refresh() {
      this.resetForm('entity')
      this.refreshTable()
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
    },
  }
}
</script>
<style scoped>
.search {
  height: 46px;
  display: flex;
  justify-content: space-between;
}
</style>
src/views/structural/premises/index.vue
@@ -22,8 +22,9 @@
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination"
        :page="page" :tableLoading="tableLoading"></lims-table>
      <lims-table :tableData="tableData" :column="column"
                  :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <!--    æ–°å¢žå®žéªŒå®¤-->
    <el-dialog :title="formTitle" :visible.sync="addDia" width="450px">