From cc2b615fc626334dbaa8e82d8fe875bbd01e06b4 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 02 八月 2024 16:34:43 +0800
Subject: [PATCH] 修改下单q分配权限
---
src/components/view/b1-inspection-order.vue | 101 ++++++++++++++++++++++++++++++++++++--------------
1 files changed, 73 insertions(+), 28 deletions(-)
diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index df33d51..893410f 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -135,8 +135,8 @@
border: none !important;
}
.scor{
- width: 3px;
- height: 3px;
+ width: 0.01cm;
+ height: 0.01cm;
border-radius: 1px;
border: 1px solid #000;
display: inline-block;
@@ -156,7 +156,7 @@
<template>
<div class="inspection_order">
- <div style="width: 100%;height: 100%;" v-if="active == 0">
+ <div style="width: 100%;height: 100%;" v-show="active == 0">
<div>
<el-row class="title">
<el-col :span="12" style="padding-left: 20px;text-align: left;">妫�楠屼笅鍗�</el-col>
@@ -175,9 +175,14 @@
v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing" style="width: 20%;">
+ <div class="search_label" style="width: 120px;">澶栭儴濮旀墭缂栧彿锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="componentData.entity.outEntrustCode" @keyup.enter.native="refreshTable()"></el-input></div>
+ </div>
+ <div class="search_thing" style="width: 20%;">
<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>
+ v-model="componentData.entity.sample" @keyup.enter.native="refreshTable()"></el-input></div>
</div>
<div class="search_thing" style="width: 20%;">
<div class="search_label">鏍峰搧鍨嬪彿锛�</div>
@@ -189,7 +194,7 @@
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
v-model="componentData.entity.sampleCode" @keyup.enter.native="refreshTable()"></el-input></div>
</div>
- <div class="search_thing" style="width: 20%;">
+ <div class="search_thing" style="width: 20%;" v-if="more">
<div class="search_label">涓嬪崟鏃堕棿锛�</div>
<div class="search_input">
<el-date-picker style="width:100%" v-model="componentData.entity.createTime"
@@ -231,7 +236,9 @@
<ul class="tab">
<li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li>
</ul>
- <ValueTable :style="getStyle()" ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData"
+ <ValueTable :style="getStyle()" ref="ValueTable"
+ :isColumnWidth="true"
+ :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData"
:key="'b'+upIndex" />
</div>
<!-- 瀹℃牳 -->
@@ -289,8 +296,17 @@
<el-col class="search_thing" style="width: 95%;">
<div class="search_label"><span class="required-span" v-show="distributeData.type==2">* </span>鎸囨淳浜哄憳锛�</div>
<div class="search_input">
- <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable>
+ <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable @change="changeUser">
<el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </el-col>
+ <el-col class="search_thing" style="width: 95%;" v-if="distributeData.userId">
+ <div class="search_label"><span class="required-span" >* </span>璇曢獙瀹わ細</div>
+ <div class="search_input">
+ <el-select v-model="distributeData.sonLaboratory" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable>
+ <el-option v-for="(item,i) in sonLaboratoryList" :key="i" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
@@ -372,32 +388,32 @@
</el-row>
</span>
</el-dialog>
- <div class="el-dialog__body" style="overflow-y: auto;position: absolute;margin-top: 0;position: fixed;top: 0;z-index: 99999;">
+ <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
<div id="printMOrder">
- <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 8px !important;page-break-after: always;color: #000;box-shadow: none;" >
+ <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.21cm !important;page-break-after: always;color: #000;box-shadow: none;" >
<div style="display: flex;">
<div>
<el-col :span="10" :offset="2">
<vueQr :text="JSON.stringify(item.sampleCode)" :size="78" :margin="2"></vueQr>
</el-col>
</div>
- <div style="margin-left: 12px;line-height: 9px;">
+ <div style="margin-left: 0.32cm;line-height: 0.25cm;">
<el-row>
- <el-col style="font-size: 8px;"><span>鏍峰搧缂栧彿: </span>{{ item.sampleCode }}</el-col>
+ <el-col style="font-size: 0.21cm;"><span>鏍峰搧缂栧彿: </span>{{ item.sampleCode }}</el-col>
</el-row>
- <el-row style="font-size: 8px;">
+ <el-row style="font-size: 0.21cm;">
<el-col><span>濮旀墭鍗曞彿: </span>{{ item.code }}</el-col>
</el-row>
- <el-row style="font-size: 8px;">
+ <el-row style="font-size: 0.21cm;">
<el-col><span>瑙勬牸鍨嬪彿: </span>{{ item.model }}</el-col>
</el-row>
- <el-row style="font-size: 8px;">
+ <el-row style="font-size: 0.21cm;">
<el-col ><span>鏍峰搧鍚嶇О: </span>{{ item.sampleName }}</el-col>
</el-row>
- <el-row style="font-size: 8px;width: 140px;">
+ <el-row style="font-size: 0.21cm;width: 4.77cm;">
<el-col class="ellipsis-multiline"><span>妫�娴嬮」鐩�: </span>{{ item.item }}</el-col>
</el-row>
- <el-row style="margin-top: 3px;font-size: 8px;">
+ <el-row style="margin-top: 0.01cm;font-size: 0.21cm;">
<el-col style="display: flex;align-items: center;"><span>鏍峰搧鐘舵��:
</span>
<span style="white-space: nowrap;"><span v-if="item.insState==0">鈭�</span><span class="scor" v-if="item.insState!=0"></span>寰呮
@@ -452,17 +468,19 @@
orderId: '',
sampleId: '',
appointed: '',
- userId: ''
+ userId: '',
+ sonLaboratory:''
},
// 浜哄憳鍒楄〃
personList: [],
componentData: {
entity: {
entrustCode: null,
- sampleType: null,
+ sample: null,
sampleName: null,
sampleModel: null,
sampleCode: null,
+ outEntrustCode: null,
state: 0,
name:null,
engineering:null,
@@ -513,7 +531,7 @@
type: 'text',
method: 'handleIssued',
disabFun: (row, index) => {
- return row.state != 1 || row.sendTime != null
+ return row.state != 1 || row.assign
}
}],
linkEvent: {
@@ -573,7 +591,8 @@
},
selectField: {},
requiredAdd: [],
- requiredUp: []
+ requiredUp: [],
+ needSort: ['createTime', 'sendTime', 'type', 'appointed']
},
componentDataDataLook: {
entity: {
@@ -659,7 +678,8 @@
}
],
qrData:[],
- multipleSelection:[]
+ multipleSelection:[],
+ sonLaboratoryList:[]
}
},
watch:{
@@ -749,7 +769,7 @@
}`,
onPrintDialogClose: this.erexcel=false,
targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
- font_size: '',
+ font_size: '0.21cm',
});
},
print(){
@@ -773,8 +793,8 @@
this.personList = data
})
},
- refreshTable() {
- this.$refs['ValueTable'].selectList()
+ refreshTable(e) {
+ this.$refs['ValueTable'].selectList(e)
},
refresh() {
this.componentData.entity = this.HaveJson(this.entityCopy)
@@ -877,14 +897,32 @@
this.distributeData.appointed = res.data
this.distributeData.type = row.type
})
+ this.$axios.post(this.$api.insOrderPlan.upPlanUser2, {
+ orderId:row.id,
+ }).then(res => {
+ if (res.code === 200&&res.data.length>0) {
+ this.sonLaboratoryList = [];
+ res.data.forEach(m=>{
+ this.sonLaboratoryList.push({
+ value:m,
+ label:m
+ })
+ })
+ }
+ })
},
submitForm2() {
if (this.distributeData.appointed == null || this.distributeData.appointed == '') {
this.$message.error('绾﹀畾鏃堕棿鏈~鍐�')
return
}
+ //
if(this.distributeData.type==2&&(this.distributeData.userId==null||this.distributeData.userId=='')){
this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
+ return
+ }
+ if(this.distributeData.userId&&(this.distributeData.sonLaboratory==null||this.distributeData.sonLaboratory=='')){
+ this.$message.error('璇曢獙瀹ゆ湭濉啓')
return
}
this.upLoad = true;
@@ -892,7 +930,8 @@
orderId: this.distributeData.orderId,
sampleId: this.distributeData.sampleId,
appointed: this.distributeData.appointed,
- userId: this.distributeData.userId
+ userId: this.distributeData.userId,
+ sonLaboratory:this.distributeData.sonLaboratory,
}).then(res => {
if (res.code === 201) {
this.upLoad = false
@@ -901,7 +940,7 @@
this.$message.success('淇敼鎴愬姛')
this.upLoad = false
this.issuedDialogVisible = false
- this.refreshTable()
+ this.refreshTable('page')
}).catch(e => {
this.$message.error('淇敼澶辫触')
this.upLoad = false
@@ -914,7 +953,7 @@
if (res.code===200){
this.upLoad=false
this.quashDialogVisible=false
- this.refreshTable()
+ this.refreshTable('page')
this.$message.success("鏇存柊鎴愬姛")
}
})
@@ -923,7 +962,7 @@
if (res.code===200){
this.upLoad = false
this.quashDialogVisible = false
- this.refreshTable()
+ this.refreshTable('page')
this.$message.success("鏇存柊鎴愬姛")
}
})
@@ -938,6 +977,7 @@
// 涓嬪崟
playOrder(num) {
this.active = num
+ this.refreshTable('page')
},
handleTab(m, i) {
this.tabIndex = i;
@@ -984,6 +1024,11 @@
},
getStyle(){
return 'height: calc(100% - '+(this.more?'94':'44')+'px)'
+ },
+ changeUser(){
+ if(this.sonLaboratoryList.length>0){
+ this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
+ }
}
}
}
--
Gitblit v1.9.3