update 稽查流程完善
This commit is contained in:
+1
-1
@@ -445,7 +445,7 @@ export default {
|
|||||||
// draftData:
|
// draftData:
|
||||||
})
|
})
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
console.log(res)
|
console.log(res)
|
||||||
return saveInspectPlan(res)
|
return saveInspectPlan(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
+1
-1
@@ -426,7 +426,7 @@ export default {
|
|||||||
// draftData:
|
// draftData:
|
||||||
})
|
})
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
console.log(res)
|
console.log(res)
|
||||||
return saveInspectProcess(res)
|
return saveInspectProcess(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
+3
-3
@@ -343,11 +343,11 @@ export default {
|
|||||||
// 初始化章节条款下拉
|
// 初始化章节条款下拉
|
||||||
initSectionClauseList () {
|
initSectionClauseList () {
|
||||||
// 过滤已经被选择的下拉
|
// 过滤已经被选择的下拉
|
||||||
const contentlist = this.data.enterpriseStandardInspectContentList || []
|
const contentList = this.data.enterpriseStandardInspectContentList || []
|
||||||
const planList = this.tempDataSource || []
|
const planList = this.tempDataSource || []
|
||||||
this.sectionClauseList = contentlist.filter(content => {
|
this.sectionClauseList = contentList.filter(content => {
|
||||||
// 当前没有被选择过,或者编辑时选择的就是当前数据就显示在下拉
|
// 当前没有被选择过,或者编辑时选择的就是当前数据就显示在下拉
|
||||||
return !planList.find(report => report.inspectContentId === content.id) || this.model.inspectContentId === content.id
|
return !planList.find(plan => plan.inspectContentId === content.id) || this.model.inspectContentId === content.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 章节条款改变
|
// 章节条款改变
|
||||||
|
|||||||
+2
-2
@@ -215,9 +215,9 @@ export default {
|
|||||||
// 初始化章节条款下拉
|
// 初始化章节条款下拉
|
||||||
initSectionClauseList () {
|
initSectionClauseList () {
|
||||||
// 过滤已经被选择的下拉
|
// 过滤已经被选择的下拉
|
||||||
const contentlist = this.data.enterpriseStandardInspectContentList || []
|
const contentList = this.data.enterpriseStandardInspectContentList || []
|
||||||
const reportList = this.tempDataSource || []
|
const reportList = this.tempDataSource || []
|
||||||
this.sectionClauseList = contentlist.filter(content => {
|
this.sectionClauseList = contentList.filter(content => {
|
||||||
// 当前没有被选择过,或者编辑时选择的就是当前数据就显示在下拉
|
// 当前没有被选择过,或者编辑时选择的就是当前数据就显示在下拉
|
||||||
return !reportList.find(report => report.inspectContentId === content.id) || this.model.inspectContentId === content.id
|
return !reportList.find(report => report.inspectContentId === content.id) || this.model.inspectContentId === content.id
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
@@ -389,7 +389,7 @@ export default {
|
|||||||
// draftData:
|
// draftData:
|
||||||
})
|
})
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
console.log(res)
|
console.log(res)
|
||||||
return saveInspectRectify(res)
|
return saveInspectRectify(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
+2
-2
@@ -301,7 +301,7 @@ export default {
|
|||||||
// 去除备注必填
|
// 去除备注必填
|
||||||
this.validatorRules.remarks.rules[0].required = false
|
this.validatorRules.remarks.rules[0].required = false
|
||||||
// 必须有数据才能提交
|
// 必须有数据才能提交
|
||||||
if (this.$refs.extensionRequestTable.dataSource.length === 0) {
|
if (isValidate && this.$refs.extensionRequestTable.dataSource.length === 0) {
|
||||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
throw new Error('base')
|
throw new Error('base')
|
||||||
}
|
}
|
||||||
@@ -384,7 +384,7 @@ export default {
|
|||||||
// draftData:
|
// draftData:
|
||||||
})
|
})
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
console.log(res)
|
console.log(res)
|
||||||
return saveInspectExtension(res)
|
return saveInspectExtension(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
+20
-56
@@ -28,7 +28,7 @@
|
|||||||
<!-- 稽查联络人 -->
|
<!-- 稽查联络人 -->
|
||||||
<template v-slot:inspectionContactPerson="{text, record}">
|
<template v-slot:inspectionContactPerson="{text, record}">
|
||||||
<div class="table-form" v-if="isInitiate">
|
<div class="table-form" v-if="isInitiate">
|
||||||
<a-select v-model="record.liaisons" style="width: 100%" allowClear @change="changeRowData(record, 'liaisons')"
|
<a-select v-model="record.liaisons" style="width: 100%" allowClear
|
||||||
show-search :filter-option="filterOption"
|
show-search :filter-option="filterOption"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.incExtensionRequest.inspectionContactPerson')">
|
:placeholder="$t('pleaseSelect')+$t('workCenter.incExtensionRequest.inspectionContactPerson')">
|
||||||
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname + '(' + item.username + ')' }}</a-select-option>
|
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname + '(' + item.username + ')' }}</a-select-option>
|
||||||
@@ -51,9 +51,9 @@
|
|||||||
</j-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<extension-request-table-modal ref="extensionRequestTableModal" @ok="modalFormOk"/>
|
<extension-request-table-modal ref="extensionRequestTableModal" @ok="handleAddCallback"/>
|
||||||
<!-- 申请延期 -->
|
<!-- 申请延期 -->
|
||||||
<request-extension-modal ref="requestExtensionModal" @ok="modalFormOk"/>
|
<request-extension-modal ref="requestExtensionModal" @ok="requestExtensionCallback"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -66,7 +66,6 @@ import ExtensionRequestTableModal
|
|||||||
import RequestExtensionModal from '@views/workCenter/inspectionExtensionRequestProcess/modules/RequestExtensionModal'
|
import RequestExtensionModal from '@views/workCenter/inspectionExtensionRequestProcess/modules/RequestExtensionModal'
|
||||||
import { InspectionExtensionRequestProcess } from '@/enums/commonEnums'
|
import { InspectionExtensionRequestProcess } from '@/enums/commonEnums'
|
||||||
import { editInspectExtensionTable } from '@api/workCenter'
|
import { editInspectExtensionTable } from '@api/workCenter'
|
||||||
import { getAction } from '@api/manage'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExtensionRequestTable',
|
name: 'ExtensionRequestTable',
|
||||||
components: { RequestExtensionModal, ExtensionRequestTableModal, JTable },
|
components: { RequestExtensionModal, ExtensionRequestTableModal, JTable },
|
||||||
@@ -214,28 +213,23 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
// 列表查询带上项目id
|
|
||||||
projectId: {
|
|
||||||
immediate: true,
|
|
||||||
handler (val) {
|
|
||||||
if (!val) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.filters.projectId = this.projectId
|
|
||||||
if (this.currentNode === InspectionExtensionRequestProcess.contactEvaluation.value) {
|
|
||||||
this.filters.nodeId = this.$route.query.nodeId
|
|
||||||
}
|
|
||||||
this.loadData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
mounted () {
|
||||||
if (this.isInitiate) {
|
if (this.isInitiate) {
|
||||||
this.getUserList()
|
this.getUserList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 添加回调
|
||||||
|
handleAddCallback (rows) {
|
||||||
|
this.dataSource.push(...rows)
|
||||||
|
},
|
||||||
|
// 设置表格数据
|
||||||
|
setData (list) {
|
||||||
|
this.dataSource = list.map(item => {
|
||||||
|
item.liaisons = item.liaisons || undefined
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
},
|
||||||
// 修改:稽查联络人
|
// 修改:稽查联络人
|
||||||
changeRowData (record, field) {
|
changeRowData (record, field) {
|
||||||
editInspectExtensionTable({
|
editInspectExtensionTable({
|
||||||
@@ -250,8 +244,12 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 申请延期
|
// 申请延期
|
||||||
handleRequestExtension (record) {
|
handleRequestExtension (record, index) {
|
||||||
this.$refs.requestExtensionModal.edit(record)
|
this.$refs.requestExtensionModal.edit(record, index)
|
||||||
|
},
|
||||||
|
// 申请延期回调
|
||||||
|
requestExtensionCallback (row, index) {
|
||||||
|
this.dataSource.splice(index, 1, row)
|
||||||
},
|
},
|
||||||
// 返回用户列表
|
// 返回用户列表
|
||||||
getUserList () {
|
getUserList () {
|
||||||
@@ -288,40 +286,6 @@ export default {
|
|||||||
projectId: this.projectId
|
projectId: this.projectId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadData (arg) {
|
|
||||||
if (!this.url.list) {
|
|
||||||
this.$message.warning('请设置url.list属性!')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 加载数据 若传入参数1则加载第一页的内容
|
|
||||||
if (arg === 1) {
|
|
||||||
this.ipagination.current = 1
|
|
||||||
}
|
|
||||||
const params = this.getQueryParams()// 查询条件
|
|
||||||
this.loading = true
|
|
||||||
getAction(this.url.list, params).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
||||||
const data = res.result.records || res.result
|
|
||||||
this.dataSource = data.map(item => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
liaisons: item.liaisons || undefined
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (res.result.total) {
|
|
||||||
this.ipagination.total = res.result.total
|
|
||||||
} else {
|
|
||||||
this.ipagination.total = 0
|
|
||||||
}
|
|
||||||
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
filterOption (input, option) {
|
filterOption (input, option) {
|
||||||
return (
|
return (
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
|||||||
+4
-15
@@ -57,7 +57,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import JTable from '@comp/jero/JTable'
|
import JTable from '@comp/jero/JTable'
|
||||||
import { addInspectExtensionTable } from '@api/workCenter'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExtensionRequestTableModal',
|
name: 'ExtensionRequestTableModal',
|
||||||
@@ -141,21 +140,11 @@ export default {
|
|||||||
this.$message.warn(this.$t('selectARecord'))
|
this.$message.warn(this.$t('selectARecord'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const params = Object.assign({
|
const data = this.selectionRows.map(item => {
|
||||||
ids: this.selectedRowKeys.join(',')
|
return item
|
||||||
}, this.model)
|
|
||||||
this.loading = true
|
|
||||||
addInspectExtensionTable(params).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$message.success(res.message)
|
|
||||||
this.$emit('ok')
|
|
||||||
this.close()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
this.$emit('ok', data)
|
||||||
|
this.close()
|
||||||
},
|
},
|
||||||
// 关闭
|
// 关闭
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
|
|||||||
+7
-16
@@ -38,7 +38,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { editInspectExtensionTable } from '@api/workCenter'
|
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -59,6 +58,7 @@ export default {
|
|||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 16 }
|
sm: { span: 16 }
|
||||||
},
|
},
|
||||||
|
index: -1,
|
||||||
rules: {
|
rules: {
|
||||||
requestDelayDate: [
|
requestDelayDate: [
|
||||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.incExtensionRequest.requestExtensionDate'), trigger: 'change' }
|
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.incExtensionRequest.requestExtensionDate'), trigger: 'change' }
|
||||||
@@ -73,7 +73,8 @@ export default {
|
|||||||
add () {
|
add () {
|
||||||
this.edit({})
|
this.edit({})
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record, index) {
|
||||||
|
this.index = index
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.form = Object.assign({}, record)
|
this.form = Object.assign({}, record)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@@ -82,23 +83,12 @@ export default {
|
|||||||
handleOk () {
|
handleOk () {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const params = Object.assign({}, {
|
const params = Object.assign({}, this.model, {
|
||||||
id: this.model.id,
|
|
||||||
requestDelayDate: this.form.requestDelayDate,
|
requestDelayDate: this.form.requestDelayDate,
|
||||||
delayDescription: this.form.delayDescription
|
delayDescription: this.form.delayDescription
|
||||||
})
|
})
|
||||||
this.confirmLoading = true
|
this.$emit('ok', params, this.index)
|
||||||
editInspectExtensionTable(params).then(res => {
|
this.close()
|
||||||
if (res.success) {
|
|
||||||
this.$message.success(res.message)
|
|
||||||
this.$emit('ok')
|
|
||||||
this.close()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
this.confirmLoading = false
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -110,6 +100,7 @@ export default {
|
|||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
|
this.index = -1
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ export default {
|
|||||||
// draftData:
|
// draftData:
|
||||||
})
|
})
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
console.log(res)
|
console.log(res)
|
||||||
return savePermissionApply(res)
|
return savePermissionApply(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ export default {
|
|||||||
// draftData:
|
// draftData:
|
||||||
})
|
})
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
console.log(res)
|
console.log(res)
|
||||||
return savePostMeetingManage(res)
|
return savePostMeetingManage(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ export default {
|
|||||||
this.getPageParams(false).then(res => {
|
this.getPageParams(false).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
// 1待办 2草稿
|
// 1待办 2草稿
|
||||||
res.saveSource = this.$route.query.draftId ? 2 : 1
|
res.saveSource = (this.$route.query.draftId || !this.$route.query.projectId) ? 2 : 1
|
||||||
return saveStandardPromotion(res)
|
return saveStandardPromotion(res)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user