槽液模块修改

dev-scheduling
jinna 2 weeks ago
parent 537b85c505
commit 79eebdbfd3
  1. 26
      src/api/qualityManagement/inspectionArchiving/rbFilePreserve.js
  2. 18
      src/api/tankSolutionSystem/tankSolutionTaskAssignment.js
  3. 2
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/addPreserve.vue
  4. 155
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/index.vue
  5. 27
      src/views/qualityManagement/tankSolutionSystem/components/batchDialog.vue
  6. 52
      src/views/qualityManagement/tankSolutionSystem/components/disposeDialog.vue
  7. 104
      src/views/qualityManagement/tankSolutionSystem/tankSolutionTaskDispose.vue

@ -107,4 +107,30 @@ export const updateStatus = (data) =>{
method:'post',
data
})
}
// 发布接口
export const release = (data) =>{
return request({
url:'/api/blade-desk/QA/ProReTemplate/publish',
method:'post',
data
})
}
// 审核接口
export const audit = (data) =>{
return request({
url:'/api/blade-desk/QA/ProReTemplate/audit',
method:'post',
data
})
}
// 查询审核历史
export const auditHistory = (params) =>{
return request({
url:`/api/blade-desk/QA/ProReTemplate/auditHistory/${params.id}`,
method:'get',
})
}

@ -124,4 +124,22 @@ export const editDrugBat = (data) =>{
method:'post',
data
})
}
// 暂存
export const saveDrugBat = (data) =>{
return request({
url:'/api/blade-desk/QA/LiquidTankTask/saveDraftDrugBat',
method:'post',
data
})
}
// 删除
export const deleteTask = (params) =>{
return request({
url:'/api/blade-desk/QA/LiquidTankTask/remove',
method:'get',
params
})
}

