diff --git a/src/api/dayPlan/PngApproGd/index.ts b/src/api/dayPlan/PngApproGd/index.ts new file mode 100644 index 0000000..556640c --- /dev/null +++ b/src/api/dayPlan/PngApproGd/index.ts @@ -0,0 +1,104 @@ +import { LngPngApproPageModel, LngPngApproPageParams, LngPngApproPageResult } from './model/PngApproGdModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + // Page = '/dayPlan/pngApproGd/page', + Page = '/magic-api//dayPlan/pngApproGd/page', + List = '/dayPlan/pngApproGd/list', + Info = '/dayPlan/pngApproGd/info', + LngPngAppro = '/dayPlan/pngApproGd', + approve = '/dayPlan/pngAppro/approveGD', + + + +} +/** + * @description: 审批LngPngAppro + */ +export async function approveLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.approve, + params: lngPngAppro, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 查询LngPngAppro分页列表 + */ +export async function getLngPngApproPage(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngPngAppro信息 + */ +export async function getLngPngAppro(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngPngAppro + */ +export async function addLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngPngAppro, + params: lngPngAppro, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngPngAppro + */ +export async function updateLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngPngAppro, + params: lngPngAppro, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngPngAppro(批量删除) + */ +export async function deleteLngPngAppro(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngPngAppro, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/dayPlan/PngApproGd/model/PngApproGdModel.ts b/src/api/dayPlan/PngApproGd/model/PngApproGdModel.ts new file mode 100644 index 0000000..ce1feb2 --- /dev/null +++ b/src/api/dayPlan/PngApproGd/model/PngApproGdModel.ts @@ -0,0 +1,26 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngPngAppro分页参数 模型 + */ +export interface LngPngApproPageParams extends BasicPageParams { + id: string; + + datePlan: string; +} + +/** + * @description: LngPngAppro分页返回值模型 + */ +export interface LngPngApproPageModel { + id: string; + + datePlan: string; +} + +0; + +/** + * @description: LngPngAppro分页返回值结构 + */ +export type LngPngApproPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/api/dayPlan/PngApproJsz/index.ts b/src/api/dayPlan/PngApproJsz/index.ts new file mode 100644 index 0000000..6a8e105 --- /dev/null +++ b/src/api/dayPlan/PngApproJsz/index.ts @@ -0,0 +1,101 @@ +import { LngPngApproPageModel, LngPngApproPageParams, LngPngApproPageResult } from './model/PngApproJszModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + // Page = '/dayPlan/pngApproJsz/page', + Page = '/magic-api/dayPlan/pngApproJsz/page', + List = '/dayPlan/pngApproJsz/list', + Info = '/dayPlan/pngApproJsz/info', + LngPngAppro = '/dayPlan/pngApproJsz', + approve = '/dayPlan/pngAppro/approveJSZ', + + + + +} +export async function approveLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.approve, + params: lngPngAppro, + }, + { + errorMessageMode: mode, + }, + ); +} +/** + * @description: 查询LngPngAppro分页列表 + */ +export async function getLngPngApproPage(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngPngAppro信息 + */ +export async function getLngPngAppro(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngPngAppro + */ +export async function addLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngPngAppro, + params: lngPngAppro, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngPngAppro + */ +export async function updateLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngPngAppro, + params: lngPngAppro, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngPngAppro(批量删除) + */ +export async function deleteLngPngAppro(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngPngAppro, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/dayPlan/PngApproJsz/model/PngApproJszModel.ts b/src/api/dayPlan/PngApproJsz/model/PngApproJszModel.ts new file mode 100644 index 0000000..ce1feb2 --- /dev/null +++ b/src/api/dayPlan/PngApproJsz/model/PngApproJszModel.ts @@ -0,0 +1,26 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngPngAppro分页参数 模型 + */ +export interface LngPngApproPageParams extends BasicPageParams { + id: string; + + datePlan: string; +} + +/** + * @description: LngPngAppro分页返回值模型 + */ +export interface LngPngApproPageModel { + id: string; + + datePlan: string; +} + +0; + +/** + * @description: LngPngAppro分页返回值结构 + */ +export type LngPngApproPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/components/common/rejectReplyModal.vue b/src/components/common/rejectReplyModal.vue index c48c8e7..cb25c2f 100644 --- a/src/components/common/rejectReplyModal.vue +++ b/src/components/common/rejectReplyModal.vue @@ -1,19 +1,21 @@ \ No newline at end of file + + \ No newline at end of file diff --git a/src/design/index.less b/src/design/index.less index c33cf60..0f6007a 100644 --- a/src/design/index.less +++ b/src/design/index.less @@ -56,7 +56,7 @@ span { opacity: 0; } } - input.ant-input-disabled:placeholder-shown{ + input.ant-input-disabled:placeholder-shown, .ant-input-disabled:placeholder-shown{ opacity: 0 !important; } .ant-picker-input > input[disabled], .ant-radio-disabled + span { diff --git a/src/hooks/web/useCommon.ts b/src/hooks/web/useCommon.ts new file mode 100644 index 0000000..b34e48a --- /dev/null +++ b/src/hooks/web/useCommon.ts @@ -0,0 +1,10 @@ + + +export function numToThousands(number) { + if (number === null || number === undefined || number === '') return '' + let arr = number.toString().split('.') + let num = arr[0] + let float = arr[1] + let str = num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + return float ? (str + '.'+ float) : str; +} diff --git a/src/views/dayPlan/Demand/components/basicForm.vue b/src/views/dayPlan/Demand/components/basicForm.vue index a17065e..3387099 100644 --- a/src/views/dayPlan/Demand/components/basicForm.vue +++ b/src/views/dayPlan/Demand/components/basicForm.vue @@ -25,7 +25,7 @@ {{ formState.qtyContractGj }} - {{ formState.qtyContractM3 }} + {{ formState.qtyContractM3 }} {{ formState.rateK }} @@ -34,7 +34,7 @@ {{ formState.qtyPlanGj }} - {{ formState.qtyPlanM3 }} + {{ formState.qtyPlanM3 }} {{ formState.rateMp }} @@ -43,7 +43,7 @@ {{ formState.qtyDemandGj }} - {{ formState.qtyDemandM3 }} + {{ formState.qtyDemandM3 }} {{ formState.rateS }} @@ -52,7 +52,7 @@ {{ formState.qtySalesGj }} - {{ formState.qtySalesM3 }} + {{ formState.qtySalesM3 }} {{ formState.rateM3Gj }} @@ -170,9 +170,9 @@ { title: t('供应商'), dataIndex: 'suName', width: 300}, { title: t('上载点'), dataIndex: 'pointUpName', width:300}, { title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 200}, - { title: t('指定量(方)'), dataIndex: 'qtyDemandM3', width: 200}, + { title: t('指定量(万方)'), dataIndex: 'qtyDemandM3', width: 200}, { title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200}, - { title: t('批复量(方)'), dataIndex: 'qtySalesM3', width: 200}, + { title: t('批复量(万方)'), dataIndex: 'qtySalesM3', width: 200}, { title: t('备注'), dataIndex: 'note', width: 200}, ]); const formState = ref({}) diff --git a/src/views/dayPlan/PngAppro/components/basicForm.vue b/src/views/dayPlan/PngAppro/components/basicForm.vue index 720939b..275f530 100644 --- a/src/views/dayPlan/PngAppro/components/basicForm.vue +++ b/src/views/dayPlan/PngAppro/components/basicForm.vue @@ -13,7 +13,7 @@ {{ formState.qtyContractGj }} - {{ formState.qtyContractM3 }} + {{ formState.qtyContractM3 }} {{ formState.rateK }} @@ -22,7 +22,7 @@ {{ formState.qtyPlanGj }} - {{ formState.qtyPlanM3 }} + {{ formState.qtyPlanM3 }} {{ formState.rateMp }} @@ -31,7 +31,7 @@ {{ formState.qtyDemandGj }} - {{ formState.qtyDemandM3 }} + {{ formState.qtyDemandM3 }} {{ formState.rateS }} @@ -40,7 +40,7 @@ {{ formState.qtySalesGj }} - {{ formState.qtySalesM3 }} + {{ formState.qtySalesM3 }} {{ formState.rateM3Gj }} @@ -126,9 +126,9 @@ { title: t('供应商'), dataIndex: 'suName', width: 400}, { title: t('采购合同'), dataIndex: 'kpName', width: 400}, { title: t('指定量(吉焦)'), dataIndex: 'qtyDemandGj', width: 300}, - { title: t('指定量(方)'), dataIndex: 'qtyDemandM3', width: 200}, + { title: t('指定量(万方)'), dataIndex: 'qtyDemandM3', width: 200}, { title: t('批复量(吉焦)'), dataIndex: 'qtySalesGj', width: 200}, - { title: t('批复量(方)'), dataIndex: 'qtySalesM3', width: 200}, + { title: t('批复量(万方)'), dataIndex: 'qtySalesM3', width: 200}, { title: t('备注'), dataIndex: 'note', width: 300}, ]); const formState = ref() diff --git a/src/views/dayPlan/PngAppro/components/config.ts b/src/views/dayPlan/PngAppro/components/config.ts index d7e1d7d..4622b68 100644 --- a/src/views/dayPlan/PngAppro/components/config.ts +++ b/src/views/dayPlan/PngAppro/components/config.ts @@ -234,7 +234,7 @@ export const columns: BasicColumn[] = [ { dataIndex: 'qtyDemandM3', - title: '指定量(方)', + title: '指定量(万方)', componentType: 'input', align: 'left', @@ -252,7 +252,7 @@ export const columns: BasicColumn[] = [ { dataIndex: 'qtySalesM3', - title: '批复量(方)', + title: '批复量(万方)', componentType: 'input', align: 'left', diff --git a/src/views/dayPlan/PngAppro/components/createForm.vue b/src/views/dayPlan/PngAppro/components/createForm.vue index 636025e..0035a94 100644 --- a/src/views/dayPlan/PngAppro/components/createForm.vue +++ b/src/views/dayPlan/PngAppro/components/createForm.vue @@ -193,18 +193,8 @@ return } } - 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 - } spinning.value = true; - await request(params); + await approveLngPngAppro(params); spinning.value = false; notification.success({ message: 'Tip', diff --git a/src/views/dayPlan/PngAppro/index.vue b/src/views/dayPlan/PngAppro/index.vue index a441831..72c1f06 100644 --- a/src/views/dayPlan/PngAppro/index.vue +++ b/src/views/dayPlan/PngAppro/index.vue @@ -117,29 +117,9 @@ 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: request, + api: getLngPngApproPage, rowKey: 'id', columns: customConfigColums, formConfig: { @@ -304,7 +284,7 @@ "remark": "", "data": arr } - await requestApprove(obj) + await approveLngPngAppro(obj) handleSuccess(); notification.success({ message: 'Tip', diff --git a/src/views/dayPlan/PngAppro/indexJsz.vue b/src/views/dayPlan/PngAppro/indexJsz.vue index 18a7504..5b57452 100644 --- a/src/views/dayPlan/PngAppro/indexJsz.vue +++ b/src/views/dayPlan/PngAppro/indexJsz.vue @@ -26,7 +26,7 @@ - + \ No newline at end of file diff --git a/src/views/dayPlan/PngApproGd/components/PngApproGdModal.vue b/src/views/dayPlan/PngApproGd/components/PngApproGdModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/dayPlan/PngApproGd/components/PngApproGdModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/dayPlan/PngApproGd/components/config.ts b/src/views/dayPlan/PngApproGd/components/config.ts new file mode 100644 index 0000000..862853a --- /dev/null +++ b/src/views/dayPlan/PngApproGd/components/config.ts @@ -0,0 +1,227 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'datePlan', + label: '计划日期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, +]; + +export const columns: BasicColumn[] = [ + + { + dataIndex: 'datePlan', + title: '计划日期', + componentType: 'input', + align: 'left', + width: 100, + sorter: true, + }, + { + dataIndex: 'daysSign', + title: '当日/次日', + componentType: 'input', + align: 'left', + + sorter: true, + }, + { + dataIndex: 'pointName', + title: '下载点', + componentType: 'input', + align: 'left', + + sorter: true, + }, + { + dataIndex: 'qtyGjGd', + title: '待管道审批量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtyGjXs', + title: '前审中量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtyGjYsp', + title: '管道已审批量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'staName', + title: '接收站', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + +]; +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; +export const formProps: FormProps = { + labelCol: { span: 3, offset: 0 }, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: '683f135952ab475cad8bdc56eb65b221', + field: 'id', + label: 'id', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入id', + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '3240cd9a50ec42e6817bf147488e8cdc', + field: 'datePlan', + label: '计划日期', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入计划日期', + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/dayPlan/PngApproGd/components/workflowPermission.ts b/src/views/dayPlan/PngApproGd/components/workflowPermission.ts new file mode 100644 index 0000000..7d99b82 --- /dev/null +++ b/src/views/dayPlan/PngApproGd/components/workflowPermission.ts @@ -0,0 +1,32 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: 'id', + fieldId: 'id', + isSubTable: false, + showChildren: true, + type: 'input', + key: '683f135952ab475cad8bdc56eb65b221', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '计划日期', + fieldId: 'datePlan', + isSubTable: false, + showChildren: true, + type: 'input', + key: '3240cd9a50ec42e6817bf147488e8cdc', + children: [], + }, +]; \ No newline at end of file diff --git a/src/views/dayPlan/PngApproGd/index.vue b/src/views/dayPlan/PngApproGd/index.vue new file mode 100644 index 0000000..4d876d2 --- /dev/null +++ b/src/views/dayPlan/PngApproGd/index.vue @@ -0,0 +1,399 @@ + + + \ No newline at end of file diff --git a/src/views/dayPlan/PngApproJsz/components/Form.vue b/src/views/dayPlan/PngApproJsz/components/Form.vue new file mode 100644 index 0000000..986e57e --- /dev/null +++ b/src/views/dayPlan/PngApproJsz/components/Form.vue @@ -0,0 +1,224 @@ + + \ No newline at end of file diff --git a/src/views/dayPlan/PngApproJsz/components/PngApproJszModal.vue b/src/views/dayPlan/PngApproJsz/components/PngApproJszModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/dayPlan/PngApproJsz/components/PngApproJszModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/dayPlan/PngApproJsz/components/config.ts b/src/views/dayPlan/PngApproJsz/components/config.ts new file mode 100644 index 0000000..3f876d6 --- /dev/null +++ b/src/views/dayPlan/PngApproJsz/components/config.ts @@ -0,0 +1,247 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'datePlan', + label: '计划日期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, +]; + +export const columns: BasicColumn[] = [ + + + { + dataIndex: 'catName', + title: '品种', + componentType: 'input', + align: 'left', + width: 80, + sorter: true, + }, + + { + dataIndex: 'datePlan', + title: '计划日期', + componentType: 'input', + align: 'left', + width: 100, + sorter: true, + }, + + { + dataIndex: 'daysSign', + title: '当日/次日', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtyGjAll', + title: '全部上报量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtyGjJsz', + title: '待接收站审批量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtyGjXs', + title: '前审中量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'qtyGjYsp', + title: '管道已审批量(吉焦)', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'staName', + title: '接收站', + componentType: 'input', + align: 'left', + + sorter: true, + }, + + { + dataIndex: 'uomName', + title: '单位', + componentType: 'input', + align: 'left', + + sorter: true, + }, +]; +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; +export const formProps: FormProps = { + labelCol: { span: 3, offset: 0 }, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: '4987e77a40b84fc5839e8320a4a03262', + field: 'id', + label: 'id', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入id', + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'e05e379e525741a6854f46976655539f', + field: 'datePlan', + label: '计划日期', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入计划日期', + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/dayPlan/PngApproJsz/components/workflowPermission.ts b/src/views/dayPlan/PngApproJsz/components/workflowPermission.ts new file mode 100644 index 0000000..c7e9447 --- /dev/null +++ b/src/views/dayPlan/PngApproJsz/components/workflowPermission.ts @@ -0,0 +1,32 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: 'id', + fieldId: 'id', + isSubTable: false, + showChildren: true, + type: 'input', + key: '4987e77a40b84fc5839e8320a4a03262', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '计划日期', + fieldId: 'datePlan', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'e05e379e525741a6854f46976655539f', + children: [], + }, +]; \ No newline at end of file diff --git a/src/views/dayPlan/PngApproJsz/index.vue b/src/views/dayPlan/PngApproJsz/index.vue new file mode 100644 index 0000000..a391ed6 --- /dev/null +++ b/src/views/dayPlan/PngApproJsz/index.vue @@ -0,0 +1,393 @@ + + + \ No newline at end of file diff --git a/src/views/dayPlan/PngMeasureSalesPur/components/config.ts b/src/views/dayPlan/PngMeasureSalesPur/components/config.ts index 6f257a7..41bd0da 100644 --- a/src/views/dayPlan/PngMeasureSalesPur/components/config.ts +++ b/src/views/dayPlan/PngMeasureSalesPur/components/config.ts @@ -101,7 +101,7 @@ export const columns: BasicColumn[] = [ { dataIndex: 'qtySalesM3', - title: '批复量(方)', + title: '批复量(万方)', componentType: 'input', align: 'left', width: 120, @@ -119,7 +119,7 @@ export const columns: BasicColumn[] = [ { dataIndex: 'qtyMeaM3', - title: '完成量(方)', + title: '完成量(万方)', componentType: 'input', align: 'left', width: 120, diff --git a/src/views/dayPlan/PngMeasureSalesPur/components/createForm.vue b/src/views/dayPlan/PngMeasureSalesPur/components/createForm.vue index 1649e0c..54629d0 100644 --- a/src/views/dayPlan/PngMeasureSalesPur/components/createForm.vue +++ b/src/views/dayPlan/PngMeasureSalesPur/components/createForm.vue @@ -10,7 +10,16 @@ - + + + @@ -31,6 +40,7 @@ import { getLngPngMeasureSalesPurPageAdd, addLngPngMeasureSalesPur } from '/@/api/dayPlan/PngMeasureSalesPur'; import {formConfig, searchFormSchema, columns } from './config'; import searchForm from './searchForm.vue'; + import NP from 'number-precision'; const userStore = useUserStore(); diff --git a/src/views/dayPlan/PngMeasureSalesPur/index.vue b/src/views/dayPlan/PngMeasureSalesPur/index.vue index 9a39807..fda5f3e 100644 --- a/src/views/dayPlan/PngMeasureSalesPur/index.vue +++ b/src/views/dayPlan/PngMeasureSalesPur/index.vue @@ -83,7 +83,7 @@ import { downloadByUrl } from '/@/utils/file/download'; import { DeleteOutlined } from '@ant-design/icons-vue'; import searchForm from './components/searchForm.vue' - + import NP from 'number-precision'; const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus(); @@ -168,6 +168,10 @@ ...formState.value, }); tableData.value = res.list || []; + tableData.value.forEach(v=> { + v.qtySalesM3 = NP.divide(Number(v.qtySalesM3), 10000) + v.qtyMeaM3 = NP.divide(Number(v.qtyMeaM3), 10000) + }) total.value = res.total || res.length || 0; } catch (error) { console.error('获取列表失败:', error); @@ -260,6 +264,10 @@ }); return; } + selectedRowsData.value.forEach(v => { + v.qtyMeaM3 = NP.times(Number(v.qtyMeaM3), 10000) + v.qtySalesM3 = NP.times(Number(v.qtySalesM3), 10000) + }) await updateLngPngMeasureSalesPur(selectedRowsData.value) handleSuccess(); notification.success({ @@ -275,6 +283,10 @@ }); return; } + selectedRowsData.value.forEach(v => { + v.qtyMeaM3 = NP.times(Number(v.qtyMeaM3), 10000) + v.qtySalesM3 = NP.times(Number(v.qtySalesM3), 10000) + }) await addLngPngMeasureSalesPur(selectedRowsData.value) handleSuccess(); notification.success({