销售审批
This commit is contained in:
@ -5,15 +5,78 @@ import { ErrorMessageMode } from '/#/axios';
|
|||||||
enum Api {
|
enum Api {
|
||||||
// Page = '/dayPlan/pngAppro/page',
|
// Page = '/dayPlan/pngAppro/page',
|
||||||
Page = '/magic-api/dayPlan/pngApproXs/page',
|
Page = '/magic-api/dayPlan/pngApproXs/page',
|
||||||
|
PageJsz = '/magic-api/dayPlan/pngApproJsz/page',
|
||||||
|
PageGd = '/magic-api//dayPlan/pngApproGd/page',
|
||||||
List = '/dayPlan/pngAppro/list',
|
List = '/dayPlan/pngAppro/list',
|
||||||
Info = '/dayPlan/pngAppro/info',
|
Info = '/dayPlan/pngAppro/info',
|
||||||
LngPngAppro = '/dayPlan/pngAppro',
|
LngPngAppro = '/dayPlan/pngAppro',
|
||||||
approve = '/dayPlan/pngAppro/approveXS',
|
approve = '/dayPlan/pngAppro/approveXS',
|
||||||
|
approveSZ = '/dayPlan/pngAppro/approveJSZ',
|
||||||
|
approveGD = '/dayPlan/pngAppro/approveGD',
|
||||||
|
|
||||||
records = '/magic-api/approve/records',
|
records = '/magic-api/approve/records',
|
||||||
compare = '/dayPlan/pngAppro/compare'
|
compare = '/dayPlan/pngAppro/compare'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description: 审批LngPngAppro
|
||||||
|
*/
|
||||||
|
export async function approveLngPngApproSZ(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.approveSZ,
|
||||||
|
params: lngPngAppro,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 审批LngPngAppro
|
||||||
|
*/
|
||||||
|
export async function approveLngPngApproGD(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.approveGD,
|
||||||
|
params: lngPngAppro,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 查询LngPngAppro分页列表
|
||||||
|
*/
|
||||||
|
export async function getLngPngApproPageGd(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngApproPageResult>(
|
||||||
|
{
|
||||||
|
url: Api.PageGd,
|
||||||
|
params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 查询LngPngAppro分页列表
|
||||||
|
*/
|
||||||
|
export async function getLngPngApproPageJsz(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngPngApproPageResult>(
|
||||||
|
{
|
||||||
|
url: Api.PageJsz,
|
||||||
|
params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 获取LngPngAppro信息
|
* @description: 获取LngPngAppro信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" :showOkBtn="false" :showCancelBtn="false">
|
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" :showOkBtn="false" :showCancelBtn="false" @visible-change="handleVisibleChange">
|
||||||
<BasicTable @register="registerTable"></BasicTable>
|
<BasicTable @register="registerTable"></BasicTable>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</div>
|
</div>
|
||||||
@ -16,10 +16,10 @@
|
|||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const columns: BasicColumn[] = [
|
const columns: BasicColumn[] = [
|
||||||
{ dataIndex: 'suCode', title: '审批人', align: 'left', sorter: true },
|
{ dataIndex: 'userName', title: '审批人', align: 'left', sorter: true },
|
||||||
{ dataIndex: 'suName', title: '审批时间', align: 'left', sorter: true },
|
{ dataIndex: 'createDate', title: '审批时间', align: 'left', sorter: true },
|
||||||
{ dataIndex: 'suSname', title: '通过/驳回', align: 'left', sorter: true },
|
{ dataIndex: 'cfmRej', title: '通过/驳回', align: 'left', sorter: true },
|
||||||
{ dataIndex: 'dI', title: '驳回原因', align: 'left', sorter: true },
|
{ dataIndex: 'reply', title: '驳回原因', align: 'left', sorter: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'register']);
|
const emit = defineEmits(['success', 'register']);
|
||||||
@ -33,7 +33,7 @@
|
|||||||
id.value = data.id
|
id.value = data.id
|
||||||
});
|
});
|
||||||
|
|
||||||
const [registerTable, {}] = useTable({
|
const [registerTable, {reload}] = useTable({
|
||||||
title: t('审批状态'),
|
title: t('审批状态'),
|
||||||
api: getLngPngApproRecords,
|
api: getLngPngApproRecords,
|
||||||
columns,
|
columns,
|
||||||
@ -51,11 +51,18 @@
|
|||||||
canResize: false,
|
canResize: false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
showTableSetting: false,
|
showTableSetting: false,
|
||||||
immediate: true, // 设置为不立即调用
|
immediate: false, // 设置为不立即调用
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return (id.value);
|
return (id.value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const handleVisibleChange = (visible: boolean) => {
|
||||||
|
if (visible) {
|
||||||
|
nextTick(() => {
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
const getTitle = computed(() => (!unref(isUpdate) ? t('审批状态') : t('')));
|
const getTitle = computed(() => (!unref(isUpdate) ? t('审批状态') : t('')));
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|||||||
@ -160,9 +160,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Popover>
|
</Popover>
|
||||||
<ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
<ViewModal @register="registerModal" />
|
||||||
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
|
||||||
</ModalPanel>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@ -181,11 +179,12 @@
|
|||||||
|
|
||||||
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
|
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
|
||||||
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
|
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
|
||||||
import ViewModal from '/@/views/dataconfig/oaNews/components/View.vue';
|
import ViewModal from '/@/views/dataconfig/oaNews/components/viewModal.vue';
|
||||||
import { ModalPanel } from '/@/components/ModalPanel/index';
|
|
||||||
|
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import { useModal } from '/@/components/Modal';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@ -197,9 +196,9 @@
|
|||||||
ApprovalProcess,
|
ApprovalProcess,
|
||||||
LookProcess,
|
LookProcess,
|
||||||
ViewModal,
|
ViewModal,
|
||||||
ModalPanel
|
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const [registerModal, { openModal }] = useModal();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const Approval = ref<{
|
const Approval = ref<{
|
||||||
taskId?: string;
|
taskId?: string;
|
||||||
@ -221,15 +220,13 @@
|
|||||||
const listData = ref(tabListData);
|
const listData = ref(tabListData);
|
||||||
const simpleImage = ref(Empty.PRESENTED_IMAGE_SIMPLE);
|
const simpleImage = ref(Empty.PRESENTED_IMAGE_SIMPLE);
|
||||||
|
|
||||||
const viewOpen = ref(false);
|
|
||||||
const viewData = ref({});
|
|
||||||
function handleView(record) {
|
function handleView(record) {
|
||||||
viewData.value = {...record};
|
openModal(true, {
|
||||||
viewOpen.value = true;
|
isUpdate: true,
|
||||||
}
|
record
|
||||||
function handleViewClose() {
|
})
|
||||||
viewOpen.value = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getDatas();
|
getDatas();
|
||||||
//停止循环获取通知
|
//停止循环获取通知
|
||||||
// times.value = setInterval(() => {
|
// times.value = setInterval(() => {
|
||||||
@ -445,10 +442,9 @@
|
|||||||
LookData,
|
LookData,
|
||||||
t,
|
t,
|
||||||
goToRouter,
|
goToRouter,
|
||||||
viewData,
|
|
||||||
viewOpen,
|
|
||||||
handleView,
|
handleView,
|
||||||
handleViewClose
|
openModal,
|
||||||
|
registerModal
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
49
src/views/dataconfig/oaNews/components/viewModal.vue
Normal file
49
src/views/dataconfig/oaNews/components/viewModal.vue
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<BasicModal v-bind="$attrs" @register="registerModal" :title="getTitle" @cancel="handleClose" :paddingRight="15" :bodyStyle="{ minHeight: '400px !important' }">
|
||||||
|
<View :viewData="viewData" />
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, computed, reactive } from 'vue';
|
||||||
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
|
import { add, getInfo, edit } from '/@/api/system/oa';
|
||||||
|
import View from './View.vue'
|
||||||
|
|
||||||
|
import { formProps } from './newsConfig';
|
||||||
|
|
||||||
|
const emit = defineEmits(['success', 'register']);
|
||||||
|
|
||||||
|
const { notification } = useMessage();
|
||||||
|
const { filterFormSchemaAuth } = usePermission();
|
||||||
|
const formRef = ref();
|
||||||
|
const state = reactive({
|
||||||
|
formModel: {},
|
||||||
|
isUpdate: true,
|
||||||
|
isView: false,
|
||||||
|
isCopy: false,
|
||||||
|
rowId: ''
|
||||||
|
});
|
||||||
|
const viewData = ref({})
|
||||||
|
const { t } = useI18n();
|
||||||
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
|
state.isUpdate = !!data?.isUpdate;
|
||||||
|
state.isView = !!data?.isView;
|
||||||
|
viewData.value = data.record
|
||||||
|
setModalProps({
|
||||||
|
destroyOnClose: true,
|
||||||
|
maskClosable: false,
|
||||||
|
showCancelBtn: false,
|
||||||
|
showOkBtn: false,
|
||||||
|
canFullscreen: true,
|
||||||
|
width: 800
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const getTitle = computed(() => (viewData.value.briefHead));
|
||||||
|
|
||||||
|
function handleClose() {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -21,9 +21,10 @@
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
|
||||||
<NewsModal @register="registerModal" @success="handleSuccess" />
|
<NewsModal @register="registerModal" @success="handleSuccess" />
|
||||||
<ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
<ViewModal @register="registerModalView" />
|
||||||
|
<!-- <ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
||||||
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
||||||
</ModalPanel>
|
</ModalPanel> -->
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -42,7 +43,8 @@
|
|||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
|
|
||||||
import NewsModal from './components/NewsModal.vue';
|
import NewsModal from './components/NewsModal.vue';
|
||||||
import ViewModal from './components/View.vue';
|
// import ViewModal from './components/View.vue';
|
||||||
|
import ViewModal from './components/viewModal.vue'
|
||||||
import { searchFormSchema, columns } from './components/newsConfig';
|
import { searchFormSchema, columns } from './components/newsConfig';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { OaType } from '../../../enums/oa';
|
import { OaType } from '../../../enums/oa';
|
||||||
@ -115,6 +117,7 @@
|
|||||||
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
const [registerModal, { openModal }] = useModal();
|
||||||
|
const [registerModalView, { openModal:openModalView }] = useModal();
|
||||||
|
|
||||||
const [registerTable, { reload }] = useTable({
|
const [registerTable, { reload }] = useTable({
|
||||||
title: '新闻列表',
|
title: '新闻列表',
|
||||||
@ -211,8 +214,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleView(record: Recordable) {
|
function handleView(record: Recordable) {
|
||||||
viewData.value = record;
|
openModalView(true, {
|
||||||
viewOpen.value = true;
|
isUpdate: true,
|
||||||
|
record
|
||||||
|
});
|
||||||
|
// viewData.value = record;
|
||||||
|
// viewOpen.value = true;
|
||||||
}
|
}
|
||||||
function handleViewClose() {
|
function handleViewClose() {
|
||||||
viewOpen.value = false;
|
viewOpen.value = false;
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
<ViewModal @register="registerModalView" />
|
||||||
<NoticesModal @register="registerModal" @success="handleSuccess" />
|
<NoticesModal @register="registerModal" @success="handleSuccess" />
|
||||||
<ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
<!-- <ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
||||||
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
||||||
</ModalPanel>
|
</ModalPanel> -->
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -42,7 +42,8 @@
|
|||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
|
|
||||||
import NoticesModal from './components/NoticesModal.vue';
|
import NoticesModal from './components/NoticesModal.vue';
|
||||||
import ViewModal from './components/View.vue';
|
// import ViewModal from './components/View.vue';
|
||||||
|
import ViewModal from './components/viewModal.vue'
|
||||||
import { searchFormSchema, columns } from './components/noticesConfig';
|
import { searchFormSchema, columns } from './components/noticesConfig';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { OaType } from '../../../enums/oa';
|
import { OaType } from '../../../enums/oa';
|
||||||
@ -116,7 +117,7 @@
|
|||||||
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
const [registerModal, { openModal }] = useModal();
|
||||||
|
const [registerModalView, { openModal:openModalView }] = useModal();
|
||||||
const [registerTable, { reload }] = useTable({
|
const [registerTable, { reload }] = useTable({
|
||||||
title: '通知公告列表',
|
title: '通知公告列表',
|
||||||
api: getList,
|
api: getList,
|
||||||
@ -212,8 +213,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleView(record: Recordable) {
|
function handleView(record: Recordable) {
|
||||||
viewData.value = record;
|
openModalView(true, {
|
||||||
viewOpen.value = true;
|
isUpdate: true,
|
||||||
|
record
|
||||||
|
});
|
||||||
|
// viewData.value = record;
|
||||||
|
// viewOpen.value = true;
|
||||||
}
|
}
|
||||||
function handleViewClose() {
|
function handleViewClose() {
|
||||||
viewOpen.value = false;
|
viewOpen.value = false;
|
||||||
|
|||||||
@ -6,65 +6,42 @@ export const formConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'verNo',
|
field: 'pointDelyName',
|
||||||
label: '版本号',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'datePlan',
|
|
||||||
label: '计划日期',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'pointDelyCode',
|
|
||||||
label: '下载点',
|
label: '下载点',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'qtyDemandGj',
|
field: 'kName',
|
||||||
label: '指定量 (吉焦)',
|
label: '销售合同名称/编码',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'qtyDemandM3',
|
field: 'approCode',
|
||||||
label: '指定量 (万方)',
|
label: '审批状态',
|
||||||
component: 'Input',
|
component: 'XjrSelect',
|
||||||
|
componentProps: {
|
||||||
|
datasourceType: 'dic',
|
||||||
|
params: { itemId: '1990669393069129729' },
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'value',
|
||||||
|
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'priceSalesGj',
|
field: 'approCode',
|
||||||
label: '批复量 (吉焦)',
|
label: '审批状态',
|
||||||
component: 'Input',
|
component: 'XjrSelect',
|
||||||
},
|
componentProps: {
|
||||||
{
|
datasourceType: 'dic',
|
||||||
field: 'priceSalesM3',
|
params: { itemId: '1990669393069129729' },
|
||||||
label: '批复量 (万方)',
|
labelField: 'name',
|
||||||
component: 'Input',
|
valueField: 'value',
|
||||||
},
|
|
||||||
{
|
getPopupContainer: () => document.body,
|
||||||
field: 'ksId',
|
},
|
||||||
label: '合同',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'id',
|
|
||||||
label: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'orgId',
|
|
||||||
label: 'orgId',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'note',
|
|
||||||
label: '备注',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'reply',
|
|
||||||
label: '批复意见',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex">
|
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex Demandtyle">
|
||||||
<BasicTable @register="registerTable" ref="tableRef" @row-dbClick="dbClickRow">
|
<BasicTable @register="registerTable" ref="tableRef" @row-dbClick="dbClickRow">
|
||||||
|
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
@ -128,7 +128,7 @@
|
|||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||||
@ -417,6 +417,11 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.Demandtyle .cusSearchForm .advanceRow> div:nth-of-type(3){
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
:deep(.ant-table-selection-col) {
|
:deep(.ant-table-selection-col) {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
@ -427,4 +432,15 @@
|
|||||||
.hide{
|
.hide{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
:deep( .ant-col-8:nth-child(2)) {
|
||||||
|
width: 360px !important;
|
||||||
|
max-width: 320px !important;;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(2) .ant-form-item-label) {
|
||||||
|
width: 160px !important;
|
||||||
|
}
|
||||||
|
:deep(.ant-col-8:nth-child(2) .ant-form-item-label .ant-form-item-no-colon) {
|
||||||
|
width: 160px !important;
|
||||||
|
max-width: 160px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -4,7 +4,7 @@
|
|||||||
<a-form-item label="计划日期" name="datePlan">{{ formState.datePlan }}</a-form-item>
|
<a-form-item label="计划日期" name="datePlan">{{ formState.datePlan }}</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="当日/次日" name="dayDesc">{{ formState.dayDesc }}</a-form-item>
|
<a-form-item label="当日/次日" name="daysSign">{{ formState.daysSign }}</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="合同" name="kName">{{ formState.kName}}</a-form-item>
|
<a-form-item label="合同" name="kName">{{ formState.kName}}</a-form-item>
|
||||||
@ -46,14 +46,14 @@
|
|||||||
<a-form-item label="比值(方/吉焦)" name="rateM3Gj">{{ formState.rateM3Gj }}</a-form-item>
|
<a-form-item label="比值(方/吉焦)" name="rateM3Gj">{{ formState.rateM3Gj }}</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="交易主体" name="name">{{ formState.name }}</a-form-item>
|
<a-form-item label="交易主体" name="comName">{{ formState.comName }}</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
|
<a-form-item label="版本号" name="verNo">{{ formState.verNo }}</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="下载点" name="fullName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-form-item label="下载点" name="poinDelyName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
{{ formState.fullName }}
|
{{ formState.pointDelyName }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -75,7 +75,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 1000}">
|
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 100}">
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
<template v-if="column.dataIndex === 'qtySalesGj'">
|
<template v-if="column.dataIndex === 'qtySalesGj'">
|
||||||
<a-input-number v-model:value="record.qtySalesGj" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
|
<a-input-number v-model:value="record.qtySalesGj" :disabled="record.alterSign=='D' || disable" :min="0" @change="numChange" style="width: 100%" />
|
||||||
@ -104,14 +104,14 @@ import { useI18n } from '/@/hooks/web/useI18n';
|
|||||||
});
|
});
|
||||||
const columns= ref([
|
const columns= ref([
|
||||||
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
|
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
|
||||||
{ title: t('上载点'), dataIndex: 'pointUpName', sorter: true, width:200},
|
{ title: t('上载点'), dataIndex: 'pointUpName', sorter: true, width:400},
|
||||||
{ title: t('供应商'), dataIndex: 'suSname', sorter: true, width: 130},
|
{ title: t('供应商'), dataIndex: 'suName', sorter: true, width: 400},
|
||||||
{ title: t('采购合同'), dataIndex: 'kName', sorter: true, width: 200},
|
{ title: t('采购合同'), dataIndex: 'kpName', sorter: true, width: 400},
|
||||||
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', sorter: true, width: 300},
|
{ title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', sorter: true, width: 300},
|
||||||
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', sorter: true, width: 200},
|
{ title: t('指定量(方)'), dataIndex: 'qtyDemandM3', sorter: true, width: 200},
|
||||||
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', sorter: true, width: 200},
|
{ title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', sorter: true, width: 200},
|
||||||
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', sorter: true, width: 200},
|
{ title: t('批复量(方)'), dataIndex: 'qtySalesM3', sorter: true, width: 200},
|
||||||
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
|
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 300},
|
||||||
]);
|
]);
|
||||||
const formState = ref()
|
const formState = ref()
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '版本号',
|
title: '版本号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 80,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -54,12 +54,12 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '计划日期',
|
title: '计划日期',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'cuCode',
|
dataIndex: 'cuName',
|
||||||
title: '客户',
|
title: '客户',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
@ -68,7 +68,7 @@ export const columns: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'demandId',
|
dataIndex: 'poinDelyName',
|
||||||
title: '下载点',
|
title: '下载点',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
@ -140,7 +140,7 @@ export const columns: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'lastVerSign',
|
dataIndex: 'kName',
|
||||||
title: '销售合同',
|
title: '销售合同',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
@ -149,7 +149,7 @@ export const columns: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'alterSign',
|
dataIndex: 'alterName',
|
||||||
title: '变更',
|
title: '变更',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|||||||
@ -1,19 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="spinning" tip="加载中...">
|
<a-spin :spinning="spinning" tip="加载中...">
|
||||||
<div class="page-bg-wrap formViewStyle pdcss">
|
<div class="page-bg-wrap formViewStyle pdcss">
|
||||||
<div class="top-toolbar" v-if="currentRoute.query.type!=='compare'">
|
<div class="top-toolbar" >
|
||||||
<a-button style="margin-right: 10px" @click="close">
|
<a-button style="margin-right: 10px" @click="close">
|
||||||
<slot name="icon"><close-outlined /></slot>关闭
|
<slot name="icon"><close-outlined /></slot>关闭
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('agree')" v-if="!currentRoute.query.type">
|
<template v-if="currentRoute.query.type!=='compare'">
|
||||||
<slot name="icon"><check-circle-outlined /></slot>通过
|
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('agree')" v-if="!currentRoute.query.type">
|
||||||
</a-button>
|
<slot name="icon"><check-circle-outlined /></slot>通过
|
||||||
<a-button style="margin-right: 10px" @click="checkBtn('reject')" v-if="!currentRoute.query.type">
|
</a-button>
|
||||||
<slot name="icon"><stop-outlined /></slot>驳回
|
<a-button style="margin-right: 10px" @click="checkBtn('reject')" v-if="!currentRoute.query.type">
|
||||||
</a-button>
|
<slot name="icon"><stop-outlined /></slot>驳回
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||||
<a-row v-if="currentRoute.query.type!=='compare'">
|
<a-row v-if="!currentRoute.query.type">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="批复意见" name="reply" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-form-item label="批复意见" name="reply" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
<a-textarea v-model:value="formState.reply" :disabled="currentRoute.query.type=='view'" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
<a-textarea v-model:value="formState.reply" :disabled="currentRoute.query.type=='view'" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||||
@ -23,8 +25,8 @@
|
|||||||
<Card :title="title" :bordered="false" >
|
<Card :title="title" :bordered="false" >
|
||||||
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
<Card :title="title" :bordered="false" v-if="currentRoute.query.type=='compare'">
|
<Card :title="titleNew" :bordered="false" v-if="currentRoute.query.type=='compare'&&titleNew">
|
||||||
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
<basicForm ref="basicFormRef" :formObj="formStateNew" :list="dataListNew" :disable="currentRoute.query.type"></basicForm>
|
||||||
</Card>
|
</Card>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@ -44,7 +46,7 @@
|
|||||||
import type { Rule } from 'ant-design-vue/es/form';
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
import { getDictionary } from '/@/api/sales/Customer';
|
import { getDictionary } from '/@/api/sales/Customer';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { getLngPngAppro,approveLngPngAppro,getLngPngApproCompare } from '/@/api/dayPlan/PngAppro';
|
import { getLngPngAppro,approveLngPngAppro,getLngPngApproCompare,approveLngPngApproSZ,approveLngPngApproGD } from '/@/api/dayPlan/PngAppro';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getAppEnvConfig } from '/@/utils/env';
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
@ -83,6 +85,9 @@
|
|||||||
const hasDel = ref(false)
|
const hasDel = ref(false)
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const formStateNew = reactive({
|
||||||
|
|
||||||
});
|
});
|
||||||
const [register, { openModal:openModal}] = useModal();
|
const [register, { openModal:openModal}] = useModal();
|
||||||
const rules= reactive({
|
const rules= reactive({
|
||||||
@ -93,7 +98,9 @@
|
|||||||
wrapperCol: { span: 18 },
|
wrapperCol: { span: 18 },
|
||||||
}
|
}
|
||||||
const title = ref('日计划审批')
|
const title = ref('日计划审批')
|
||||||
|
const titleNew = ref('')
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
|
const dataListNew = ref([])
|
||||||
const basicFormRef = ref()
|
const basicFormRef = ref()
|
||||||
let optionSelect= reactive({
|
let optionSelect= reactive({
|
||||||
approCodeList: [],
|
approCodeList: [],
|
||||||
@ -112,39 +119,27 @@
|
|||||||
async function getCompareInfo(id) {
|
async function getCompareInfo(id) {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
try {
|
try {
|
||||||
let data = await getLngPngApproCompare(id)
|
let data = await getLngPngApproCompare(id) || []
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
Object.assign(formState, {...data})
|
if (data.length == 1) {
|
||||||
Object.assign(dataList.value, formState.lngPngApproPurList || [{}])
|
let obj = changeData(data[0])
|
||||||
const startDate = dayjs(formState.datePlan);
|
Object.assign(formState, {...obj.params})
|
||||||
const endDate = dayjs(new Date());
|
Object.assign(dataList.value, obj.list || [{}])
|
||||||
const diffInDays = endDate.diff(startDate, 'day');
|
title.value = '版本V'+ formState.verNo
|
||||||
if (diffInDays == 0) {
|
}
|
||||||
formState.dayDesc = '当日'
|
if (data.length > 1) {
|
||||||
} else if (diffInDays == 1) {
|
let obj = changeData(data[0])
|
||||||
formState.dayDesc = '次日'
|
Object.assign(formState, {...obj.params})
|
||||||
} else if (diffInDays > 1) {
|
Object.assign(dataList.value, obj.list || [{}])
|
||||||
formState.dayDesc = diffInDays + '日后'
|
title.value = '版本V'+ formState.verNo
|
||||||
} else {
|
|
||||||
formState.dayDesc = ''
|
let obj1 = changeData(data[1])
|
||||||
|
Object.assign(formStateNew, {...obj1.params})
|
||||||
|
Object.assign(dataListNew.value, obj1.list || [{}])
|
||||||
|
titleNew.value = '版本V'+ formStateNew.verNo
|
||||||
}
|
}
|
||||||
formState.qtyContractM3 = Number(formState.qtyContractM3)/10000
|
|
||||||
formState.qtyPlanM3 = Number(formState.qtyPlanM3)/10000
|
|
||||||
formState.qtyDemandM3 = Number(formState.qtyDemandM3)/10000
|
|
||||||
formState.qtySalesM3 = Number(formState.qtySalesM3)/10000
|
|
||||||
let num = 0;
|
|
||||||
let num1 = 0;
|
|
||||||
dataList.value.forEach(v => {
|
|
||||||
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
|
||||||
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
|
||||||
num+=(Number(v.qtySalesGj) || 0)
|
|
||||||
num1+=(Number(v.qtySalesM3) || 0)
|
|
||||||
});
|
|
||||||
formState.qtySalesGj = num
|
|
||||||
formState.qtySalesM3 = num1
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error, 'error')
|
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,38 +149,44 @@
|
|||||||
try {
|
try {
|
||||||
let data = await getLngPngAppro(id)
|
let data = await getLngPngAppro(id)
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
Object.assign(formState, {...data})
|
let obj = changeData(data)
|
||||||
Object.assign(dataList.value, formState.lngPngApproPurList || [{}])
|
Object.assign(formState, {...obj.params})
|
||||||
const startDate = dayjs(formState.datePlan);
|
Object.assign(dataList.value, obj.list || [{}])
|
||||||
const endDate = dayjs(new Date());
|
} catch (error) {
|
||||||
const diffInDays = endDate.diff(startDate, 'day');
|
spinning.value = false
|
||||||
if (diffInDays == 0) {
|
|
||||||
formState.dayDesc = '当日'
|
|
||||||
} else if (diffInDays == 1) {
|
|
||||||
formState.dayDesc = '次日'
|
|
||||||
} else if (diffInDays > 1) {
|
|
||||||
formState.dayDesc = diffInDays + '日后'
|
|
||||||
} else {
|
|
||||||
formState.dayDesc = ''
|
|
||||||
}
|
}
|
||||||
formState.qtyContractM3 = Number(formState.qtyContractM3)/10000
|
}
|
||||||
formState.qtyPlanM3 = Number(formState.qtyPlanM3)/10000
|
const changeData = (obj) => {
|
||||||
formState.qtyDemandM3 = Number(formState.qtyDemandM3)/10000
|
let arr = obj.lngPngApproPurList || [{}]
|
||||||
formState.qtySalesM3 = Number(formState.qtySalesM3)/10000
|
// const startDate = dayjs(obj.datePlan);
|
||||||
|
// const endDate = dayjs(new Date());
|
||||||
|
// const diffInDays = endDate.diff(startDate, 'day');
|
||||||
|
// if (diffInDays == 0) {
|
||||||
|
// obj.dayDesc = '当日'
|
||||||
|
// } else if (diffInDays == 1) {
|
||||||
|
// obj.dayDesc = '次日'
|
||||||
|
// } else if (diffInDays > 1) {
|
||||||
|
// obj.dayDesc = diffInDays + '日后'
|
||||||
|
// } else {
|
||||||
|
// obj.dayDesc = ''
|
||||||
|
// }
|
||||||
|
obj.qtyContractM3 = Number(obj.qtyContractM3)/10000
|
||||||
|
obj.qtyPlanM3 = Number(obj.qtyPlanM3)/10000
|
||||||
|
obj.qtyDemandM3 = Number(obj.qtyDemandM3)/10000
|
||||||
|
obj.qtySalesM3 = Number(obj.qtySalesM3)/10000
|
||||||
let num = 0;
|
let num = 0;
|
||||||
let num1 = 0;
|
let num1 = 0;
|
||||||
dataList.value.forEach(v => {
|
arr.forEach(v => {
|
||||||
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
v.qtyDemandM3 = Number(v.qtyDemandM3)/10000
|
||||||
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
v.qtySalesM3 = Number(v.qtySalesM3)/10000
|
||||||
num+=(Number(v.qtySalesGj) || 0)
|
num+=(Number(v.qtySalesGj) || 0)
|
||||||
num1+=(Number(v.qtySalesM3) || 0)
|
num1+=(Number(v.qtySalesM3) || 0)
|
||||||
});
|
});
|
||||||
formState.qtySalesGj = num
|
obj.qtySalesGj = num
|
||||||
formState.qtySalesM3 = num1
|
obj.qtySalesM3 = num1
|
||||||
|
return {
|
||||||
} catch (error) {
|
list : arr,
|
||||||
console.log(error, 'error')
|
params: obj
|
||||||
spinning.value = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function getOption() {
|
async function getOption() {
|
||||||
@ -197,7 +198,6 @@
|
|||||||
}
|
}
|
||||||
async function checkBtn(type) {
|
async function checkBtn(type) {
|
||||||
let data = basicFormRef.value.getFormValue()
|
let data = basicFormRef.value.getFormValue()
|
||||||
console.log(data, 'data')
|
|
||||||
let arr = JSON.parse(JSON.stringify(data.list))
|
let arr = JSON.parse(JSON.stringify(data.list))
|
||||||
arr.forEach(v=> {
|
arr.forEach(v=> {
|
||||||
v.qtyDemandM3 = Number(v.qtyDemandM3)*10000
|
v.qtyDemandM3 = Number(v.qtyDemandM3)*10000
|
||||||
@ -214,7 +214,7 @@
|
|||||||
let params = {
|
let params = {
|
||||||
result: type == 'agree' ? 'C' : 'R',
|
result: type == 'agree' ? 'C' : 'R',
|
||||||
remark: formState.reply,
|
remark: formState.reply,
|
||||||
data: obj
|
data: [obj]
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
try {
|
try {
|
||||||
@ -224,7 +224,17 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await approveLngPngAppro(params);
|
let request = ''
|
||||||
|
if (formPath.includes('dayPlan/PngAppro/index')) {
|
||||||
|
request = approveLngPngAppro
|
||||||
|
}
|
||||||
|
if (formPath.includes('dayPlan/pngPipeAppro/index')) {
|
||||||
|
request = approveLngPngApproGD
|
||||||
|
}
|
||||||
|
if (formPath.includes('dayPlan/pngReceiveStationAppro/index')) {
|
||||||
|
request = approveLngPngApproSZ
|
||||||
|
}
|
||||||
|
await request(params);
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
notification.success({
|
notification.success({
|
||||||
message: 'Tip',
|
message: 'Tip',
|
||||||
|
|||||||
@ -44,7 +44,8 @@
|
|||||||
import { useFormConfig } from '/@/hooks/web/useFormConfig';
|
import { useFormConfig } from '/@/hooks/web/useFormConfig';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { setIndexFlowStatus } from '/@/utils/flow/index'
|
import { setIndexFlowStatus } from '/@/utils/flow/index'
|
||||||
import { getLngPngAppro } from '/@/api/dayPlan/PngAppro';
|
import { getLngPngAppro,getLngPngApproPageGd, getLngPngApproPageJsz, approveLngPngApproSZ, approveLngPngApproGD, approveLngPngAppro
|
||||||
|
} from '/@/api/dayPlan/PngAppro';
|
||||||
import { useModal,BasicModal } from '/@/components/Modal';
|
import { useModal,BasicModal } from '/@/components/Modal';
|
||||||
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
|
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
|
||||||
import LaunchProcess from '/@/views/workflow/task/components/LaunchProcess.vue';
|
import LaunchProcess from '/@/views/workflow/task/components/LaunchProcess.vue';
|
||||||
@ -95,7 +96,6 @@
|
|||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const path = currentRoute.value?.path
|
const path = currentRoute.value?.path
|
||||||
console.log(currentRoute, 'router55555555555555', path)
|
|
||||||
const formIdComputedRef = ref();
|
const formIdComputedRef = ref();
|
||||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||||
const schemaIdComputedRef = ref();
|
const schemaIdComputedRef = ref();
|
||||||
@ -108,7 +108,7 @@
|
|||||||
const formDataRef = ref();
|
const formDataRef = ref();
|
||||||
const rowKeyData = ref();
|
const rowKeyData = ref();
|
||||||
const draftsId = ref();
|
const draftsId = ref();
|
||||||
|
const selectedKeys = ref([])
|
||||||
const visibleApproveProcessRef = ref(false);
|
const visibleApproveProcessRef = ref(false);
|
||||||
const taskIdRef = ref('');
|
const taskIdRef = ref('');
|
||||||
const visibleFlowRecordModal = ref(false);
|
const visibleFlowRecordModal = ref(false);
|
||||||
@ -117,21 +117,29 @@
|
|||||||
|
|
||||||
let formName='管道气销售审批';
|
let formName='管道气销售审批';
|
||||||
let curPath = 'dayPlan/PngAppro/index'
|
let curPath = 'dayPlan/PngAppro/index'
|
||||||
|
let request = ''
|
||||||
|
let requestApprove = ''
|
||||||
if (path.includes('dayPlan/PngAppro/index')) {
|
if (path.includes('dayPlan/PngAppro/index')) {
|
||||||
formName='管道气销售审批'
|
formName='管道气销售审批'
|
||||||
curPath = 'dayPlan/PngAppro/index'
|
curPath = 'dayPlan/PngAppro/index'
|
||||||
|
request = getLngPngApproPage
|
||||||
|
requestApprove = approveLngPngAppro
|
||||||
}
|
}
|
||||||
if (path.includes('dayPlan/pngPipeAppro/index')) {
|
if (path.includes('dayPlan/pngPipeAppro/index')) {
|
||||||
formName='管道气管道审批'
|
formName='管道气管道审批'
|
||||||
curPath = 'dayPlan/pngPipeAppro'
|
curPath = 'dayPlan/pngPipeAppro'
|
||||||
|
request = getLngPngApproPageGd
|
||||||
|
requestApprove = approveLngPngApproGD
|
||||||
}
|
}
|
||||||
if (path.includes('dayPlan/pngReceiveStationAppro/index')) {
|
if (path.includes('dayPlan/pngReceiveStationAppro/index')) {
|
||||||
formName='管道气接收站审批'
|
formName='管道气接收站审批'
|
||||||
curPath = 'dayPlan/pngReceiveStationAppro'
|
curPath = 'dayPlan/pngReceiveStationAppro'
|
||||||
|
request = getLngPngApproPageJsz
|
||||||
|
requestApprove = approveLngPngApproSZ
|
||||||
}
|
}
|
||||||
const [registerTable, { reload, clearSelectedRowKeys, setTableData }] = useTable({
|
const [registerTable, { reload, clearSelectedRowKeys, setTableData }] = useTable({
|
||||||
title: '' || (formName + '列表'),
|
title: '' || (formName + '列表'),
|
||||||
api: getLngPngApproPage,
|
api: request,
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
columns: customConfigColums,
|
columns: customConfigColums,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
@ -182,7 +190,7 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
const btnCheck = (record)=> {
|
const btnCheck = (record)=> {
|
||||||
openModalApproStatus(true,{isUpdate: false,id:record.id});
|
openModalApproStatus(true,{isUpdate: false,id:record.demandId});
|
||||||
}
|
}
|
||||||
function onSelectChange(rowKeys: string[]) {
|
function onSelectChange(rowKeys: string[]) {
|
||||||
selectedKeys.value = rowKeys;
|
selectedKeys.value = rowKeys;
|
||||||
@ -277,8 +285,32 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function handleBatchApprove () {
|
async function handleBatchApprove () {
|
||||||
setTableData([{verNo: 5, cuCode: 444, approName: '未提交'}])
|
if (!selectedKeys.value.length) {
|
||||||
|
notification.warning({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('请选择需要审批的数据'),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let arr = selectedKeys.value.map(v=> {
|
||||||
|
return {
|
||||||
|
id: v
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
let obj = {
|
||||||
|
"result": "C",
|
||||||
|
"remark": "",
|
||||||
|
"data": arr
|
||||||
|
}
|
||||||
|
await requestApprove(obj)
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: 'Tip',
|
||||||
|
description: t('审批成功!'),
|
||||||
|
});
|
||||||
|
clearSelectedRowKeys()
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@ -61,7 +61,6 @@
|
|||||||
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
|
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
|
||||||
import { Button as AButton, ButtonProps } from '/@/components/Button';
|
import { Button as AButton, ButtonProps } from '/@/components/Button';
|
||||||
import { BasicArrow } from '/@/components/Basic';
|
import { BasicArrow } from '/@/components/Basic';
|
||||||
import { dE } from '@fullcalendar/core/internal-common';
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
@ -106,10 +105,10 @@ import { dE } from '@fullcalendar/core/internal-common';
|
|||||||
const onSearch = () => {
|
const onSearch = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
...formState.value,
|
...formState.value,
|
||||||
startDate: formState.value.datePlan[0],
|
startDate: formState.value.datePlan ? dayjs(formState.value.datePlan[0]).format('YYYY-MM-DD') : '',
|
||||||
endDate: formState.value.datePlan[0],
|
endDate: formState.value.datePlan ? dayjs(formState.value.datePlan[1]).format('YYYY-MM-DD') : '',
|
||||||
dateMeaStart: formState.value.dateMea[0],
|
dateMeaStart: formState.value.dateMea ? dayjs(formState.value.dateMea[0]).format('YYYY-MM-DD') : '',
|
||||||
dateMeaEnd: formState.value.dateMea[1],
|
dateMeaEnd: formState.value.dateMea ? dayjs(formState.value.dateMea[1]).format('YYYY-MM-DD') : '',
|
||||||
}
|
}
|
||||||
delete obj.datePlan
|
delete obj.datePlan
|
||||||
delete obj.dateMea
|
delete obj.dateMea
|
||||||
|
|||||||
@ -74,7 +74,9 @@
|
|||||||
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
|
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
|
||||||
async function setFormDataFromId(rowId, skipUpdate) {
|
async function setFormDataFromId(rowId, skipUpdate) {
|
||||||
try {
|
try {
|
||||||
const record = await getXjrNotice(rowId);
|
let record = await getXjrNotice(rowId);
|
||||||
|
record.status = ''+record.status
|
||||||
|
record.publisherType = ''+record.publisherType
|
||||||
if (skipUpdate) {
|
if (skipUpdate) {
|
||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user