diff --git a/src/api/wuziguanli/caigouPlan/index.ts b/src/api/wuziguanli/caigouPlan/index.ts new file mode 100644 index 0000000..ba6a719 --- /dev/null +++ b/src/api/wuziguanli/caigouPlan/index.ts @@ -0,0 +1,56 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { CaigouPlanVO, CaigouPlanForm, CaigouPlanQuery } from '@/api/wuziguanli/caigouPlan/types'; + +/** + * 查询运维-物资-采购计划单列表 + * @param query + * @returns {*} + */ + +export const listCaigouPlan = (query?: CaigouPlanQuery): AxiosPromise => { + return request({ + url: '/ops/caigouPlan/list', + method: 'get', + params: query + }); +}; + +/** + * 查询采购商列表 + * @param query + * @returns {*} + */ + +export const getSupplierList = (data:any): AxiosPromise => { + return request({ + url: '/ops/tenderSupplierInput/getList', + method: 'get', + params: data + }); +}; + +/** + * 新增运维-物资-采购计划单 + * @param data + * @returns {*} + */ +export const addCaigouPlan = (data: CaigouPlanForm): AxiosPromise => { + return request({ + url: '/ops/caigouPlan', + method: 'post', + data: data + }); +}; + +/** + * 查询运维-物资-采购计划单详情 + * @param id + * @returns {*} + */ +export const caigouPlanDetail = (id: string | number): AxiosPromise => { + return request({ + url: `/ops/caigouPlan/`+id, + method: 'get' + }); +}; diff --git a/src/api/wuziguanli/caigouPlan/types.ts b/src/api/wuziguanli/caigouPlan/types.ts new file mode 100644 index 0000000..83d1196 --- /dev/null +++ b/src/api/wuziguanli/caigouPlan/types.ts @@ -0,0 +1,558 @@ +export interface CaigouPlanVO { + /** + * id + */ + id: string | number; + + /** + * 项目id + */ + projectId: string | number; + + /** + * 计划名称 + */ + jihuaName: string; + + /** + * 计划编号 + */ + jihuaBianhao: string; + + /** + * 采购单位(当前登录人部门) + */ + caigouDanwei: number; + + /** + * 采购单位名称 + */ + caigouDanweiName: string; + + /** + * 经办人 + */ + jingbanren: number; + + /** + * 经办人名称 + */ + jingbanrenName: string; + + /** + * 合同类型 + */ + hetonType: string; + + /** + * 采购类型 + */ + caigouType: string; + + /** + * 仓库地址 + */ + cangkuUrl: string; + + /** + * 合同名称 + */ + hetonName: string; + + /** + * 供应商id + */ + gonyingshangId: string | number; + + /** + * 出货时间 + */ + chuhuoTime: string; + + /** + * 付款条件 + */ + fukuantiaojian: string; + + /** + * 发票开具方式 + */ + fapiaoKjfs: string; + + /** + * 计划状态 + */ + status: string; + + /** + * 审核状态 + */ + shenheStatus: string; + + /** + * 预计金额 + */ + yujiJine: number; + + /** + * 实际采购金额 + */ + shijiJine: number; + /** + * 文件id + */ + fileId: string | number; + + /** + * 文件地址 + */ + fileUrl: string; + + /** + * 文件名称 + */ + fileName: string; + + /** + * 采购申请计划id + */ + caigouPlanId: string | number; + + /** + * 产品名称 + */ + chanpinName: string; + + /** + * 产品型号 + */ + chanpinType: string; + + /** + * 产品单价 + */ + chanpinMonovalent: number; + + /** + * 购买数量 + */ + goumaiNumber: number; + + /** + * 单位 + */ + danwei: string; + + /** + * 用途 + */ + yontu: string; + + /** + * 总价 + */ + totalPrice: number; + /** + * 申请时间 + */ + createTime?: string; + /** + * 出货时间 + */ + chouhuoTime?: string; + /** + * 采购申请计划文件 新增 + */ + opsCaigouPlanFilesBos?: Array; + /** + * 采购申请计划产品 新增 + */ + opsCaigouPlanChanpinBos?:Array; + + /** + * 采购申请计划产品 查询 + */ + opsCaigouPlanChanpinVos?: Array; + + /** + * 采购申请计划文件 查询 + */ + opsCaigouPlanFilesVos?: Array; + +} + +export interface CaigouPlanForm extends BaseEntity { + /** + * id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 计划名称 + */ + jihuaName?: string; + + /** + * 计划编号 + */ + jihuaBianhao?: string; + + /** + * 采购单位(当前登录人部门) + */ + caigouDanwei?: number; + + /** + * 采购单位名称 + */ + caigouDanweiName?: string; + + /** + * 经办人 + */ + jingbanren?: number; + + /** + * 经办人名称 + */ + jingbanrenName?: string; + + /** + * 合同类型 + */ + hetonType?: string; + + /** + * 采购类型 + */ + caigouType?: string; + + /** + * 仓库地址 + */ + cangkuUrl?: string; + + /** + * 合同名称 + */ + hetonName?: string; + + /** + * 供应商id + */ + gonyingshangId?: string | number; + + /** + * 出货时间 + */ + chuhuoTime?: string; + + /** + * 付款条件 + */ + fukuantiaojian?: string; + + /** + * 发票开具方式 + */ + fapiaoKjfs?: string; + + /** + * 计划状态 + */ + status?: string; + + /** + * 审核状态 + */ + shenheStatus?: string; + + /** + * 预计金额 + */ + yujiJine?: number; + + /** + * 实际采购金额 + */ + shijiJine?: number; + /** + * 采购申请计划id + */ + caigouPlanId?: string | number; + + /** + * 文件id + */ + fileId?: string | number; + + /** + * 文件地址 + */ + fileUrl?: string; + + /** + * 文件名称 + */ + fileName?: string; + /** + * 产品名称 + */ + chanpinName?: string; + + /** + * 产品型号 + */ + chanpinType?: string; + + /** + * 产品单价 + */ + chanpinMonovalent?: number; + + /** + * 购买数量 + */ + goumaiNumber?: number; + + /** + * 单位 + */ + danwei?: string; + + /** + * 用途 + */ + yontu?: string; + + /** + * 总价 + */ + totalPrice?: number; + /** + * 采购申请计划文件 新增 + */ + opsCaigouPlanFilesBos?: Array; + /** + * 采购申请计划产品 新增 + */ + opsCaigouPlanChanpinBos?:Array; + + /** + * 采购申请计划产品 查询 + */ + opsCaigouPlanChanpinVos?: Array; + + /** + * 采购申请计划文件 查询 + */ + opsCaigouPlanFilesVos?: Array; + /** + * 申请时间 + */ + createTime?: string; + /** + * 出货时间 + */ + chouhuoTime?: string; + + +} + +export interface CaigouPlanQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 计划名称 + */ + jihuaName?: string; + + /** + * 计划编号 + */ + jihuaBianhao?: string; + + /** + * 采购单位(当前登录人部门) + */ + caigouDanwei?: number; + + /** + * 采购单位名称 + */ + caigouDanweiName?: string; + + /** + * 经办人 + */ + jingbanren?: number; + + /** + * 经办人名称 + */ + jingbanrenName?: string; + + /** + * 合同类型 + */ + hetonType?: string; + + /** + * 采购类型 + */ + caigouType?: string; + + /** + * 仓库地址 + */ + cangkuUrl?: string; + + /** + * 合同名称 + */ + hetonName?: string; + + /** + * 供应商id + */ + gonyingshangId?: string | number; + + /** + * 出货时间 + */ + chuhuoTime?: string; + + /** + * 付款条件 + */ + fukuantiaojian?: string; + + /** + * 发票开具方式 + */ + fapiaoKjfs?: string; + + /** + * 计划状态 + */ + status?: string; + + /** + * 审核状态 + */ + shenheStatus?: string; + + /** + * 预计金额 + */ + yujiJine?: number; + + /** + * 实际采购金额 + */ + shijiJine?: number; + + /** + * 日期范围参数 + */ + params?: any; + /** + * 采购申请计划id + */ + caigouPlanId?: string | number; + + /** + * 文件id + */ + fileId?: string | number; + + /** + * 文件地址 + */ + fileUrl?: string; + + /** + * 文件名称 + */ + fileName?: string; + + /** + * 产品名称 + */ + chanpinName?: string; + + /** + * 产品型号 + */ + chanpinType?: string; + + /** + * 产品单价 + */ + chanpinMonovalent?: number; + + /** + * 购买数量 + */ + goumaiNumber?: number; + + /** + * 单位 + */ + danwei?: string; + + /** + * 用途 + */ + yontu?: string; + + /** + * 总价 + */ + totalPrice?: number; + /** + * 采购申请计划文件 新增 + */ + opsCaigouPlanFilesBos?: Array; + /** + * 采购申请计划产品 新增 + */ + opsCaigouPlanChanpinBos?:Array; + + /** + * 采购申请计划产品 查询 + */ + opsCaigouPlanChanpinVos?: Array; + + /** + * 采购申请计划文件 查询 + */ + opsCaigouPlanFilesVos?: Array; + /** + * 申请时间 + */ + createTime?: string; + /** + * 出货时间 + */ + chouhuoTime?: string; +} + + + + + + + + + + diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 1767b1b..13093ec 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -3,6 +3,7 @@ - 选取文件 + 选取文件 +
+ +
+ 拖拽文件到此处,或 点击上传 +
+
@@ -63,11 +70,13 @@ const props = defineProps({ // 是否显示提示 isShowTip: propTypes.bool.def(true), // 禁用组件(仅查看文件) - disabled: propTypes.bool.def(false) + disabled: propTypes.bool.def(false), + // 是否开启拖拽上传 + isDrag: propTypes.bool.def(false) }); const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const emit = defineEmits(['update:modelValue']); +const emit = defineEmits(['update:modelValue', 'update:fileList']); const number = ref(0); const uploadList = ref([]); @@ -80,6 +89,7 @@ const showTip = computed(() => props.isShowTip && (props.fileType || props.fileS const fileUploadRef = ref(); + // 监听 fileType 变化,更新 fileAccept const fileAccept = computed(() => props.fileType.map((type) => `.${type}`).join(',')); @@ -164,6 +174,7 @@ const handleUploadSuccess = (res: any, file: UploadFile) => { url: res.data.url, ossId: res.data.ossId }); + uploadedSuccessfully(); } else { number.value--; @@ -189,6 +200,7 @@ const uploadedSuccessfully = () => { uploadList.value = []; number.value = 0; emit('update:modelValue', listToString(fileList.value)); + emit('update:fileList', fileList.value); proxy?.$modal.closeLoading(); } }; diff --git a/src/views/materialManagement/components/detailInfo.vue b/src/views/materialManagement/components/detailInfo.vue index f404af7..9b807ab 100644 --- a/src/views/materialManagement/components/detailInfo.vue +++ b/src/views/materialManagement/components/detailInfo.vue @@ -5,35 +5,35 @@ - + - - + + - + - + - + - + @@ -50,18 +50,18 @@ - + - + - + @@ -75,13 +75,13 @@ - - - - - - - + + + + + + + @@ -94,14 +94,14 @@ - + - + @@ -134,9 +134,39 @@
- + + \ No newline at end of file diff --git a/src/views/materialManagement/inventoryManagement.vue b/src/views/materialManagement/inventoryManagement.vue index 2d88994..e291202 100644 --- a/src/views/materialManagement/inventoryManagement.vue +++ b/src/views/materialManagement/inventoryManagement.vue @@ -61,7 +61,7 @@ : '添加入库单' }} + style="width: 100%;margin-top: 15px;">