From 5a53822c8983d4559eddb9d9af3d7710fb6321ef Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期六, 06 四月 2024 13:10:00 +0800
Subject: [PATCH] 完成样品管理权限,完成仓库新增和查询,仓库变更赋予货架列表数据
---
src/components/do/b1-inspect-order-plan/Inspection.vue | 161 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 123 insertions(+), 38 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 87ce163..292874e 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -18,24 +18,21 @@
.center {
width: calc(100% - 40px);
- height: calc(100% - 60px - 80px - 40px);
+ max-height: 580px;
background-color: #fff;
border-radius: 3px;
padding: 20px;
- position: relative;
+ overflow-y: auto;
}
.center-box {
- height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
- overflow-y: auto;
}
.tables {
- /* width: 800px; */
margin-bottom: 16px;
}
@@ -127,6 +124,11 @@
<el-col :span="12" style="text-align: right;">
<el-button size="small" type="primary" @click="sampleVisible=true">鏍峰搧鍒囨崲</el-button>
<el-button size="small" type="primary" @click="taskVisible=true">浠诲姟鍒囨崲</el-button>
+ <el-button size="small" type="primary" @click="submit" v-show="state==1" :loading="submitLoading">鎻愪氦</el-button>
+ <!-- 澶嶆牳 -->
+ <el-button size="medium" type="primary" @click="upInsReview(1)" :loading="reviewLoading"
+ v-show="state>1">閫氳繃</el-button>
+ <el-button size="medium" @click="upInsReview(0)" v-show="state>1">涓嶉�氳繃</el-button>
<el-button size="small" @click="$emit('goback')">杩斿洖</el-button>
</el-col>
</el-row>
@@ -169,11 +171,11 @@
<div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`">
<template v-if="n.v.ps!=undefined && n.v.ps.value==='妫�楠屽��'">
<el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v"
- :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
+ :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')||state>1"
@change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
<el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea"
- :autosize="{ minRows: 1}" v-model="n.v.v" />
- <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v">
+ :autosize="{ minRows: 1}" v-model="n.v.v" :disabled="state>1" />
+ <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" :disabled="state>1">
<el-option label="鏄�" value="鏄�"></el-option>
<el-option label="鍚�" value="鍚�"></el-option>
</el-select>
@@ -181,7 +183,7 @@
v-else-if="getInspectionValueType(n.i) == 4">/</span>
<el-button type="primary" icon="el-icon-edit" size="mini" circle
v-if="getInspectionItemType(n.i) == 1" style="border: 0;margin-left: 2px;"
- @click="getSystemValue(n)" :disabled="n.u != userId && n.u != undefined && n.u != ''">
+ @click="getSystemValue(n)" :disabled="(n.u != userId && n.u != undefined && n.u != '')||state>1">
</el-button>
</template>
<template v-else-if="n.v.ps!=undefined && n.v.ps.value==='缁撹'">
@@ -190,7 +192,7 @@
<span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span>
</template>
<template v-else-if="n.v.ps!=undefined && n.v.ps.value==='璁惧'">
- <el-select v-model="n.v.v" placeholder="璇烽�夋嫨" @visible-change="e=>getEquipOptions(e,n.i)">
+ <el-select v-model="n.v.v" placeholder="璇烽�夋嫨" @visible-change="e=>getEquipOptions(e,n.i)" :disabled="state>1">
<el-option
v-for="item in equipOptions"
:key="item.value"
@@ -239,13 +241,25 @@
<ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList"
:componentData="componentData" :key="upIndex" />
</el-drawer>
+ <el-dialog title="妫�楠屽鏍�" :visible.sync="reviewDia" width="400px">
+ <div class="body" style="display: flex;" v-if="reviewDia">
+ <div class="search_label" style="width: 120px;"><span class="required-span">* </span>涓嶉�氳繃鍘熷洜锛�</div>
+ <div class="search_input">
+ <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 3, maxRows: 5}"></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="reviewDia = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleReviewDia" :loading="reviewLoading">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
<script>
import ValueTable from '../../tool/value-table.vue'
export default {
- props: ['sonLaboratory', 'orderId'],
+ props: ['sonLaboratory', 'orderId','state'],
components: {
ValueTable,
},
@@ -253,6 +267,7 @@
return {
sampleVisible: false,
taskVisible: false,
+ submitLoading:false,
searchForm: {
sampleName: null,
state: null
@@ -298,7 +313,10 @@
comparisonList: [],
excelMethodList: [],
equipOptions:[],
- userId: 0
+ userId: 0,
+ reviewLoading:false,
+ reviewDia:false,
+ noReason:''
}
},
created() {
@@ -315,7 +333,8 @@
id(val) {
this.loading = true
this.$axios.post(this.$api.insOrderPlan.doInsOrder, {
- id: val
+ id: val,
+ laboratory: this.sonLaboratory
}).then(res => {
this.insOrder = res.data.insOrder;
this.urgentList.forEach(m => {
@@ -430,26 +449,26 @@
this.tableList.forEach(a => {
let dels = []
let ids = []
- a.template.forEach(b => {
- if (b.v.ps != undefined && b.v.ps.value === '妫�楠屽瓙椤�') {
- let count = 0
- for (let i in this.currentSample.insProduct) {
- if (this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample
- .insProduct[i].templateId === a.templateId) {
- ids.push({
- r: b.r,
- id: this.currentSample.insProduct[i].id,
- product: this.currentSample.insProduct[i]
- })
- break
- }
- count++
- }
- if (count === this.currentSample.insProduct.length) {
- dels.push(b)
- }
- }
- })
+ a.template.forEach(b => {
+ if (b.v.ps != undefined && b.v.ps.value === '妫�楠屽瓙椤�') {
+ let count = 0
+ for (let i in this.currentSample.insProduct) {
+ if (this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample
+ .insProduct[i].templateId === a.templateId) {
+ ids.push({
+ r: b.r,
+ id: this.currentSample.insProduct[i].id,
+ product: this.currentSample.insProduct[i]
+ })
+ break
+ }
+ count++
+ }
+ if (count === this.currentSample.insProduct.length) {
+ dels.push(b)
+ }
+ }
+ })
dels.forEach(del => {
for (let b = 0; b < a.template.length; b++) {
if (a.template[b].r === del.r) {
@@ -572,11 +591,14 @@
this.param[a.id].insValue[i].u = insValue[i].u
}
}catch(e){}
- try{
- this.param[a.id].equipValue.v.v = a.insProductResult.equipValue
- }catch(e){}
- this.param[a.id].resValue.v.v = a.lastValue
- this.param[a.id].insResult.v.v = a.insResult
+ try{
+ this.param[a.id].equipValue.v.v = a.insProductResult.equipValue
+ }catch(e){}
+ try{
+ this.param[a.id].resValue.v.v = a.lastValue
+ this.param[a.id].insResult.v.v = a.insResult
+ }catch(e){
+ }
})
this.handleExcelMethod()
},
@@ -794,6 +816,69 @@
this.userId = res.data.id
})
},
+ // 澶嶆牳
+ upInsReview(e){
+ if(e==1){
+ // 閫氳繃
+ this.reviewLoading = true;
+ this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
+ orderId:this.orderId,
+ type:1,
+ laboratory:this.sonLaboratory,
+ tell:null
+ }).then(res => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛")
+ this.$emit('goback')
+ }
+ this.reviewLoading = false;
+ }).catch(error => {
+ console.error(error)
+ this.reviewLoading = false;
+ })
+ }else{
+ // 涓嶉�氳繃
+ this.reviewDia = true;
+ }
+ },
+ handleReviewDia(){
+ if(this.noReason){
+ this.reviewLoading = true;
+ this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
+ orderId:this.orderId,
+ type:0,
+ laboratory:this.sonLaboratory,
+ tell:this.noReason
+ }).then(res => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛")
+ this.$emit('goback')
+ }
+ this.reviewLoading = false;
+ }).catch(error => {
+ console.error(error)
+ this.reviewLoading = false;
+ })
+ }else{
+ this.$message.error('鏈緭鍏ヤ笉閫氳繃鍘熷洜')
+ }
+ },
+ submit(){
+ this.submitLoading = true;
+ this.$axios.post(this.$api.insOrderPlan.submitPlan, {
+ orderId:this.orderId,
+ laboratory:this.sonLaboratory,
+ }).then(res => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛")
+ this.$emit('goback')
+ }
+ this.submitLoading = false;
+ }).catch(error => {
+ console.error(error)
+ this.submitLoading = false;
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3