|
@@ -1,92 +1,43 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="page">
|
|
<div class="page">
|
|
|
- <el-form
|
|
|
|
|
- v-if="searchVisible"
|
|
|
|
|
- ref="searchForm"
|
|
|
|
|
- :model="searchForm"
|
|
|
|
|
- :inline="true"
|
|
|
|
|
- class="query-form m-b-10"
|
|
|
|
|
- @keyup.enter.native="refreshList"
|
|
|
|
|
- @submit.native.prevent
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-form v-if="searchVisible" ref="searchForm" :model="searchForm" :inline="true" class="query-form m-b-10"
|
|
|
|
|
+ @keyup.enter.native="refreshList" @submit.native.prevent>
|
|
|
<el-form-item label="采购编号" prop="purchaseNo">
|
|
<el-form-item label="采购编号" prop="purchaseNo">
|
|
|
- <el-input
|
|
|
|
|
- v-model="searchForm.purchaseNo"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="请输入采购编号"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-input v-model="searchForm.purchaseNo" clearable placeholder="请输入采购编号" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="采购人" prop="handledBy">
|
|
<el-form-item label="采购人" prop="handledBy">
|
|
|
- <UserSelect
|
|
|
|
|
- :limit="1"
|
|
|
|
|
- :modelValue="searchForm.handledBy"
|
|
|
|
|
- @update:modelValue="
|
|
|
|
|
- (value) => (searchForm.handledBy = value)
|
|
|
|
|
- "
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <UserSelect :limit="1" :modelValue="searchForm.handledBy"
|
|
|
|
|
+ @update:modelValue="(value) => (searchForm.handledBy = value)" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="采购时间" prop="purchaseTimes">
|
|
<el-form-item label="采购时间" prop="purchaseTimes">
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="searchForm.purchaseTimes"
|
|
|
|
|
- type="datetimerange"
|
|
|
|
|
- format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="开始时间"
|
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
|
- placement="bottom-start"
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- v-if="showHideItem"
|
|
|
|
|
- label="采购部门"
|
|
|
|
|
- prop="handledByOffice"
|
|
|
|
|
- >
|
|
|
|
|
- <SelectTree
|
|
|
|
|
- ref="officeTree"
|
|
|
|
|
- :props="{
|
|
|
|
|
- value: 'id',
|
|
|
|
|
- label: 'name',
|
|
|
|
|
- children: 'children',
|
|
|
|
|
- }"
|
|
|
|
|
- :url="`/system-server/sys/office/treeData?type=2`"
|
|
|
|
|
- :value="searchForm.handledByOffice"
|
|
|
|
|
- size="default"
|
|
|
|
|
- :accordion="true"
|
|
|
|
|
- @getValue="(value) => (searchForm.handledByOffice = value)"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-date-picker v-model="searchForm.purchaseTimes" type="datetimerange" format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss" range-separator="至" start-placeholder="开始时间"
|
|
|
|
|
+ end-placeholder="结束时间" placement="bottom-start" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <!-- <el-form-item v-if="showHideItem" label="采购部门" prop="handledByOffice">
|
|
|
|
|
+ <SelectTree ref="officeTree" :props="{
|
|
|
|
|
+ value: 'id',
|
|
|
|
|
+ label: 'name',
|
|
|
|
|
+ children: 'children',
|
|
|
|
|
+ }" :url="`/system-server/sys/office/treeData?type=2`" :value="searchForm.handledByOffice" size="default"
|
|
|
|
|
+ :accordion="true" @getValue="(value) => (searchForm.handledByOffice = value)" />
|
|
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item v-if="showHideItem" label="修改状态" prop="status">
|
|
<el-form-item v-if="showHideItem" label="修改状态" prop="status">
|
|
|
- <el-select
|
|
|
|
|
- v-model="searchForm.status"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="请选择状态"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in $dictUtils.getDictList('cw_status')"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-select v-model="searchForm.status" clearable placeholder="请选择状态" style="width: 100%">
|
|
|
|
|
+ <el-option v-for="item in $dictUtils.getDictList('cw_status')" :key="item.value" :label="item.label"
|
|
|
|
|
+ :value="item.value" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <el-button
|
|
|
|
|
- type="default"
|
|
|
|
|
- :icon="showHideIcon"
|
|
|
|
|
- @click="showHide"
|
|
|
|
|
- >{{ showHideName }}</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-search"
|
|
|
|
|
- @click="refreshList"
|
|
|
|
|
- >查询</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button icon="el-icon-refresh-right" @click="resetSearch"
|
|
|
|
|
- >重置</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button type="default" :icon="showHideIcon" @click="showHide">
|
|
|
|
|
+ {{ showHideName }}
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="refreshList">
|
|
|
|
|
+ 查询
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button icon="el-icon-refresh-right" @click="resetSearch">
|
|
|
|
|
+ 重置
|
|
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
@@ -95,108 +46,68 @@
|
|
|
<div class="statistics-label">当前筛选范围采购金额</div>
|
|
<div class="statistics-label">当前筛选范围采购金额</div>
|
|
|
<div class="statistics-value">{{ statisticTotalPrice }}</div>
|
|
<div class="statistics-value">{{ statisticTotalPrice }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-button type="primary" plain @click="refreshStatistics"
|
|
|
|
|
- >刷新统计</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button type="primary" plain @click="refreshStatistics">
|
|
|
|
|
+ 刷新统计
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="jp-table top">
|
|
<div class="jp-table top">
|
|
|
<vxe-toolbar :refresh="{ query: refreshList }" custom>
|
|
<vxe-toolbar :refresh="{ query: refreshList }" custom>
|
|
|
<template #buttons>
|
|
<template #buttons>
|
|
|
- <el-button
|
|
|
|
|
- v-if="hasPermission('psi:foodPurchase:add')"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- @click="start"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button v-if="hasPermission('psi:foodPurchase:add')" type="primary" icon="el-icon-plus"
|
|
|
|
|
+ @click="start">
|
|
|
新增
|
|
新增
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button v-if="hasPermission('psi:foodPurchase:export')" type="warning" icon="el-icon-download"
|
|
|
|
|
+ plain @click="exportFile">
|
|
|
|
|
+ 导出
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template #tools>
|
|
<template #tools>
|
|
|
- <vxe-button
|
|
|
|
|
- text
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="vxe-icon-search"
|
|
|
|
|
- class="tool-btn"
|
|
|
|
|
- :title="searchVisible ? '收起搜索' : '展开搜索'"
|
|
|
|
|
- @click="searchVisible = !searchVisible"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <vxe-button text type="primary" icon="vxe-icon-search" class="tool-btn"
|
|
|
|
|
+ :title="searchVisible ? '收起搜索' : '展开搜索'" @click="searchVisible = !searchVisible" />
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-toolbar>
|
|
</vxe-toolbar>
|
|
|
|
|
|
|
|
<div style="height: calc(100% - 90px)">
|
|
<div style="height: calc(100% - 90px)">
|
|
|
- <vxe-table
|
|
|
|
|
- ref="clientTable"
|
|
|
|
|
- :key="tableKey"
|
|
|
|
|
- border="inner"
|
|
|
|
|
- auto-resize
|
|
|
|
|
- resizable
|
|
|
|
|
- height="auto"
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- show-header-overflow
|
|
|
|
|
- show-overflow
|
|
|
|
|
- highlight-hover-row
|
|
|
|
|
- :menu-config="{}"
|
|
|
|
|
- :sort-config="{ remote: true }"
|
|
|
|
|
- :data="dataList"
|
|
|
|
|
- :checkbox-config="{}"
|
|
|
|
|
- @sort-change="sortChangeHandle"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <vxe-table ref="clientTable" :key="tableKey" border="inner" auto-resize resizable height="auto"
|
|
|
|
|
+ :loading="loading" show-header-overflow show-overflow highlight-hover-row :menu-config="{}"
|
|
|
|
|
+ :sort-config="{ remote: true }" :data="dataList" :checkbox-config="{}"
|
|
|
|
|
+ @sort-change="sortChangeHandle">
|
|
|
<vxe-column type="seq" width="60" title="序号" />
|
|
<vxe-column type="seq" width="60" title="序号" />
|
|
|
- <vxe-column
|
|
|
|
|
- min-width="180"
|
|
|
|
|
- align="center"
|
|
|
|
|
- title="采购编号"
|
|
|
|
|
- field="purchaseNo"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <vxe-column min-width="180" align="center" title="采购编号" field="purchaseNo">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-link
|
|
|
|
|
- v-if="hasPermission('psi:foodPurchase:list')"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="view(scope.row.id)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-link v-if="hasPermission('psi:foodPurchase:list')" type="primary" :underline="false"
|
|
|
|
|
+ @click="view(scope.row.id)">
|
|
|
{{ scope.row.purchaseNo }}
|
|
{{ scope.row.purchaseNo }}
|
|
|
</el-link>
|
|
</el-link>
|
|
|
<span v-else>{{ scope.row.purchaseNo }}</span>
|
|
<span v-else>{{ scope.row.purchaseNo }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
- <vxe-column
|
|
|
|
|
- min-width="180"
|
|
|
|
|
- align="center"
|
|
|
|
|
- title="采购时间"
|
|
|
|
|
- field="purchaseTime"
|
|
|
|
|
- />
|
|
|
|
|
- <vxe-column
|
|
|
|
|
- min-width="160"
|
|
|
|
|
- align="center"
|
|
|
|
|
- title="采购金额"
|
|
|
|
|
- field="totalPrice"
|
|
|
|
|
- />
|
|
|
|
|
- <vxe-column
|
|
|
|
|
- min-width="160"
|
|
|
|
|
- align="center"
|
|
|
|
|
- title="采购人"
|
|
|
|
|
- field="handledByName"
|
|
|
|
|
- />
|
|
|
|
|
- <vxe-column
|
|
|
|
|
- min-width="140"
|
|
|
|
|
- align="center"
|
|
|
|
|
- title="修改状态"
|
|
|
|
|
- field="status"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <vxe-column min-width="180" align="center" title="采购时间" field="purchaseTime" />
|
|
|
|
|
+ <vxe-column min-width="160" align="center" title="采购金额" field="totalPrice" />
|
|
|
|
|
+ <!-- <vxe-column min-width="180" align="center" title="待变更时间" field="changePurchaseTime">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- :type="
|
|
|
|
|
- $dictUtils.getDictLabel(
|
|
|
|
|
- 'cw_status_flag',
|
|
|
|
|
- scope.row.status,
|
|
|
|
|
- ''
|
|
|
|
|
- )
|
|
|
|
|
- "
|
|
|
|
|
- @click="detail(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <span v-if="scope.row.status != '5' && scope.row.status != '0'">
|
|
|
|
|
+ {{ scope.row.changePurchaseTime }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else class="text-gray">-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </vxe-column>
|
|
|
|
|
+ <vxe-column min-width="160" align="center" title="待变更金额" field="changeTotalPrice">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.status != '5' && scope.row.status != '0'">
|
|
|
|
|
+ {{ scope.row.changeTotalPrice }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else class="text-gray">-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </vxe-column> -->
|
|
|
|
|
+ <vxe-column min-width="160" align="center" title="采购人" field="handledByName" />
|
|
|
|
|
+ <vxe-column min-width="140" align="center" title="修改状态" field="status">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-button effect="dark"
|
|
|
|
|
+ :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '')"
|
|
|
|
|
+ @click="detail(scope.row)">
|
|
|
{{
|
|
{{
|
|
|
$dictUtils.getDictLabel(
|
|
$dictUtils.getDictLabel(
|
|
|
"cw_status",
|
|
"cw_status",
|
|
@@ -207,106 +118,67 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
- <vxe-column
|
|
|
|
|
- title="操作"
|
|
|
|
|
- width="240"
|
|
|
|
|
- fixed="right"
|
|
|
|
|
- align="center"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <vxe-column title="操作" width="320" fixed="right" align="center">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
- ['0', '1', '3', '5'].includes(
|
|
|
|
|
- scope.row.status || '0'
|
|
|
|
|
- )
|
|
|
|
|
- "
|
|
|
|
|
- text
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="push(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
- 修改
|
|
|
|
|
|
|
+ <el-button v-if="
|
|
|
|
|
+ hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
+ ['0', '1', '3', '5'].includes(scope.row.status || '0')
|
|
|
|
|
+ " text type="primary" size="small" @click="push(scope.row)">
|
|
|
|
|
+ 申请修改
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
- scope.row.status === '4'
|
|
|
|
|
- "
|
|
|
|
|
- text
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="adjust(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button v-if="
|
|
|
|
|
+ hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
+ scope.row.status === '4'
|
|
|
|
|
+ " text type="primary" size="small" @click="adjust(scope.row)">
|
|
|
驳回调整
|
|
驳回调整
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
- scope.row.status === '2'
|
|
|
|
|
- "
|
|
|
|
|
- text
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="reback(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button v-if="
|
|
|
|
|
+ hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
+ scope.row.status === '2'
|
|
|
|
|
+ " text type="primary" size="small" @click="reback(scope.row)">
|
|
|
撤回
|
|
撤回
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- hasPermission('psi:foodPurchase:del') &&
|
|
|
|
|
- scope.row.status !== '2'
|
|
|
|
|
- "
|
|
|
|
|
- text
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="del(scope.row.id)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button v-if="
|
|
|
|
|
+ hasPermission('psi:foodPurchase:edit') &&
|
|
|
|
|
+ scope.row.changeId &&
|
|
|
|
|
+ ['1', '3', '4'].includes(scope.row.status || '')
|
|
|
|
|
+ " text type="primary" size="small" @click="terminateChange(scope.row)">
|
|
|
|
|
+ 终止申请
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button v-if="
|
|
|
|
|
+ hasPermission('psi:foodPurchase:del') &&
|
|
|
|
|
+ !scope.row.changeId &&
|
|
|
|
|
+ scope.row.status !== '2'
|
|
|
|
|
+ " text type="primary" size="small" @click="del(scope.row.id)">
|
|
|
删除
|
|
删除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- scope.row.status === '2' &&
|
|
|
|
|
- checkIsAudit(scope.row)
|
|
|
|
|
- "
|
|
|
|
|
- text
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="examine(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button v-if="
|
|
|
|
|
+ scope.row.status === '2' &&
|
|
|
|
|
+ checkIsAudit(scope.row)
|
|
|
|
|
+ " text type="primary" size="small" @click="examine(scope.row)">
|
|
|
审核
|
|
审核
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
</vxe-table>
|
|
|
|
|
|
|
|
- <vxe-pager
|
|
|
|
|
- background
|
|
|
|
|
- :current-page="tablePage.currentPage"
|
|
|
|
|
- :page-size="tablePage.pageSize"
|
|
|
|
|
- :total="tablePage.total"
|
|
|
|
|
- :page-sizes="[
|
|
|
|
|
|
|
+ <vxe-pager background :current-page="tablePage.currentPage" :page-size="tablePage.pageSize"
|
|
|
|
|
+ :total="tablePage.total" :page-sizes="[
|
|
|
10,
|
|
10,
|
|
|
20,
|
|
20,
|
|
|
100,
|
|
100,
|
|
|
1000,
|
|
1000,
|
|
|
{ label: '全量数据', value: 1000000 },
|
|
{ label: '全量数据', value: 1000000 },
|
|
|
- ]"
|
|
|
|
|
- :layouts="[
|
|
|
|
|
|
|
+ ]" :layouts="[
|
|
|
'PrevPage',
|
|
'PrevPage',
|
|
|
'JumpNumber',
|
|
'JumpNumber',
|
|
|
'NextPage',
|
|
'NextPage',
|
|
|
'FullJump',
|
|
'FullJump',
|
|
|
'Sizes',
|
|
'Sizes',
|
|
|
'Total',
|
|
'Total',
|
|
|
- ]"
|
|
|
|
|
- @page-change="currentChangeHandle"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ ]" @page-change="currentChangeHandle" />
|
|
|
|
|
|
|
|
- <UpdateFoodPurchaseForm
|
|
|
|
|
- ref="updateFoodPurchaseForm"
|
|
|
|
|
- @refreshList="refreshList"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <UpdateFoodPurchaseForm ref="updateFoodPurchaseForm" @refreshList="refreshList" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -371,6 +243,9 @@ export default {
|
|
|
this.refreshList();
|
|
this.refreshList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getEditBusinessTable() {
|
|
|
|
|
+ return "psi_management_food_purchase_change";
|
|
|
|
|
+ },
|
|
|
showHide() {
|
|
showHide() {
|
|
|
this.showHideItem = !this.showHideItem;
|
|
this.showHideItem = !this.showHideItem;
|
|
|
this.showHideIcon = this.showHideItem
|
|
this.showHideIcon = this.showHideItem
|
|
@@ -408,7 +283,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
this.refreshStatistics();
|
|
this.refreshStatistics();
|
|
|
this.checkIsAdmin();
|
|
this.checkIsAdmin();
|
|
|
- processService.getByName("进销存-食材采购修改").then((data) => {
|
|
|
|
|
|
|
+ processService.getByName("食材采购统计-修改").then((data) => {
|
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
|
this.processDefinitionAuditId = data.id;
|
|
this.processDefinitionAuditId = data.id;
|
|
|
this.procDefAuditKey = data.key;
|
|
this.procDefAuditKey = data.key;
|
|
@@ -470,43 +345,45 @@ export default {
|
|
|
} else if (row.status === "4") {
|
|
} else if (row.status === "4") {
|
|
|
status = "reapplyFlag";
|
|
status = "reapplyFlag";
|
|
|
}
|
|
}
|
|
|
- taskService
|
|
|
|
|
- .getTaskDef({
|
|
|
|
|
- procDefId: this.processDefinitionAuditId,
|
|
|
|
|
- businessId: row.id,
|
|
|
|
|
- businessTable: "psi_management_food_purchase_basic",
|
|
|
|
|
- })
|
|
|
|
|
- .then((data) => {
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: "/flowable/task/TaskForm",
|
|
|
|
|
- query: {
|
|
|
|
|
- ...pick(
|
|
|
|
|
- data,
|
|
|
|
|
- "formType",
|
|
|
|
|
- "formUrl",
|
|
|
|
|
- "procDefKey",
|
|
|
|
|
- "taskDefKey",
|
|
|
|
|
- "procInsId",
|
|
|
|
|
- "procDefId",
|
|
|
|
|
- "taskId",
|
|
|
|
|
- "status",
|
|
|
|
|
- "title"
|
|
|
|
|
- ),
|
|
|
|
|
- procDefId: this.processDefinitionAuditId,
|
|
|
|
|
- procDefKey: this.procDefAuditKey,
|
|
|
|
|
- title,
|
|
|
|
|
- formType: data.formType,
|
|
|
|
|
- formUrl: data.formUrl,
|
|
|
|
|
- formTitle: processTitle,
|
|
|
|
|
- businessTable: "psi_management_food_purchase_basic",
|
|
|
|
|
- businessId: row.id,
|
|
|
|
|
- isShow: "false",
|
|
|
|
|
- status,
|
|
|
|
|
- routePath:
|
|
|
|
|
- "/psiManagement/foodPurchase/FoodPurchaseList",
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.foodPurchaseService.prepareChange(row.id).then((biz) => {
|
|
|
|
|
+ taskService
|
|
|
|
|
+ .getTaskDef({
|
|
|
|
|
+ procDefId: this.processDefinitionAuditId,
|
|
|
|
|
+ businessId: biz.businessId,
|
|
|
|
|
+ businessTable: this.getEditBusinessTable(),
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((data) => {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/flowable/task/TaskForm",
|
|
|
|
|
+ query: {
|
|
|
|
|
+ ...pick(
|
|
|
|
|
+ data,
|
|
|
|
|
+ "formType",
|
|
|
|
|
+ "formUrl",
|
|
|
|
|
+ "procDefKey",
|
|
|
|
|
+ "taskDefKey",
|
|
|
|
|
+ "procInsId",
|
|
|
|
|
+ "procDefId",
|
|
|
|
|
+ "taskId",
|
|
|
|
|
+ "status",
|
|
|
|
|
+ "title"
|
|
|
|
|
+ ),
|
|
|
|
|
+ procDefId: this.processDefinitionAuditId,
|
|
|
|
|
+ procDefKey: this.procDefAuditKey,
|
|
|
|
|
+ title,
|
|
|
|
|
+ formType: data.formType,
|
|
|
|
|
+ formUrl: data.formUrl,
|
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
|
+ businessTable: this.getEditBusinessTable(),
|
|
|
|
|
+ businessId: biz.businessId,
|
|
|
|
|
+ isShow: "false",
|
|
|
|
|
+ status,
|
|
|
|
|
+ routePath:
|
|
|
|
|
+ "/psiManagement/foodPurchase/FoodPurchaseList",
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
detail(row) {
|
|
detail(row) {
|
|
|
if (!row.procInsId || ["0", "1"].includes(row.status || "0")) {
|
|
if (!row.procInsId || ["0", "1"].includes(row.status || "0")) {
|
|
@@ -537,7 +414,10 @@ export default {
|
|
|
readOnly: true,
|
|
readOnly: true,
|
|
|
title: "食材采购修改流程详情",
|
|
title: "食材采购修改流程详情",
|
|
|
formTitle: "食材采购修改流程详情",
|
|
formTitle: "食材采购修改流程详情",
|
|
|
- businessId: row.id,
|
|
|
|
|
|
|
+ businessId: row.changeId || row.id,
|
|
|
|
|
+ businessTable: row.changeId
|
|
|
|
|
+ ? this.getEditBusinessTable()
|
|
|
|
|
+ : "psi_management_food_purchase_basic",
|
|
|
status: "reback",
|
|
status: "reback",
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -549,7 +429,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- this.foodPurchaseService.findById(row.id).then((data) => {
|
|
|
|
|
|
|
+ this.foodPurchaseService.findChangeById(row.changeId).then((data) => {
|
|
|
if (data.status !== "2") {
|
|
if (data.status !== "2") {
|
|
|
this.$message.error("数据已发生变化,请刷新后重试");
|
|
this.$message.error("数据已发生变化,请刷新后重试");
|
|
|
this.refreshList();
|
|
this.refreshList();
|
|
@@ -557,7 +437,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
processService.revokeProcIns(row.procInsId).then((msg) => {
|
|
processService.revokeProcIns(row.procInsId).then((msg) => {
|
|
|
this.foodPurchaseService
|
|
this.foodPurchaseService
|
|
|
- .updateStatusById({ status: "3", id: row.id })
|
|
|
|
|
|
|
+ .updateChangeStatusById({
|
|
|
|
|
+ status: "3",
|
|
|
|
|
+ id: row.changeId,
|
|
|
|
|
+ })
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$message.success(msg);
|
|
this.$message.success(msg);
|
|
|
this.refreshList();
|
|
this.refreshList();
|
|
@@ -566,27 +449,58 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ terminateChange(row) {
|
|
|
|
|
+ this.$confirm("确定终止该修改申请吗?终止后会删除修改数据,并恢复展示原始数据。", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }).then(async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (!row.changeId) {
|
|
|
|
|
+ this.$message.error("修改单不存在,请刷新后重试");
|
|
|
|
|
+ this.refreshList();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ const changeData = await this.foodPurchaseService.findChangeById(row.changeId);
|
|
|
|
|
+ if (this.commonJS.isEmpty(changeData.id)) {
|
|
|
|
|
+ this.$message.error("修改单不存在,请刷新后重试");
|
|
|
|
|
+ this.refreshList();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (changeData.status === "2" && row.procInsId) {
|
|
|
|
|
+ await processService.stop(row.procInsId, "终止食材采购修改申请");
|
|
|
|
|
+ }
|
|
|
|
|
+ const msg = await this.foodPurchaseService.removeChange(row.changeId);
|
|
|
|
|
+ this.$message.success(msg || "操作成功");
|
|
|
|
|
+ this.refreshList();
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ if (error) {
|
|
|
|
|
+ this.refreshList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
adjust(row) {
|
|
adjust(row) {
|
|
|
- this.foodPurchaseService.findById(row.id).then((data) => {
|
|
|
|
|
|
|
+ this.foodPurchaseService.findChangeById(row.changeId).then((data) => {
|
|
|
if (data.status !== "4") {
|
|
if (data.status !== "4") {
|
|
|
this.$message.error("数据已发生变化,请刷新后重试");
|
|
this.$message.error("数据已发生变化,请刷新后重试");
|
|
|
this.refreshList();
|
|
this.refreshList();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.todo(row);
|
|
|
|
|
|
|
+ this.todo(row, false);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
examine(row) {
|
|
examine(row) {
|
|
|
- this.foodPurchaseService.findById(row.id).then((data) => {
|
|
|
|
|
|
|
+ this.foodPurchaseService.findChangeById(row.changeId).then((data) => {
|
|
|
if (data.status !== "2") {
|
|
if (data.status !== "2") {
|
|
|
this.$message.error("数据已发生变化,请刷新后重试");
|
|
this.$message.error("数据已发生变化,请刷新后重试");
|
|
|
this.refreshList();
|
|
this.refreshList();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.todo(row);
|
|
|
|
|
|
|
+ this.todo(row, true);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- todo(row) {
|
|
|
|
|
|
|
+ todo(row, formReadOnly = true) {
|
|
|
taskService.getTaskDefInfo({ taskId: row.taskId }).then((data) => {
|
|
taskService.getTaskDefInfo({ taskId: row.taskId }).then((data) => {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: "/flowable/task/TaskForm",
|
|
path: "/flowable/task/TaskForm",
|
|
@@ -605,10 +519,11 @@ export default {
|
|
|
"businessId"
|
|
"businessId"
|
|
|
),
|
|
),
|
|
|
isShow: false,
|
|
isShow: false,
|
|
|
- formReadOnly: true,
|
|
|
|
|
|
|
+ formReadOnly,
|
|
|
formTitle: `${data.taskName}`,
|
|
formTitle: `${data.taskName}`,
|
|
|
cUser: false,
|
|
cUser: false,
|
|
|
title: `审批【${data.taskName || ""}】`,
|
|
title: `审批【${data.taskName || ""}】`,
|
|
|
|
|
+ businessTable: this.getEditBusinessTable(),
|
|
|
routePath:
|
|
routePath:
|
|
|
"/psiManagement/foodPurchase/FoodPurchaseList",
|
|
"/psiManagement/foodPurchase/FoodPurchaseList",
|
|
|
},
|
|
},
|
|
@@ -622,6 +537,28 @@ export default {
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|
|
|
},
|
|
},
|
|
|
|
|
+ exportFile() {
|
|
|
|
|
+ const options = {
|
|
|
|
|
+ filename: `${this.moment(new Date()).format("YYYY-MM-DD")}食材采购数据导出`,
|
|
|
|
|
+ sheetName: "食材采购数据导出",
|
|
|
|
|
+ mode: "all",
|
|
|
|
|
+ };
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ this.foodPurchaseService
|
|
|
|
|
+ .exportFile({
|
|
|
|
|
+ current: this.tablePage.currentPage,
|
|
|
|
|
+ size: this.tablePage.pageSize,
|
|
|
|
|
+ orders: this.tablePage.orders,
|
|
|
|
|
+ ...options,
|
|
|
|
|
+ ...this.searchForm,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.$utils.downloadExcel(res, options.filename);
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|