From 9508c11a63737b4b9e80e1223792f07d3151c2e8 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期五, 11 四月 2025 14:26:01 +0800 Subject: [PATCH] 条件改成 试验条件 电缆配置修改 --- src/views/business/productOrder/components/addInspectionDia.vue | 96 ++++++++++++++++++++++-------------------------- 1 files changed, 44 insertions(+), 52 deletions(-) diff --git a/src/views/business/productOrder/components/addInspectionDia.vue b/src/views/business/productOrder/components/addInspectionDia.vue index ae76551..4119d60 100644 --- a/src/views/business/productOrder/components/addInspectionDia.vue +++ b/src/views/business/productOrder/components/addInspectionDia.vue @@ -1,14 +1,9 @@ <template> <div> - <el-dialog - :close-on-click-modal="false" - :close-on-press-escape="false" - :visible.sync="dialogVisible" - title="娣诲姞妫�楠岄」" + <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 class="el-table sampleTable" highlight-current-row - :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" - max-height="400px" tooltip-effect="dark"> + :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"> <template slot-scope="scope"> @@ -18,19 +13,18 @@ <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="100" prop="sampleCode"> <template slot-scope="scope"> <el-input v-model="scope.row.sampleCode" clearable disabled placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" - size="small"></el-input> + size="small"></el-input> </template> </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 disabled placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" - size="small"></el-input> + <el-input v-model="scope.row.model" clearable disabled placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" size="small"></el-input> </template> </el-table-column> <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodListId"> <template slot-scope="scope"> <el-input v-model="scope.row.standardMethodListId" clearable disabled placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" - size="small"></el-input> + size="small"></el-input> </template> </el-table-column> <el-table-column label="鎿嶄綔" min-width="120"> @@ -40,65 +34,63 @@ </el-table-column> </el-table> </el-dialog> - <el-dialog - :close-on-click-modal="false" - :close-on-press-escape="false" - :visible.sync="itemDialogVisible" - title="娣诲姞妫�楠岄」" - width="90%"> - <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" border class="el-table" - :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" - max-height="580px" tooltip-effect="dark" @selection-change="selectProduct"> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="itemDialogVisible" + title="娣诲姞妫�楠岄」" width="90%"> + <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" + border class="el-table" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" max-height="580px" + tooltip-effect="dark" @selection-change="selectProduct"> <el-table-column type="selection" width="65"></el-table-column> - <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" show-overflow-tooltip></el-table-column> + <el-table-column label="妫�楠岄」鍒嗙被" min-width="140" prop="inspectionItemClass" + show-overflow-tooltip></el-table-column> <el-table-column label="妫�楠岄」" min-width="140" prop="inspectionItem" show-overflow-tooltip></el-table-column> - <el-table-column label="妫�楠岄」瀛愰」" min-width="140" prop="inspectionItemSubclass" show-overflow-tooltip></el-table-column> + <el-table-column label="妫�楠岄」瀛愰」" min-width="140" prop="inspectionItemSubclass" + show-overflow-tooltip></el-table-column> <el-table-column label="瑕佹眰鍊�" min-width="220px" prop="ask"> <template slot-scope="scope"> - <el-input v-if="active==1&&scope.row.inspectionValueType!='5'" v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鍊�" - size="small" type="textarea"></el-input> + <el-input v-if="active == 1 && scope.row.inspectionValueType != '5'" v-model="scope.row.ask" + :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="瑕佹眰鍊�" size="small" + type="textarea"></el-input> <span v-else> - <template >{{ scope.row.ask }}</template> - </span> + <template>{{ scope.row.ask }}</template> + </span> </template> </el-table-column> <el-table-column label="瑕佹眰鎻忚堪" min-width="220px" prop="tell"> <template slot-scope="scope"> - <el-input v-if="active==1" v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="瑕佹眰鎻忚堪" - size="small" type="textarea"></el-input> + <el-input v-if="active == 1" v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3 }" clearable + placeholder="瑕佹眰鎻忚堪" size="small" type="textarea"></el-input> <span v-else> - <template >{{ scope.row.tell }}</template> - </span> + <template>{{ scope.row.tell }}</template> + </span> </template> </el-table-column> <el-table-column label="鏉′欢" min-width="140" prop="radius" show-overflow-tooltip> <template slot-scope="scope"> - <el-input v-if="active==1&&!scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')" v-model="scope.row.radius" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="鏉′欢" - size="small" type="textarea"> + <el-input v-if="active == 1 && !scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙')" v-model="scope.row.radius" + :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="璇曢獙鏉′欢" size="small" type="textarea"> </el-input> - <el-select v-else-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && active==1" v-model="scope.row.radius" clearable - placeholder="鏉′欢" - size="small"> - <el-option v-for="(a,i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option> + <el-select v-else-if="scope.row.inspectionItem.includes('楂樻俯鍘嬪姏璇曢獙') && active == 1" v-model="scope.row.radius" + clearable placeholder="鏉′欢" size="small"> + <el-option v-for="(a, i) in JSON.parse(scope.row.radiusList)" :key="i" :label="a" :value="a"></el-option> </el-select> - <span v-else>{{scope.row.radius}}</span> + <span v-else>{{ scope.row.radius }}</span> </template> </el-table-column> <el-table-column label="绾胯姱" min-width="120" prop="cableTag" show-overflow-tooltip> <template slot-scope="scope"> - <el-input v-if="active==1" v-model="scope.row.cableTag" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="绾胯姱" - size="small" type="textarea"></el-input> + <el-input v-if="active == 1" v-model="scope.row.cableTag" :autosize="{ minRows: 1, maxRows: 3 }" clearable + placeholder="绾胯姱" size="small" type="textarea"></el-input> </template> </el-table-column> <el-table-column label="璇曢獙鏂规硶" min-width="120" prop="methodS" show-overflow-tooltip></el-table-column> <el-table-column label="璁¢噺鍗曚綅" prop="unit" show-overflow-tooltip width="100"></el-table-column> <el-table-column label="鍗曚环" prop="price" show-overflow-tooltip width="100"></el-table-column> <el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column> - <el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory" - show-overflow-tooltip></el-table-column> + <el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" + prop="sonLaboratory" show-overflow-tooltip></el-table-column> </el-table> <span slot="footer" class="dialog-footer"> - <el-button @click="itemDialogVisible = false">鍙� 娑�</el-button> + <el-button @click="itemDialogVisible = false">鍙� 娑�</el-button> <el-button :loading="upLoad" type="primary" @click="submitList">纭� 瀹�</el-button> </span> </el-dialog> @@ -106,7 +98,7 @@ </template> <script> -import {addOmitOrderProduct, getProductTreeBySampleId, getSampleByOrderId} from "@/api/business/productOrder"; +import { addOmitOrderProduct, getProductTreeBySampleId, getSampleByOrderId } from "@/api/business/productOrder"; export default { name: "addInspectionDia", @@ -122,8 +114,8 @@ productList: [], // 妫�楠岄」琛ㄦ牸鏁版嵁 productListSelected: [], // 閫夋嫨鐨勬楠岄」琛ㄦ牸 active: 1, - methodS:null, - id:null, + methodS: null, + id: null, filters: [], upLoad: false, } @@ -135,15 +127,15 @@ methods: { getDataList(row) { this.dialogVisible = true - getSampleByOrderId({insOrderId: row.id}).then(res => { + getSampleByOrderId({ insOrderId: row.id }).then(res => { this.sampleList = res.data }) }, - openAddItemDia (row) { + openAddItemDia(row) { this.itemDialogVisible = true this.getProductLoad = true - this.id=row.id - getProductTreeBySampleId({insSampleId: row.id}).then(res => { + this.id = row.id + getProductTreeBySampleId({ insSampleId: row.id }).then(res => { this.getProductLoad = false this.productList = res.data }).catch(err => { @@ -160,14 +152,14 @@ } this.productListSelected = val }, - submitList () { + submitList() { this.$confirm('纭娣诲姞姝ゆ楠岄」?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.upLoad = true - addOmitOrderProduct({insProductBindingList:this.productListSelected,insSampleId:this.id}).then(res => { + addOmitOrderProduct({ insProductBindingList: this.productListSelected, insSampleId: this.id }).then(res => { this.upLoad = false this.$message.success('娣诲姞鎴愬姛锛�') this.itemDialogVisible = false @@ -181,7 +173,7 @@ }); }); }, - tableRowClassName({row, rowIndex}) { + tableRowClassName({ row, rowIndex }) { if (row.state === 0) { return ''; } -- Gitblit v1.9.3