Commit 219a17cf authored by 15008242619's avatar 15008242619 Committed by jingnan

产品质量记录整改说明功能新增

parent ae4b442f
<template>
<div>
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data="{ selectData,selectionRows }"
:lay-config="{ typeName: 'QualityRecord', layKey: 'QualityRecordList' }"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
title="发起整改说明申请"
:dialog-visible="dialogVisible"
>
<div style="margin-bottom: 20px;font-size: 14px;font-weight: bolder;">确认提交吗?</div>
<div style="text-align: center;">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button @click="cancle">取 消</el-button>
</div>
</dee-dialog>
<dee-dialog
title="选择负责人"
:dialog-visible="setPersonVisible"
>
<dee-form
ref="form"
label-width="100"
:form="form"
:form-data="formData"
:rules="rules"
>
<el-button type="primary" @click="setPersonConfirm">确 定</el-button>
<el-button @click="setPersonCancle">取 消</el-button>
</dee-form>
</dee-dialog>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ZGSMList',
componentName: '整改说明',
components: { },
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
dialogVisible: false,
setPersonVisible: false,
selectionRows: [],
form: {},
formData: [{
split: 1,
data: [
{
title: '设置负责人',
key: 'userIds',
component: {
clearable: true,
name: 'el-select',
placeholder: '请选择',
multiple: true,
options: []
}
}]
}],
rules: {
userIds: [
{
required: true,
message: '请填写负责人',
trigger: ['blur', 'change']
}
]
}
}
},
created() {
},
methods: {
getPersonList() {
const httpParams = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'source.name',
'operator': 'IN',
'value': ['整改说明技术负责人']
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'target',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/DxGroupMemberLink/search', httpParams).then(res => {
const arr = []
const ids = []
res.items.content.forEach(item => {
if (ids.indexOf(item.target.id) === -1) {
ids.push(item.target.id)
arr.push({
value: item.target.id,
label: item.target.name + '/' + item.target.number
})
}
})
this.formData[0].data.forEach(item => {
if (item.key === 'userIds') {
item.component.options = arr
}
/**
item.key === 'userIds' && (item.component.options = arr.map(row => {
return {
value: row.value,
label: row.label
}
}
))
*/
})
}).catch((err) => {
console.log(err)
})
},
tableToolHandler(e) {
console.log(e.key.btnValue)
if (e.key.btnValue === 'ZGSMApply') {
this.ZGSMApply()
}
},
ZGSMApply() {
this.dialogVisible = true
},
confirm() {
this.getPersonList()
this.dialogVisible = false
this.setPersonVisible = true
},
cancle() {
this.dialogVisible = false
},
setPersonConfirm() {
const ids = []
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/QualityRecord/creator/apply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}, 1500)
}).catch(err => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
this.dialogVisible = false
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择审批负责人')
}
},
setPersonCancle() {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
},
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style></style>
<template>
<div class="ZGSMApply">
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data="{ selectData,selectionRows }"
:lay-config="{ typeName: 'QualityRecord', layKey: 'batchSign_QualityRecordApply' }"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
title="发起整改说明申请"
:dialog-visible="dialogVisible"
>
<div style="margin-bottom: 20px;font-size: 14px;font-weight: bolder;">确认提交吗?</div>
<div style="text-align: center;">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button @click="cancle">取 消</el-button>
</div>
</dee-dialog>
<dee-dialog
title="选择负责人"
:dialog-visible="setPersonVisible"
>
<dee-form
ref="form"
label-width="100"
:form="form"
:form-data="formData"
:rules="rules"
>
<el-button type="primary" @click="setPersonConfirm">确 定</el-button>
<el-button @click="setPersonCancle">取 消</el-button>
</dee-form>
</dee-dialog>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ZGSMApply',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
dialogVisible: false,
setPersonVisible: false,
selectionRows: [],
form: {},
formData: [{
split: 1,
data: [
{
title: '设置负责人',
key: 'userIds',
component: {
clearable: true,
name: 'el-select',
placeholder: '请选择',
multiple: true,
options: []
}
}]
}],
rules: {
userIds: [
{
required: true,
message: '请填写负责人',
trigger: ['blur', 'change']
}
]
}
}
},
created() {
},
methods: {
getPersonList() {
const httpParams = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'source.name',
'operator': 'IN',
'value': ['整改说明技术负责人']
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'target',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/DxGroupMemberLink/search', httpParams).then(res => {
const arr = []
const ids = []
res.items.content.forEach(item => {
if (ids.indexOf(item.target.id) === -1) {
ids.push(item.target.id)
arr.push({
value: item.target.id,
label: item.target.name + '/' + item.target.number
})
}
})
this.formData[0].data.forEach(item => {
if (item.key === 'userIds') {
item.component.options = arr
}
/**
item.key === 'userIds' && (item.component.options = arr.map(row => {
return {
value: row.value,
label: row.label
}
}
))
*/
})
}).catch((err) => {
console.log(err)
})
},
tableToolHandler(e) {
console.log(e.key.btnValue)
if (e.key.btnValue === 'ZGSMApply') {
this.ZGSMApply()
}
},
ZGSMApply() {
this.dialogVisible = true
},
confirm() {
this.getPersonList()
this.dialogVisible = false
this.setPersonVisible = true
},
cancle() {
this.dialogVisible = false
},
setPersonConfirm() {
const ids = []
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/QualityRecord/creator/apply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}, 1500)
}).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
this.dialogVisible = false
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择审批负责人')
}
},
setPersonCancle() {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
},
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style lang="scss">
.ZGSMApply{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
<template>
<div class="ZGSMAudit">
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data="{ selectData,selectionRows }"
:lay-config="{ typeName: 'QualityRecord', layKey: 'batchSign_QualityRecordAudit' }"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
title="发起整改说明申请"
:dialog-visible="dialogVisible"
>
<div style="margin-bottom: 20px;font-size: 14px;font-weight: bolder;">确认提交吗?</div>
<div style="text-align: center;">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button @click="cancle">取 消</el-button>
</div>
</dee-dialog>
<dee-dialog
title="选择检验员"
:dialog-visible="setPersonVisible"
>
<dee-form
ref="form"
label-width="100"
:form="form"
:form-data="formData"
:rules="rules"
>
<el-button type="primary" @click="setPersonConfirm">确 定</el-button>
<el-button @click="setPersonCancle">取 消</el-button>
</dee-form>
</dee-dialog>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ZGSMAudit',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
dialogVisible: false,
setPersonVisible: false,
selectionRows: [],
form: {},
formData: [{
split: 1,
data: [
{
title: '设置检验员',
key: 'userIds',
component: {
clearable: true,
name: 'el-select',
placeholder: '请选择',
multiple: true,
options: []
}
}]
}],
rules: {
userIds: [
{
required: true,
message: '请填写检验员',
trigger: ['blur', 'change']
}
]
}
}
},
created() {
},
methods: {
getPersonList() {
const httpParams = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'source.name',
'operator': 'IN',
'value': ['检验技术员']
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'target',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/DxGroupMemberLink/search', httpParams).then(res => {
const arr = []
const ids = []
res.items.content.forEach(item => {
if (ids.indexOf(item.target.id) === -1) {
ids.push(item.target.id)
arr.push({
value: item.target.id,
label: item.target.name + '/' + item.target.number
})
}
})
this.formData[0].data.forEach(item => {
if (item.key === 'userIds') {
item.component.options = arr
}
/**
item.key === 'userIds' && (item.component.options = arr.map(row => {
return {
value: row.value,
label: row.label
}
}
))
*/
})
}).catch((err) => {
console.log(err)
})
},
tableToolHandler(e) {
if (e.key.btnValue === 'ZGSMAudit') {
this.ZGSMApply()
}
},
ZGSMApply() {
this.dialogVisible = true
},
confirm() {
this.getPersonList()
this.dialogVisible = false
this.setPersonVisible = true
},
cancle() {
this.dialogVisible = false
},
setPersonConfirm() {
const ids = []
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/QualityRecord/technical/apply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}, 1500)
}).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
this.dialogVisible = false
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择检验技术员')
}
},
setPersonCancle() {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
},
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style lang="scss">
.ZGSMAudit{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
<template>
<div class="ZGSMCountersign">
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data="{ selectData,selectionRows }"
:lay-config="{ typeName: 'QualityRecord', layKey: 'batchSign_QualityRecordCountersign' }"
@selectionChange="selectionChange"
/>
</div>
</template>
<script>
export default {
name: 'ZGSMCountersign',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: []
}
},
created() {
},
methods: {
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style lang="scss">
.ZGSMCountersign{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
......@@ -50,7 +50,10 @@ export default {
InStorageTkdBackCraftsmenExamin: () => import('./inStorageTkdBackCraftsmenExamin'), // 退库单退库工艺审核
InStorageTkdBackDesignerExamin: () => import('./inStorageTkdBackDesignerExamin'), // 退库单退库设计审核
ExperimentRecordExamine: () => import('./experimentRecordExamine'), // 试验记录审核
GeneralExperimentRecordExamine: () => import('./experimentRecordExamine') // 通用试验记录审核
GeneralExperimentRecordExamine: () => import('./experimentRecordExamine'), // 通用试验记录审核
ZGSMApply: () => import('./ZGSMApply'), // 整改说明申请
ZGSMAudit: () => import('./ZGSMAudit'), // 整改说明审核
ZGSMCountersign: () => import('./ZGSMCountersign') // 整改说明会签
},
props: {
selectData: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment