From 2902cd8d2b36f66ea5162ae91d9a5a51912758fa Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期一, 31 三月 2025 16:04:04 +0800 Subject: [PATCH] Merge branch 'dev_test' into dev --- src/views/business/productOrder/index.vue | 107 ++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 84 insertions(+), 23 deletions(-) diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index de90aa1..d8371fb 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -8,7 +8,7 @@ </el-input> </el-form-item> <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName"> - <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small" + <el-input v-model="entity.sampleName" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="refreshTable"></el-input> </el-form-item> <el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel"> @@ -17,6 +17,7 @@ </el-form-item> <el-form-item label="涓嬪崟鏃堕棿" prop="createTime" v-if="more"> <el-date-picker v-model="entity.createTime" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + @change="refreshTable" style="width:100%" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> @@ -33,8 +34,8 @@ <el-form-item> <el-button :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button> - <el-button size="small" @click="refresh()">閲� 缃�</el-button> - <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> + <el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button> + <el-button size="mini" @click="refresh()">閲嶇疆</el-button> </el-form-item> </el-form> </div> @@ -293,9 +294,28 @@ @closePrintDialog="closePrintDialog"></print-dialog> <!--娣诲姞閬楁紡妫�楠岄」寮规--> <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia> - <!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"--> - <!-- :sonLaboratory="sonLaboratory" :state="state"--> - <!-- :typeSource="typeSource" @goback="goback" @refreshView="refreshView"/>--> + <!--淇敼鏍峰搧鍨嬪彿寮规--> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="dialogVisible" title="淇敼鏍峰搧鍨嬪彿" width="80%"> + <el-table ref="sampleTable" :data="sampleList" border highlight-current-row + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" + max-height="400px" tooltip-effect="dark"> + <el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column> + <el-table-column align="center" label="鏍峰搧鍚嶇О" min-width="100" prop="sample"> </el-table-column> + <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="100" prop="sampleCode"></el-table-column> + <el-table-column align="center" label="鏍峰搧鍨嬪彿" min-width="60" prop="model"> + <template slot-scope="scope"> + <el-input v-model="scope.row.model" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" + size="small"></el-input> + </template> + </el-table-column> + <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodName"></el-table-column> + </el-table> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button :loading="submitListLoad" type="primary" @click="submitList">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -306,11 +326,11 @@ import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue"; import limsTable from "@/components/Table/lims-table.vue"; import { - checkUpdate, delInsOrder, + checkUpdate, delInsOrder, getSampleByOrderId, rawAllInsOrderExport, selectInsOrderParameter, selectNoProducts, selectOrderManDay, updateInspected, - updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2 + updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2 } from "@/api/business/productOrder"; import { selectUserCondition } from "@/api/performance/class"; import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder"; @@ -348,7 +368,13 @@ dataType: "link", linkMethod: "selectAllByOne", }, - { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { + label: "鏍峰搧鍨嬪彿", + prop: "sampleModel", + width: "160px", + dataType: "link", + linkMethod: "editSampleModel", + }, { label: '鏍峰搧鏁伴噺', prop: 'sampleNum' }, { label: '妫�楠屼汉', prop: 'testingName' }, { @@ -529,7 +555,7 @@ ], page: { total: 0, - size: 10, + size: 20, current: 1 }, state: 0,// 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅 @@ -558,7 +584,7 @@ tableDataLook: [], tableDataLookPage: { total: 0, - size: 10, + size: 20, current: 1 }, tableDataLookColumn: [ @@ -649,7 +675,7 @@ ], pageFile: { total: 0, - size: 10, + size: 20, current: 1 }, formData: {}, @@ -686,7 +712,7 @@ ], pageDelete: { total: 0, - size: 10, + size: 20, current: 1 }, deleteDialogVisible: false, @@ -735,7 +761,10 @@ multipleSelection: [], sonLaboratoryList: [], printDialog: false, - addInspectionDia: false + addInspectionDia: false, + dialogVisible: false, + submitListLoad: false, + sampleList: [] } }, watch: { @@ -940,15 +969,42 @@ this.dataDialogVisible = false; this.upLoad = false; }, - // 璇︽儏 + // 鐐瑰嚮鏍峰搧鍚嶇О selectAllByOne(row) { this.$router.push({ - path: "/productOrder/add", query: { + path: "/productOrder/addView", query: { examine: 1, active: 2, - currentId: row.id + currentId: row.id, + tabIndex: this.tabIndex, } }); + }, + // 淇敼鏍峰搧鍨嬪彿 + editSampleModel (row) { + if (this.tabIndex !== 1) { + return + } + this.dialogVisible = true + this.getDataList(row) + }, + getDataList(row) { + this.dialogVisible = true + getSampleByOrderId({insOrderId: row.id}).then(res => { + this.sampleList = res.data + }) + }, + // 鎻愪氦鏍峰搧鍨嬪彿淇敼 + submitList () { + this.submitListLoad = true + updateSampleModel(this.sampleList).then(res => { + this.submitListLoad = false + this.dialogVisible = false + this.$message.success('淇敼鎴愬姛') + this.refreshTable() + }).catch(err => { + this.submitListLoad = false + }) }, // 鏁版嵁鏌ョ湅 handleDataLook(row) { @@ -976,7 +1032,7 @@ closeDia () { this.tableDataLookPage = { total: 0, - size: 10, + size: 20, current: 1 } this.dataDialogVisible = false @@ -1015,8 +1071,13 @@ // 涓嬭浇鎶ュ憡 download(row) { let url = row.urlS ? row.urlS : row.url; - if (url) { - this.$download.saveAs(url, row.entrustCode); + if(url){ + url = url.split('.')[0]+'.pdf' + const link = document.createElement('a'); + link.href = this.javaApi + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); } }, // 鎾ら攢 @@ -1034,7 +1095,7 @@ }, getDeleteList() { this.tableLoadingDelete = true - selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => { + selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds, ...this.pageDelete }).then(res => { this.tableLoadingDelete = false this.componentDataDelete = res.data.records this.pageDelete.total = res.data.total @@ -1182,11 +1243,11 @@ }, // 涓嬪崟 playOrder(num) { - this.$router.push({ path: "/productOrder/add", query: { examine: 0, active: num, tabIndex: this.tabIndex } }); + this.$router.push({ path: "/productOrder/addOrder", query: { examine: 0, active: num, tabIndex: this.tabIndex } }); }, // 瀹℃牳 handleVerify(row) { - this.$router.push({ path: "/productOrder/add", query: { examine: 1, active: 3, currentId: row.id } }); + this.$router.push({ path: "/productOrder/addView", query: { examine: 1, active: 3, currentId: row.id } }); }, handleTab(i) { this.tabIndex = i; -- Gitblit v1.9.3