From 80469ad421f5013c5513f0fa6d2fa6ca68164d1b Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Sun, 3 Sep 2023 19:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=A8=A1=E5=9D=97(=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=E5=88=9D=E7=89=88?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/order.js | 8 ++ src/views/plan/order/index.vue | 148 +++++++++++++++++++++++++++++---- 2 files changed, 139 insertions(+), 17 deletions(-) diff --git a/src/api/plan/order.js b/src/api/plan/order.js index 1966eb2..d35e752 100644 --- a/src/api/plan/order.js +++ b/src/api/plan/order.js @@ -1,5 +1,13 @@ import request from '@/utils/request' +// 获取物料list +export function selectMaterielList() { + return request({ + url: '/plan/product/list', + method: 'get' + }) +} + // 通过木订单code获取级联订单信息并封装 export function getCascadeProOrder(orderCode) { return request({ diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue index 4fd970d..f0f070a 100644 --- a/src/views/plan/order/index.vue +++ b/src/views/plan/order/index.vue @@ -231,18 +231,77 @@ - + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + 确定 + + + - + - + - + + + + + + + + + + - - - - - - - - - @@ -278,20 +328,21 @@ - + - + + - + 1) { + this.$message({ + message: '物料只能选择一个!', + type: 'warning' + }) + return + } + this.form.prodCode = this.materiel[0].productCode; + this.form.prodDesc = this.materiel[0].productDescZh; + this.innerVisible = false; + console.log(this.materiel) + console.log(12312) + console.log(this.form) + }, + // 选中物料信息 + handleSelectionChange(e) { + console.log("选中了物料信息") + this.materiel = e; + }, + // 查询物料列表 + getMaterielList() { + this.loading = true; + selectMaterielList(this.addDateRange(this.materielQueryParams, this.dateRange)).then(response => { + this.materielList = response.rows; + this.total = response.total; + this.loading = false; + } + ); + }, + // 选择物料 + selectMateriel() { + console.log("点击了选择物料") + this.innerVisible = true; + this.getMaterielList(); + }, // 选择工艺 changeRoute(routeCode) { getProEquipment(routeCode).then(response => { @@ -1097,10 +1198,19 @@ export default { batchQuantity: '' }] }, + // 物料搜索 + handleMaterielQuery() { + console.log("进行了查询功能") + this.getMaterielList(); + }, /** 搜索按钮操作 */ handleQuery() { this.getList() }, + // 物料重置 + resetMaterielQuery() { + console.log("进行了物料重置") + }, /** 重置按钮操作 */ resetQuery() { this.queryParams = { @@ -1235,4 +1345,8 @@ export default { margin-top: 40px; margin-bottom: 10px; } +.my-materiel-btn{ + margin-top: 20px; + margin-left: 650px; +}