From e9352432fd356691e8322af7a79781983f9932f9 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 19 三月 2024 13:07:28 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master
---
src/components/do/b1-ins-order/add.vue | 102 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 99 insertions(+), 3 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 063abfc..1758b5a 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -220,7 +220,7 @@
<el-table-column label="鎿嶄綔" width="65" align="center">
<template slot-scope="scope">
{{scope.index}}
- <el-button type="text" size="small" @click="sampleList.splice(scope.$index, 1)" :disabled="active!=1">鍒犻櫎</el-button>
+ <el-button type="text" size="small" @click="delSampleAndProduct" :disabled="active!=1">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -361,6 +361,35 @@
<el-button type="primary" @click="addTemplateDia" :loading="templateLoading">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="400px">
+ <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="issuedDialogVisible=false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm2" :loading="upLoad">纭� 瀹�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -450,7 +479,14 @@
saveLoad: false,
templateDia:false,
templateLoading:false,
- templateName:''
+ templateName:'',
+ issuedDialogVisible:false,
+ distributeData:{
+ appointed:'',
+ userId:''
+ },
+ personList:[],
+ upLoad:false,
}
},
mounted() {
@@ -458,6 +494,7 @@
this.getUserNow()
this.selectStandardTreeList()
this.selectInsOrderTemplate()
+ this.getAuthorizedPerson();
if(this.active==1){
// 涓嬪崟娴佺▼
}else {
@@ -476,6 +513,18 @@
}
},
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
+ })
+ },
selectEnumByCategoryForType() {
this.$axios.post(this.$api.enums.selectEnumByCategory, {
category: "绱ф�ョ▼搴�"
@@ -520,7 +569,20 @@
this.saveLoad = false
if(res.code==201)return
this.$message.success('宸叉彁浜�')
- this.$parent.playOrder(0)
+ // 濡傛灉绱ф�ョ▼搴︿负绱ф�ワ紝闇�瑕佺洿鎺ヤ笅鍙戜汉鍛�
+ if(this.addObj.type==2){
+ this.issuedDialogVisible = true;
+ this.$axios.post(this.$api.insOrder.selectOrderManDay,{
+ id: res.data
+ }).then(ress=>{
+ // TODO 闇�瑕佸啀纭涓�涓嬭繑鍥炲��
+ this.distributeData.orderId = res.data
+ // this.distributeData.sampleId = res.data.sampleId
+ this.distributeData.appointed = ress.data
+ })
+ }else{
+ this.$parent.playOrder(0)
+ }
})
}
},
@@ -538,6 +600,36 @@
if(res.code==201)return
this.$message.success('鎻愪氦鎴愬姛')
this.$parent.playOrder(0)
+ })
+ },
+ // 涓嬪彂
+ submitForm2(){
+ if(this.distributeData.appointed==null||this.distributeData.appointed==''){
+ this.$message.error('绾﹀畾鏃堕棿鏈~鍐�')
+ return
+ }
+ if(this.distributeData.userId==null||this.distributeData.userId==''){
+ 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.$parent.playOrder(0)
+ }).catch(e => {
+ this.$message.error('淇敼澶辫触')
+ this.upLoad = false
})
},
getUserNow() {
@@ -756,6 +848,10 @@
this.sampleList = obj.sampleList;
})
},
+ delSampleAndProduct(){
+ this.sampleList.splice(scope.$index, 1)
+ this.productList = []
+ }
}
}
</script>
--
Gitblit v1.9.3