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