---初始化后台管理web页面项目
This commit is contained in:
189
src/views/erp/purchase/components/ApplyCheckInfo.vue
Normal file
189
src/views/erp/purchase/components/ApplyCheckInfo.vue
Normal file
@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<BasicModal
|
||||
v-bind="$attrs"
|
||||
@register="registerModal"
|
||||
title="查看采购申请"
|
||||
:width="1000"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<div class="info-box">
|
||||
<div class="sub-title">基础信息</div>
|
||||
<a-row>
|
||||
<a-col :span="12">申请单号:{{ baseInfo?.applyNumber }}</a-col>
|
||||
<a-col :span="12">申请主题:{{ baseInfo?.theme }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">申请日期:{{ baseInfo?.applyDate }}</a-col>
|
||||
<a-col :span="12">申请部门:{{ baseInfo?.applyDepName }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">申请人员:{{ baseInfo?.applyUserNames }}</a-col>
|
||||
<a-col :span="12">关联项目:{{ baseInfo?.relatedProjectName }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">申请单号:{{ baseInfo?.applyNumber }}</a-col>
|
||||
<a-col :span="12">申请主题:{{ baseInfo?.theme }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="24">备注:{{ baseInfo?.remark }}</a-col>
|
||||
</a-row>
|
||||
<BasicTable @register="registerTable" />
|
||||
<div class="table-bottom">
|
||||
<span>合计</span>
|
||||
<div>
|
||||
<span>
|
||||
总量:
|
||||
<span class="price">{{ baseInfo?.countSum }}</span>
|
||||
</span>
|
||||
<span>
|
||||
总金额:
|
||||
<span class="price">{{ baseInfo?.amountSum }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sub-title">附件</div>
|
||||
<Upload
|
||||
v-if="baseInfo?.filePath"
|
||||
v-model:value="baseInfo.filePath"
|
||||
listType="dragger"
|
||||
:style="{ width: '200px', display: 'none' }"
|
||||
:showRemoveIcon="false"
|
||||
/>
|
||||
<div style="height: 100px" v-else></div>
|
||||
<div class="sub-title">审批记录</div>
|
||||
<FlowRecord v-if="isReady" :list="workflowList" :processId="processId" />
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { BasicTable, useTable, BasicColumn } from '/@/components/Table';
|
||||
import Upload from '/@/components/Form/src/components/Upload.vue';
|
||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||
import { getCaseErpApply } from '/@/api/erp/purchase/apply';
|
||||
import { getRecordList } from '/@/api/erp/purchase/order';
|
||||
|
||||
const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '物料编码',
|
||||
dataIndex: 'code',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
dataIndex: 'model',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'unitName',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '预计单价',
|
||||
dataIndex: 'price',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '申请数量',
|
||||
dataIndex: 'count',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '预计金额',
|
||||
dataIndex: 'amount',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '交付日期',
|
||||
dataIndex: 'payDate',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '用途',
|
||||
dataIndex: 'purpose',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
|
||||
const rowId = ref('');
|
||||
const processId = ref('');
|
||||
const workflowList = ref();
|
||||
const baseInfo = ref();
|
||||
const isReady = ref(false);
|
||||
|
||||
const [registerTable, { setTableData }] = useTable({
|
||||
title: '物品明细',
|
||||
columns,
|
||||
bordered: true,
|
||||
pagination: false,
|
||||
});
|
||||
|
||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
||||
setModalProps({
|
||||
confirmLoading: false,
|
||||
destroyOnClose: true,
|
||||
footer: null,
|
||||
showCancelBtn: false,
|
||||
showOkBtn: false,
|
||||
});
|
||||
|
||||
rowId.value = data.id;
|
||||
processId.value = data.processId;
|
||||
if (processId.value) {
|
||||
const res = await getRecordList(processId.value);
|
||||
workflowList.value = [
|
||||
{
|
||||
records: res.taskRecords,
|
||||
schemaName: '当前流程',
|
||||
},
|
||||
];
|
||||
}
|
||||
isReady.value = true;
|
||||
|
||||
const record = await getCaseErpApply(data.id);
|
||||
baseInfo.value = record;
|
||||
setTableData(record.caseErpApplyDetailList || []);
|
||||
});
|
||||
|
||||
const handleCancel = () => {
|
||||
isReady.value = false;
|
||||
workflowList.value = [];
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.info-box {
|
||||
padding: 0 16px;
|
||||
|
||||
:deep(.vben-basic-table) {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.ant-row {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-weight: bold;
|
||||
margin: 15px 0 20px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.table-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 5px;
|
||||
|
||||
& > div > span {
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
126
src/views/erp/purchase/components/ApplyModal.vue
Normal file
126
src/views/erp/purchase/components/ApplyModal.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<BasicModal
|
||||
v-bind="$attrs"
|
||||
@register="registerModal"
|
||||
:title="getTitle"
|
||||
@ok="handleSubmit"
|
||||
@cancel="handleClose"
|
||||
:paddingRight="15"
|
||||
:bodyStyle="{ minHeight: '400px !important' }"
|
||||
>
|
||||
<SimpleForm ref="formRef" :formProps="formProps" :formModel="state.formModel" />
|
||||
</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 { addCaseErpApply, getCaseErpApply, updateCaseErpApply } from '/@/api/erp/purchase/apply';
|
||||
|
||||
import { formProps } from './config';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
|
||||
|
||||
const emit = defineEmits(['success', 'register']);
|
||||
|
||||
const { notification } = useMessage();
|
||||
const { filterFormSchemaAuth } = usePermission();
|
||||
const formRef = ref();
|
||||
formProps.schemas = filterFormSchemaAuth(formProps.schemas!);
|
||||
const state = reactive({
|
||||
formModel: {},
|
||||
isUpdate: true,
|
||||
isView: false,
|
||||
rowId: '',
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
state.isUpdate = !!data?.isUpdate;
|
||||
state.isView = !!data?.isView;
|
||||
|
||||
setModalProps({
|
||||
destroyOnClose: true,
|
||||
maskClosable: false,
|
||||
showCancelBtn: !state.isView,
|
||||
showOkBtn: !state.isView,
|
||||
canFullscreen: true,
|
||||
width: 1200,
|
||||
});
|
||||
const viewformProps = cloneDeep(formProps);
|
||||
setDisabled(viewformProps.schemas);
|
||||
formRef.value.setProps(state.isView ? viewformProps : formProps);
|
||||
if (state.isUpdate || state.isView) {
|
||||
state.rowId = data.id;
|
||||
const record = await getCaseErpApply(data.id);
|
||||
formRef.value.setFieldsValue(record);
|
||||
} else {
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
});
|
||||
|
||||
const getTitle = computed(() => (state.isView ? '查看' : !state.isUpdate ? '新增' : '编辑'));
|
||||
|
||||
function setDisabled(schemas) {
|
||||
const layoutComponents = ['tab', 'grid', 'card'];
|
||||
schemas?.map((info) => {
|
||||
if (layoutComponents.includes(info.type!)) {
|
||||
info.children?.map((childInfo) => {
|
||||
childInfo.list.map((com) => {
|
||||
if (layoutComponents.includes(com.type)) {
|
||||
setDisabled(childInfo.list);
|
||||
} else {
|
||||
com.dynamicDisabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (info.type == 'one-for-one') {
|
||||
setDisabled(info.componentProps.childSchemas);
|
||||
} else {
|
||||
info.dynamicDisabled = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
const values = await formRef.value?.validate();
|
||||
//添加隐藏组件
|
||||
if (formProps.hiddenComponent?.length) {
|
||||
formProps.hiddenComponent.forEach((component) => {
|
||||
values[component.bindField] = component.value;
|
||||
});
|
||||
}
|
||||
setModalProps({ confirmLoading: true });
|
||||
|
||||
// TODO custom api
|
||||
if (!state.isUpdate) {
|
||||
//false 新增
|
||||
await addCaseErpApply(values);
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
description: t('新增成功!'),
|
||||
}); //提示消息
|
||||
} else {
|
||||
values.id = state.rowId;
|
||||
await updateCaseErpApply(values);
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
description: t('修改成功!'),
|
||||
}); //提示消息
|
||||
}
|
||||
|
||||
closeModal();
|
||||
formRef.value.resetFields();
|
||||
emit('success');
|
||||
} finally {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
|
||||
function handleClose() {
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
</script>
|
||||
714
src/views/erp/purchase/components/OrderInfoModal.vue
Normal file
714
src/views/erp/purchase/components/OrderInfoModal.vue
Normal file
@ -0,0 +1,714 @@
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="查看订单详情" @cancel="handleCancel">
|
||||
<div class="info-box">
|
||||
<a-card :bordered="false">
|
||||
<div class="title-name">{{ baseInfo?.theme }}</div>
|
||||
<div class="title-info">
|
||||
<span>创建人:{{ baseInfo?.createUserName }}</span>
|
||||
<span>创建时间:{{ baseInfo?.createDate }}</span>
|
||||
<span>最后修改人:{{ baseInfo?.modifyUserName }}</span>
|
||||
<span>修改时间:{{ baseInfo?.modifyDate }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<a-button size="small" class="title-btn" @click="handlePrint">打印</a-button>
|
||||
</div>
|
||||
</a-card>
|
||||
<a-card :bordered="false">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane key="1" tab="订单信息">
|
||||
<a-row>基础信息</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">采购单号:{{ baseInfo?.purchaseNumber }}</a-col>
|
||||
<a-col :span="12">订单主题:{{ baseInfo?.theme }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">采购日期:{{ baseInfo?.purchaseDate }}</a-col>
|
||||
<a-col :span="12">供应商名称:{{ baseInfo?.supplierName }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">联系人:{{ baseInfo?.supplierPerson }}</a-col>
|
||||
<a-col :span="12">联系方式:{{ baseInfo?.supplierWay }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">采购部门:{{ baseInfo?.purchaseDeptName }}</a-col>
|
||||
<a-col :span="12">采购人员:{{ baseInfo?.purchasePersonName }}</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">联系电话:{{ baseInfo?.purchasePhone }}</a-col>
|
||||
<a-col :span="12">关联项目:{{ baseInfo?.relatedProjectName }}</a-col>
|
||||
</a-row>
|
||||
<a-row> 结算方式:{{ baseInfo?.payTypeName }} </a-row>
|
||||
<a-row> 交货地址:{{ baseInfo?.payAddress }} </a-row>
|
||||
<a-row> 备注:{{ baseInfo?.remark }} </a-row>
|
||||
<BasicTable @register="registerPurchaseTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleExport('purchase')">导出</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<div class="table-bottom">
|
||||
<span>合计</span>
|
||||
<div>
|
||||
<span>总量:{{ baseInfo?.countSum }}</span>
|
||||
<span> 总金额:{{ baseInfo?.amountSum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
附件:
|
||||
<Upload
|
||||
v-if="baseInfo?.filePath"
|
||||
v-model:value="baseInfo.filePath"
|
||||
listType="dragger"
|
||||
:style="{ width: '200px', display: 'none' }"
|
||||
:showRemoveIcon="false"
|
||||
/>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2">
|
||||
<template #tab>
|
||||
<span>
|
||||
入库记录
|
||||
<Icon
|
||||
icon="ant-design:check-circle-filled"
|
||||
:size="20"
|
||||
v-if="baseInfo?.inStoreState === 1"
|
||||
/>
|
||||
<Icon
|
||||
icon="ant-design:exclamation-circle-filled"
|
||||
color="#FF1A2E"
|
||||
:size="20"
|
||||
v-else
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<BasicTable @register="registerInstoreTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleExport('instore')">导出</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3">
|
||||
<template #tab>
|
||||
<span>
|
||||
到票记录
|
||||
<Icon
|
||||
icon="ant-design:check-circle-filled"
|
||||
:size="20"
|
||||
v-if="baseInfo?.ticketState === 1"
|
||||
/>
|
||||
<Icon
|
||||
icon="ant-design:exclamation-circle-filled"
|
||||
color="#FF1A2E"
|
||||
:size="20"
|
||||
v-else
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<BasicTable @register="registerTicketTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleExport('ticket')">导出</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="4">
|
||||
<template #tab>
|
||||
<span>
|
||||
付款记录
|
||||
<Icon
|
||||
icon="ant-design:check-circle-filled"
|
||||
:size="20"
|
||||
v-if="baseInfo?.payState === 1"
|
||||
/>
|
||||
<Icon
|
||||
icon="ant-design:exclamation-circle-filled"
|
||||
color="#FF1A2E"
|
||||
:size="20"
|
||||
v-else
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<BasicTable @register="registerPayTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleExport('pay')">导出</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="5" tab="审批记录">
|
||||
<FlowRecord
|
||||
v-if="isReady"
|
||||
:list="workflowList"
|
||||
:processInstanceId="baseInfo.processInstanceId"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="6" tab="操作记录">
|
||||
<BasicTable @register="registerLogTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleExport('log')">导出</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicTable, useTable, BasicColumn, FormSchema } from '/@/components/Table';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import {
|
||||
exportPurchaseInfo,
|
||||
exportInstoreInfo,
|
||||
exportTicketInfo,
|
||||
exportPayInfo,
|
||||
exportLogInfo,
|
||||
} from '/@/api/erp/purchase/order';
|
||||
import { getPurchaseCheckInfo } from '/@/api/erp/purchase/order';
|
||||
import { getRecordList } from '/@/api/erp/purchase/order';
|
||||
import { getFileList } from '/@/api/system/file';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { downloadByData } from '/@/utils/file/download';
|
||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import Upload from '/@/components/Form/src/components/Upload.vue';
|
||||
import printJS from 'print-js';
|
||||
import domtoimage from 'dom-to-image';
|
||||
import { isNil } from 'lodash-es';
|
||||
|
||||
const purchaseColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '物料编码',
|
||||
dataIndex: 'code',
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
dataIndex: 'model',
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'unitName',
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '采购数量',
|
||||
dataIndex: 'count',
|
||||
},
|
||||
{
|
||||
title: '折扣',
|
||||
dataIndex: 'discount',
|
||||
},
|
||||
{
|
||||
title: '税率',
|
||||
dataIndex: 'taxRate',
|
||||
},
|
||||
{
|
||||
title: '税费',
|
||||
dataIndex: 'taxBreak',
|
||||
},
|
||||
{
|
||||
title: '税后金额',
|
||||
dataIndex: 'afterTaxAmount',
|
||||
},
|
||||
{
|
||||
title: '已入库数量',
|
||||
dataIndex: 'inStoreCount',
|
||||
},
|
||||
{
|
||||
title: '未入库数量',
|
||||
dataIndex: 'noInStoreCount',
|
||||
},
|
||||
{
|
||||
title: '退货数量',
|
||||
dataIndex: 'returnCount',
|
||||
},
|
||||
{
|
||||
title: '交付日期',
|
||||
dataIndex: 'deliveryDate',
|
||||
},
|
||||
];
|
||||
const instoreColumns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'code',
|
||||
title: '入库单号',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'theme',
|
||||
title: '入库订单主题',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'date',
|
||||
title: '入库日期',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'name',
|
||||
title: '供应商名称',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'person',
|
||||
title: '入库人员',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'store',
|
||||
title: '入库仓库',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
const ticketColumns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'code',
|
||||
title: '到票编号',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'theme',
|
||||
title: '到票主题',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'date',
|
||||
title: '到票日期',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'name',
|
||||
title: '开票方',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'ticketNum',
|
||||
title: '发票号码',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'ticketAmout',
|
||||
title: '到票金额',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
const payColumns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'code',
|
||||
title: '付款编号',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'theme',
|
||||
title: '付款主题',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'date',
|
||||
title: '付款日期',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'amount',
|
||||
title: '付款总额',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'payer',
|
||||
title: '收款方',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'account',
|
||||
title: '银行账号',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
const logColumns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'operateUserAccount',
|
||||
title: '操作人',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
dataIndex: 'createDate',
|
||||
title: '操作时间',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
dataIndex: 'executeResultJson',
|
||||
title: '操作类型',
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'keyword',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
placeholder: '请输入要查询的关键字',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const purchaseInfoDataSource = ref<any>([]);
|
||||
const instoreDataSource = ref<any>([]);
|
||||
const ticketDataSource = ref<any>([]);
|
||||
const payDataSource = ref<any>([]);
|
||||
const logInfoDataSource = ref<any>([]);
|
||||
|
||||
const isReady = ref(false);
|
||||
const rowId = ref('');
|
||||
const activeKey = ref('1');
|
||||
const baseInfo = ref();
|
||||
const workflowList = ref();
|
||||
const imgList = ref<any>([]);
|
||||
const { notification } = useMessage();
|
||||
|
||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
||||
setModalProps({
|
||||
confirmLoading: false,
|
||||
destroyOnClose: true,
|
||||
showCancelBtn: false,
|
||||
showOkBtn: false,
|
||||
width: 1000,
|
||||
fixedHeight: true,
|
||||
footer: null,
|
||||
});
|
||||
rowId.value = data.id;
|
||||
getInfo();
|
||||
});
|
||||
|
||||
const [registerPurchaseTable, { getSelectRowKeys: getPurchaseRowKeys }] = useTable({
|
||||
title: '采购物料',
|
||||
dataSource: purchaseInfoDataSource,
|
||||
rowKey: 'id',
|
||||
columns: purchaseColumns,
|
||||
bordered: true,
|
||||
pagination: false,
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
});
|
||||
const [registerInstoreTable, { getSelectRowKeys: getInstoreRowKeys, setProps: setInstoreProps }] =
|
||||
useTable({
|
||||
dataSource: instoreDataSource,
|
||||
rowKey: 'id',
|
||||
columns: instoreColumns,
|
||||
handleSearchInfoFn(info) {
|
||||
const filterData = instoreDataSource.value.filter((item) => {
|
||||
for (const key in item) {
|
||||
if (!isNil(item[key]) && item[key].toString().indexOf(info.keyword) > -1) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
});
|
||||
setInstoreProps({ dataSource: filterData });
|
||||
return info;
|
||||
},
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
bordered: true,
|
||||
pagination: false,
|
||||
useSearchForm: true,
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
});
|
||||
const [registerTicketTable, { getSelectRowKeys: getTicketRowKeys, setProps: setTicketProps }] =
|
||||
useTable({
|
||||
dataSource: ticketDataSource,
|
||||
rowKey: 'id',
|
||||
columns: ticketColumns,
|
||||
handleSearchInfoFn(info) {
|
||||
const filterData = ticketDataSource.value.filter((item) => {
|
||||
for (const key in item) {
|
||||
if (!isNil(item[key]) && item[key].toString().indexOf(info.keyword) > -1) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
});
|
||||
setTicketProps({ dataSource: filterData });
|
||||
return info;
|
||||
},
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
bordered: true,
|
||||
pagination: false,
|
||||
useSearchForm: true,
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
});
|
||||
const [registerPayTable, { getSelectRowKeys: getPayRowKeys, setProps: setPayProps }] = useTable({
|
||||
dataSource: payDataSource,
|
||||
rowKey: 'id',
|
||||
columns: payColumns,
|
||||
handleSearchInfoFn(info) {
|
||||
const filterData = payDataSource.value.filter((item) => {
|
||||
for (const key in item) {
|
||||
if (!isNil(item[key]) && item[key].toString().indexOf(info.keyword) > -1) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
});
|
||||
setPayProps({ dataSource: filterData });
|
||||
return info;
|
||||
},
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
bordered: true,
|
||||
pagination: false,
|
||||
useSearchForm: true,
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
});
|
||||
const [registerLogTable, { getSelectRowKeys: getLogRowKeys, setProps: setLogProps }] = useTable({
|
||||
dataSource: logInfoDataSource,
|
||||
rowKey: 'id',
|
||||
columns: logColumns,
|
||||
handleSearchInfoFn(info) {
|
||||
const filterData = logInfoDataSource.value.filter((item) => {
|
||||
for (const key in item) {
|
||||
if (!isNil(item[key]) && item[key].toString().indexOf(info.keyword) > -1) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
});
|
||||
setLogProps({ dataSource: filterData });
|
||||
return info;
|
||||
},
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
useSearchForm: true,
|
||||
bordered: true,
|
||||
pagination: false,
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
});
|
||||
|
||||
const getInfo = async () => {
|
||||
const res = await getPurchaseCheckInfo(rowId.value);
|
||||
baseInfo.value = res;
|
||||
purchaseInfoDataSource.value = res?.caseErpPurchaseDetailList;
|
||||
instoreDataSource.value = res?.inStoreLogVoList.map((x) => {
|
||||
return {
|
||||
code: x.code,
|
||||
theme: x.theme,
|
||||
date: x.date,
|
||||
name: x.name,
|
||||
person: x.person,
|
||||
store: x.store,
|
||||
};
|
||||
});
|
||||
ticketDataSource.value = res?.ticketLogVoList.map((x) => {
|
||||
return {
|
||||
code: x.code,
|
||||
theme: x.theme,
|
||||
date: x.date,
|
||||
name: x.name,
|
||||
ticketNum: x.ticketNum,
|
||||
ticketAmout: x.ticketAmout,
|
||||
};
|
||||
});
|
||||
payDataSource.value = res?.payLogVoList.map((x) => {
|
||||
return {
|
||||
code: x.code,
|
||||
theme: x.theme,
|
||||
date: x.date,
|
||||
amount: x.amount,
|
||||
payer: x.payer,
|
||||
account: x.account,
|
||||
};
|
||||
});
|
||||
logInfoDataSource.value = res?.logList.map((x) => {
|
||||
return {
|
||||
operateUserAccount: x.operateUserAccount,
|
||||
createDate: x.createDate,
|
||||
executeResultJson: x.executeResultJson,
|
||||
};
|
||||
});
|
||||
if (baseInfo.value.processInstanceId) {
|
||||
const res = await getRecordList(baseInfo.value.processInstanceId);
|
||||
workflowList.value = [
|
||||
{
|
||||
records: res.taskRecords,
|
||||
schemaName: '当前流程',
|
||||
},
|
||||
];
|
||||
}
|
||||
isReady.value = true;
|
||||
|
||||
if (baseInfo.value.filePath) {
|
||||
imgList.value = await getFileList({ folderId: baseInfo.value.filePath });
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
isReady.value = false;
|
||||
workflowList.value = [];
|
||||
activeKey.value = '1';
|
||||
};
|
||||
|
||||
const handleExport = async (type) => {
|
||||
const params: any = {
|
||||
saleId: rowId.value,
|
||||
};
|
||||
let title = '';
|
||||
let res;
|
||||
switch (type) {
|
||||
case 'purchase':
|
||||
if (!notice(getPurchaseRowKeys().length)) return;
|
||||
title = '采购信息';
|
||||
params.ids = getPurchaseRowKeys();
|
||||
res = await exportPurchaseInfo(params);
|
||||
break;
|
||||
case 'instore':
|
||||
if (!notice(getInstoreRowKeys().length)) return;
|
||||
title = '入库记录';
|
||||
params.ids = getInstoreRowKeys();
|
||||
res = await exportInstoreInfo(params);
|
||||
break;
|
||||
case 'ticket':
|
||||
if (!notice(getTicketRowKeys().length)) return;
|
||||
title = '到票记录';
|
||||
params.ids = getTicketRowKeys();
|
||||
res = await exportTicketInfo(params);
|
||||
break;
|
||||
case 'pay':
|
||||
if (!notice(getPayRowKeys().length)) return;
|
||||
title = '付款记录';
|
||||
params.ids = getPayRowKeys();
|
||||
res = await exportPayInfo(params);
|
||||
break;
|
||||
case 'log':
|
||||
title = '操作记录';
|
||||
params.ids = getLogRowKeys();
|
||||
res = await exportLogInfo(params);
|
||||
break;
|
||||
}
|
||||
downloadByData(
|
||||
res.data,
|
||||
`${title}.xlsx`,
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
);
|
||||
};
|
||||
|
||||
const notice = (length) => {
|
||||
if (!length) {
|
||||
notification.warning({
|
||||
message: 'Tip',
|
||||
description: '请选择需要导出的数据',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const handlePrint = async () => {
|
||||
const element: HTMLElement = window.document.querySelector('.info-box')!;
|
||||
const url = await domtoimage.toPng(element);
|
||||
printJS({
|
||||
printable: url,
|
||||
type: 'image',
|
||||
documentTitle: '打印',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.info-box {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
margin-right: 8px;
|
||||
|
||||
.title-name {
|
||||
font-size: 18px;
|
||||
color: #444;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.title-info {
|
||||
margin: 10px 0;
|
||||
|
||||
span {
|
||||
margin-right: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0;
|
||||
|
||||
& > div > span {
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.title-btn {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-row {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
:deep(.vben-basic-table) {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
:deep(.ant-table-wrapper),
|
||||
:deep(.ant-table-title) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
:deep(.ant-card-body) {
|
||||
background-color: #f8f8f8;
|
||||
margin-bottom: 12px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
:deep(.ant-tabs) {
|
||||
height: 70%;
|
||||
}
|
||||
|
||||
:deep(.ant-tabs-content) {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
570
src/views/erp/purchase/components/OrderModal.vue
Normal file
570
src/views/erp/purchase/components/OrderModal.vue
Normal file
@ -0,0 +1,570 @@
|
||||
<template>
|
||||
<BasicModal
|
||||
v-bind="$attrs"
|
||||
@register="registerModal"
|
||||
:title="getTitle"
|
||||
@ok="handleSubmit"
|
||||
:width="1000"
|
||||
>
|
||||
<div class="sub-title">基础信息</div>
|
||||
<BasicForm @register="registerForm">
|
||||
<template #code="{ model }">
|
||||
<a-input
|
||||
v-model:value="model.purchaseNumber"
|
||||
placeholder="请输入采购单号"
|
||||
:readonly="model.isSysNumBoolean"
|
||||
/>
|
||||
</template>
|
||||
<template #isSysNum="{ model }">
|
||||
<a-checkbox
|
||||
v-model:checked="model.isSysNumBoolean"
|
||||
@change="handleSysChange"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
用系统编号
|
||||
</a-checkbox>
|
||||
</template>
|
||||
<template #isRelation="{ model }">
|
||||
<a-checkbox
|
||||
v-model:checked="model.isRelationApplyBoolean"
|
||||
@change="handleRelationChange"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
不关联
|
||||
</a-checkbox>
|
||||
</template>
|
||||
<template #user="{ model }">
|
||||
<SelectUser
|
||||
v-model:value="model.purchasePersonId"
|
||||
:multiple="false"
|
||||
suffix="ant-design:setting-outlined"
|
||||
placeholder="请选择采购人员"
|
||||
@change="handleUserChange"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="openModal(true, { type: 'checkbox' })"> 添加 </a-button>
|
||||
<a-button type="primary" danger @click="handleDelete"> 移除</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'price'">
|
||||
<a-input-number
|
||||
v-model:value="record.price"
|
||||
:min="0"
|
||||
@change="handleNumberChange(record)"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'count'">
|
||||
<a-input-number
|
||||
v-model:value="record.count"
|
||||
:min="0"
|
||||
@change="handleNumberChange(record)"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'discount'">
|
||||
<a-input-number
|
||||
v-model:value="record.discount"
|
||||
addon-after="%"
|
||||
:min="0"
|
||||
@change="handleNumberChange(record)"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'taxRate'">
|
||||
<a-input-number
|
||||
v-model:value="record.taxRate"
|
||||
addon-after="%"
|
||||
:min="0"
|
||||
@change="handleNumberChange(record)"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'taxBreak'">
|
||||
<a-input v-model:value="record.taxBreak" disabled />
|
||||
</template>
|
||||
<template v-if="column.key === 'afterTaxAmount'">
|
||||
<a-input v-model:value="record.afterTaxAmount" disabled />
|
||||
</template>
|
||||
<template v-if="column.key === 'deliveryDate'">
|
||||
<XjrDatePicker v-model:value="record.deliveryDate" format="YYYY-MM-DD" />
|
||||
</template>
|
||||
<template v-if="column.key === 'remark'">
|
||||
<a-input v-model:value="record.remark" />
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<div class="table-bottom">
|
||||
<span>合计</span>
|
||||
<div>
|
||||
<span>
|
||||
总量:
|
||||
<span class="price">{{ total.countSum }}</span>
|
||||
</span>
|
||||
<span>
|
||||
总金额:
|
||||
<span class="price">{{ total.amountSum }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sub-title">附件</div>
|
||||
<Upload
|
||||
v-model:value="folderId"
|
||||
listType="dragger"
|
||||
:tip="fileTip"
|
||||
:style="{ width: '200px' }"
|
||||
/>
|
||||
<SelectModal @register="registerSelectModal" @success="handleSuccess" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, unref } from 'vue';
|
||||
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
|
||||
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||
import { BasicTable, useTable, BasicColumn, FormSchema } from '/@/components/Table';
|
||||
import Upload from '/@/components/Form/src/components/Upload.vue';
|
||||
import SelectModal from '../../bom/components/SelectModal.vue';
|
||||
import SelectUser from '/@/components/Form/src/components/SelectUser.vue';
|
||||
import { XjrDatePicker } from '/@/components/DatePicker';
|
||||
import { getSaleCode } from '/@/api/erp/sale/order';
|
||||
import { getPurchaseInfo, updatePurchase, addPurchase } from '/@/api/erp/purchase/order';
|
||||
import { getCaseErpApply } from '/@/api/erp/purchase/apply';
|
||||
import { getCaseErpApplyList } from '/@/api/erp/purchase/apply';
|
||||
import { getSupplierList } from '/@/api/erp/supplier/list';
|
||||
import { getUser } from '/@/api/system/user';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const handleApplyChange = async (id) => {
|
||||
const res = await getCaseErpApply(id);
|
||||
let userInfo;
|
||||
if (res.applyUserIds) {
|
||||
userInfo = await getUser(res.applyUserIds);
|
||||
}
|
||||
setFieldsValue({
|
||||
relatedProject: res.relatedProject,
|
||||
purchasePersonId: res.applyUserIds,
|
||||
purchaseDeptId: res.applyDepId,
|
||||
purchasePhone: userInfo?.mobile || '',
|
||||
filePath: res.filePath,
|
||||
});
|
||||
|
||||
unref(total).countSum = res.countSum || 0;
|
||||
unref(total).amountSum = res.amountSum || 0;
|
||||
|
||||
setTableData(res.caseErpApplyDetailList || []);
|
||||
};
|
||||
|
||||
const FormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'purchaseNumber',
|
||||
label: '采购单号',
|
||||
component: 'Input',
|
||||
slot: 'code',
|
||||
required: true,
|
||||
colProps: { span: 9 },
|
||||
},
|
||||
{
|
||||
field: 'isSysNumBoolean',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
slot: 'isSysNum',
|
||||
colProps: { span: 3 },
|
||||
},
|
||||
{
|
||||
field: 'applyId',
|
||||
label: '关联申请单',
|
||||
component: 'ApiSelect',
|
||||
colProps: { span: 9 },
|
||||
componentProps: {
|
||||
placeholder: '请选择关联申请单',
|
||||
api: getCaseErpApplyList,
|
||||
labelField: 'theme',
|
||||
valueField: 'id',
|
||||
getPopupContainer: () => document.body,
|
||||
onChange: handleApplyChange,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'isRelationApplyBoolean',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
slot: 'isRelation',
|
||||
colProps: { span: 3 },
|
||||
},
|
||||
{
|
||||
field: 'theme',
|
||||
label: '订单主题',
|
||||
component: 'Input',
|
||||
required: true,
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
placeholder: '请输入订单主题',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'purchaseDate',
|
||||
label: '采购日期',
|
||||
component: 'DatePicker',
|
||||
required: true,
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: '请选择采购日期',
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'supplierId',
|
||||
label: '供应商名称',
|
||||
component: 'ApiSelect',
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
placeholder: '请选择供应商名称',
|
||||
api: getSupplierList,
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
getPopupContainer: () => document.body,
|
||||
onChange: (_, option) => {
|
||||
if (option) {
|
||||
setFieldsValue({
|
||||
supplierPerson: option.person || '',
|
||||
supplierWay: option.phone || '',
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'supplierPerson',
|
||||
label: '联系人',
|
||||
component: 'Input',
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'supplierWay',
|
||||
label: '联系方式',
|
||||
component: 'Input',
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'purchaseDeptId',
|
||||
label: '采购部门',
|
||||
component: 'Dept',
|
||||
colProps: { span: 12 },
|
||||
},
|
||||
{
|
||||
field: 'purchasePersonId',
|
||||
label: '采购人员',
|
||||
component: 'Input',
|
||||
slot: 'user',
|
||||
colProps: { span: 12 },
|
||||
},
|
||||
{
|
||||
field: 'purchasePhone',
|
||||
label: '联系电话',
|
||||
component: 'Input',
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'relatedProject',
|
||||
label: '关联项目',
|
||||
component: 'DicSelect',
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
placeholder: '请选择关联项目',
|
||||
itemId: '1680768933996957698',
|
||||
isShowAdd: false,
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'payType',
|
||||
label: '结算方式',
|
||||
component: 'DicSelect',
|
||||
colProps: { span: 12 },
|
||||
componentProps: {
|
||||
placeholder: '请选择结算方式',
|
||||
itemId: '1680821338692333570',
|
||||
isShowAdd: false,
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'payAddress',
|
||||
label: '交付地址',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
placeholder: '请输入交货地址',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
label: '备注',
|
||||
component: 'InputTextArea',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
placeholder: '请输入备注',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '物料编码',
|
||||
dataIndex: 'code',
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
dataIndex: 'model',
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'unitName',
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
dataIndex: 'count',
|
||||
},
|
||||
{
|
||||
title: '折扣',
|
||||
dataIndex: 'discount',
|
||||
},
|
||||
{
|
||||
title: '税率',
|
||||
dataIndex: 'taxRate',
|
||||
},
|
||||
{
|
||||
title: '税费',
|
||||
dataIndex: 'taxBreak',
|
||||
},
|
||||
{
|
||||
title: '税后金额',
|
||||
dataIndex: 'afterTaxAmount',
|
||||
},
|
||||
{
|
||||
title: '交付日期',
|
||||
dataIndex: 'deliveryDate',
|
||||
},
|
||||
];
|
||||
|
||||
const { notification } = useMessage();
|
||||
const isUpdate = ref(true);
|
||||
const rowId = ref('');
|
||||
const folderId = ref('');
|
||||
const fileTip = '支持扩展名:.doc .docx .pdf .jpg ...';
|
||||
|
||||
const total = ref({
|
||||
countSum: 0 as any,
|
||||
amountSum: 0 as any,
|
||||
});
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate, updateSchema }] = useForm({
|
||||
labelWidth: 100,
|
||||
schemas: FormSchema,
|
||||
showActionButtonGroup: false,
|
||||
actionColOptions: {
|
||||
span: 23,
|
||||
},
|
||||
});
|
||||
const customRow = (record) => {
|
||||
return {
|
||||
onClick: () => {
|
||||
let selectedRowKeys = [...getSelectRowKeys()];
|
||||
if (selectedRowKeys.indexOf(record.key) >= 0) {
|
||||
let index = selectedRowKeys.indexOf(record.key);
|
||||
selectedRowKeys.splice(index, 1);
|
||||
} else {
|
||||
selectedRowKeys.push(record.key);
|
||||
}
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
};
|
||||
};
|
||||
const [registerTable, { setSelectedRowKeys, getSelectRowKeys, setTableData, getDataSource }] =
|
||||
useTable({
|
||||
title: '采购物料',
|
||||
columns,
|
||||
striped: false,
|
||||
pagination: false,
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
},
|
||||
customRow,
|
||||
});
|
||||
|
||||
const [registerSelectModal, { openModal }] = useModal();
|
||||
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
resetFields();
|
||||
setModalProps({ confirmLoading: false, destroyOnClose: true });
|
||||
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
if (unref(isUpdate)) {
|
||||
rowId.value = data.id;
|
||||
const record = await getPurchaseInfo(data.id);
|
||||
folderId.value = record.filePath || '';
|
||||
setFieldsValue({
|
||||
...record,
|
||||
});
|
||||
setTableData(record.caseErpPurchaseDetails || []);
|
||||
unref(total).countSum = record.countSum || 0;
|
||||
unref(total).amountSum = record.amountSum || 0;
|
||||
} else {
|
||||
folderId.value = '';
|
||||
const code = await getSaleCode();
|
||||
setFieldsValue({ purchaseNumber: code, isSysNumBoolean: true });
|
||||
}
|
||||
});
|
||||
|
||||
const getTitle = computed(() => (!unref(isUpdate) ? '新增订单' : '编辑订单'));
|
||||
|
||||
const handleSysChange = async (e) => {
|
||||
let code = '';
|
||||
if (e.target.checked) {
|
||||
code = await getSaleCode();
|
||||
}
|
||||
setFieldsValue({ purchaseNumber: code });
|
||||
};
|
||||
const handleRelationChange = async (e) => {
|
||||
updateSchema({
|
||||
field: 'applyId',
|
||||
componentProps: { disabled: e.target.checked },
|
||||
});
|
||||
if (e.target.checked) {
|
||||
setFieldsValue({
|
||||
applyId: '',
|
||||
relatedProject: '',
|
||||
purchasePersonId: '',
|
||||
purchaseDeptId: '',
|
||||
purchasePhone: '',
|
||||
filePath: '',
|
||||
});
|
||||
|
||||
unref(total).countSum = 0;
|
||||
unref(total).amountSum = 0;
|
||||
|
||||
setTableData([]);
|
||||
}
|
||||
};
|
||||
|
||||
const handleUserChange = (_, options) => {
|
||||
setFieldsValue({ purchasePhone: options[0]?.mobile });
|
||||
};
|
||||
|
||||
const handleNumberChange = (record) => {
|
||||
const price = record.price || 0;
|
||||
const count = record.count || 0;
|
||||
const discount = record.discount || 0;
|
||||
const taxRate = record.taxRate || 0;
|
||||
if (discount) {
|
||||
record.taxBreak = price * count * (1 - discount / 100) * (taxRate / 100);
|
||||
} else {
|
||||
record.taxBreak = price * count * (taxRate / 100);
|
||||
}
|
||||
record.afterTaxAmount = price * count * (1 - discount / 100) + record.taxBreak;
|
||||
record.taxBreak = record.taxBreak.toFixed(2);
|
||||
record.afterTaxAmount = record.afterTaxAmount.toFixed(2);
|
||||
|
||||
handleTotalChange();
|
||||
};
|
||||
|
||||
const handleSuccess = async (data) => {
|
||||
data.map((x) => {
|
||||
x.taxRate = 3;
|
||||
x.count = 0;
|
||||
});
|
||||
setTableData([...getDataSource(), ...data]);
|
||||
};
|
||||
|
||||
const handleDelete = () => {
|
||||
const datasource = getDataSource().filter((x) => !getSelectRowKeys().includes(x.key));
|
||||
setTableData(datasource);
|
||||
handleTotalChange();
|
||||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
try {
|
||||
const values = await validate();
|
||||
values.filePath = folderId.value;
|
||||
values.addCaseErpPurchaseDetailDtoList = getDataSource() || [];
|
||||
Object.assign(values, unref(total));
|
||||
setModalProps({ confirmLoading: true });
|
||||
|
||||
if (!unref(isUpdate)) {
|
||||
await addPurchase(values);
|
||||
notification.success({
|
||||
message: '新增订单',
|
||||
description: t('成功'),
|
||||
});
|
||||
} else {
|
||||
values.id = rowId.value;
|
||||
await updatePurchase(values);
|
||||
notification.success({
|
||||
message: '编辑订单',
|
||||
description: t('成功'),
|
||||
});
|
||||
}
|
||||
|
||||
closeModal();
|
||||
emit('success');
|
||||
} catch (error) {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
};
|
||||
|
||||
const handleTotalChange = () => {
|
||||
unref(total).countSum = 0;
|
||||
unref(total).amountSum = 0;
|
||||
getDataSource().map((item) => {
|
||||
const price = item.price || 0;
|
||||
const count = item.count || 0;
|
||||
unref(total).countSum += count;
|
||||
unref(total).amountSum += count * price;
|
||||
});
|
||||
unref(total).amountSum = unref(total).amountSum.toFixed(2);
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.sub-title {
|
||||
font-weight: bold;
|
||||
margin: 15px 0 20px 30px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.table-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 5px;
|
||||
|
||||
& > div > span {
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
color: #f00;
|
||||
}
|
||||
</style>
|
||||
613
src/views/erp/purchase/components/config.ts
Normal file
613
src/views/erp/purchase/components/config.ts
Normal file
@ -0,0 +1,613 @@
|
||||
import { FormProps } from '/@/components/Form';
|
||||
import { BasicColumn } from '/@/components/Table';
|
||||
import { uploadApi } from '/@/api/sys/upload';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'applyNumber',
|
||||
title: '请购单号',
|
||||
componentType: 'input',
|
||||
},
|
||||
{
|
||||
dataIndex: 'theme',
|
||||
title: '请购主题',
|
||||
componentType: 'input',
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'applyDate',
|
||||
title: '请购日期',
|
||||
componentType: 'date',
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'purchaseStatus',
|
||||
title: '采购状态',
|
||||
customRender: ({ record }) => {
|
||||
return record.purchaseStatus ? '已采购' : '未采购';
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'applyUserName',
|
||||
title: '采购人员',
|
||||
componentType: 'user',
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'applyDetail',
|
||||
title: '物品概要',
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'applyDepName',
|
||||
title: '请购部门',
|
||||
componentType: 'organization',
|
||||
},
|
||||
{
|
||||
dataIndex: 'applyUserName',
|
||||
title: '请购人员',
|
||||
componentType: 'user',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: 'relatedProjectName',
|
||||
title: '关联项目',
|
||||
componentType: 'select',
|
||||
},
|
||||
];
|
||||
|
||||
export const formProps: FormProps = {
|
||||
labelCol: { span: 2, offset: 0 },
|
||||
labelAlign: 'right',
|
||||
layout: 'horizontal',
|
||||
size: 'default',
|
||||
schemas: [
|
||||
{
|
||||
key: 'f03183acbdcd44dc97b840d075720c5b',
|
||||
field: '',
|
||||
label: '标题',
|
||||
type: 'title',
|
||||
component: 'Title',
|
||||
colProps: { span: 24 },
|
||||
defaultValue: '基础信息',
|
||||
componentProps: {
|
||||
defaultValue: '基础信息',
|
||||
color: '',
|
||||
align: 'left',
|
||||
fontSize: 14,
|
||||
style: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'ca555e9dad404e04a3939f09a3c27044',
|
||||
field: '',
|
||||
label: '',
|
||||
type: 'grid',
|
||||
colProps: { span: 24 },
|
||||
component: 'Grid',
|
||||
children: [
|
||||
{
|
||||
span: 12,
|
||||
list: [
|
||||
{
|
||||
key: '4980ff6f41bc437e9530ce0ec91de963',
|
||||
field: '',
|
||||
label: '',
|
||||
type: 'grid',
|
||||
colProps: { span: 24 },
|
||||
component: 'Grid',
|
||||
children: [
|
||||
{
|
||||
span: 18,
|
||||
list: [
|
||||
{
|
||||
key: '4d0964ebb5a246b9969871bcdaa2cb17',
|
||||
field: 'applyNumber',
|
||||
label: '申请单号',
|
||||
type: 'input',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: 6,
|
||||
defaultValue: '',
|
||||
placeholder: '请输入申请单号',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: true,
|
||||
required: true,
|
||||
rules: [],
|
||||
events: {},
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
span: 6,
|
||||
list: [
|
||||
{
|
||||
key: 'b3ba87573cf0466d951bc63fd4df1c78',
|
||||
field: 'isSysNum',
|
||||
label: '',
|
||||
type: 'checkbox',
|
||||
component: 'ApiCheckboxGroup',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
span: 7,
|
||||
showLabel: true,
|
||||
disabled: false,
|
||||
staticOptions: [{ key: 1, label: '用系统编号', value: '1' }],
|
||||
datasourceType: 'staticData',
|
||||
defaultSelect: '1',
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
apiConfig: {},
|
||||
dicOptions: [],
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
style: {},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
componentProps: { gutter: 16, justify: 'start', align: 'top', span: 7 },
|
||||
},
|
||||
],
|
||||
},
|
||||
{ span: 12, list: [] },
|
||||
],
|
||||
componentProps: { gutter: 16, justify: 'start', align: 'top' },
|
||||
},
|
||||
{
|
||||
key: '891431243da0459d8c7def90d854002c',
|
||||
field: 'theme',
|
||||
label: '申请主题',
|
||||
type: 'input',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入申请主题',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: true,
|
||||
required: true,
|
||||
rules: [],
|
||||
events: {},
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'c0cd005cf792430c87458b3761b793a2',
|
||||
field: '',
|
||||
label: '',
|
||||
type: 'grid',
|
||||
colProps: { span: 24 },
|
||||
component: 'Grid',
|
||||
children: [
|
||||
{
|
||||
span: 12,
|
||||
list: [
|
||||
{
|
||||
key: '25acf86d4ffe453d9ea5f113b276f669',
|
||||
field: 'applyDate',
|
||||
label: '申请日期',
|
||||
type: 'date',
|
||||
component: 'DatePicker',
|
||||
colProps: { span: 24 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
span: 4,
|
||||
defaultValue: '',
|
||||
width: '100%',
|
||||
placeholder: '请选择申请日期',
|
||||
format: 'YYYY-MM-DD',
|
||||
showLabel: true,
|
||||
allowClear: true,
|
||||
disabled: false,
|
||||
required: true,
|
||||
rules: [],
|
||||
events: {},
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'c9eb0e20e21c47b984a2c5d080cf98c4',
|
||||
field: 'applyUserIds',
|
||||
label: '申请人员',
|
||||
type: 'user',
|
||||
component: 'User',
|
||||
colProps: { span: 24 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
span: 4,
|
||||
width: '100%',
|
||||
defaultValue: '',
|
||||
placeholder: '请选择申请人员',
|
||||
userType: 0,
|
||||
prefix: '',
|
||||
suffix: 'ant-design:setting-outlined',
|
||||
showLabel: true,
|
||||
disabled: false,
|
||||
required: false,
|
||||
multiple: false,
|
||||
events: {},
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
span: 12,
|
||||
list: [
|
||||
{
|
||||
key: '392215a25f9f4c81bc23cf9c8ba87e74',
|
||||
field: 'applyDepId',
|
||||
label: '申请部门',
|
||||
type: 'organization',
|
||||
component: 'Dept',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
span: 4,
|
||||
width: '100%',
|
||||
orgzType: 0,
|
||||
placeholder: '请选择申请部门',
|
||||
showLabel: true,
|
||||
disabled: false,
|
||||
required: false,
|
||||
events: {},
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
{
|
||||
key: '97394dc0655a42a381813e4975a29e63',
|
||||
field: 'relatedProject',
|
||||
label: '关联项目',
|
||||
type: 'select',
|
||||
component: 'XjrSelect',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: 4,
|
||||
placeholder: '请选择关联项目',
|
||||
showLabel: true,
|
||||
showSearch: false,
|
||||
clearable: false,
|
||||
disabled: false,
|
||||
staticOptions: [
|
||||
{ key: 1, label: 'Option 1', value: 'Option 1' },
|
||||
{ key: 2, label: 'Option 2', value: 'Option 2' },
|
||||
{ key: 3, label: 'Option 3', value: 'Option 3' },
|
||||
],
|
||||
defaultSelect: '',
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '1680768933996957698' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
apiConfig: {},
|
||||
dicOptions: [],
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
itemId: '1680768933996957698',
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
componentProps: { gutter: 16, justify: 'start', align: 'top' },
|
||||
},
|
||||
{
|
||||
key: 'c7a6fbe82805417cb0b41bc1a6aa9999',
|
||||
field: 'remark',
|
||||
label: '备注',
|
||||
type: 'textarea',
|
||||
component: 'InputTextArea',
|
||||
colProps: { span: 24 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入备注',
|
||||
maxlength: null,
|
||||
rows: 4,
|
||||
autoSize: false,
|
||||
showCount: false,
|
||||
disabled: false,
|
||||
showLabel: true,
|
||||
allowClear: false,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'fb8a6d7b353a4b2c974a3f1bcf3a3985',
|
||||
label: '物品明细',
|
||||
field: 'caseErpApplyDetailList',
|
||||
type: 'form',
|
||||
component: 'SubForm',
|
||||
required: true,
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
mainKey: 'caseErpApplyDetailList',
|
||||
columns: [
|
||||
{
|
||||
key: '933cab4edd2047ca87b9c17683ae2702',
|
||||
title: '物料编码',
|
||||
dataIndex: 'code',
|
||||
componentType: 'Input',
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入物料编码',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: false,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: '20a6d2b20a1448189aa844a0043c140f',
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
componentType: 'Input',
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入物料名称',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: true,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: '7d422b2139284ce29b4124a6c29104af',
|
||||
title: '规格型号',
|
||||
dataIndex: 'model',
|
||||
componentType: 'Input',
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入规格型号',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: true,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'a482fdb6b3044cf18264fcf3a7baf49b',
|
||||
title: '单位',
|
||||
dataIndex: 'unitName',
|
||||
componentType: 'Input',
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入单位',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: true,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: '55a712069b7d46259bffb752ee0064af',
|
||||
title: '预计单价',
|
||||
dataIndex: 'price',
|
||||
componentType: 'InputNumber',
|
||||
defaultValue: 0,
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: 0,
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
maxlength: null,
|
||||
disabled: false,
|
||||
showLabel: true,
|
||||
controls: true,
|
||||
required: false,
|
||||
subTotal: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'be2cec3741474bab97dd5fd7e1c0d2fc',
|
||||
title: '申请数量',
|
||||
dataIndex: 'count',
|
||||
componentType: 'InputNumber',
|
||||
defaultValue: 0,
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: 0,
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
maxlength: null,
|
||||
disabled: false,
|
||||
showLabel: true,
|
||||
controls: true,
|
||||
required: false,
|
||||
subTotal: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: '93efc02d14db4cc5aa3882db8a6b69b9',
|
||||
title: '预计金额',
|
||||
dataIndex: 'amount',
|
||||
componentType: 'InputNumber',
|
||||
defaultValue: 0,
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: 0,
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
maxlength: null,
|
||||
disabled: true,
|
||||
showLabel: true,
|
||||
controls: true,
|
||||
required: false,
|
||||
subTotal: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'b328bb18405a4c41bb36d12bfe65da16',
|
||||
title: '交付日期',
|
||||
dataIndex: 'payDate',
|
||||
componentType: 'DatePicker',
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
width: '100%',
|
||||
placeholder: '请选择交付日期',
|
||||
format: 'YYYY-MM-DD',
|
||||
showLabel: true,
|
||||
allowClear: true,
|
||||
disabled: false,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: '97dbac431ae64cb5acd9c11fcb1350b0',
|
||||
title: '用途',
|
||||
dataIndex: 'purpose',
|
||||
componentType: 'Input',
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
defaultValue: '',
|
||||
placeholder: '请输入用途',
|
||||
maxlength: null,
|
||||
prefix: '',
|
||||
suffix: '',
|
||||
addonBefore: '',
|
||||
addonAfter: '',
|
||||
disabled: false,
|
||||
allowClear: false,
|
||||
showLabel: true,
|
||||
required: false,
|
||||
rules: [],
|
||||
events: {},
|
||||
},
|
||||
},
|
||||
{ title: '操作', key: 'action', fixed: 'right', width: '50px' },
|
||||
],
|
||||
span: '24',
|
||||
preloadType: 'api',
|
||||
apiConfig: {},
|
||||
itemId: '',
|
||||
dicOptions: [],
|
||||
useSelectButton: false,
|
||||
buttonName: '选择数据',
|
||||
showLabel: false,
|
||||
showComponentBorder: true,
|
||||
showFormBorder: true,
|
||||
showIndex: false,
|
||||
multipleHeads: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'ac18952da41b45c9a66ffba3e42b7f3d',
|
||||
field: 'filePath',
|
||||
label: '附件',
|
||||
type: 'upload',
|
||||
component: 'Upload',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
api: uploadApi,
|
||||
span: 24,
|
||||
defaultValue: [],
|
||||
accept: '',
|
||||
maxNumber: '',
|
||||
maxSize: '',
|
||||
showLabel: true,
|
||||
multiple: false,
|
||||
disabled: false,
|
||||
required: false,
|
||||
events: {},
|
||||
style: { width: '200px' },
|
||||
},
|
||||
},
|
||||
],
|
||||
showActionButtonGroup: false,
|
||||
buttonLocation: 'center',
|
||||
actionColOptions: { span: 24 },
|
||||
showResetButton: false,
|
||||
showSubmitButton: false,
|
||||
hiddenComponent: [],
|
||||
};
|
||||
Reference in New Issue
Block a user