From 811bbc3feb318238214d022cb3a7458176f28e55 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 02 九月 2024 17:17:18 +0800 Subject: [PATCH] 新增插队、扫码枪等功能 --- src/components/do/b1-ins-order/add.vue | 43 ++++++++++++++++++++++++++++++++++--------- 1 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 1515195..0f3c868 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -384,7 +384,7 @@ <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input> </template> </el-table-column> - <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="140" align="center"> + <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="100" align="center"> <template slot-scope="scope"> <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚" :readonly="active>1"></el-input> @@ -399,7 +399,7 @@ </el-select> </template> </el-table-column> - <el-table-column prop="modelNum" label="鍨嬪彿鍙傛暟" width="130" align="center" v-if="!(active>1)"> + <el-table-column prop="modelNum" label="鍨嬪彿鍙傛暟" min-width="100" align="center" v-if="!(active>1)"> <template slot-scope="scope"> <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="闈炲繀濉�" @keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)" @@ -412,6 +412,15 @@ placeholder="妫�楠屾爣鍑�" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)" @focus="methodFocus" :readonly="active>1" style="width: 100%;" clearable @clear="productList = []"> <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> + </el-option> + </el-select> + </template> + </el-table-column> + <el-table-column prop="testRequirements" label="璇曢獙鏍囧噯" align="center" min-width="100"> + <template slot-scope="scope"> + <el-select v-model="scope.row.testRequirements" :disabled="scope.row.model==null||active>1" + placeholder="璇曢獙鏍囧噯" size="small" :readonly="active>1" style="width: 100%;" clearable> + <el-option v-for="item in standard" :key="item.id" :label="item.label" :value="item.value"> </el-option> </el-select> </template> @@ -1127,7 +1136,8 @@ temId: '', sonLaboratoryList:[], selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃 - deaprtEnum:[] + deaprtEnum:[], + standard:[] } }, watch: { @@ -1193,6 +1203,7 @@ // this.selectInsOrderTemplate() this.getAuthorizedPerson(); this.selectEnumByCategoryForUnit() + this.selectEnumByCategoryForStandard() this.selectStandardMethods() this.selectEnumByCategoryForOrderType() this.selectDepartmentEnum() @@ -1594,10 +1605,11 @@ }else if(this.addObj.orderType&&this.addObj.orderType!='C'&&!this.addObj.departmentLimsId){ this.addObj.departmentLims = '妫�娴嬩腑蹇�' this.addObj.departmentLimsId = this.deaprtEnum.find(m=>m.name=='妫�娴嬩腑蹇�').id - }else{ - this.$message.error('璇烽�夋嫨妫�楠岀被鍒�') - return } + // else{ + // this.$message.error('璇烽�夋嫨妫�楠岀被鍒�') + // return + // } if (!this.addObj.companyId) { this.$message.error('鏈�夋嫨瀹㈡埛鍗曚綅') return @@ -2137,9 +2149,15 @@ }) }, getProNum() { - this.sampleSelectionList.forEach((m, i) => { - Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) - }) + if (this.active != 1) { + this.sampleList.forEach((m, i) => { + Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) + }) + }else{ + this.sampleSelectionList.forEach((m, i) => { + Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) + }) + } this.$refs.sampleTable.doLayout() }, searchFilter() { @@ -2559,6 +2577,13 @@ this.units = res.data }) }, + selectEnumByCategoryForStandard() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "璇曢獙鏍囧噯" + }).then(res => { + this.standard = res.data + }) + }, selectEnumByCategoryForOrderType() { this.$axios.post(this.$api.enums.selectEnumByCategory, { category: "妫�楠岀被鍒�" -- Gitblit v1.9.3