|
|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
|
<!-- 列表 -->
|
|
|
<AutoResizer :given-height="220">
|
|
|
- <template #default="{height}">
|
|
|
+ <template #default="{ height }">
|
|
|
<el-table
|
|
|
v-if="columnsList.length > 0"
|
|
|
ref="multipleTable"
|
|
|
@@ -25,7 +25,8 @@
|
|
|
type="text"
|
|
|
size="mini"
|
|
|
@click="handleDetails(scope.row)"
|
|
|
- >{{ scope.row.id }}</el-button>
|
|
|
+ >{{ scope.row.id }}</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -71,6 +72,15 @@
|
|
|
width="120"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
+ <el-table-column
|
|
|
+ v-if="columnsList[23].visible"
|
|
|
+ :key="Math.random()"
|
|
|
+ label="图号"
|
|
|
+ align="center"
|
|
|
+ prop="drawingNo"
|
|
|
+ width="150"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
v-if="columnsList[7].visible"
|
|
|
:key="Math.random()"
|
|
|
@@ -79,7 +89,10 @@
|
|
|
prop="testStatus"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.WMS_TEST_STATUS" :value="scope.row.testStatus" />
|
|
|
+ <dict-tag
|
|
|
+ :type="DICT_TYPE.WMS_TEST_STATUS"
|
|
|
+ :value="scope.row.testStatus"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -91,7 +104,10 @@
|
|
|
width="120"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.WMS_AUDIT_STATUS" :value="scope.row.auditStatus" />
|
|
|
+ <dict-tag
|
|
|
+ :type="DICT_TYPE.WMS_AUDIT_STATUS"
|
|
|
+ :value="scope.row.auditStatus"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -166,7 +182,10 @@
|
|
|
prop="auditStatus"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.WMS_IQC_APPROVAL_STATUS" :value="scope.row.auditStatus" />
|
|
|
+ <dict-tag
|
|
|
+ :type="DICT_TYPE.WMS_IQC_APPROVAL_STATUS"
|
|
|
+ :value="scope.row.auditStatus"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -177,7 +196,10 @@
|
|
|
prop="inspection"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.WMS_TEST_RESULT" :value="scope.row.inspection" />
|
|
|
+ <dict-tag
|
|
|
+ :type="DICT_TYPE.WMS_TEST_RESULT"
|
|
|
+ :value="scope.row.inspection"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -193,7 +215,8 @@
|
|
|
icon="el-icon-refresh"
|
|
|
size="mini"
|
|
|
@click="callBack(scope.row)"
|
|
|
- >撤回</el-button>
|
|
|
+ >撤回</el-button
|
|
|
+ >
|
|
|
<!-- <el-button
|
|
|
type="text"
|
|
|
icon="el-icon-view"
|
|
|
@@ -234,22 +257,23 @@
|
|
|
<!-- 检验详情查看 -->
|
|
|
<!-- <InspectDetail ref="inspectDetail" @resetComplete="resetRefresh" @complete="approvalComplete" /> -->
|
|
|
</div>
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getIqcInspectionPage, inspectionReBack } from '@/api/wms/quality/iqcInspectionExecute'
|
|
|
-import { updateAuditStatus } from '@/api/wms/quality/inspectionResultApproval'
|
|
|
+import {
|
|
|
+ getIqcInspectionPage,
|
|
|
+ inspectionReBack,
|
|
|
+} from "@/api/wms/quality/iqcInspectionExecute";
|
|
|
+import { updateAuditStatus } from "@/api/wms/quality/inspectionResultApproval";
|
|
|
// import InspectDetail from './components/InspectDetail.vue'
|
|
|
-import { getFormColumnsList } from '@/api/system/saveColumns/index'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
-import { isArray } from 'min-dash'
|
|
|
+import { getFormColumnsList } from "@/api/system/saveColumns/index";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { isArray } from "min-dash";
|
|
|
|
|
|
export default {
|
|
|
- name: 'InspectionResultApproval',
|
|
|
- components: {
|
|
|
- },
|
|
|
- inject: ['paramsQuery'],
|
|
|
+ name: "InspectionResultApproval",
|
|
|
+ components: {},
|
|
|
+ inject: ["paramsQuery"],
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
@@ -271,7 +295,7 @@ export default {
|
|
|
// 用户列表
|
|
|
users: [],
|
|
|
// 弹出层标题
|
|
|
- title: '',
|
|
|
+ title: "",
|
|
|
// 是否显示查看弹出层
|
|
|
viewOpen: false,
|
|
|
advParams: {},
|
|
|
@@ -287,100 +311,103 @@ export default {
|
|
|
inQty: null,
|
|
|
funitId: null,
|
|
|
id: null,
|
|
|
- processNo: 'PURCHASE'
|
|
|
+ processNo: "PURCHASE",
|
|
|
},
|
|
|
excueParams: {},
|
|
|
// 表单参数
|
|
|
form: {
|
|
|
- noPassType: '0'
|
|
|
+ noPassType: "0",
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
noPassType: [
|
|
|
- { required: true, message: '请选择处理结果', trigger: 'change' }
|
|
|
- ]
|
|
|
+ { required: true, message: "请选择处理结果", trigger: "change" },
|
|
|
+ ],
|
|
|
},
|
|
|
// 显示隐藏列参数
|
|
|
columns: [
|
|
|
- { key: 0, label: '物料批次', visible: true },
|
|
|
- { key: 1, label: '送货批次', visible: true },
|
|
|
- { key: 2, label: '采购订单', visible: true },
|
|
|
- { key: 3, label: '采购数量', visible: true },
|
|
|
- { key: 4, label: '物料编码', visible: true },
|
|
|
- { key: 5, label: '物料名称', visible: true },
|
|
|
- { key: 6, label: '到货数量', visible: true },
|
|
|
- { key: 7, label: '检验状态', visible: true },
|
|
|
- { key: 8, label: '单位', visible: true },
|
|
|
- { key: 9, label: '供应商', visible: true },
|
|
|
- { key: 10, label: '存储条件', visible: true },
|
|
|
- { key: 11, label: '登记时间', visible: true },
|
|
|
- { key: 12, label: '登记人', visible: true },
|
|
|
- { key: 13, label: '累计已到货数量', visible: true },
|
|
|
- { key: 14, label: '检验单号', visible: true },
|
|
|
- { key: 15, label: '检验数量', visible: true },
|
|
|
- { key: 16, label: '审核状态', visible: true },
|
|
|
- { key: 17, label: '审核人', visible: true },
|
|
|
- { key: 18, label: '审核时间', visible: true },
|
|
|
- { key: 19, label: '检验时间', visible: true },
|
|
|
- { key: 20, label: '检验人', visible: true },
|
|
|
- { key: 21, label: '处理结果', visible: true },
|
|
|
- { key: 22, label: '检验结果', visible: true }
|
|
|
+ { key: 0, label: "物料批次", visible: true },
|
|
|
+ { key: 1, label: "送货批次", visible: true },
|
|
|
+ { key: 2, label: "采购订单", visible: true },
|
|
|
+ { key: 3, label: "采购数量", visible: true },
|
|
|
+ { key: 4, label: "物料编码", visible: true },
|
|
|
+ { key: 5, label: "物料名称", visible: true },
|
|
|
+ { key: 6, label: "到货数量", visible: true },
|
|
|
+ { key: 7, label: "检验状态", visible: true },
|
|
|
+ { key: 8, label: "单位", visible: true },
|
|
|
+ { key: 9, label: "供应商", visible: true },
|
|
|
+ { key: 10, label: "存储条件", visible: false },
|
|
|
+ { key: 11, label: "登记时间", visible: true },
|
|
|
+ { key: 12, label: "登记人", visible: true },
|
|
|
+ { key: 13, label: "累计已到货数量", visible: true },
|
|
|
+ { key: 14, label: "检验单号", visible: true },
|
|
|
+ { key: 15, label: "检验数量", visible: true },
|
|
|
+ { key: 16, label: "审核状态", visible: true },
|
|
|
+ { key: 17, label: "审核人", visible: true },
|
|
|
+ { key: 18, label: "审核时间", visible: true },
|
|
|
+ { key: 19, label: "检验时间", visible: true },
|
|
|
+ { key: 20, label: "检验人", visible: true },
|
|
|
+ { key: 21, label: "处理结果", visible: true },
|
|
|
+ { key: 22, label: "检验结果", visible: true },
|
|
|
+ { key: 23, label: "图号", visible: true },
|
|
|
],
|
|
|
// 显示隐藏持久化参数
|
|
|
- columnsList: []
|
|
|
- }
|
|
|
+ columnsList: [],
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters([
|
|
|
- 'userId'
|
|
|
- ])
|
|
|
+ ...mapGetters(["userId"]),
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听路由参数的变化
|
|
|
- '$route'() {
|
|
|
+ $route() {
|
|
|
// 判断 id 是否存在并调用 getList 方法
|
|
|
if (this.$route.query) {
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
// 获取显隐列列表
|
|
|
- this.getColumnsList()
|
|
|
- this.getList()
|
|
|
+ this.getColumnsList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
// 撤回
|
|
|
callBack({ id }) {
|
|
|
- this.loading = true
|
|
|
- inspectionReBack({ inspectionId: id }).then(response => {
|
|
|
- this.$message.success('已撤回')
|
|
|
- this.getList()
|
|
|
- }).finally(() => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ this.loading = true;
|
|
|
+ inspectionReBack({ inspectionId: id })
|
|
|
+ .then((response) => {
|
|
|
+ this.$message.success("已撤回");
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
/** 查询列表 */
|
|
|
getList() {
|
|
|
- this.loading = true
|
|
|
+ this.loading = true;
|
|
|
// 执行查询
|
|
|
const params = {
|
|
|
...this.queryParams,
|
|
|
...this.paramsQuery,
|
|
|
- ...this.advParams
|
|
|
- }
|
|
|
- getIqcInspectionPage(params).then(response => {
|
|
|
- this.list = response.data.list
|
|
|
- this.total = response.data.total
|
|
|
- this.users = response.data.users
|
|
|
- }).finally(() => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ ...this.advParams,
|
|
|
+ };
|
|
|
+ getIqcInspectionPage(params)
|
|
|
+ .then((response) => {
|
|
|
+ this.list = response.data.list;
|
|
|
+ this.total = response.data.total;
|
|
|
+ this.users = response.data.users;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
/** 取消按钮 */
|
|
|
cancel() {
|
|
|
- this.open = false
|
|
|
- this.reset()
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
},
|
|
|
/** 表单重置 */
|
|
|
reset() {
|
|
|
@@ -390,27 +417,35 @@ export default {
|
|
|
orderType: undefined,
|
|
|
inQty: undefined,
|
|
|
funitId: undefined,
|
|
|
- remark: undefined
|
|
|
- }
|
|
|
- this.resetForm('form')
|
|
|
+ remark: undefined,
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNo = 1
|
|
|
- this.getList()
|
|
|
+ this.queryParams.pageNo = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.handleQuery()
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
},
|
|
|
handleName(row, column, cellValue) {
|
|
|
- const user = this.users.find(item => item.id.toString() === cellValue)
|
|
|
- return user && user.nickname
|
|
|
+ const user = this.users.find((item) => item.id.toString() === cellValue);
|
|
|
+ return user && user.nickname;
|
|
|
},
|
|
|
// 查看检验详情
|
|
|
handleDetails(row) {
|
|
|
- const { materialLots, materialNo, auditStatus, id, creator, processNo, unitCode } = row
|
|
|
+ const {
|
|
|
+ materialLots,
|
|
|
+ materialNo,
|
|
|
+ auditStatus,
|
|
|
+ id,
|
|
|
+ creator,
|
|
|
+ processNo,
|
|
|
+ unitCode,
|
|
|
+ } = row;
|
|
|
// this.$refs.inspectDetail.visible = true
|
|
|
// this.$refs.inspectDetail.queryParams.materialLots = materialLots
|
|
|
// this.$refs.inspectDetail.queryParams.materialNo = materialNo
|
|
|
@@ -421,79 +456,93 @@ export default {
|
|
|
// this.$refs.inspectDetail.queryParams.processNo = processNo
|
|
|
|
|
|
// 跳转到检验执行
|
|
|
- this.$router.push({ path: '/quality/iqcInspection/inspect-details', query: { id, auditStatus, unitCode, materialLots, materialNo, processNo, type: 0, creator }})
|
|
|
+ this.$router.push({
|
|
|
+ path: "/quality/iqcInspection/inspect-details",
|
|
|
+ query: {
|
|
|
+ id,
|
|
|
+ auditStatus,
|
|
|
+ unitCode,
|
|
|
+ materialLots,
|
|
|
+ materialNo,
|
|
|
+ processNo,
|
|
|
+ type: 0,
|
|
|
+ creator,
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
handleComplete(qualified, auditStatus) {
|
|
|
if (qualified === 1) {
|
|
|
- if (this.form.noPassType === '') {
|
|
|
- this.$modal.msgWarning('处理结果不能为空~')
|
|
|
- return
|
|
|
+ if (this.form.noPassType === "") {
|
|
|
+ this.$modal.msgWarning("处理结果不能为空~");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
- this.submitLoading = true
|
|
|
+ this.submitLoading = true;
|
|
|
const params = {
|
|
|
inspection: qualified,
|
|
|
materialNo: this.queryParams.materialNo,
|
|
|
noPassType: this.form.noPassType,
|
|
|
materialLots: this.queryParams.materialLots,
|
|
|
id: this.queryParams.id,
|
|
|
- auditStatus
|
|
|
- }
|
|
|
- updateAuditStatus(params).then(res => {
|
|
|
- const msg = auditStatus === 1 ? '审核通过' : '审核不通过'
|
|
|
- this.$modal.msgSuccess('审核完成!产品' + msg)
|
|
|
- this.$emit('complete')
|
|
|
- this.visible = false
|
|
|
- this.open = false
|
|
|
- this.finishOpen = false
|
|
|
- this.getList()
|
|
|
- this.reset()
|
|
|
- this.submitLoading = false
|
|
|
- this.queryParams.materialLots = undefined
|
|
|
- this.queryParams.materialNo = undefined
|
|
|
- this.queryParams.id = undefined
|
|
|
- }).finally(() => {
|
|
|
- this.submitLoading = false
|
|
|
- this.queryParams.materialLots = undefined
|
|
|
- this.queryParams.materialNo = undefined
|
|
|
- this.queryParams.id = undefined
|
|
|
- })
|
|
|
+ auditStatus,
|
|
|
+ };
|
|
|
+ updateAuditStatus(params)
|
|
|
+ .then((res) => {
|
|
|
+ const msg = auditStatus === 1 ? "审核通过" : "审核不通过";
|
|
|
+ this.$modal.msgSuccess("审核完成!产品" + msg);
|
|
|
+ this.$emit("complete");
|
|
|
+ this.visible = false;
|
|
|
+ this.open = false;
|
|
|
+ this.finishOpen = false;
|
|
|
+ this.getList();
|
|
|
+ this.reset();
|
|
|
+ this.submitLoading = false;
|
|
|
+ this.queryParams.materialLots = undefined;
|
|
|
+ this.queryParams.materialNo = undefined;
|
|
|
+ this.queryParams.id = undefined;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.submitLoading = false;
|
|
|
+ this.queryParams.materialLots = undefined;
|
|
|
+ this.queryParams.materialNo = undefined;
|
|
|
+ this.queryParams.id = undefined;
|
|
|
+ });
|
|
|
},
|
|
|
// 重新检验刷新
|
|
|
resetRefresh() {
|
|
|
- this.getList()
|
|
|
- this.$emit('resetComplete')
|
|
|
+ this.getList();
|
|
|
+ this.$emit("resetComplete");
|
|
|
},
|
|
|
approvalComplete() {
|
|
|
- this.getList()
|
|
|
- this.$emit('alreadyComplete')
|
|
|
+ this.getList();
|
|
|
+ this.$emit("alreadyComplete");
|
|
|
},
|
|
|
// 获取显示隐藏列
|
|
|
getColumnsList() {
|
|
|
- const { componentName } = this.$route.meta || null
|
|
|
+ const { componentName } = this.$route.meta || null;
|
|
|
const params = {
|
|
|
userId: this.userId,
|
|
|
- vueForm: componentName
|
|
|
- }
|
|
|
- getFormColumnsList(params).then(res => {
|
|
|
- if (isArray(res.data)) {
|
|
|
- this.columnsList = res.data.length === 0 ? this.columns : res.data
|
|
|
- } else {
|
|
|
- this.columnsList = this.columns
|
|
|
- }
|
|
|
- }).catch((err) => {
|
|
|
- if (err) {
|
|
|
- this.columnsList = this.columns
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.$emit('columns', this.columnsList)
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ vueForm: componentName,
|
|
|
+ };
|
|
|
+ getFormColumnsList(params)
|
|
|
+ .then((res) => {
|
|
|
+ if (isArray(res.data)) {
|
|
|
+ this.columnsList = res.data.length === 0 ? this.columns : res.data;
|
|
|
+ } else {
|
|
|
+ this.columnsList = this.columns;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ if (err) {
|
|
|
+ this.columnsList = this.columns;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.$emit("columns", this.columnsList);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
- <style>
|
|
|
-
|
|
|
- </style>
|
|
|
-
|
|
|
+<style></style>
|