From 2281a3da368d9366e7d97e85719fe0f4a0492f9b Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期一, 18 三月 2024 01:05:37 +0800
Subject: [PATCH] 功能调整
---
src/components/view/b1-inspection-order.vue | 224 ++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 146 insertions(+), 78 deletions(-)
diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 5034b53..4e3f189 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -12,19 +12,19 @@
}
.search_thing {
- width: 350px;
display: flex;
align-items: center;
+ height: 50px;
}
-
+
.search_label {
- width: 110px;
+ width: 120px;
font-size: 14px;
text-align: right;
}
-
+
.search_input {
- width: calc(100% - 110px);
+ width: calc(100% - 120px);
}
.table {
@@ -75,7 +75,7 @@
<el-row class="title">
<el-col :span="12" style="padding-left: 20px;">妫�楠屼笅鍗�</el-col>
<el-col :span="12" style="text-align: right;">
- <el-button size="medium" type="primary" @click="playOrder(1)">涓嬪崟</el-button>
+ <el-button size="medium" type="primary" @click="playOrder(1)" v-if="addPower">涓嬪崟</el-button>
</el-col>
</el-row>
</div>
@@ -83,12 +83,12 @@
<div class="search_thing">
<div class="search_label">濮旀墭缂栧彿锛�</div>
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.deviceName" @keyup.enter.native="refreshTable()"></el-input></div>
+ 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_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.specificationModel" @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="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
@@ -99,11 +99,8 @@
<ul class="tab">
<li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li>
</ul>
- <!-- 璇硶 瀛愮粍浠堕�氳繃 this.$emit +浼犲叆鏂规硶鍚� 璋冪敤鐖剁粍浠舵柟娉� 渚嬪 this.$emit锛坰electAllByOne锛� 灏遍渶鍦ㄧ埗缁勪欢澹版槑骞朵紶鍏� @selectAllByOne="selectAllByOne"-->
<ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData"
- :key="upIndex" style="height: calc(100% - 44px)" @selectAllByOne="selectAllByOne"
- @handleDataLook="handleDataLook" @download="download" @handleVerify="handleVerify" @handlEquash="handlEquash"
- @handleIssued="handleIssued" />
+ :key="upIndex" style="height: calc(100% - 44px)" />
</div>
<!-- 瀹℃牳 -->
<el-dialog title="涓嬪崟瀹℃牳" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose">
@@ -146,28 +143,36 @@
</span>
</el-dialog>
<!-- 涓嬪彂 -->
- <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose">
- <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm">
- <el-form-item label="绾﹀畾鏃堕棿锛�">
- <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData.downTime"
- type="date" size="small" placeholder="閫夋嫨鏃堕棿">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="鎸囨淳浜哄憳锛�">
- <el-select v-model="formData.equipmentManager" placeholder="璇烽�夋嫨" size="small" style="width:100%">
- <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
+ <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="400px" :before-close="handleClose">
+ <div class="body" style="max-height: 60vh;">
+ <el-row>
+ <el-col class="search_thing" :span="22">
+ <div class="search_label"><span class="required-span">* </span>绾﹀畾鏃堕棿锛�</div>
+ <div class="search_input">
+ <el-date-picker size="small" v-model="distributeData.appointed" type="date" placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-dd" style="width: 100%;" format="yyyy-MM-dd">
+ </el-date-picker>
+ </div>
+ </el-col>
+ <el-col class="search_thing" :span="22">
+ <div class="search_label"><span class="required-span">* </span>鎸囨淳浜哄憳锛�</div>
+ <div class="search_input">
+ <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
+ <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
<span slot="footer" class="dialog-footer">
<el-row>
- <el-button @click="handleClose">鍙� 娑�</el-button>
- <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button>
+ <el-button @click="handleClose2">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm2" :loading="upLoad">纭� 瀹�</el-button>
</el-row>
</span>
</el-dialog>
- <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose">
+ <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose2">
<div style="height: 70vh;overflow-y: auto;">
<ValueTable ref="ValueTableDataLook" :url="$api.deviceScope.selectDeviceParameter"
:componentData="componentDataDataLook" :key="upIndex" />
@@ -175,7 +180,7 @@
</el-dialog>
</div>
<div style="width: 100%;height: 100%;" v-if="active == 1">
- <Add/>
+ <Add />
</div>
</div>
</template>
@@ -199,11 +204,20 @@
issuedDialogVisible: false,
dataDialogVisible: false,
formData: {},
+ formData0: {},
+ formData1: {},
+ distributeData: {
+ orderId: '',
+ sampleId: '',
+ appointed: '',
+ userId: ''
+ },
// 浜哄憳鍒楄〃
personList: [],
- labelPosition: 'right',
componentData: {
entity: {
+ entrustCode: null,
+ sample: null,
state: 1,
orderBy: {
field: 'id',
@@ -217,54 +231,67 @@
id: 'dataLook',
font: '鏁版嵁鏌ョ湅',
type: 'text',
- method: 'handleDataLook'
+ method: 'handleDataLook',
+ disabFun: (row, index) => {
+ return row.state != 1
+ }
}, {
id: 'download',
font: '鎶ュ憡涓嬭浇',
type: 'text',
- method: 'download'
+ method: 'download',
+ disabFun: (row, index) => {
+ return row.state != 1
+ }
}, {
id: 'verify',
font: '瀹℃牳',
type: 'text',
- method: 'handleVerify'
+ method: 'handleVerify',
+ disabFun: (row, index) => {
+ return row.state != 0
+ }
}, {
id: 'quash',
font: '鎾ら攢',
type: 'text',
method: 'handlEquash'
}, {
- id: 'issued',
font: '涓嬪彂',
type: 'text',
- method: 'handleIssued'
+ method: 'handleIssued',
+ disabFun: (row, index) => {
+ return row.state != 1 || row.sendTime != null
+ }
}],
+ linkEvent:{
+ entrustCode:{
+ method:'selectAllByOne'
+ }
+ },
tagField: {
- deviceStatus: {
+ type: {
select: [{
value: 0,
type: 'success',
- label: '姝e父'
+ label: '鏅��'
}, {
value: 1,
type: 'warning',
- label: '鎶ュ簾'
+ label: '浼樺厛'
}, {
value: 2,
type: 'danger',
- label: '淇濅慨'
+ label: '绱ф��'
}]
+ },
+ createUser: {
+ select: []
}
},
- linkEvent:{
- deviceName:{
- id: 'details',
- method:'selectAllByOne',
- }
- },
selectField: {},
- requiredAdd: ['largeCategory', 'subclass', 'deviceName', 'internalCode', 'specificationModel', 'manufacturer'],
- requiredUp: ['largeCategory', 'subclass', 'deviceName', 'internalCode', 'specificationModel', 'manufacturer']
+ requiredAdd: [],
+ requiredUp: []
},
componentDataDataLook: {
entity: {
@@ -320,14 +347,28 @@
},
],
tabIndex: 0,
- active: 1
+ active: 0
}
},
mounted() {
this.entityCopy = this.HaveJson(this.componentData.entity)
this.getPower()
+ this.getUserMenu()
+ this.getAuthorizedPerson()
},
methods: {
+ getAuthorizedPerson() {
+ this.$axios.get(this.$api.user.getUserMenu).then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ })
+ },
refreshTable() {
this.$refs['ValueTable'].selectList()
},
@@ -342,21 +383,15 @@
let del = false
let add = false
for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == 'upDeviceParameter') {
+ if (power[i].menuMethod == 'upInsOrder') {
up = true
}
- if (power[i].menuMethod == 'delDeviceParameter') {
- del = true
- }
- if (power[i].menuMethod == 'addDeviceParameter') {
+ if (power[i].menuMethod == 'addInsOrder') {
add = true
}
}
- if (!del) {
- this.componentData.do.splice(1, 1)
- }
if (!up) {
- this.componentData.do.splice(0, 1)
+ this.componentData.do.splice(4, 1)
}
this.addPower = add
},
@@ -367,8 +402,16 @@
this.dataDialogVisible = false;
this.upLoad = false;
},
+ handleClose2() {
+ this.verifyDialogVisible = false;
+ this.quashDialogVisible = false;
+ this.issuedDialogVisible = false;
+ this.dataDialogVisible = false;
+ this.upLoad = false;
+ },
// 璇︽儏
selectAllByOne(row) {
+ console.log(row);
//鎵撳紑寮规
this.dialogVisible = true;
//row = 鐐瑰嚮瀵瑰簲琛屽��
@@ -381,7 +424,6 @@
},
// 涓嬭浇鎶ュ憡
download(row) {
-
},
// 瀹℃牳
handleVerify(row) {
@@ -394,6 +436,38 @@
// 涓嬪彂
handleIssued(row) {
this.issuedDialogVisible = true;
+ this.$axios.post(this.$api.insOrder.selectOrderManDay,{
+ id: row.sampleId
+ }).then(res=>{
+ this.distributeData.orderId = row.id
+ this.distributeData.sampleId = row.sampleId
+ this.distributeData.appointed = res.data
+ })
+ },
+ submitForm2() {
+ if(this.distributeData.appointed==null||this.distributeData.appointed==''){
+ this.$message.error('绾﹀畾鏃堕棿鏈~鍐�')
+ return
+ }
+ this.upLoad = true;
+ this.$axios.post(this.$api.insOrder.upInsOrder, {
+ orderId: this.distributeData.orderId,
+ sampleId: this.distributeData.sampleId,
+ appointed: this.distributeData.appointed,
+ userId: this.distributeData.userId
+ }).then(res => {
+ if (res.code === 201) {
+ this.upLoad = false
+ return
+ }
+ this.$message.success('淇敼鎴愬姛')
+ this.upLoad = false
+ this.issuedDialogVisible = false
+ this.refreshTable()
+ }).catch(e => {
+ this.$message.error('淇敼澶辫触')
+ this.upLoad = false
+ })
},
submitForm() {
this.upLoad = true;
@@ -403,24 +477,6 @@
delete this.formData.createUser
delete this.formData.updateUser
this.formData.authorizedPerson = authorizedPerson
- this.$axios.post(this.$api.deviceScope.upDeviceParameter, this.formData, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
- if (res.code === 201) {
- this.upLoad = false
- return
- }
- this.$message.success('淇敼鎴愬姛')
- this.upLoad = false
- this.refreshTable()
- this.dialogVisible = false
- }).catch(e => {
- this.$message.error('淇敼澶辫触')
- this.dialogVisible = false
- this.upLoad = false
- })
},
// 涓嬪崟
playOrder(num) {
@@ -430,7 +486,19 @@
this.tabIndex = i;
this.componentData.entity.state = m.value
this.refreshTable()
+ },
+ getUserMenu() {
+ this.$axios.get(this.$api.user.getUserMenu).then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.componentData.tagField.createUser.select = data
+ })
}
}
}
-</script>
+</script>
\ No newline at end of file
--
Gitblit v1.9.3