|
|
@@ -4,11 +4,11 @@
|
|
|
<seek-page :seekList="seekList" @search="search"></seek-page>
|
|
|
|
|
|
<el-tabs v-model="tabValue" type="card" @tab-click="handleTabClick">
|
|
|
- <el-tab-pane label="全部" name="1"></el-tab-pane>
|
|
|
- <el-tab-pane label="草稿" name="5"></el-tab-pane>
|
|
|
- <el-tab-pane label="审核中" name="4"></el-tab-pane>
|
|
|
- <el-tab-pane label="退回" name="6"></el-tab-pane>
|
|
|
- <el-tab-pane label="办结" name="7"></el-tab-pane>
|
|
|
+ <el-tab-pane label="全部" name="99"></el-tab-pane>
|
|
|
+ <el-tab-pane label="草稿" name="0"></el-tab-pane>
|
|
|
+ <el-tab-pane label="审核中" name="1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="驳回" name="3"></el-tab-pane>
|
|
|
+ <el-tab-pane label="办结" name="2"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<!-- 数据表格 -->
|
|
|
<ele-pro-table
|
|
|
@@ -30,7 +30,7 @@
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary" @click="toAdd()">新增</el-button>
|
|
|
- <el-button type="danger" @click="toDel()">删除</el-button>
|
|
|
+ <el-button type="danger" @click="toDelAll()">删除</el-button>
|
|
|
<el-button type="success" @click="toEnd()">导出</el-button>
|
|
|
<el-button type="primary" @click="allPrinting()">打印</el-button>
|
|
|
</template>
|
|
|
@@ -120,21 +120,25 @@
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
- @click="routing(row)"
|
|
|
+ @click="toEdit('edit', row)"
|
|
|
>
|
|
|
编辑
|
|
|
</el-link>
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- @click="handleOrderPublish(row)"
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除吗?"
|
|
|
+ @confirm="
|
|
|
+ toDel(row)
|
|
|
+ "
|
|
|
>
|
|
|
- 删除
|
|
|
- </el-link>
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link type="danger" :underline="false"> 删除 </el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
- @click="toEnd(row)"
|
|
|
+ @click="toSubmit(row)"
|
|
|
>
|
|
|
提交
|
|
|
</el-link>
|
|
|
@@ -146,11 +150,11 @@
|
|
|
发布
|
|
|
</el-link>
|
|
|
|
|
|
- <el-link
|
|
|
+ <!-- <el-link
|
|
|
type="primary"
|
|
|
@click="toRelease(row)"
|
|
|
>撤销</el-link
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
@click="toRelease(row)"
|
|
|
@@ -191,7 +195,8 @@
|
|
|
// import checkAdd from '@/views/checklistManagement/components/checkAdd.vue';
|
|
|
// import checkDetails from '@/views/checklistManagement/components/checkDetails.vue';
|
|
|
// import { getTaskInstanceList } from '@/api/produce/job';
|
|
|
-
|
|
|
+ import { noticeDocumentPageV1API, noticeDocumentDeleteAPI } from '@/api/documents/noticeIssuance/index.js';
|
|
|
+
|
|
|
export default {
|
|
|
mixins: [tableColumnsMixin],
|
|
|
components: {
|
|
|
@@ -202,7 +207,7 @@
|
|
|
return {
|
|
|
processSubmitDialogFlag: false,
|
|
|
activeName: 'first',
|
|
|
- tabValue: '1',
|
|
|
+ tabValue: '99',
|
|
|
id: '',
|
|
|
where: {},
|
|
|
// 加载状态
|
|
|
@@ -241,28 +246,29 @@
|
|
|
return [
|
|
|
{
|
|
|
label: '标题:',
|
|
|
- value: 'keyWord',
|
|
|
+ value: 'title',
|
|
|
type: 'input',
|
|
|
placeholder: ''
|
|
|
},
|
|
|
{
|
|
|
label: '发文字号:',
|
|
|
- value: 'code',
|
|
|
+ value: 'docNumber',
|
|
|
type: 'input',
|
|
|
placeholder: '',
|
|
|
labelWidth: 100
|
|
|
},
|
|
|
{
|
|
|
label: '发文机关:',
|
|
|
- value: 'apsWorkOrderCode',
|
|
|
+ value: 'issuingAuthorityId',
|
|
|
type: 'select',
|
|
|
labelWidth: 100
|
|
|
},
|
|
|
{
|
|
|
label: '紧急程度:',
|
|
|
- value: 'productionPlanCode',
|
|
|
+ value: 'urgencyLevelId',
|
|
|
type: 'select',
|
|
|
- width: 240
|
|
|
+ width: 240,
|
|
|
+
|
|
|
},
|
|
|
];
|
|
|
},
|
|
|
@@ -277,11 +283,13 @@
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'batchNo',
|
|
|
+ columnKey: 'index',
|
|
|
label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
align: 'center',
|
|
|
- minWidth: 130,
|
|
|
- showOverflowTooltip: true
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -293,61 +301,56 @@
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- prop: 'code',
|
|
|
- slot: 'code',
|
|
|
+ prop: 'title',
|
|
|
label: '标题',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'QRcode',
|
|
|
- slot: 'QRcode',
|
|
|
+ prop: 'docNumber',
|
|
|
label: '发文字号',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'apsWorkOrderCode',
|
|
|
+ prop: 'issuingAuthority',
|
|
|
label: '发文机关',
|
|
|
- slot: 'apsWorkOrderCode',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'sourceType',
|
|
|
+ prop: 'draftAuthor',
|
|
|
label: '拟稿人',
|
|
|
- slot: 'sourceType',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'sourceCode',
|
|
|
+ prop: 'draftDate',
|
|
|
label: '拟稿日期',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'workOrderType',
|
|
|
+ prop: 'urgencyLevelId',
|
|
|
label: '紧急程度',
|
|
|
- slot: 'workOrderType',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'productionPlanCode',
|
|
|
+ prop: 'approvalStatusText',
|
|
|
label: '审批状态',
|
|
|
align: 'center',
|
|
|
minWidth: 110,
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
{
|
|
|
- prop: 'planType',
|
|
|
+ prop: 'status',
|
|
|
label: '发布状态',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
@@ -356,43 +359,6 @@
|
|
|
return obj && obj.label;
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'bomType',
|
|
|
- label: '当前环节',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- width: 120,
|
|
|
- formatter: (row) => {
|
|
|
- if (row.bomType == 1) {
|
|
|
- return '产品(PBOM)';
|
|
|
- }
|
|
|
- if (row.bomType == 2) {
|
|
|
- return '加工(MBOM)';
|
|
|
- }
|
|
|
- if (row.bomType == 3) {
|
|
|
- return '装配(ABOM)';
|
|
|
- }
|
|
|
- // if (row.bomType == 4) {
|
|
|
- // return '装配(EBOM)';
|
|
|
- // }
|
|
|
- return '';
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'bomCategoryName',
|
|
|
- label: '当前处理人',
|
|
|
- align: 'center',
|
|
|
- width: 130,
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row) => {
|
|
|
- if (row.bomCategoryName) {
|
|
|
- return `${row.bomCategoryName} (V${row.bomCategoryVersions}.0)`;
|
|
|
- }
|
|
|
- return '';
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
{
|
|
|
prop: 'action',
|
|
|
label: '操作',
|
|
|
@@ -432,16 +398,16 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- processSubmit(powerData) {
|
|
|
- if (this.selection.length == 0 || this.selection.length > 1) {
|
|
|
- this.$message.warning('请选择一条数据');
|
|
|
- return;
|
|
|
- }
|
|
|
+ toSubmit(row) {
|
|
|
+ // if (this.selection.length == 0 || this.selection.length > 1) {
|
|
|
+ // this.$message.warning('请选择一条数据');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
this.processSubmitDialogFlag = true;
|
|
|
this.$nextTick(() => {
|
|
|
- this.selection[0]['businessKey'] = 'fm_file_repeal_approve';
|
|
|
- this.$refs.processSubmitDialogRef.init(this.selection[0]);
|
|
|
+ row['businessKey'] = 'fm_file_repeal_approve';
|
|
|
+ this.$refs.processSubmitDialogRef.init(row);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
@@ -461,15 +427,40 @@
|
|
|
toAdd() {
|
|
|
this.$refs.documentDialogRef.open();
|
|
|
},
|
|
|
+ toEdit(type, row = {}) {
|
|
|
+ this.current = row;
|
|
|
+ this.$router.push({
|
|
|
+ path: '/documents/noticeIssuance/add-or-edit',
|
|
|
+ // query
|
|
|
+ query: {
|
|
|
+ id: this.current.id,
|
|
|
+ type: type
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ toDel(row) {
|
|
|
+ const loading = this.$loading({ lock: true });
|
|
|
+ noticeDocumentDeleteAPI(row.id)
|
|
|
+ .then((msg) => {
|
|
|
+ loading.close();
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.reload();
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ loading.close();
|
|
|
+ // this.$message.error(e.message);
|
|
|
+ });
|
|
|
+ },
|
|
|
handleSelectDone(list) {
|
|
|
this.current = list[0];
|
|
|
this.$router.push({
|
|
|
- path: '/documents/noticeIssuance/add-or-edit/index',
|
|
|
- // query
|
|
|
- query: {
|
|
|
- id: this.current.id
|
|
|
- }
|
|
|
- });
|
|
|
+ path: '/documents/noticeIssuance/add-or-edit',
|
|
|
+ // query
|
|
|
+ query: {
|
|
|
+ id: this.current.id,
|
|
|
+ type: 'add'
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
//派单
|
|
|
toReleaseOpen(row) {
|
|
|
@@ -607,35 +598,16 @@
|
|
|
/* 表格数据源 */
|
|
|
async datasource({ page, limit, where, order }) {
|
|
|
console.log(this.tabValue, '888');
|
|
|
- let statusList = this.tabValue == 1 ? [4, 5, 7] : [this.tabValue];
|
|
|
-
|
|
|
+
|
|
|
let params = {
|
|
|
...where,
|
|
|
...order,
|
|
|
- queryTermination: this.tabValue == '10' ? 1 : 0,
|
|
|
+ approvalStatus: this.tabValue == 99 ? '' : this.tabValue,
|
|
|
pageNum: page,
|
|
|
size: limit,
|
|
|
- ...this.sort
|
|
|
};
|
|
|
|
|
|
- // 只有 tabValue == 1 才可能需要 workCenterIds 字段,可根据业务决定是否添加
|
|
|
- if (this.tabValue == 1) {
|
|
|
- params.workCenterIds = this.$store.state.user.info.workCenterIds;
|
|
|
- }
|
|
|
-
|
|
|
- const URL = this.tabValue == 1 ? getMyPage : getPage;
|
|
|
-
|
|
|
- let res = await URL({ ...params, statusList });
|
|
|
-
|
|
|
- // this.loadTaskNames(res.list);
|
|
|
- // let res = await URL({ ...params, statusList });
|
|
|
-
|
|
|
- // await Promise.all(
|
|
|
- // res.list.map(async (row) => {
|
|
|
- // const tasks = await getTaskInstanceList(row.id);
|
|
|
- // row._taskList = tasks;
|
|
|
- // })
|
|
|
- // );
|
|
|
+ let res = await noticeDocumentPageV1API({ ...params });
|
|
|
|
|
|
return res;
|
|
|
},
|
|
|
@@ -718,56 +690,6 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // 删除
|
|
|
- toDel(row) {
|
|
|
- if (row) {
|
|
|
- this.$confirm(`是否要完结工单【${row.code}】?`, '提醒', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- batchCompletion([row.id]).then((res) => {
|
|
|
- this.$message.success('成功');
|
|
|
- this.reload();
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- } else {
|
|
|
- if (!this.selection.length) {
|
|
|
- return this.$message.warning('请至少选择一条工单!');
|
|
|
- }
|
|
|
- const ids = [];
|
|
|
- this.selection.map((item) => {
|
|
|
- ids.push(item.id);
|
|
|
- });
|
|
|
- const h = this.$createElement;
|
|
|
- this.$msgbox({
|
|
|
- title: '提醒',
|
|
|
- message: h('p', null, [
|
|
|
- h('span', null, '是否要完结 '),
|
|
|
- h(
|
|
|
- 'span',
|
|
|
- { style: 'color: #70B603' },
|
|
|
- `${this.selection.length}`
|
|
|
- ),
|
|
|
- h('span', null, ' 条工单?')
|
|
|
- ]),
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- batchCompletion(ids).then((res) => {
|
|
|
- this.$message.success('成功');
|
|
|
- this.reload();
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
// 取消完结
|
|
|
toCancel(row) {
|
|
|
cancelCompletion([row.id]).then((res) => {
|
|
|
@@ -787,10 +709,7 @@
|
|
|
/* 刷新表格 */
|
|
|
reload(where = {}) {
|
|
|
this.$nextTick(() => {
|
|
|
- where.statusList = (
|
|
|
- where.status || this.statusOpt[this.activeName][0].value
|
|
|
- ).split(',');
|
|
|
- this.$refs.table.reload({ page: 1, where });
|
|
|
+ this.$refs.table.reload({ page: 1, where, approvalStatus: this.tabValue == 99 ? '' : this.tabValue });
|
|
|
});
|
|
|
},
|
|
|
|