From c267ad940afde946ac5e047d7dde1a63743a16de Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Wed, 31 Dec 2025 09:39:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=80=90=E7=94=A8=E5=93=81=E6=8A=A5?= =?UTF-8?q?=E5=BA=9F=E5=92=8C=E5=BD=92=E8=BF=98=E9=80=BB=E8=BE=91=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/materials/components/returnDialog.vue | 14 ++++++++++++++ src/views/materials/components/scrapDialog.vue | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/views/materials/components/returnDialog.vue b/src/views/materials/components/returnDialog.vue index 3d9ed9d..4739c16 100644 --- a/src/views/materials/components/returnDialog.vue +++ b/src/views/materials/components/returnDialog.vue @@ -60,6 +60,20 @@ export default { }, ], }, + { + label: "归还时间", + prop: "sex", + span: 24, + type:'textarea', + rows:5, + rules: [ + { + required: true, + message: "请选择", + trigger: "blur", + }, + ], + }, ], }, }; diff --git a/src/views/materials/components/scrapDialog.vue b/src/views/materials/components/scrapDialog.vue index 5722abb..e11df15 100644 --- a/src/views/materials/components/scrapDialog.vue +++ b/src/views/materials/components/scrapDialog.vue @@ -61,6 +61,20 @@ export default { }, ], }, + { + label: "报废时间", + prop: "sex", + span: 24, + type:'textarea', + rows:5, + rules: [ + { + required: true, + message: "请选择", + trigger: "blur", + }, + ], + }, ], }, }; From 46051c015bc5dc4f787340466181ee217c95115e Mon Sep 17 00:00:00 2001 From: taozi <1362265981@qq.com> Date: Wed, 31 Dec 2025 09:40:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/materials/index.vue | 72 ++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/src/views/materials/index.vue b/src/views/materials/index.vue index 1c3543e..70f8c65 100644 --- a/src/views/materials/index.vue +++ b/src/views/materials/index.vue @@ -5,6 +5,21 @@ :table-loading="loading" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" :page.sync="page"> + @@ -13,7 +28,10 @@ import { getList, add, remove, update, getCode } from "@/api/materials/list"; export default { data() { return { - form: { imageUrl: "" }, + form: { + imageUrl: "", + picture: "" // 用于存储接口返回的图片地址 + }, selectionList: [], query: {}, loading: true, @@ -98,30 +116,45 @@ export default { { label: '图片', prop: 'picture', - type: 'upload', headerAlign: "center", align: "center", - loadText: "图片上传中,请稍等", - span: 12, - // propsHttp: { //配置请求接口返回的数据结构 - // url: 'picture', //路径地址 - // name: 'name', //图片名称 - // res: 'data' //返回数据层级结构 - // }, - tip: "只能上传jpg/png文件", + slot: true, // 使用自定义插槽 + add: true, // 新增时显示 + edit: true, // 编辑时显示 + view: true, // 查看时显示 rules: [{ required: true, message: "请上传图片", - trigger: "change", - }], - formatter: (row, column) => { - const value = row.picture; - if (value === null || value === undefined || value === "") { - return "无" - } - return value; - } + trigger: "change" + }] }, + // { + // label: '图片', + // prop: 'picture', + // type: 'upload', + // headerAlign: "center", + // align: "center", + // loadText: "图片上传中,请稍等", + // span: 12, + // // propsHttp: { //配置请求接口返回的数据结构 + // // url: 'picture', //路径地址 + // // name: 'name', //图片名称 + // // res: 'data' //返回数据层级结构 + // // }, + // tip: "只能上传jpg/png文件", + // rules: [{ + // required: true, + // message: "请上传图片", + // trigger: "change", + // }], + // formatter: (row, column) => { + // const value = row.picture; + // if (value === null || value === undefined || value === "") { + // return "无" + // } + // return value; + // } + // }, ], }, data: [], @@ -135,6 +168,7 @@ export default { this.fetchMaterialCode(); }, methods: { + fetchMaterialCode() { getCode() .then((res) => { From b1743f4619f45d54feae33bd4c66ecc226c46567 Mon Sep 17 00:00:00 2001 From: taozi <1362265981@qq.com> Date: Wed, 31 Dec 2025 11:35:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/firstOrder/inbound.js | 1 - src/api/materials/expend.js | 11 +++ src/api/materials/index.js | 11 +++ src/views/firstOrder/inbound.vue | 2 +- .../materials/components/returnDialog.vue | 69 +++++++++++----- .../materials/components/scrapDialog.vue | 54 ++++++++----- src/views/materials/expend.vue | 14 +++- src/views/materials/index.vue | 78 ++++++------------- src/views/secondOrder/outbound.vue | 12 +-- 9 files changed, 148 insertions(+), 104 deletions(-) create mode 100644 src/api/materials/index.js 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/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/firstOrder/inbound.vue b/src/views/firstOrder/inbound.vue index 7049616..b460ef5 100644 --- a/src/views/firstOrder/inbound.vue +++ b/src/views/firstOrder/inbound.vue @@ -135,7 +135,7 @@ export default { width: 180, headerAlign: "center", align: "center", - slot: "purchaseEndInfo" + slot: "purchaseEndInfo", width: 150, align: "center", formatter: (row, column) => { diff --git a/src/views/materials/components/returnDialog.vue b/src/views/materials/components/returnDialog.vue index 4739c16..fccf57f 100644 --- a/src/views/materials/components/returnDialog.vue +++ b/src/views/materials/components/returnDialog.vue @@ -6,7 +6,7 @@ width="30%" @close="closeDialog" > - + diff --git a/src/views/materials/index.vue b/src/views/materials/index.vue index 70f8c65..296ab74 100644 --- a/src/views/materials/index.vue +++ b/src/views/materials/index.vue @@ -5,33 +5,15 @@ :table-loading="loading" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" :page.sync="page"> - \ 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 }} -
- + + + 取 消 确 定
+ + +