From 47431e32e426d14736415ac0cc9cdcd88f7c07e5 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 22 四月 2024 18:02:20 +0800 Subject: [PATCH] 优化检验任务计算 --- src/components/view/b2-standard.vue | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 6271490..080f0f7 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -110,7 +110,7 @@ :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" v-loading="treeLoad" :expand-on-click-node="false" :default-expanded-keys="expandedKeys" - style="max-height: 500px;overflow-y: scroll;scrollbar-width: none;"> + style="height:calc(100% - 30px);overflow-y: scroll;scrollbar-width: none;"> <div class="custom-tree-node" slot-scope="{ node, data }"> <el-row style="width: 100%;"> <el-col :span="21" :class="{sort:node.level>3}"> @@ -130,15 +130,15 @@ <div class="right"> <el-row class="title"> <el-col :span="24" style="font-size: 14px;color: #999;">{{selectTree}}</el-col> - <!-- <el-col :span="selectTree==''?24:14" style="text-align: right;" v-if="selectTree!=''"> - <el-button size="small" type="primary" @click="addStandardDia = true" + <!-- <el-col :span="selectTree==''?24:14" style="text-align: right;" v-if="selectTree!=''"> --> + <!-- <el-button size="small" type="primary" @click="addStandardDia = true" v-if="addStandardMethod">鏂板鏍囧噯</el-button> <el-button size="small" type="primary" @click="addProductDia = true" v-if="addStandardProduct">鏂板椤圭洰</el-button> <el-button size="small" @click="delStandardProductByIds" v-if="delStandardProduct"> <i class="el-icon-delete" style="color: #3A7BFA;"></i> <span style="color: #3A7BFA;">鍒犻櫎</span> - </el-button> - </el-col> --> + </el-button> --> + <!-- </el-col> --> </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" @@ -186,7 +186,15 @@ <span v-else>{{scope.row.ask}}</span> </template> </el-table-column> - <el-table-column prop="method" label="璇曢獙鏂规硶" width="100" show-overflow-tooltip></el-table-column> + <el-table-column prop="method" label="璇曢獙鏂规硶" width="200"> + <template slot-scope="scope"> + <el-select v-model="scope.row.methodS" size="small" placeholder="璇曢獙鏂规硶" + @change="(value)=>upStandardProductListOfMethodS(value,scope.row.id)" v-if="upStandardProduct"> + <el-option v-for="(a,i) in JSON.parse(scope.row.method)" :key="i" :label="a" :value="a"></el-option> + </el-select> + <span v-else>{{scope.row.methodS}}</span> + </template> + </el-table-column> <el-table-column prop="unit" label="璁¢噺鍗曚綅" width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="price" label="鍗曚环(鍏�)" width="90" show-overflow-tooltip></el-table-column> <el-table-column prop="manHour" label="宸ユ椂(H)" width="90" show-overflow-tooltip></el-table-column> @@ -677,6 +685,22 @@ this.$message.success('宸蹭繚瀛�') }) }, + upStandardProductListOfMethodS(value, index) { + this.$axios.post(this.$api.standardTree.upStandardProductList, { + id: index, + methodS: value + }, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code == 201) { + this.$message.error('鏈繚瀛�') + return + } + this.$message.success('宸蹭繚瀛�') + }) + }, delStandardMethodByFLSSM(id) { this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", -- Gitblit v1.9.3