From e642f80b8718f9315ff75edb1db773da239bf926 Mon Sep 17 00:00:00 2001
From: deslrey <deslre0381@gmail.com>
Date: 星期六, 10 一月 2026 11:30:59 +0800
Subject: [PATCH] 【物料属性】的回显和下拉列表
---
src/views/business/inspectionReview/index.vue | 159 +++++++++++++++++++++++++++++++++++-----------------
1 files changed, 107 insertions(+), 52 deletions(-)
diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index 6d48595..8935f72 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -2,6 +2,11 @@
<div class="app-container">
<div>
<el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="鎵瑰彿" prop="updateBatchNo">
+ <el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()">
+ </el-input>
+ </el-form-item>
<el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.entrustCode"
@keyup.enter.native="refreshTable()"></el-input>
@@ -11,9 +16,18 @@
<el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>
</el-select>
</el-form-item>
+
+ <el-form-item label="鐗╂枡灞炴��" prop="materialProp">
+ <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%">
+ <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"
+ :value="dict.value"">
+ </el-option>
+ </el-select>
+ </el-form-item>
+
<el-form-item>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
+ <el-button type=" primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
<div class="page_total">
@@ -47,7 +61,6 @@
<script>
import { getYearAndMonthAndDays } from "@/utils/date";
-// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
import limsTable from "@/components/Table/lims-table.vue";
import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask";
@@ -56,13 +69,13 @@
import filePreview from "@/components/Preview/filePreview.vue";
export default {
+ name: 'InspectionReview',
components: {
filePreview,
onlyoffice,
limsTable,
- // ShowInfo,
},
- dicts: ["urgency_level", "inspection_task_state"],
+ dicts: ["urgency_level", "inspection_task_state", 'material_prop_type'],
computed: {
...mapGetters(["nickName", "userId"]),
},
@@ -83,6 +96,11 @@
tableData: [],
column: [
{
+ label: "鎵瑰彿",
+ prop: "updateBatchNo",
+ width: "120px",
+ },
+ {
label: "濮旀墭缂栧彿",
prop: "entrustCode",
width: "160px",
@@ -91,15 +109,32 @@
},
{ label: "鏍峰搧鍚嶇О", prop: "sample", width: "160px" },
{
+ label: '鐗╂枡灞炴��',
+ prop: 'materialProp',
+ formatData: (params) => {
+ if (!params) return null
+
+ for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+ const item = this.dict.type.material_prop_type[i]
+ if (item.value == params) {
+ return item.label
+ }
+ }
+ return null
+ }
+ },
+ {
label: "涓嬪崟绫诲埆",
prop: "typeSource",
width: "100px",
dataType: "tag",
formatData: (params) => {
if (params == 0) {
- return "鎴愬搧涓嬪崟";
- } else {
+ return "澶栬喘涓嬪崟";
+ } else if (params == 1) {
return "鍘熸潗鏂欎笅鍗�";
+ } else {
+ return "濮旀墭涓嬪崟";
}
},
},
@@ -109,7 +144,18 @@
prop: "type",
dataType: "tag",
formatData: (params) => {
- return this.urgencyLevel.find((m) => m.value == params).label;
+ if (this.urgencyLevel.find((m) => m.value == params)) {
+ return this.urgencyLevel.find((m) => m.value == params).label;
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (this.urgencyLevel.find((m) => m.value == params)) {
+ return this.urgencyLevel.find((m) => m.value == params).type;
+ } else {
+ return null
+ }
},
},
{
@@ -129,11 +175,18 @@
prop: "insState",
dataType: "tag",
formatData: (params) => {
- return this.inspectionTaskState.find((m) => m.value == params)
- .label;
+ if (this.inspectionTaskState.find((m) => m.value == params)) {
+ return this.inspectionTaskState.find((m) => m.value == params).label;
+ } else {
+ return null
+ }
},
formatType: (params) => {
- return this.inspectionTaskState.find((m) => m.value == params).type;
+ if (this.inspectionTaskState.find((m) => m.value == params)) {
+ return this.inspectionTaskState.find((m) => m.value == params).type;
+ } else {
+ return null
+ }
},
},
{ label: "妫�楠屼汉", prop: "userName" },
@@ -154,7 +207,7 @@
this.handleReview(row);
},
disabled: (row) => {
- return row.userName == null || row.userName && !row.userName.includes(this.nickName)
+ return row.checkName == null || (row.checkName && !row.checkName.includes(this.nickName))
}
},
{
@@ -219,7 +272,8 @@
currentTime: null,
sonLaboratoryList: [],
typeSourceList: [
- { label: '鎴愬搧涓嬪崟', value: 0 },
+ { label: '濮旀墭涓嬪崟', value: -1 },
+ { label: '澶栬喘涓嬪崟', value: 0 },
{ label: '鍘熸潗鏂欎笅鍗�', value: 1 },
],
isCopper: null,
@@ -230,10 +284,10 @@
fullscreen: false,
option: null,
orderTypeList: [
- { label: '濮旀墭璇曢獙', value: 'Customer-ordered test' },
- { label: '鎶芥', value: '鎶芥' },
- { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�' },
- { label: '瀛e害妫�楠�', value: 'Quarterly inspection' },
+ { label: '濮旀墭璇曢獙', value: 'Customer-ordered test', type: 'success' },
+ { label: '鎶芥', value: '鎶芥', type: 'danger' },
+ { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�', type: 'info' },
+ { label: '瀛e害妫�楠�', value: 'Quarterly inspection', type: '' },
],
urgencyLevel: [],
inspectionTaskState: [],
@@ -250,6 +304,9 @@
this.currentTime = getYearAndMonthAndDays()
},
mounted() {
+ this.refreshTable()
+ },
+ activated() {
this.refreshTable()
},
methods: {
@@ -284,13 +341,6 @@
}
return "";
},
- // 鏌ョ湅浜т笟閾句俊鎭�
- // openInfoDialog (row) {
- // this.showInfoDialog = true
- // this.$nextTick(() => {
- // this.$refs.showInfoDialog.getInfo(row.ifsInventoryId)
- // })
- // },
selectAllByOne(row) {
this.isCopper = row.isCopper
this.customsInspection = row
@@ -302,7 +352,7 @@
case 0:
// 鍘熸潗鏂�
this.$router.push({
- path: "/materialOrder/customsInspection", query: {
+ path: "/materialOrder/customsInspectionView", query: {
customsInspection: row,
active: this.activeFace,
currentId: this.currentId,
@@ -313,7 +363,7 @@
case null:
// 鎴愬搧
this.$router.push({
- path: "/productOrder/add", query: {
+ path: "/productOrder/addView", query: {
examine: this.examine,
active: this.activeFace,
currentId: this.currentId
@@ -323,7 +373,7 @@
case 1:
// 閾滄潗
this.$router.push({
- path: "/materialOrder/copperOrder", query: {
+ path: "/materialOrder/CopperView", query: {
active: this.activeFace,
currentId: this.currentId
}
@@ -345,7 +395,7 @@
},
// 涓嬭浇鎶ュ憡
download(row) {
- let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
+ let url = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
const link = document.createElement('a');
link.href = this.javaApi + url;
link.target = '_blank';
@@ -370,30 +420,28 @@
},
// 鏌ョ湅鎶ュ憡
handleIssued(row) {
- if (!row.tempUrlPdf) return this.$message.warning('鏂囦欢鏈笂浼�')
- this.currentInfo = row
- this.lookDialogVisible = true
- // this.currentInfo = row;
- // let fileName = row.url
- // let fileType = "docx"
- // if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
- // fileName = row.tempUrlPdf
- // fileType = "pdf"
- // }
- // fileName = fileName.replace('/word/','')
- // const userName = this.nickName
- // this.option = {
- // url: this.javaApi + "/word/" + fileName,
- // isEdit: false,
- // fileType: fileType,
- // title: fileName,
- // lang: 'zh-CN',
- // isPrint: false,
- // user_id: 1,
- // user_name: userName,
- // editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
- // }
- // this.issuedVisible = true;
+ // todo: 鏌ョ湅鎶ュ憡缁勪欢
+ this.currentInfo = row;
+ let fileName = row.url
+ let fileType = "docx"
+ if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
+ fileName = row.tempUrlPdf
+ fileType = "pdf"
+ }
+ fileName = fileName.replace('/word/', '')
+ const userName = this.nickName
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: fileType,
+ title: fileName,
+ lang: 'zh-CN',
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
+ }
+ this.issuedVisible = true;
},
getAuthorizedPerson() {
selectUserCondition({ type: 1 }).then((res) => {
@@ -413,5 +461,12 @@
<style scoped>
.page_total {
margin-bottom: 10px;
+ display: flex;
+}
+
+.page_total span:last-child {
+ color: #3a7bfa;
+ font-size: 23px;
+ font-weight: 400;
}
</style>
--
Gitblit v1.9.3