From 361ad4ba15d552592ace39d7886f3fe2531f46da Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期五, 26 四月 2024 22:00:44 +0800 Subject: [PATCH] 检验项目绑定产品,检验对象绑定产品 --- src/components/view/b2-standard.vue | 106 +++++++++++++++-------------------- src/components/tool/excel.vue | 4 src/components/tool/value-table.vue | 7 ++ src/components/view/a5-capacity-scope.vue | 19 ++++-- src/components/view/b1-inspection-order.vue | 2 src/components/view/index-index.vue | 2 6 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/components/tool/excel.vue b/src/components/tool/excel.vue index fd1cfca..eeb1f26 100644 --- a/src/components/tool/excel.vue +++ b/src/components/tool/excel.vue @@ -90,8 +90,8 @@ frozenMode: false, // '鍐荤粨鏂瑰紡' currencyFormat: false, //璐у竵鏍煎紡 percentageFormat: false, //鐧惧垎姣旀牸寮� - numberDecrease: false, // '鍑忓皯灏忔暟浣嶆暟' - numberIncrease: false, // '澧炲姞灏忔暟浣嶆暟 + numberDecrease: true, // '鍑忓皯灏忔暟浣嶆暟' + numberIncrease: true, // '澧炲姞灏忔暟浣嶆暟 moreFormats: false, // '鏇村鏍煎紡' strikethrough: false, // '鍒犻櫎绾� (Alt+Shift+5)' underline: false, // '涓嬪垝绾� (Alt+Shift+6)' diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue index 593b320..c1e3dd7 100644 --- a/src/components/tool/value-table.vue +++ b/src/components/tool/value-table.vue @@ -236,6 +236,7 @@ <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`璇疯緭鍏�${a.value}`" v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input> <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null" + :multiple="data.selectField[a.label].choose" style="width: 100%;" :placeholder="`璇烽�夋嫨${a.value}`" clearable filterable> <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value" :label="b.label"></el-option> @@ -263,6 +264,7 @@ <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`璇疯緭鍏�${a.value}`" v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input> <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null" + :multiple="data.selectField[a.label].choose" style="width: 100%;" :placeholder="`璇烽�夋嫨${a.value}`" clearable> <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value" :label="b.label"></el-option> @@ -873,6 +875,11 @@ } } this.addLoad = true + for (var a in this.data.selectField) { + if (this.data.selectField[a].choose == true) { + this.upData[a] = JSON.stringify(this.upData[a]) + } + } this.upHead.forEach((item, index) => { if (this.data.cascaderField && this.data.cascaderField[item.label]) { if (this.upData[item.label]) { diff --git a/src/components/view/a5-capacity-scope.vue b/src/components/view/a5-capacity-scope.vue index 94936fc..3618d06 100644 --- a/src/components/view/a5-capacity-scope.vue +++ b/src/components/view/a5-capacity-scope.vue @@ -54,7 +54,7 @@ </el-col> <el-col :span="12" style="text-align: right;"> <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button> - <el-button size="medium" icon="el-icon-delete">鍒犻櫎</el-button> + <!-- <el-button size="medium" icon="el-icon-delete">鍒犻櫎</el-button> --> </el-col> </el-row> </div> @@ -69,6 +69,12 @@ <div class="search_label">妫�楠屽瓙椤癸細</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="itemParameterData.entity.inspectionItemSubclass" @keyup.enter.native="refreshTable()"></el-input> + </div> + </div> + <div class="search_thing"> + <div class="search_label">妫�楠屽璞★細</div> + <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="itemParameterData.entity.sample" @keyup.enter.native="refreshTable()"></el-input> </div> </div> <div class="search_thing" style="padding-left: 30px;"> @@ -129,13 +135,14 @@ entity: { inspectionItem: null, inspectionItemSubclass: null, + sample: null, orderBy: { field: 'id', order: 'asc' } }, - isIndex: false, - showSelect: true, + isIndex: true, + showSelect: false, select: true, row: 2, do: [{ @@ -217,7 +224,7 @@ props:{ value:'name', label:'name', - checkStrictly: false + checkStrictly: true } }, requiredAdd: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType', @@ -235,8 +242,8 @@ order: 'asc' } }, - isIndex: false, - showSelect: true, + isIndex: true, + showSelect: false, select: true, do: [{ id: 'update', diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 7a4c8e1..6bd546a 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -86,7 +86,7 @@ v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing"> - <div class="search_label">鏍峰搧绫诲瀷锛�</div> + <div class="search_label">鏍峰搧鍚嶇О锛�</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.sampleType" @keyup.enter.native="refreshTable()"></el-input></div> </div> diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 9b68b52..0fac06d 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -143,16 +143,16 @@ </el-row> <el-row class="standard_table" v-loading="tableLoad"> <el-table class="el-table" :data="standardList" style="width: 100%;" height="220px" tooltip-effect="dark" - highlight-current-row @row-click="rowClick" ref="standard"> - <el-table-column prop="code" label="鏍囧噯缂栧彿" show-overflow-tooltip> + highlight-current-row @row-click="rowClick" ref="standard" :key="Math.random()"> + <el-table-column prop="code" label="鏍囧噯缂栧彿" show-overflow-tooltip width="180"> <template slot-scope="scope"> <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span> </template> </el-table-column> <el-table-column prop="name" label="鏍囧噯鍚嶇О" show-overflow-tooltip></el-table-column> <el-table-column prop="remark" label="澶囨敞" show-overflow-tooltip></el-table-column> - <el-table-column prop="createUserName" label="鍒涘缓浜�"></el-table-column> - <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="250px"></el-table-column> + <!-- <el-table-column prop="createUserName" label="鍒涘缓浜�"></el-table-column> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="250px"></el-table-column> --> <!-- <el-table-column label="鎿嶄綔" width="100" align="center" v-if="delStandardMethod"> <template slot-scope="scope"> <el-button type="text" size="small" @click="delStandardMethodByFLSSM(scope.row.id)">鍒犻櫎</el-button> @@ -163,7 +163,7 @@ <el-row class="product_table" v-loading="tableLoad2"> <el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe :fit="true" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" - @select="upProductSelect"> + @select="upProductSelect" @select-all="handleAll"> <el-table-column type="selection" width="65"> </el-table-column> <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column> @@ -209,46 +209,32 @@ <el-dialog title="鍒嗙被娣诲姞" :visible.sync="addDia" width="400px"> <div class="body"> <el-row style="line-height: 50px;"> - <el-col :span="6" style="text-align: right;"> - <span class="required-span">* </span>宸ュ巶锛� - </el-col> + <el-col :span="6" style="text-align: right;">宸ュ巶锛�</el-col> <el-col :span="16" :offset="1"> - <el-select v-model="addOb.factory" size="small" style="width: 100%;" clearable> - <el-option v-for="(a, ai) in factory" :key="ai" :value="a.value" :label="a.label"></el-option> - </el-select> + <el-input size="small" readonly v-model="addOb.factory"></el-input> + </el-col> + </el-row> + <el-row style="line-height: 50px;"> + <el-col :span="6" style="text-align: right;">瀹為獙瀹わ細</el-col> + <el-col :span="16" :offset="1"> + <el-input size="small" readonly v-model="addOb.laboratory"></el-input> + </el-col> + </el-row> + <el-row style="line-height: 50px;"> + <el-col :span="6" style="text-align: right;">鏍峰搧澶х被锛�</el-col> + <el-col :span="16" :offset="1"> + <el-input size="small" readonly v-model="addOb.sampleType"></el-input> + </el-col> + </el-row> + <el-row style="line-height: 50px;"> + <el-col :span="6" style="text-align: right;">鏍峰搧鍚嶇О锛�</el-col> + <el-col :span="16" :offset="1"> + <el-input v-model="addOb.sample" readonly size="small"></el-input> </el-col> </el-row> <el-row style="line-height: 50px;"> <el-col :span="6" style="text-align: right;"> - <span class="required-span">* </span>瀹為獙瀹わ細 - </el-col> - <el-col :span="16" :offset="1"> - <el-select v-model="addOb.laboratory" size="small" style="width: 100%;" clearable> - <el-option v-for="(a, ai) in laboratory" :key="ai" :value="a.value" :label="a.label"></el-option> - </el-select> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="6" style="text-align: right;"> - <span class="required-span">* </span>鏍峰搧澶х被锛� - </el-col> - <el-col :span="16" :offset="1"> - <el-select v-model="addOb.sampleType" size="small" style="width: 100%;" clearable> - <el-option v-for="(a, ai) in sampleType" :key="ai" :value="a.value" :label="a.label"></el-option> - </el-select> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="6" style="text-align: right;"> - <span class="required-span">* </span>鏍峰搧鍚嶇О锛� - </el-col> - <el-col :span="16" :offset="1"> - <el-input v-model="addOb.sample" placeholder="璇疯緭鍏ユ牱鍝佸悕绉�" clearable size="small"></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="6" style="text-align: right;"> - 鍨嬪彿锛� + <span class="required-span">* </span>鍨嬪彿锛� </el-col> <el-col :span="16" :offset="1"> <el-input v-model="addOb.model" placeholder="璇疯緭鍏ュ瀷鍙�" clearable size="small"></el-input> @@ -517,12 +503,7 @@ this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => { this.list = res.data this.list.forEach(a => { - a.children.forEach(b => { - b.children.forEach(c => { - this.expandedKeys.push(c.label) - }) - // this.expandedKeys.push(b.label) - }) + this.expandedKeys.push(a.label) }) this.treeLoad = false }) @@ -580,20 +561,12 @@ }) }, addStandardTree() { - if (this.addOb.factory == null || this.addOb.factory == '') { - this.$message.error('宸ュ巶鏄繀濉」') - return - } - if (this.addOb.laboratory == null || this.addOb.laboratory == '') { - this.$message.error('瀹為獙瀹ゆ槸蹇呭~椤�') - return - } - if (this.addOb.sampleType == null || this.addOb.sampleType == '') { - this.$message.error('鏍峰搧澶х被鏄繀濉」') - return - } if (this.addOb.sample == null || this.addOb.sample == '') { - this.$message.error('鏍峰搧鏄繀濉」') + this.$message.error('浜у搧涓嶅瓨鍦�') + return + } + if (this.addOb.model == null || this.addOb.model == '') { + this.$message.error('璇峰~鍐欏瀷鍙�') return } this.addLoad = true @@ -827,12 +800,25 @@ this.$message.error('鏈繚瀛�') return } - this.$message.success('宸蹭繚瀛�') + // this.$message.success('宸蹭繚瀛�') }) }, filterHandler(value, row, column) { const property = column['property']; return row[property] === value; + }, + handleAll(e) { + if (e.length > 0) { + this.productList.map(m => { + this.upProductSelect(null, m) + return m + }) + } else { + this.productList.map(m => { + this.upProductSelect(null, m) + return m + }) + } } } } diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue index 9c462d6..d74400e 100644 --- a/src/components/view/index-index.vue +++ b/src/components/view/index-index.vue @@ -281,7 +281,7 @@ </div> <div class="mun"> <p style="font-size: 20px;">254</p> - <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑浠e姙</p> + <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑寰呭姙</p> </div> </div> <div class="right-1-item"> -- Gitblit v1.9.3