@ -298,7 +298,7 @@ export default {
// this.closeDialog();
// this.$emit('submitSuccess', submitData);
submitData.map(item => {
item.line = item.line ? 0 : 1
item.line = item.line ? 1 : 0
})
console.log('submitData',submitData)
addRecords(submitData).then(res => {

@ -39,16 +39,19 @@
<!-- v-if="
(scope.row.rfpStatus == 1 || scope.row.rfpStatus == 4) && scope.row.approvalStatus != 0
" -->
<el-button type="text" @click="rowDel(scope.row)" v-if="scope.row.status == 1 && permission.rbFilePreserve_delete"
<el-button type="text" @click="rowDel(scope.row)" v-if="scope.row.status == 0 && permission.rbFilePreserve_delete"
>删除</el-button
>
<el-button type="text" @click="updateStatus(scope.row, 2)" v-if="scope.row.status == 1 && permission.rbFilePreserve_issue"
<el-button type="text" @click="releaseData(scope.row)" v-if="scope.row.status == 0 && permission.rbFilePreserve_issue"
>发布</el-button
>
<el-button type="text" @click="updateStatus(scope.row, 3)" v-if="scope.row.status == 2 && permission.rbFilePreserve_cancellation"
<el-button type="text" @click="auditData(scope.row)" v-if="scope.row.status == 1"
>审核</el-button
>
<el-button type="text" @click="updateStatus(scope.row, 3)" v-if="scope.row.status == 3 && permission.rbFilePreserve_cancellation"
>作废</el-button
>
<el-button type="text" @click="templatePreserve(scope.row)" v-if="scope.row.status == 1 && permission.rbFilePreserve_maintain_Erecord"
<el-button type="text" @click="templatePreserve(scope.row)" v-if="scope.row.status == 0 && permission.rbFilePreserve_maintain_Erecord"
>维护电子档案</el-button
>
<el-button type="text" @click="detailClick(scope.row)" v-if="permission.rbFilePreserve_Erecord_detail">电子档案详情</el-button>
@ -57,6 +60,14 @@
<el-tag v-if="row.line == 1">线上</el-tag>
<el-tag v-if="row.line == 0" type="success">线下</el-tag>
</template>
<template #status="{row}">
<span v-if="row.status == 0" style="cursor:pointer;">新建</span>
<span v-if="row.status == 1" style="cursor:pointer;" @click="hadleHistory(row)">待审核</span>
<span v-if="row.status == 2" style="cursor:pointer;">审核中</span>
<span v-if="row.status == 3" style="cursor:pointer;">使用中</span>
<span v-if="row.status == 4" style="cursor:pointer;">废弃</span>
<span v-if="row.status == 5" style="cursor:pointer;">审核不通过</span>
</template>
</avue-crud>
<detailRb
:detail-open="detailOpen"
@ -91,7 +102,36 @@
importUrl="/blade-desk/QA/CycleTestItem/import-excel"
@closeDialog="closeDialog"
></basic-import>
<el-dialog width="30%" v-model="approveDialog" title="审核">
<el-form :model="auditForm" :rules="auditRules" ref="auditForm">
<el-form-item label="审核结果" prop="result">
<el-radio-group v-model="auditForm.result" @change="changeResult">
<el-radio label="1">审核通过</el-radio>
<el-radio label="2">审核不通过</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" prop="remark">
<el-input type="textarea" v-model="auditForm.remark"></el-input>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="approveDialog = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
<el-dialog width="30%" v-model="checkHistory" title="审核历史">
<div style="height: 300px;">
<el-steps direction="vertical" :active="1">
<el-step v-for="(item,index) in historyData" :key="item.id" :title="`${index == historyData.length -1 ? '提交人:' : '审核人:'} `"></el-step>
<!-- <el-step title="步骤 2"></el-step>
<el-step title="步骤 3" description="这是一段很长很长很长的描述性文字"></el-step> -->
</el-steps>
</div>
</el-dialog>
</basic-container>
</template>
<script>
@ -102,6 +142,7 @@ import {
deleteRecords,
copyData,
updateStatus,
release
} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve';
import { mapGetters } from 'vuex';
import detailRb from './detailRb2.vue';
@ -129,10 +170,21 @@ export default {
currentPage: 1,
total: 0,
},
historyData:[
{id:2,name:'张三',time:'2021-01-01',result:'审核通过'},
{id:1,name:'李四',time:'2021-01-01',result:'审核通过'},
],
form: {},
query: {},
loading: true,
excelBox: false,
approveDialog:false,
auditForm:{},
auditRules:{
result:[{ required: true, message: '请选择审核结果', trigger: 'blur' }],
remark:[{ required: false, message: '请填写审核意见', trigger: 'blur' }]
},
checkHistory:false,
option: {
tip: false,
height: 'auto',
@ -244,24 +296,24 @@ export default {
filter: true,
span: 24,
},
// {
// label: '线/线',
// prop: 'line',
// span: 24,
// value:0,
// type: 'switch',
// dicData: [
// {
// label: '线',
// value: 0,
// },
// {
// label: '线',
// value: 1,
// },
{
label: '类型',
prop: 'line',
span: 24,
// value:0,
// type: 'switch',
// dicData: [
// {
// label: '线',
// value: 0,
// },
// {
// label: '线',
// value: 1,
// },
// ],
// },
// ],
},
{
label: '维护人',
prop: 'keepUserRealName',
@ -291,18 +343,42 @@ export default {
type: 'select',
dicData: [
// {
// label: '',
// value: 1,
// },
// {
// label: '使',
// value: 2,
// },
// {
// label: '',
// value: 3,
// },
{
label: '新建',
value: 0,
},
{
label: '待审核',
value: 1,
},
{
label: '使用中',
label: '审核中',
value: 2,
},
{
label: '废弃',
label: '使用中',
value: 3,
},
{
label: '废弃',
value: 4,
},
{
label: '审核不通过',
value: 5,
},
],
// type: 'select',
// dicUrl:'/api/blade-system/dict/dictionary?code=ProReTemplate-Status',
@ -346,6 +422,7 @@ export default {
detailOpen: false,
templateOpen: false,
isShowImport: false,
checkId:'',
};
},
computed: {
@ -386,6 +463,38 @@ export default {
.catch(() => {});
},
auditData(row){
this.checkId = row.id
this.auditForm = {
result: '1',
}
this.approveDialog = true
},
changeResult(val){
console.log('val-----------------',val)
if(val == 1){
this.auditRules.remark[0].required = false
}else{
this.auditRules.remark[0].required = true
}
},
submit(){
this.$refs.auditForm.validate(valid => {
if (valid) {
let params = {
...this.auditForm,
id:this.checkId
}
}
})
},
hadleHistory(row){
this.checkHistory = true
},
//
handleImport() {
this.isShowImport = true;

@ -104,6 +104,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog(false)"> </el-button>
<el-button type="primary" v-if="data[0].status == 2 || data[0].status == 12" @click="handleSave"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
@ -111,7 +112,7 @@
</template>
<script>
import {calcTank,safeEval} from "@/utils/tankclac"
import {firstBat,fillBat,editDrugBat} from "@/api/tankSolutionSystem/tankSolutionTaskAssignment"
import {firstBat,fillBat,editDrugBat,saveDrugBat} from "@/api/tankSolutionSystem/tankSolutionTaskAssignment"
export default {
props: {
showDialog: {
@ -185,8 +186,8 @@ export default {
filter: true,
span: 24,
search: false,
width: 110
width: 110,
fixed:true,
},
{
label: '作业中心',
@ -196,6 +197,7 @@ export default {
span: 24,
search: false,
width: 110,
fixed:true,
},
{
label: '作业槽',
@ -204,8 +206,8 @@ export default {
sortable: true,
filter: true,
span: 24,
width: 120
width: 120,
fixed:true,
},
{
label: '分析项目',
@ -215,8 +217,8 @@ export default {
sortable: true,
filter: true,
span: 24,
width: 110
width: 110,
fixed:true,
},
{
@ -537,8 +539,17 @@ export default {
row.needAddValue = parseFloat(safeEval(formula).toFixed(5))
row.afterAddTheoryValue = parseFloat(safeEval(theoryFormula).toFixed(5))
},
//
handleSave(){
saveDrugBat(this.data).then(res =>{
if(res.data.code == 200){
this.$message.success('暂存成功')
this.closeDialog(true)
}
})
},
submit(){
if(this.data[0].status == 2){
if(this.data[0].status == 2 || this.data[0].status == 12){
const requiredFields = [
{ key: 'firstTestValue', label: '测量值' },
{ key: 'conductivityFirstTestValue', label: '电导率测量值' },

@ -1,5 +1,5 @@
<template>
<el-dialog title="详情" append-to-body :modelValue="showDialog" width="80%" @close="closeDialog">
<el-dialog v-loading="loading" title="详情" append-to-body :modelValue="openShow" width="80%" @close="closeDialog">
<div>
<div style="font-weight: 550;">任务信息</div>
<div class="info_box">
@ -182,8 +182,8 @@
</el-form>
</div>
</div>
<div style="font-weight: 550;" v-show="detailForm.status >= 4 && detailForm.status != 10">加药量审核</div>
<div class="info_box" v-show="detailForm.status >= 4 && detailForm.status != 10">
<div style="font-weight: 550;" v-show="detailForm.status >= 4 && detailForm.status != 10 && detailForm.status != 12">加药量审核</div>
<div class="info_box" v-show="detailForm.status >= 4 && detailForm.status != 10 && detailForm.status != 12">
<div v-show="detailForm.status != 2">
<el-row class="item_item" :gutter="20">
<el-col :span="6">
@ -221,8 +221,8 @@
</el-form>
</div>
</div>
<div style="font-weight: 550;" v-show="detailForm.status >= 8 && detailForm.status != 10">领药信息</div>
<div class="info_box" v-show="detailForm.status >= 8 && detailForm.status != 10">
<div style="font-weight: 550;" v-show="detailForm.status >= 8 && detailForm.status != 10 && detailForm.status != 12">领药信息</div>
<div class="info_box" v-show="detailForm.status >= 8 && detailForm.status != 10 && detailForm.status != 12">
<div v-show="detailForm.status != 3">
<el-row class="item_item" :gutter="20">
<el-col :span="6">
@ -367,41 +367,9 @@ export default {
auditForm: {},
drugForm: {},
recheckForm: {},
userData: [
{
"jobName": "软件工程师",
"deptName": "MES开发部",
"ldapName": null,
"userSex": 1,
"deptId": 1,
"mobile": null,
"userName": "测试",
"userId": 521,
"userCode": "0001"
},
{
"jobName": null,
"deptName": "MES开发部",
"ldapName": "jinna",
"userSex": 2,
"deptId": 1,
"mobile": null,
"userName": "靳娜",
"userId": 21,
"userCode": "jinna"
},
{
"jobName": null,
"deptName": "MES开发部",
"ldapName": "zd001",
"userSex": 1,
"deptId": 1,
"mobile": null,
"userName": "张迪",
"userId": 601,
"userCode": "zd001"
}
],
userData: [],
openShow:false,
loading:false,
initialInspectionFormRules: {
isTest: [{ required: true, message: '请选择是否进行化验', trigger: 'blur' }],
meterNum: [{ required: true, message: '请输入测量值', trigger: 'blur' }],
@ -424,6 +392,7 @@ export default {
},
mounted() {
console.log('row---------------------', this.rowObj)
this.loading = true
this.getDetailForm()
},
methods: {
@ -433,9 +402,12 @@ export default {
getDetail({id:this.rowId}).then(res =>{
this.detailForm = res.data.data
console.log('deta------------',this.detailForm)
this.openShow = this.showDialog
this.loading = false
})
},
closeDialog() {
this.openShow = false
this.$emit('closeDialog');
},
//

@ -32,6 +32,8 @@
@click="batchTestFn(scope.row, 'receive')">转派</el-button>
<el-button type="text" v-show="scope.row.status == 6 && permission.tankSolutionTaskDispose_withdraw"
@click="revocationReview(scope.row, 'receive')">撤回</el-button>
<el-button type="text" v-show="(scope.row.status == 11 || scope.row.status == 10) && permission.tankSolutionTaskDispose_withdraw"
@click="deleteReview(scope.row, 'receive')">删除</el-button>
</template>
<template #normValueLimit="{row}">
@ -93,7 +95,7 @@ import dispatchTestDialog from './components/dispatchTestDialog.vue'
import checkDialog from './components/checkDialog.vue'
import getMedicineDialog from './components/getMedicineDialog.vue'
import catchInfoDialog from './components/catchInfoDialog.vue'
import {getDealList,receiveTask,revokeDrug} from '@/api/tankSolutionSystem/tankSolutionTaskAssignment'
import {getDealList,receiveTask,revokeDrug,deleteTask} from '@/api/tankSolutionSystem/tankSolutionTaskAssignment'
import { mapGetters } from 'vuex';
export default {
components: {
@ -133,7 +135,7 @@ export default {
calcHeight: 32,
// simplePage: true,
searchShow: true,
searchMenuSpan: 12,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
columnSort: true,
@ -485,14 +487,18 @@ export default {
{
label: '任务下发时间',
prop: 'createTime',
search: false,
type:'date',
search: true,
searchRange: true,
sortable: 'custom',
editDisplay: false,
filter: true,
addDisplay: false,
span: 24,
width: 160,
searchLabelWidth:110,
format:"YYYY-MM-DD",
valueFormat:"YYYY-MM-DD",
},
{
label: '任务完成时间',
@ -596,20 +602,66 @@ export default {
this.$message.error('至少选择一条数据')
return
}
let tmp = this.selectionList.find(item => item.status != 2 && item.status != 8 && item.status != 4)
console.log('tmp-------------',tmp)
if(tmp){
this.$message.error('请选择状态均为【待填报】/【待复检】/【加药量待修改】的数据')
return
//
const statusSet = new Set(this.selectionList.map(item => item.status));
//
const allowedStatuses = [2, 12, 8, 4];
// 1.
const hasInvalidStatus = Array.from(statusSet).some(status => !allowedStatuses.includes(status));
if (hasInvalidStatus) {
this.$message.error('请选择状态均为【暂存】/【待填报】/【待复检】/【加药量待修改】的数据');
return;
}
let tmp1 = this.allStatusEqual(this.selectionList)
console.log('tmp1-------------',tmp1)
// 2.
if(!tmp1){
this.$message.error('请选择状态均为【待填报】/【待复检】/【加药量待修改】的数据')
return
// A: 8
if (statusSet.has(8)) {
// 88 (2, 12, 4)
if (statusSet.size > 1 || !statusSet.has(8)) { // size>1
this.$message.error('请选择状态均为【待复检】的数据');
return;
}
}
// B: 4
else if (statusSet.has(4)) {
// 44 (2, 12, 8)
if (statusSet.size > 1) {
this.$message.error('请选择状态均为【加药量待修改】的数据');
return;
}
}
// C: 2 12
else if (statusSet.has(2) || statusSet.has(12)) {
// 212 8 4 (84if)
// (212) (84)
//
// 84(2,12)84
// 8 4 ( if-else )
if (statusSet.has(8) || statusSet.has(4)) {
this.$message.error('请选择状态为【暂存】或【待填报】的数据');
return;
}
}
// let tmp = this.selectionList.find(item => (item.status != 2 && item.status != 12) && item.status != 8 && item.status != 4)
// console.log('tmp-------------',tmp)
// if(tmp){
// this.$message.error('//')
// return
// }
// let tmp1 = this.allStatusEqual(this.selectionList)
// console.log('tmp1-------------',tmp1)
// if(!tmp1){
// this.$message.error('//')
// return
// }
this.batchList = this.selectionList
console.log('this.batchList',this.batchList)
@ -726,6 +778,22 @@ export default {
});
});
},
deleteReview(row){
this.$confirm('确认是否删除该条数据?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
deleteTask({
ids:row.id
}).then(res =>{
if(res.data.code == 200){
this.$message.success('删除成功')
this.onLoad(this.page, { ...this.search, id: this.taskId ,})
}
})
})
},
reportFn() {
this.$confirm('是否下载检验报告?', {
confirmButtonText: '确定',
@ -764,14 +832,18 @@ export default {
onLoad(page, params) {
console.log('sear-------------', this.search)
this.loading = true
getDealList({
let searchParams = {
current: page?.currentPage || this.page.currentPage,
size: page?.pageSize || this.page.pageSize,
...this.query,
status: params?.statusValue || this.search.statusValue,
workCenterId: params?.workCenterId || this.search.workCenterId,
id: params?.id || this.taskId, // id
}).then(res =>{
createTimeStart:this.query && this.query.createTime && this.query.createTime.length > 0 ? this.query.createTime[0].length == 10 ? this.query.createTime[0] + ' 00:00:00' : this.query.createTime[0] : '',
createTimeEnd:this.query && this.query.createTime && this.query.createTime.length > 0 ? this.query.createTime[1].length == 10 ? this.query.createTime[1] + ' 23:59:59' : this.query.createTime[1] : '',
}
if(searchParams.createTime) delete searchParams.createTime
getDealList(searchParams).then(res =>{
// res.data.data.records.map(item =>{
// item.liquidTank = null
// })

Loading…
Cancel
Save