diff --git a/src/api/firstOrder/inbound.js b/src/api/firstOrder/inbound.js index 1a31f50..ccb04c9 100644 --- a/src/api/firstOrder/inbound.js +++ b/src/api/firstOrder/inbound.js @@ -72,7 +72,6 @@ export const submitData = (sizeForm) => { }) } export const editList = (onePutStorageId) => { - console.log('api中的数据',onePutStorageId) return request({ url: '/smartpark/onePutStorage/detail', method: 'get', diff --git a/src/api/firstOrder/outbound.js b/src/api/firstOrder/outbound.js index 932ccdb..e32686d 100644 --- a/src/api/firstOrder/outbound.js +++ b/src/api/firstOrder/outbound.js @@ -57,10 +57,12 @@ export const submitData = (sizeForm) => { cryptoData: false }) } -export const getMaterialList = () => { +export const getMaterialList = (optionType) => { + console.log('api中的数据', optionType) return request({ url: '/smartpark/oneForm/getPutOneFormList', method: 'get', + params: optionType, cryptoToken: false, cryptoData: false }) diff --git a/src/api/materials/expend.js b/src/api/materials/expend.js index 8cb1abb..4955e11 100644 --- a/src/api/materials/expend.js +++ b/src/api/materials/expend.js @@ -13,3 +13,14 @@ export const getList = (current, size, params) => { cryptoData: false }) } +//归还和报废 +export const returnMaterial = (LdDurableFormDto) => { + console.log(LdDurableFormDto,'api传的參') + return request({ + url: '/smartpark/durableForm/restoreAndScrap ', + method: 'post', + data: LdDurableFormDto, + cryptoToken: false, + cryptoData: false + }) +} diff --git a/src/api/materials/index.js b/src/api/materials/index.js new file mode 100644 index 0000000..8a13f26 --- /dev/null +++ b/src/api/materials/index.js @@ -0,0 +1,11 @@ +import request from '@/router/axios'; + +export const upload = (file) => { + return request({ + url: '/smartpark/material/upload ', + method: 'post', + data: file, + cryptoToken: false, + cryptoData: false + }) +} diff --git a/src/views/demandOrder/index.vue b/src/views/demandOrder/index.vue index a44b160..82c6ea6 100644 --- a/src/views/demandOrder/index.vue +++ b/src/views/demandOrder/index.vue @@ -61,8 +61,8 @@ export default { label: "提交时间", prop: "optTime", type: "date", - format: "yyyy-MM-dd", - valueFormat: "yyyy-MM-dd", + format: "yyyy-MM-dd HH:mm:ss", + valueFormat: "yyyy-MM-dd HH:mm:ss", headerAlign: "center", align: "center", }, diff --git a/src/views/firstOrder/components/consumableDialog.vue b/src/views/firstOrder/components/consumableDialog.vue new file mode 100644 index 0000000..686a9c5 --- /dev/null +++ b/src/views/firstOrder/components/consumableDialog.vue @@ -0,0 +1,269 @@ + + \ No newline at end of file diff --git a/src/views/firstOrder/components/inDialog.vue b/src/views/firstOrder/components/inDialog.vue index b4fe825..bad5279 100644 --- a/src/views/firstOrder/components/inDialog.vue +++ b/src/views/firstOrder/components/inDialog.vue @@ -1,291 +1,301 @@ - - - + + - + + - - - - - - - - - + - - + - - - - + + +
入库账目表格:
+ + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + - - - - + + + + + + s + - - + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + - - - + + + + + + + + + + + 取 消 暂存 @@ -296,7 +306,7 @@ - + @@ -337,8 +347,6 @@ export default { inDialogVisible: false, sizeForm: { orderNo: '',//入库单号 - // applyNmae: 'user1',//审批人 - // submitName: '',//填报人 reason: '',//事由 inDate: '',//入库日期 inAccountsTableData: [],//总计 @@ -353,16 +361,18 @@ export default { purchaseEndInfo: '',//采购单信息 userInfoVO: { userId: "用户ID", - name: "用户名称" + name: "用户名称", + mainErDepartment: "1", + mainErDepartmentName: "主管部门名称", }, ldOnePutStorageDetailVOList: [],//入库明细 }, inTableData: [], - // singleData: {}, inBatchDialogVisible: false,//选择采购单的数据 batchType: '',//批量选择类型 materialsType: '', allDisabled: false, + } }, computed: { @@ -425,7 +435,6 @@ export default { try { const res = await editList(this.id); const { ldOnePutStorage, ldOnePutStorageDetailList = [] } = res.data.result || {}; - if (!ldOnePutStorage) { this.$message.error("回显数据异常"); return; @@ -446,17 +455,12 @@ export default { } else { this.sizeForm.singleData = handledDetailList; } - } catch (error) { - console.error("回显失败:", error); this.$message.error("获取详情数据失败"); } } }, addInit() { - // 生成入库单号 - // const randomNum = Math.floor(Math.random() * 100000000) + 1; - // this.sizeForm.orderNo = String(randomNum).padStart(8, '0');//入库单号 this.sizeForm.inDate = new Date()//入库时间 this.sizeForm.inTableData.theInboundQuantity = 0 }, @@ -478,7 +482,6 @@ export default { unitPrice: 0, }) } else { - // 确保singleData是数组 if (!Array.isArray(this.sizeForm.singleData)) { this.sizeForm.singleData = []; } @@ -486,7 +489,7 @@ export default { unit: '', model: '', name: '', - status: '',// + status: '', materialId: '', materialName: '', theInboundQuantity: 0, @@ -512,7 +515,6 @@ export default { this.sizeForm.purchaseEndInfo = selectedOption this.loading = true const res = await getPurchasesByIds(this.batchType); - console.log("res", res) if (res.data.success) { this.sizeForm.inTableData = res.data.result; this.$message.success("数据获取成功"); @@ -588,14 +590,16 @@ export default { this.$message.error("物资名称不能为空"); return; } + if (row.type === "NY") { + if (row.unitPrice === undefined || row.unitPrice <= 0) { + this.$message.error("单价不能为空"); + return; + } + } if (!row.theInboundQuantity || row.theInboundQuantity < 0) { this.$message.error("本次入库数量不能为空"); return; } - if (row.unitPrice === undefined || row.unitPrice < 0) { - this.$message.error("单价不能为空"); - return; - } if (!row.type) { this.$message.error("请选择类别"); return; @@ -618,14 +622,13 @@ export default { this.$message.error("物资名称不能为空"); return; } - if (!row.theInboundQuantity || row.theInboundQuantity < 0) { - this.$message.error("本次入库数量不能为空"); - return; - } - if (row.unitPrice === undefined || row.unitPrice <= 0) { - this.$message.error("单价不能为空"); - return; + if (row.type === "NY") { + if (row.unitPrice === undefined || row.unitPrice <= 0) { + this.$message.error("单价不能为空"); + return; + } } + if (!row.type) { this.$message.error("请选择类别"); return; @@ -668,6 +671,7 @@ export default { // 选项选择,批量选择1 单条选择2 radioChange() { + this.batchType = ''; this.sizeForm.inTableData = [] this.sizeForm.singleData = [] if (this.sizeForm.option == 1) { @@ -700,14 +704,24 @@ export default { } diff --git a/src/views/firstOrder/components/outDialog.vue b/src/views/firstOrder/components/outDialog.vue index 4e014b8..52521d5 100644 --- a/src/views/firstOrder/components/outDialog.vue +++ b/src/views/firstOrder/components/outDialog.vue @@ -3,120 +3,76 @@ - -
基本信息
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - 批量选择 - 单项选择 - - - - - - - 易耗品 - 耐用品 - 全部 - - - - - - - - - -
{{ outDate }} 出库信息:
- 新增 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
出库账目表格:
- - +
+ +
基本信息
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 批量选择 + 单项选择 + + + + + + + 易耗品 + 耐用品 + + + + + + + + + +
{{ outDate }} 出库信息:
+ 新增 + + @@ -130,25 +86,85 @@ {{ scope.row.type === "NY" ? "出库单" : (scope.row.type === "YH" ? "发放单" : "") }} - + + + - + - - - + - - -
+ + + + + + + +
出库账目表格:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
取 消 暂存 @@ -163,8 +179,10 @@ @@ -172,7 +190,8 @@ - + @@ -181,10 +200,9 @@ - - 易耗品 - 耐用品 - 全部 + + 易耗品 + 耐用品 @@ -199,6 +217,13 @@ + +
+ + + +
@@ -215,7 +240,7 @@
- + @@ -224,24 +249,30 @@ {{ scope.row.outboundQuantity || 0 }} -
- + + + 取 消 确 定
+ + + diff --git a/src/views/materials/index.vue b/src/views/materials/index.vue index 1c3543e..097f048 100644 --- a/src/views/materials/index.vue +++ b/src/views/materials/index.vue @@ -10,10 +10,10 @@