From 1f69274b3f62e60378d7c5dbce05357366aaf2a6 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 19 三月 2025 17:21:50 +0800 Subject: [PATCH] 能力范围修改80%+合并装备代码 --- src/components/Table/lims-table.vue | 42 ++++--- src/views/index.vue | 1 src/views/standard/standardLibrary/index.vue | 27 +++-- src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue | 61 +++++++++-- src/views/system/customer/index.vue | 2 src/components/index/scroll-paging.vue | 3 src/api/structural/structureTestObjectPart.js | 11 ++ src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue | 1 src/api/business/unqualifiedHandler.js | 6 src/views/structural/capabilityAndLaboratory/capability/index.vue | 68 ++++++++++--- src/api/structural/capability.js | 11 ++ src/views/business/inspectionTask/index.vue | 38 ++++++ 12 files changed, 197 insertions(+), 74 deletions(-) diff --git a/src/api/business/unqualifiedHandler.js b/src/api/business/unqualifiedHandler.js index d458b42..042d095 100644 --- a/src/api/business/unqualifiedHandler.js +++ b/src/api/business/unqualifiedHandler.js @@ -17,11 +17,11 @@ params: query, }); } -//鍒犻櫎涓嶅悎鏍煎鐞� +//鎻愪氦OA娴佺▼ export function pushOA(query) { return request({ url: "/unqualifiedHandler/pushOA", - method: "delete", - params: query, + method: "post", + data: query, }); } diff --git a/src/api/structural/capability.js b/src/api/structural/capability.js index 4bfe518..b65e14c 100644 --- a/src/api/structural/capability.js +++ b/src/api/structural/capability.js @@ -149,7 +149,7 @@ params: query, }); } -// 缁戝畾杞﹂棿 +// 浜у搧-缁戝畾杞﹂棿 export function updateWorkShop(query) { return request({ url: "/capacityScope/updateWorkShop", @@ -157,3 +157,12 @@ data: query, }); } + +// 瀵硅薄-缁戝畾杞﹂棿 +export function updateObjectWorkShop(query) { + return request({ + url: "/capacityScope/updateObjectWorkShop", + method: "post", + data: query, + }); +} diff --git a/src/api/structural/structureTestObjectPart.js b/src/api/structural/structureTestObjectPart.js index 83db6a7..210cf68 100644 --- a/src/api/structural/structureTestObjectPart.js +++ b/src/api/structural/structureTestObjectPart.js @@ -60,7 +60,7 @@ export function deleteProductPart(query) { return request({ url: "/productPart/deleteProductPart", - method: "post", + method: "delete", params: query, }); } @@ -82,3 +82,12 @@ data: query, }); } + +// 鏌ヨ闆朵欢鍙蜂慨鏀硅褰� +export function productPartLogList(query) { + return request({ + url: "/productPart/productPartLogList", + method: "get", + params: query, + }); +} diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue index 3accd8a..62d3155 100644 --- a/src/components/Table/lims-table.vue +++ b/src/components/Table/lims-table.vue @@ -12,9 +12,11 @@ <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop" - :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" - :min-width="item.dataType == 'action' ? btnWidth : getTitleWidth(item)" - :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType == 'action' ? btnWidth : getTitleWidth(item)" align="center"> + :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" + :min-width="item.dataType == 'action' ? btnWidth : getTitleWidth(item)" :sortable="item.sortable ? true : false" + :type="item.type" + :width="item.dataType == 'action' ? btnWidth : (column.length < 6 ? 'auto' : getTitleWidth(item))" + align="center"> <!-- <div class="123" v-if="item.type == ''"> --> <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> @@ -63,29 +65,26 @@ </div> <!-- 鎸夐挳 --> - <div v-else-if="item.dataType == 'action'" - :style="`width:${getWidth(item.operation, scope.row)}`"> + <div v-else-if="item.dataType == 'action'" :style="`width:${getWidth(item.operation, scope.row)}`"> <template v-for="(o, key) in item.operation"> <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true" - :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" + :disabled="o.disabled ? o.disabled(scope.row) : false" :plain="o.plain" :style="{ color: o.name === '鍒犻櫎' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)" @click="o.clickFun(scope.row)" :key="key"> {{ o.name }} </el-button> <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)" - :key="uploadKeys[scope.$index]" - ref="uploadRef" - size="mini" :multiple="o.multiple ? o.multiple : false" :limit="1" - :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept + :key="uploadKeys[scope.$index]" ref="uploadRef" size="mini" :multiple="o.multiple ? o.multiple : false" + :limit="1" :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept ? o.accept : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' " v-if="o.type == 'upload'" style="display: inline-block; width: 50px" - v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" - :before-upload="(file) => beforeUpload(file, scope.$index)" - :on-change="(file, fileList) => handleChange(file, fileList, scope.$index)" - :on-error="(error, file, fileList) => onError(error, file, fileList, scope.$index)" - :on-success="(response, file, fileList) => handleSuccessUp(response, file, fileList, scope.$index)" - :on-exceed="onExceed" :show-file-list="false"> + v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" + :before-upload="(file) => beforeUpload(file, scope.$index)" + :on-change="(file, fileList) => handleChange(file, fileList, scope.$index)" + :on-error="(error, file, fileList) => onError(error, file, fileList, scope.$index)" + :on-success="(response, file, fileList) => handleSuccessUp(response, file, fileList, scope.$index)" + :on-exceed="onExceed" :show-file-list="false"> <el-button :size="o.size ? o.size : 'small'" type="text" :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> </el-upload> @@ -302,19 +301,21 @@ count += a.name.length; } }); - this.btnWidth = count * 15 + 50 + "px"; + this.btnWidth = count * 15 + 60 + "px"; return count * 15 + 50 + "px"; }, getTitleWidth(row) { if (row.label.includes('鏃堕棿') || row.label.includes('缂栧彿') || row.label.includes('鏍峰搧鍚嶇О') || row.label.includes('闆朵欢')) { return 160 + } else if (row.label.includes('浜у搧')) { + return 210 } else if (row.label.includes('鎿嶄綔')) { return row.width } else { const span = document.createElement('span'); span.innerText = row.label; document.body.appendChild(span); - const width = `${span.offsetWidth + 50}px`; + const width = `${span.offsetWidth + 60}px`; document.body.removeChild(span); return width; @@ -374,7 +375,7 @@ // 鏇存柊褰撳墠鏂囦欢 this.currentFiles[index] = file; }, - beforeUpload (file, index) { + beforeUpload(file, index) { this.currentFiles[index] = {} if (file.size > 1024 * 1024 * 10) { this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); @@ -481,9 +482,11 @@ color: rgb(64, 158, 255); cursor: pointer; } + >>>.cell { padding: 0 !important; } + .cell { white-space: nowrap; overflow: hidden; @@ -496,6 +499,7 @@ height: 10px; /* 璁剧疆婊氬姩鏉″搴� */ } + .lims-table .highlight-warning-row-border td:first-child { border-left: 4px solid #ffcd29; } diff --git a/src/components/index/scroll-paging.vue b/src/components/index/scroll-paging.vue index ba5e511..16b4de3 100644 --- a/src/components/index/scroll-paging.vue +++ b/src/components/index/scroll-paging.vue @@ -34,7 +34,6 @@ deep:true, handler(){ this.isLoding = false - console.log(this.isLoding) } } }, @@ -55,9 +54,7 @@ onScroll(){}, scrollFn() { let content = this.$refs.content - // console.log(22222,content.scrollTop + content.clientHeight+1,content.scrollHeight) if (content.scrollTop + content.clientHeight+2 >= content.scrollHeight) { - // console.log(1111,this.finishLoding) if(!this.finishLoding){ this.loadMore() }else{ diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue index b635be5..5cdde1c 100644 --- a/src/views/business/inspectionTask/index.vue +++ b/src/views/business/inspectionTask/index.vue @@ -76,7 +76,8 @@ <el-button link type="text" size="small">鏇村</el-button> </template> <div> - <el-button :disabled="scope.row.insState != 3" style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">涓嬭浇鎶ュ憡</el-button> + <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || + (scope.row.userName && !scope.row.userName.includes(nickName)))" style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">涓嬭浇鎶ュ憡</el-button> <el-upload ref='upload' :action="javaApi + '/insReport/inReport'" :before-upload="beforeUpload" @@ -86,10 +87,13 @@ :show-file-list="false" style="display: inline;margin: 0 6px" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> - <el-button :disabled="scope.row.insState != 3" size="small" type="text">涓婁紶</el-button> + <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || + (scope.row.userName && !scope.row.userName.includes(nickName)))" size="small" type="text">涓婁紶</el-button> </el-upload> - <el-button :disabled="scope.row.insState != 3" type="text" size="small" @click="handleRestore(scope.row)">杩樺師</el-button> - <el-button :disabled="scope.row.insState != 3" type="text" size="small" @click="handleIssued(scope.row)">鏌ョ湅鎶ュ憡</el-button> + <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || + (scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small" @click="handleRestore(scope.row)">杩樺師</el-button> + <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || + (scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small" @click="handleIssued(scope.row)">鏌ョ湅鎶ュ憡</el-button> </div> </el-popover> </div> @@ -204,11 +208,28 @@ <viewManHourDia ref="viewManHourDia"></viewManHourDia> <!--涓嶅悎鏍煎娴嬫煡鐪嬪脊妗�--> <un-pass-retest-result v-if="retestVisible" :retestInfo="retestInfo" :retestVisible="retestVisible" @closeRetestLook="closeRetestLook"></un-pass-retest-result> + <!--鎶ュ憡鏌ョ湅--> + <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false" + :fullscreen="fullscreen"> + <div class="full-screen"> + <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;" + v-if="!fullscreen"></i> + <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;"> + </div> + <div style="height: 80vh;" v-if="issuedVisible"> + <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> + </div> + </el-dialog> + <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen> + <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}" + style="max-height: 90vh;overflow-y: auto;" /> + </el-dialog> </div> </template> <script> import { getYearAndMonthAndDays } from "@/utils/date"; + import EditInspectionItem from "./components/EditInspectionItem.vue"; import limsTable from "@/components/Table/lims-table.vue"; import viewManHourDia from "./components/viewManHourDia.vue" @@ -228,9 +249,12 @@ import { mapGetters } from "vuex"; import {getRetestResult} from "@/api/business/rawMaterialOrder"; import {upReportUrl} from "@/api/business/insReport"; +import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue"; +import filePreview from "@/components/Preview/filePreview.vue"; export default { name: 'InspectionTask', components: { + filePreview, onlyoffice, EditInspectionItem, limsTable, viewManHourDia, @@ -242,6 +266,10 @@ }, data() { return { + issuedVisible: false, + fullscreen: false, + lookDialogVisible: false, + option: null, InspectionKey: 1, bindDialogVisible: false, bindAddDialogVisible: false, @@ -646,6 +674,7 @@ }, // 鏌ョ湅鎶ュ憡 handleIssued(row) { + console.log('================') // todo: 鏌ョ湅鎶ュ憡缁勪欢 this.currentInfo = row; let fileName = row.url @@ -962,6 +991,7 @@ if (response.code == 200) { this.$refs.upload.clearFiles() this.$message.success("涓婁紶鎴愬姛"); + this.refreshTable() } else { this.$message.error(response.message); } diff --git a/src/views/index.vue b/src/views/index.vue index 26471bc..858773c 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -353,7 +353,6 @@ month: month, } currentUserWorkHourCount(params).then(res => { - console.log(res) this.totalHour = res.data.totalHour this.materialPieSeries[0].data[0].value = res.data.subsidiaryHour this.materialPieSeries[0].data[1].value = res.data.yieldHour diff --git a/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue b/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue index bcace15..f73d856 100644 --- a/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue +++ b/src/views/standard/standardLibrary/components/bindSupplierDensityDialogAsk.vue @@ -162,7 +162,6 @@ }; }, mounted() { - console.log(22222, this.currentRow); this.entity.productListId = this.currentRow.id; this.searchTableData(); }, diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue index 05bd11d..e36597d 100644 --- a/src/views/standard/standardLibrary/index.vue +++ b/src/views/standard/standardLibrary/index.vue @@ -17,7 +17,8 @@ height: calc(100% - 30px); overflow-y: scroll; scrollbar-width: none; - " @node-click="handleNodeClick" @node-drop="handleDrop"> + " @node-click="handleNodeClick" + @node-drop="handleDrop"> <div slot-scope="{ node, data }" class="custom-tree-node"> <el-row style="width: 100%"> <el-col :class="{ sort: node.level > 3 }" :span="19" :title="data.label" style="text-align: left"> @@ -65,8 +66,9 @@ </el-row> <el-row v-loading="tableLoad" class="standard_table"> <el-table ref="standard" :data="standardList" class="el-table" header-row-class-name="header-class" height="220" - :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border highlight-current-row - style="width: 100%; height: 220px !important" tooltip-effect="dark" @row-click="rowClick"> + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border + highlight-current-row style="width: 100%; height: 220px !important" tooltip-effect="dark" + @row-click="rowClick"> <el-table-column label="鏍囧噯缂栧彿" prop="code" show-overflow-tooltip width="200"> <template slot-scope="scope"> <span style="color: red; font-size: 14px">{{ @@ -80,10 +82,11 @@ </el-row> <el-row v-loading="tableLoad2" class="product_table"> <el-table id="templateParamTable" ref="productTable" v-loading="productTableLoading" :data="productList" - :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border :fit="true" - :row-class-name="tableRowClassName" class="productTable" header-row-class-name="header-class" height="100%" - row-key="id" stripe style="width: 100%" tooltip-effect="dark" @select="upProductSelect" - @selection-change="handleSelectionChange" @select-all="handleAll"> + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border + :fit="true" :row-class-name="tableRowClassName" class="productTable" + header-row-class-name="header-class" height="100%" row-key="id" stripe style="width: 100%" + tooltip-effect="dark" @select="upProductSelect" @selection-change="handleSelectionChange" + @select-all="handleAll"> <el-table-column type="selection" width="50"> </el-table-column> <el-table-column label="浜у搧" min-width="100" prop="sample" show-overflow-tooltip></el-table-column> <el-table-column label="鍨嬪彿" min-width="100" prop="model" show-overflow-tooltip></el-table-column> @@ -173,8 +176,8 @@ <template slot-scope="scope"> <el-button type="text" @click="sectionUp(scope.row)" :disabled="!checkPermi(['standard:standardLibrary:upStandardProduct']) ">鍖洪棿璁剧疆</el-button> - <!-- <el-button type="text" :disabled="!checkPermi(['standard:standardLibrary:upStandardProduct']) - " @click="bindSupplierDensitySecond(scope.row)">缁戝畾鍘傚</el-button> --> + <el-button type="text" :disabled="!checkPermi(['standard:standardLibrary:upStandardProduct']) + " @click="bindSupplierDensitySecond(scope.row)">缁戝畾鍘傚</el-button> </template> </el-table-column> </el-table> @@ -222,7 +225,7 @@ <el-dialog :close-on-click-modal="false" :visible.sync="sectionUpDia" title="鍖洪棿璁剧疆" width="80%"> <div class="body" style="padding: 5px 0"> <el-table :data="sectionList" border height="350px" style="width: 100%" - :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"> + :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"> <el-table-column align="center" label="搴忓彿" type="index" width="70"> </el-table-column> <el-table-column align="center" label="鍖洪棿"> @@ -495,7 +498,7 @@ } }, // 璋冪敤tree杩囨护鏂规硶 涓枃鑻辫繃婊� - filterNode(value, data, node) { + filterNode (value, data, node) { if (!value) {銆�銆�銆�銆�//濡傛灉鏁版嵁涓虹┖锛屽垯杩斿洖true,鏄剧ず鎵�鏈夌殑鏁版嵁椤� return true } @@ -504,7 +507,7 @@ return this.chooseNode(val, data, node) // 璋冪敤杩囨护浜屽眰鏂规硶 }, // 杩囨护鐖惰妭鐐� / 瀛愯妭鐐� (濡傛灉杈撳叆鐨勫弬鏁版槸鐖惰妭鐐逛笖鑳藉尮閰嶏紝鍒欒繑鍥炶鑺傜偣浠ュ強鍏朵笅鐨勬墍鏈夊瓙鑺傜偣锛涘鏋滃弬鏁版槸瀛愯妭鐐癸紝鍒欒繑鍥炶鑺傜偣鐨勭埗鑺傜偣銆俷ame鏄腑鏂囧瓧绗︼紝enName鏄嫳鏂囧瓧绗�. - chooseNode(value, data, node) { + chooseNode (value, data, node) { if (data.label.indexOf(value) !== -1) { return true } diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue index ea3b1cd..3fbef5c 100644 --- a/src/views/structural/capabilityAndLaboratory/capability/index.vue +++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue @@ -126,7 +126,7 @@ import { addProduct, delItemParameter, delProduct, delTestObject, selectItemParameterList, selectProductListByObjectId, - selectTestObjectList, upProduct, updateWorkShop + selectTestObjectList, upProduct, updateWorkShop, updateObjectWorkShop } from "@/api/structural/capability"; import limsTable from "@/components/Table/lims-table.vue"; import EditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue"; @@ -244,6 +244,7 @@ } }, }, + { label: '杞﹂棿鍚嶇О', prop: 'workShopName' }, { label: '鍒涘缓浜�', prop: 'createUserName' }, { label: '鏇存柊浜�', prop: 'updateUserName' }, { label: '鍒涘缓鏃堕棿', prop: 'createTime' }, @@ -281,6 +282,16 @@ clickFun: (row) => { this.bindPartFirst(row); }, + }, + { + name: '杞﹂棿缁戝畾', + type: 'text', + clickFun: (row) => { + this.bindWokshop1(row); + }, + disabled: (row) => { + return row.objectType != '鍘熸潗鏂�' + } }, ] } @@ -674,9 +685,17 @@ bindPartSecond(row) { this.bindPart(row, 1) }, + // 浜у搧-杞﹂棿缁戝畾 bindWokshop(row) { this.workshopForm.workShopId = row.workShopId this.currentProduct = row; + this.workshopVisible = true + }, + // 瀵硅薄-杞﹂棿缁戝畾 + bindWokshop1(row) { + this.$set(this.workshopForm, 'workShopId', row.workShopId) + this.currentProduct = {}; + this.currentObj = row; this.workshopVisible = true }, // 鍘傚瀵嗗害缁戝畾 @@ -720,20 +739,39 @@ this.$refs['workshopForm'].validate((valid) => { if (valid) { this.uploading = true - updateWorkShop({ - id: this.currentProduct.id, - workShopId: this.workshopForm.workShopId, - name: this.workshopList.find(m => m.id == this.workshopForm.workShopId).name - }).then(res => { - this.uploading = false - if (res.code === 200) { - this.$message.success('鏂板鎴愬姛') - this.getProductList(); - this.workshopVisible = false - } - }).catch(err => { - this.uploading = false - }) + if (this.currentProduct.id) { + // 浜у搧缁戝畾杞﹂棿 + updateWorkShop({ + id: this.currentProduct.id ? this.currentProduct.id : null, + workShopId: this.workshopForm.workShopId, + workShopName: this.workshopList.find(m => m.id == this.workshopForm.workShopId).name, + }).then(res => { + this.uploading = false + if (res.code === 200) { + this.$message.success('缁戝畾鎴愬姛') + this.getProductList(); + this.workshopVisible = false + } + }).catch(err => { + this.uploading = false + }) + } else { + // 瀵硅薄缁戝畾杞﹂棿 + updateObjectWorkShop({ + id: this.currentObj.id ? this.currentObj.id : null, + workShopId: this.workshopForm.workShopId, + workShopName: this.workshopList.find(m => m.id == this.workshopForm.workShopId).name, + }).then(res => { + this.uploading = false + if (res.code === 200) { + this.$message.success('缁戝畾鎴愬姛') + this.refreshTable() + this.workshopVisible = false + } + }).catch(err => { + this.uploading = false + }) + } } }) } diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue index 92e3e56..23bf010 100644 --- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue +++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue @@ -38,10 +38,10 @@ </div> <span slot="footer" class="dialog-footer"> <el-button @click="closeBindPartDialog">鍙� 娑�</el-button> - <el-button type="primary" @click="submitBind" :loading="bindLoad">纭� 璁�</el-button> + <el-button type="primary" @click="submitBind">纭� 璁�</el-button> </span> </el-dialog> - <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="600px"> + <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="900px"> <div class="body" v-if="editItem"> <lims-table :tableData="editList" :column="editColumn" height="460px" :tableLoading="tableLoading0" :key="2" :page="editPage" @pagination="editPagination"></lims-table> @@ -54,9 +54,16 @@ import limsTable from "@/components/Table/lims-table.vue"; import { addProductPart, - addTestObjectPart, deleteProductPart, deleteTestObjectPart, + addTestObjectPart, + deleteProductPart, + deleteTestObjectPart, selectByProductId, - selectByTestObjectId, updateProductPart, updateTestObjectPart, inspectionItems, productPartReview + selectByTestObjectId, + updateProductPart, + updateTestObjectPart, + inspectionItems, + productPartReview, + productPartLogList } from "@/api/structural/structureTestObjectPart"; export default { @@ -93,6 +100,7 @@ { label: '闆朵欢鍙�', prop: 'partNo' }, { label: '棰滆壊', prop: 'color' }, { label: '鑹叉爣', prop: 'colorCode' }, + { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' }, { label: '鐘舵��', prop: 'review', dataType: "tag", @@ -136,7 +144,7 @@ productPartReview({ id: row.id }).then((res) => { if (res.code == 200) { this.$message.success("澶嶆牳閫氳繃"); - this.getList()(); + this.getList(); } }); }) @@ -207,12 +215,23 @@ editItem: false, editList: [], editColumn: [ - { label: '闆朵欢鍙�', prop: 'inspectionItem' }, - { label: '棰滆壊', prop: 'inspectionItemSubclass' }, - { label: '鑹叉爣', prop: 'ask' }, - { label: '杩涘巶妫�楠岄」', prop: 'askTell' }, - { label: '淇敼鏃堕棿', prop: 'method' }, - { label: '淇敼浜�', prop: 'method' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '棰滆壊', prop: 'color' }, + { label: '鑹叉爣', prop: 'colorCode' }, + { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' }, + { + label: '鐘舵��', prop: 'review', + dataType: "tag", + formatType: (params) => { + if (params == '寰呭鏍�') { + return 'danger' + } else { + return 'success' + } + }, + }, + { label: '淇敼鏃堕棿', prop: 'operTime' }, + { label: '淇敼浜�', prop: 'operName' }, ], editPage: { total: 0, @@ -220,6 +239,7 @@ current: 0, }, tableLoading0: false, + currentPart: {},//褰撳墠闆朵欢 // mutilSelect: [] } }, @@ -240,11 +260,21 @@ }) }, // 淇敼璁板綍 - lookList() { + lookList(row) { + this.currentPart = row; this.editItem = true; this.getEditList() }, - getEditList() { }, + getEditList() { + this.tableLoading0 = true + productPartLogList({ id: this.currentPart.id, ...this.editPage }).then(res => { + this.tableLoading0 = false + if (res.code == 200) { + this.editList = res.data.records + this.editPage.total = res.data.total + } + }) + }, editPagination() { this.editPage.current = page; this.editPage.size = limit; @@ -282,6 +312,8 @@ if (type === 'edit') { this.bindPartData = this.HaveJson(row) this.bindPartData.inspectionItem = this.bindPartData.inspectionItem ? this.bindPartData.inspectionItem.split(',') : [] + } else { + this.bindPartData = {} } }, // 鎻愪氦闆朵欢缁戝畾 @@ -294,12 +326,14 @@ color: this.bindPartData.color, colorCode: this.bindPartData.colorCode, partNo: this.bindPartData.partNo, + id: this.bindPartData.id, inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : '' } : { productId: this.currentRow.id, color: this.bindPartData.color, colorCode: this.bindPartData.colorCode, partNo: this.bindPartData.partNo, + id: this.bindPartData.id, inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : '' } this.bindLoad = true @@ -319,6 +353,7 @@ }) } else { addProductPart(params).then(res => { + this.bindLoad = false if (res.code === 200) { this.resetForm('bindPartData') this.addBindPartDialog = false diff --git a/src/views/system/customer/index.vue b/src/views/system/customer/index.vue index c928522..767cdc9 100644 --- a/src/views/system/customer/index.vue +++ b/src/views/system/customer/index.vue @@ -106,7 +106,7 @@ ], page: { total:0, - size:10, + size:20, current:0 }, tableLoading: false, -- Gitblit v1.9.3