|
@@ -8,282 +8,100 @@
|
|
|
-->
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent
|
|
|
- size="large">
|
|
|
- <el-row>
|
|
|
- <el-form-item label="交验单号" prop="deliverNo">
|
|
|
- <el-select v-model="queryParamDeliverNo" placeholder="请选择" @change="handleQuery">
|
|
|
- <el-option v-for="dict in sapDeliverNoCheck" :key="dict.deliverNo" :label="dict.deliverNo"
|
|
|
- :value="dict.deliverNo">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="生产令号" prop="bomNo">
|
|
|
- <el-input v-model="queryParams.bomNo" placeholder="请输入" class="z-el-input" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="BN / SN码" prop="bnSnCode">
|
|
|
- <el-input v-model="queryParams.bnSnCode" placeholder="请输入" class="z-el-input" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-form-item label="物料编码" prop="materialCode">
|
|
|
- <el-input v-model="queryParams.materialCode" placeholder="请输入" class="z-el-input" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="物料名称" prop="materialName">
|
|
|
- <el-input v-model="queryParams.materialName" placeholder="请输入" class="z-el-input" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="物料类型" prop="category">
|
|
|
- <el-select v-model="queryParams.category" placeholder="请选择" clearable style="width:120px" @change="handleQuery">
|
|
|
- <el-option v-for="dict in options.materialTypeOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue">
|
|
|
- <dict-tag :options="options.materialTypeOptions" :value="dict.dictValue" />
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="规格型号 / 图号" prop="materialSpec">
|
|
|
- <el-input v-model="queryParams.materialSpec" placeholder="请输入" class="z-el-input" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-form-item label="关键件标识" prop="keyFlag">
|
|
|
- <el-select v-model="queryParams.keyFlag" placeholder="请选择" clearable style="width:120px" @change="handleQuery">
|
|
|
- <el-option v-for="dict in options.keyFlagOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue">
|
|
|
- <dict-tag :options="options.keyFlagOptions" :value="dict.dictValue" />
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="质检结果" prop="checkResult">
|
|
|
- <el-select v-model="queryParams.checkResult" placeholder="请选择" clearable style="width:120px"
|
|
|
- @change="handleQuery">
|
|
|
- <el-option v-for="dict in options.qaResultOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue">
|
|
|
- <dict-tag :options="options.qaResultOptions" :value="dict.dictValue" />
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="入库结果" prop="instoreResult">
|
|
|
- <el-select v-model="queryParams.instoreResult" placeholder="请选择" clearable style="width:120px"
|
|
|
- @change="handleQuery">
|
|
|
- <el-option v-for="dict in options.operationResultOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue">
|
|
|
- <dict-tag :options="options.operationResultOptions" :value="dict.dictValue" />
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
|
|
- <el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
|
|
- <el-button icon="finished" type="primary">提交</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <!-- 工具区域 -->
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-button type="primary" v-hasPermi="['business:qainspectrecord:add']" plain icon="plus" @click="handleAdd">
|
|
|
- {{ $t('btn.add') }}
|
|
|
- </el-button>
|
|
|
- </el-col> -->
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-button type="success" :disabled="single" v-hasPermi="['business:qainspectrecord:edit']" plain icon="edit"
|
|
|
- @click="handleUpdate">
|
|
|
- {{ $t('btn.edit') }}
|
|
|
- </el-button>
|
|
|
- </el-col> -->
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-button type="danger" :disabled="multiple" v-hasPermi="['business:qainspectrecord:delete']" plain icon="delete"
|
|
|
- @click="handleDelete">
|
|
|
- {{ $t('btn.delete') }}
|
|
|
- </el-button>
|
|
|
- </el-col> -->
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-button type="warning" plain icon="Download" @click="handleExport"
|
|
|
- v-hasPermi="['business:qainspectrecord:export']">
|
|
|
- {{ $t('btn.export') }}
|
|
|
- </el-button>
|
|
|
- </el-col> -->
|
|
|
- <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <!-- 数据区域 -->
|
|
|
- <el-table :data="dataList" v-loading="loading" ref="table" highlight-current-row @sort-change="sortChange"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="index" label="序号" width="50" align="center" />
|
|
|
- <el-table-column prop="id" label="ID" align="center" v-if="columns.showColumn('id')" />
|
|
|
- <el-table-column prop="deliverNo" label="交验单号" align="center" :show-overflow-tooltip="true" width="150"
|
|
|
- v-if="columns.showColumn('deliverNo')" />
|
|
|
- <el-table-column prop="checkName" label="送检人员" align="center" :show-overflow-tooltip="true"
|
|
|
- v-if="columns.showColumn('checkName')" />
|
|
|
- <el-table-column prop="bomNo" label="生产令号" align="center" :show-overflow-tooltip="true"
|
|
|
- v-if="columns.showColumn('bomNo')" />
|
|
|
- <el-table-column prop="rowNo" label="行项目" align="center" v-if="columns.showColumn('rowNo')" />
|
|
|
- <el-table-column prop="category" label="物料类型" align="center" :show-overflow-tooltip="true"
|
|
|
- v-if="columns.showColumn('category')">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag :options="options.materialTypeOptions" :value="scope.row.category" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="materialCode" label="物料编码" align="center" :show-overflow-tooltip="true" width="150"
|
|
|
- v-if="columns.showColumn('materialCode')" />
|
|
|
- <el-table-column prop="materialName" label="物料名称" align="center" :show-overflow-tooltip="true" width="120"
|
|
|
- v-if="columns.showColumn('materialName')" />
|
|
|
- <el-table-column prop="materialSpec" label="规格型号/图号" align="center" :show-overflow-tooltip="true" width="120"
|
|
|
- v-if="columns.showColumn('materialSpec')" />
|
|
|
- <el-table-column prop="keyFlag" label="关键件" align="center" v-if="columns.showColumn('keyFlag')">
|
|
|
- <template #default="scope">
|
|
|
- <el-icon v-if="scope.row.keyFlag" size="large" color="red">
|
|
|
- <StarFilled />
|
|
|
- </el-icon>
|
|
|
- <el-icon v-else />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="bnSnCode" label="BN / SN码" align="center" :show-overflow-tooltip="true"
|
|
|
- v-if="columns.showColumn('bnSnCode')" />
|
|
|
- <el-table-column prop="qty" label="交验单数量" align="center" v-if="columns.showColumn('qty')" />
|
|
|
- <el-table-column prop="spotCheckQty" label="抽检数量" align="center" v-if="columns.showColumn('spotCheckQty')" />
|
|
|
- <el-table-column prop="checkQty" label="质检数量" align="center" v-if="columns.showColumn('checkQty')" />
|
|
|
- <el-table-column prop="checkResult" label="质检结果" align="center" :show-overflow-tooltip="true"
|
|
|
- v-if="columns.showColumn('checkResult')">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag :options="options.qaResultOptions" :value="scope.row.checkResult" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="instoreQty" label="入库数量" align="center" v-if="columns.showColumn('instoreQty')" />
|
|
|
- <el-table-column prop="instoreResult" label="入库结果" align="center" v-if="columns.showColumn('instoreResult')">
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag :options="options.operationResultOptions" :value="scope.row.instoreResult" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="createBy" label="创建人" align="center" v-if="columns.showColumn('createBy')" />
|
|
|
- <el-table-column prop="createTime" label="创建时间" align="center" width="160"
|
|
|
- v-if="columns.showColumn('createTime')" />
|
|
|
- <el-table-column prop="updateBy" label="更新人" align="center" v-if="columns.showColumn('updateBy')" />
|
|
|
- <el-table-column prop="updateTime" label="更新时间" align="center" width="160"
|
|
|
- v-if="columns.showColumn('updateTime')" />
|
|
|
- <el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true"
|
|
|
- v-if="columns.showColumn('remark')" />
|
|
|
- <el-table-column label="操作" align="center" width="160">
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" plain icon="view" @click="CheckOperation(scope.row)">质检</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination class="mt10" background :total="total" v-model:page="queryParams.pageNum"
|
|
|
- v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
-
|
|
|
- <!-- 添加或修改质检管理/质检记录表对话框 -->
|
|
|
- <el-dialog :title="title" :lock-scroll="false" v-model="open">
|
|
|
- <el-row :gutter="10">
|
|
|
- <el-col :span="12">
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">交验单号</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.deliverNo }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">生产令号</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.bomNo }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">物料类型</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <dict-tag :options="options.materialTypeOptions" :value="form.category" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">物料名称</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.materialName }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">规格型号 / 图号</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.materialSpec }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">关键件</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-icon v-if="form.keyFlag == 1" size="large" color="red">
|
|
|
- <StarFilled />
|
|
|
- </el-icon>
|
|
|
- <el-icon v-else />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">BN / SN码</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.bnSnCode }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">交验单数量</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.qty }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">质检数量</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <el-text>{{ form.checkQty }}</el-text>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
|
|
|
- <el-col :span="dialogColumnWidth">
|
|
|
- <el-text class="dialog-table-row-head">质检结果</el-text>
|
|
|
- </el-col>
|
|
|
- <el-col :span="dialogColumnCellWidth">
|
|
|
- <dict-tag :options="options.qaResultOptions" :value="form.checkResult" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
|
|
- <el-form-item label="BN / SN码">
|
|
|
-
|
|
|
+ <el-row :gutter="30" justify="space-evenly">
|
|
|
+ <el-col :span="9">
|
|
|
+ <el-form ref="formRef" :model="form" :rules="rules" label-width="100px" size="large"
|
|
|
+ style="border:solid 1px var(--el-border-color);border-radius:4px;padding:20px;">
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="交验单号" prop="deliverNo">
|
|
|
+ <!-- <el-radio-group v-model="queryParamDeliverNo" @change="handleQuery">
|
|
|
+ <el-radio-button v-for="dict in sapDeliverNoCheck" :label="dict.deliverNo">
|
|
|
+ {{ dict.deliverNo }}
|
|
|
+ </el-radio-button>
|
|
|
+ </el-radio-group> -->
|
|
|
+ <el-select v-model="queryParams.deliverNo" placeholder="请选择" @change="handleQuery">
|
|
|
+ <el-option v-for="dict in sapDeliverNoCheck" :key="dict.deliverNo" :label="dict.deliverNo"
|
|
|
+ :value="dict.deliverNo">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="合格数量">
|
|
|
-
|
|
|
+ <el-button icon="finished" type="success" style="margin-left:10px;">提交</el-button>
|
|
|
+ <!-- <el-button icon="refresh" style="margin-left:10px;">重置</el-button> -->
|
|
|
+ <el-form-item label="质检进度" prop="isComplate">
|
|
|
+ <el-radio-group v-model="queryParams.isComplate" @change="handleQuery">
|
|
|
+ <el-radio-button>全部</el-radio-button>
|
|
|
+ <el-radio-button :label="true">未完成</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="不合格数量">
|
|
|
-
|
|
|
+ </el-row>
|
|
|
+ <!-- <el-form-item label="质检结果" prop="checkResult">
|
|
|
+ <el-radio-group v-model="queryParams.checkResult" @change="handleQuery">
|
|
|
+ <el-radio-button :label=null>全部</el-radio-button>
|
|
|
+ <el-radio-button v-for="dict in options.qaResultOptions" :label="dict.dictValue">
|
|
|
+ {{ dict.dictLabel }}
|
|
|
+ </el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-row>
|
|
|
+ <el-form-item prop="materialSpec">
|
|
|
+ <template #label>
|
|
|
+ <el-text>物料</el-text>
|
|
|
+ </template>
|
|
|
+ <el-input v-model="queryParams.materialSpec" clearable placeholder="请选择输入物料图号"
|
|
|
+ @change="materialCurrentChange" />
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <template #footer v-if="opertype != 3">
|
|
|
- <el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
|
|
|
- <el-button type="primary" @click="submitForm">{{ $t('btn.submit') }}</el-button>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
+ <!-- <el-button type="primary" icon="search" style="margin-left: 10px;" @click="materialCurrentChange"></el-button> -->
|
|
|
+ </el-row>
|
|
|
+ <el-form-item prop="bnSnCode">
|
|
|
+ <template #label>
|
|
|
+ <el-text>BN / SN码</el-text>
|
|
|
+ </template>
|
|
|
+ <el-input v-model="form.bnSnCode" placeholder="请输入BN / SN码" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="CheckOkQty">
|
|
|
+ <template #label>
|
|
|
+ <el-text>合格数量</el-text>
|
|
|
+ </template>
|
|
|
+ <el-input-number v-model="form.CheckOkQty" :min="0" :max="form.sumQty - form.sumCheckQty - form.CheckNgQty" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="CheckNgQty">
|
|
|
+ <template #label>
|
|
|
+ <el-text type="danger">不合格数量</el-text>
|
|
|
+ </template>
|
|
|
+ <el-input-number v-model="form.CheckNgQty" :min="0" :max="form.sumQty - form.sumCheckQty"
|
|
|
+ :change="NGQtyToOKQty()" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button icon="check" type="primary" @click="submitForm">{{ $t('btn.submit') }}</el-button>
|
|
|
+ <el-button icon="refresh" @click="reset(), handleQuery()">{{ $t('btn.reset') }}</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="15">
|
|
|
+ <!-- 数据区域 -->
|
|
|
+ <el-card shadow="never">
|
|
|
+ <el-card style="
|
|
|
+ height: 130px;
|
|
|
+ width: 450px;
|
|
|
+ margin: 5px;
|
|
|
+ float: left;" shadow="hover" v-for="cell in dataList">
|
|
|
+ <template #header>
|
|
|
+ <el-text size="large">{{ cell.materialName }}</el-text>
|
|
|
+ <el-text size="large" v-if="!cell.materialName.includes(cell.materialSpec)">{{ " " + cell.materialSpec
|
|
|
+ }}</el-text>
|
|
|
+ <el-text style="float:right;border:1px solid red;border-radius: 2px;padding:2px 4px;" type="danger"
|
|
|
+ size="large" v-if="cell.sumQty == cell.sumCheckQty">完成</el-text>
|
|
|
+ </template>
|
|
|
+ <el-form :model="cell" label-width="80px" inline>
|
|
|
+ <el-form-item label="交验单数量">{{ cell.sumQty }}</el-form-item>
|
|
|
+ <el-form-item label="质检数量">{{ cell.sumCheckQty }}</el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ <pagination class="mt10" style="clear:both;" background :total="total" v-model:page="queryParams.pageNum"
|
|
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
@@ -291,11 +109,11 @@
|
|
|
<script setup name="qainspectrecord">
|
|
|
import {
|
|
|
listQaInspectRecord, addQaInspectRecord, delQaInspectRecord, updateQaInspectRecord, getQaInspectRecord,
|
|
|
- exportQaInspectRecord
|
|
|
+ exportQaInspectRecord, AddSapDeliverDtlInspectResult
|
|
|
} from '@/api/business/qainspectrecord.js'
|
|
|
|
|
|
import {
|
|
|
- listSapDeliverRecord, getSapDeliverRecord
|
|
|
+ listSapDeliverRecord, getSapDeliverRecord, GetSapDeliverRecordSumList
|
|
|
} from '@/api/business/sapdeliverrecord.js'
|
|
|
|
|
|
import { listSapDeliverNoCheck } from '@/api/business/sapdeliverrecord.js'
|
|
@@ -303,13 +121,8 @@ import { reactive } from 'vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
|
|
|
-const dialogColumnWidth = 7
|
|
|
-const dialogColumnCellWidth = 17
|
|
|
-const dialogRowGutter = 10
|
|
|
// 选中inspectId数组数组
|
|
|
const ids = ref([])
|
|
|
-const single = ref(true)
|
|
|
-const multiple = ref(true)
|
|
|
const loading = ref(false)
|
|
|
const showSearch = ref(true)
|
|
|
const queryParams = reactive({
|
|
@@ -318,47 +131,22 @@ const queryParams = reactive({
|
|
|
sort: '',
|
|
|
sortType: 'asc',
|
|
|
})
|
|
|
-const queryParamDeliverNo = ref()
|
|
|
|
|
|
-const columns = ref([
|
|
|
- { visible: false, prop: 'id', label: 'ID' },
|
|
|
- { visible: true, prop: 'deliverNo', label: '交验单号' },
|
|
|
- { visible: false, prop: 'checkName', label: '送检人员' },
|
|
|
- { visible: true, prop: 'bomNo', label: '生产令号' },
|
|
|
- { visible: false, prop: 'rowNo', label: '行项目' },
|
|
|
- { visible: true, prop: 'category', label: '物料类型' },
|
|
|
- { visible: false, prop: 'materialCode', label: '物料编码' },
|
|
|
- { visible: true, prop: 'materialName', label: '物料名称' },
|
|
|
- { visible: true, prop: 'materialSpec', label: '规格型号/图号' },
|
|
|
- { visible: true, prop: 'keyFlag', label: '关键件标识' },
|
|
|
- { visible: true, prop: 'bnSnCode', label: 'BN / SN码' },
|
|
|
- { visible: true, prop: 'qty', label: '交验单数量' },
|
|
|
- { visible: false, prop: 'spotCheckQty', label: '抽检数量' },
|
|
|
- { visible: true, prop: 'checkQty', label: '质检数量' },
|
|
|
- { visible: true, prop: 'checkResult', label: '质检结果' },
|
|
|
- { visible: true, prop: 'instoreQty', label: '入库数量' },
|
|
|
- { visible: true, prop: 'instoreResult', label: '入库结果' },
|
|
|
- { visible: false, prop: 'createBy', label: '创建人' },
|
|
|
- { visible: false, prop: 'createTime', label: '创建时间' },
|
|
|
- { visible: false, prop: 'updateBy', label: '更新人' },
|
|
|
- { visible: false, prop: 'updateTime', label: '更新时间' },
|
|
|
- { visible: false, prop: 'remark', label: '备注' },
|
|
|
-])
|
|
|
const total = ref(0)
|
|
|
const dataList = ref([])
|
|
|
const sapDeliverNoCheck = ref([])
|
|
|
const queryRef = ref()
|
|
|
-const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
|
|
|
|
|
|
function getList() {
|
|
|
loading.value = true
|
|
|
- listSapDeliverRecord(queryParams).then(res => {
|
|
|
+ GetSapDeliverRecordSumList(queryParams).then(res => {
|
|
|
const { code, data } = res
|
|
|
if (code == 200) {
|
|
|
dataList.value = data.result
|
|
|
total.value = data.totalNum
|
|
|
loading.value = false
|
|
|
}
|
|
|
+ // console.log(dataList.value)
|
|
|
})
|
|
|
}
|
|
|
function getNoCheck() {
|
|
@@ -368,7 +156,7 @@ function getNoCheck() {
|
|
|
if (code == 200) {
|
|
|
sapDeliverNoCheck.value = data
|
|
|
if (data.length > 0) {
|
|
|
- queryParamDeliverNo.value = sapDeliverNoCheck.value[0].deliverNo
|
|
|
+ queryParams.deliverNo = sapDeliverNoCheck.value[0].deliverNo
|
|
|
handleQuery()
|
|
|
}
|
|
|
}
|
|
@@ -377,8 +165,8 @@ function getNoCheck() {
|
|
|
getNoCheck()
|
|
|
// 查询
|
|
|
function handleQuery() {
|
|
|
- queryParams.deliverNo = queryParamDeliverNo.value
|
|
|
queryParams.pageNum = 1
|
|
|
+ // console.log(queryParams)
|
|
|
getList()
|
|
|
}
|
|
|
|
|
@@ -388,27 +176,6 @@ function resetQuery() {
|
|
|
handleQuery()
|
|
|
}
|
|
|
|
|
|
-// 多选框选中数据
|
|
|
-function handleSelectionChange(selection) {
|
|
|
- ids.value = selection.map((item) => item.inspectId);
|
|
|
- single.value = selection.length != 1
|
|
|
- multiple.value = !selection.length;
|
|
|
-}
|
|
|
-
|
|
|
-// 自定义排序
|
|
|
-function sortChange(column) {
|
|
|
- var sort = undefined
|
|
|
- var sortType = undefined
|
|
|
-
|
|
|
- if (column.prop != null && column.order != null) {
|
|
|
- sort = column.prop
|
|
|
- sortType = column.order
|
|
|
-
|
|
|
- }
|
|
|
- queryParams.sort = sort
|
|
|
- queryParams.sortType = sortType
|
|
|
- handleQuery()
|
|
|
-}
|
|
|
|
|
|
/*************** form操作 ***************/
|
|
|
const formRef = ref()
|
|
@@ -419,19 +186,9 @@ const open = ref(false)
|
|
|
const state = reactive({
|
|
|
form: {},
|
|
|
rules: {
|
|
|
- inspectNo: [{ required: true, message: "质检记录单号不能为空", trigger: "blur" }],
|
|
|
- deliverNo: [{ required: true, message: "交验单号不能为空", trigger: "blur" }],
|
|
|
- bomNo: [{ required: true, message: "生产令号不能为空", trigger: "blur" }],
|
|
|
- rowNo: [{ required: true, message: "交验单行项目不能为空", trigger: "blur", type: "number" }],
|
|
|
- category: [{ required: true, message: "物料类型不能为空", trigger: "blur" }],
|
|
|
- materialCode: [{ required: true, message: "物料编码不能为空", trigger: "blur" }],
|
|
|
- materialName: [{ required: true, message: "物料名称不能为空", trigger: "blur" }],
|
|
|
- materialSpec: [{ required: true, message: "规格型号/图号不能为空", trigger: "blur" }],
|
|
|
- keyFlag: [{ required: true, message: "关键件标识不能为空", trigger: "blur" }],
|
|
|
+ // materialSpec: [{ required: true, message: "物料图号不能为空", trigger: "blur" }],
|
|
|
bnSnCode: [{ required: true, message: "BN/SN码不能为空", trigger: "blur" }],
|
|
|
- qty: [{ required: true, message: "交验单数量不能为空", trigger: "blur", type: "number" }],
|
|
|
- checkQty: [{ required: true, message: "质检数量不能为空", trigger: "blur", type: "number" }],
|
|
|
- result: [{ required: true, message: "质检结果不能为空", trigger: "blur" }],
|
|
|
+ CheckOkQty: [{ required: true, message: "合格数量不能为空", trigger: "blur", type: "number" }],
|
|
|
},
|
|
|
options: {
|
|
|
keyFlagOptions: [], // 关键件标识字典
|
|
@@ -454,110 +211,82 @@ proxy.getDicts(dictParams).then((response) => {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
-
|
|
|
-// 关闭dialog
|
|
|
-function cancel() {
|
|
|
- open.value = false
|
|
|
+// 选择物料
|
|
|
+function materialCurrentChange(material) {
|
|
|
reset()
|
|
|
+ queryParams.materialSpec = material
|
|
|
+ queryParams.pageNum = 1
|
|
|
+ loading.value = true
|
|
|
+ GetSapDeliverRecordSumList(queryParams).then(res => {
|
|
|
+ const { code, data } = res
|
|
|
+ if (code == 200) {
|
|
|
+ dataList.value = data.result
|
|
|
+ total.value = data.totalNum
|
|
|
+ loading.value = false
|
|
|
+ if (dataList.value.length > 0) {
|
|
|
+ form.value = dataList.value[0]
|
|
|
+ form.value.deliverNo = queryParams.deliverNo
|
|
|
+ form.value.CheckNgQty = 0
|
|
|
+ form.value.CheckOkQty = form.value.sumQty - form.value.sumCheckQty
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 重置表单
|
|
|
function reset() {
|
|
|
form.value = {
|
|
|
- inspectId: undefined,
|
|
|
- inspectNo: undefined,
|
|
|
- deliverNo: undefined,
|
|
|
- bomNo: undefined,
|
|
|
- rowNo: undefined,
|
|
|
- category: undefined,
|
|
|
materialCode: undefined,
|
|
|
materialName: undefined,
|
|
|
materialSpec: undefined,
|
|
|
- keyFlag: undefined,
|
|
|
- bnSnCode: undefined,
|
|
|
- qty: undefined,
|
|
|
- checkQty: undefined,
|
|
|
- inspectedBy: undefined,
|
|
|
- inspectTime: undefined,
|
|
|
- result: undefined,
|
|
|
- createBy: undefined,
|
|
|
- createTime: undefined,
|
|
|
- updateBy: undefined,
|
|
|
- updateTime: undefined,
|
|
|
- remark: undefined,
|
|
|
+ sumQty: undefined,
|
|
|
+ sumCheckQty: undefined,
|
|
|
};
|
|
|
+ queryParams.materialSpec = undefined
|
|
|
proxy.resetForm("formRef")
|
|
|
}
|
|
|
|
|
|
-// 添加按钮操作
|
|
|
-function handleAdd() {
|
|
|
- reset();
|
|
|
- open.value = true
|
|
|
- title.value = '添加'
|
|
|
- opertype.value = 1
|
|
|
-}
|
|
|
-
|
|
|
-// 质检按钮操作
|
|
|
-function CheckOperation(row) {
|
|
|
- console.log(row)
|
|
|
- reset()
|
|
|
- form.value = row
|
|
|
- open.value = true
|
|
|
- title.value = "物料质检"
|
|
|
- opertype.value = 2
|
|
|
+// 不合格数量联动合格数量
|
|
|
+function NGQtyToOKQty() {
|
|
|
+ if (form.value.sumQty < (form.value.sumCheckQty + form.value.CheckOkQty + form.value.CheckNgQty)) {
|
|
|
+ form.value.CheckOkQty = form.value.sumQty - form.value.sumCheckQty - form.value.CheckNgQty
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-// 添加&修改 表单提交
|
|
|
+// 质检表单提交
|
|
|
function submitForm() {
|
|
|
proxy.$refs["formRef"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- if (form.value.inspectId != undefined && opertype.value === 2) {
|
|
|
- updateQaInspectRecord(form.value).then((res) => {
|
|
|
- proxy.$modal.msgSuccess("修改成功")
|
|
|
- open.value = false
|
|
|
- getList()
|
|
|
- })
|
|
|
- .catch(() => { })
|
|
|
- } else {
|
|
|
- addQaInspectRecord(form.value).then((res) => {
|
|
|
- proxy.$modal.msgSuccess("新增成功")
|
|
|
- open.value = false
|
|
|
+ // console.log(form.value)
|
|
|
+ if (form.value.CheckOKQty == 0 && form.value.CheckNGQty == 0) {
|
|
|
+ proxy.$modal.msgWarning("请至少输入合格数量或不合格数量!")
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ AddSapDeliverDtlInspectResult(form.value).then((res) => {
|
|
|
+ reset()
|
|
|
+ queryParams.materialSpec = undefined
|
|
|
+ proxy.$modal.msgSuccess("质检成功!")
|
|
|
getList()
|
|
|
})
|
|
|
- .catch(() => { })
|
|
|
}
|
|
|
+ // if (form.value.inspectId != undefined && opertype.value === 2) {
|
|
|
+ // updateQaInspectRecord(form.value).then((res) => {
|
|
|
+ // proxy.$modal.msgSuccess("修改成功")
|
|
|
+ // open.value = false
|
|
|
+ // getList()
|
|
|
+ // })
|
|
|
+ // .catch(() => { })
|
|
|
+ // } else {
|
|
|
+ // addQaInspectRecord(form.value).then((res) => {
|
|
|
+ // proxy.$modal.msgSuccess("新增成功")
|
|
|
+ // open.value = false
|
|
|
+ // getList()
|
|
|
+ // })
|
|
|
+ // .catch(() => { })
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 删除按钮操作
|
|
|
-function handleDelete(row) {
|
|
|
- const Ids = row.inspectId || ids.value
|
|
|
-
|
|
|
- proxy
|
|
|
- .$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?')
|
|
|
- .then(function () {
|
|
|
- return delQaInspectRecord(Ids)
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- getList()
|
|
|
- proxy.$modal.msgSuccess("删除成功")
|
|
|
- })
|
|
|
- .catch(() => { })
|
|
|
-}
|
|
|
-
|
|
|
-// 导出按钮操作
|
|
|
-function handleExport() {
|
|
|
- proxy
|
|
|
- .$confirm('是否确认导出当前质检记录?', '警告', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- .then(async () => {
|
|
|
- await exportQaInspectRecord(queryParams)
|
|
|
- })
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|