Commit adf77b88 authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents 00140346 c2f63aa7
<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>
...@@ -88,6 +88,15 @@ export default { ...@@ -88,6 +88,15 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
},
mounted() {
this.$bus.$on('cancelAndRefresh', (data) => {
this.$refs.applyTable && this.$refs.applyTable.$refs.asCom.getData()
})
},
// 组件方法
methods: {
getPersonList(){
const httpParams = { const httpParams = {
'pageFrom': 1, 'pageFrom': 1,
'pageSize': 9999, 'pageSize': 9999,
...@@ -142,13 +151,6 @@ export default { ...@@ -142,13 +151,6 @@ export default {
console.log(err) console.log(err)
}) })
}, },
mounted() {
this.$bus.$on('cancelAndRefresh', (data) => {
this.$refs.applyTable && this.$refs.applyTable.$refs.asCom.getData()
})
},
// 组件方法
methods: {
tableToolHandler(e) { tableToolHandler(e) {
console.log(e.key.btnValue) console.log(e.key.btnValue)
if (e.key.btnValue === 'useApply') { if (e.key.btnValue === 'useApply') {
...@@ -167,6 +169,7 @@ export default { ...@@ -167,6 +169,7 @@ export default {
}) })
if (isUrgentUse === 0) { if (isUrgentUse === 0) {
// 紧急领用选人 // 紧急领用选人
this.getPersonList()
this.dialogVisible = false this.dialogVisible = false
this.setPersonVisible = true this.setPersonVisible = true
} else if (isUrgentUse === this.selectionRows.length) { } else if (isUrgentUse === this.selectionRows.length) {
...@@ -226,6 +229,5 @@ export default { ...@@ -226,6 +229,5 @@ export default {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding:0 4px; padding:0 4px;
} }
</style> </style>
...@@ -50,7 +50,10 @@ export default { ...@@ -50,7 +50,10 @@ export default {
InStorageTkdBackCraftsmenExamin: () => import('./inStorageTkdBackCraftsmenExamin'), // 退库单退库工艺审核 InStorageTkdBackCraftsmenExamin: () => import('./inStorageTkdBackCraftsmenExamin'), // 退库单退库工艺审核
InStorageTkdBackDesignerExamin: () => import('./inStorageTkdBackDesignerExamin'), // 退库单退库设计审核 InStorageTkdBackDesignerExamin: () => import('./inStorageTkdBackDesignerExamin'), // 退库单退库设计审核
ExperimentRecordExamine: () => import('./experimentRecordExamine'), // 试验记录审核 ExperimentRecordExamine: () => import('./experimentRecordExamine'), // 试验记录审核
GeneralExperimentRecordExamine: () => import('./experimentRecordExamine') // 通用试验记录审核 GeneralExperimentRecordExamine: () => import('./experimentRecordExamine'), // 通用试验记录审核
ZGSMApply: () => import('./ZGSMApply'), // 整改说明申请
ZGSMAudit: () => import('./ZGSMAudit'), // 整改说明审核
ZGSMCountersign: () => import('./ZGSMCountersign') // 整改说明会签
}, },
props: { props: {
selectData: { 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