From 33d8dff0b80ae6324c17c5ad3606a50fa28175b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=94=A1=E7=8E=B2?=
<8702040+cai-ling@user.noreply.gitee.com>
Date: Tue, 10 Dec 2024 14:07:55 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=8B=A8=E7=BB=B4=E6=8A=A4=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E9=9C=80=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/management/alloc-maintenance_new.vue | 127 +++++++++++++++++++--
pages/management/in-storage_new.vue | 6 +-
2 files changed, 123 insertions(+), 10 deletions(-)
diff --git a/pages/management/alloc-maintenance_new.vue b/pages/management/alloc-maintenance_new.vue
index 995fd13..7cbd25f 100644
--- a/pages/management/alloc-maintenance_new.vue
+++ b/pages/management/alloc-maintenance_new.vue
@@ -55,6 +55,8 @@
+
+
@@ -128,22 +130,57 @@
-
+
修改调出仓库
修改调入仓库
-
+ 分配明细
+
+
+
+ 序号
+ 物料编号
+ 物料名称
+ 库位编码
+ 数量
+ 库存数量
+ 单据编号
+ 分录序号
+ 备注
+
+
+ {{t+1}}
+ {{ele.wlbm}}
+ {{ele.wlmc}}
+
+
+
+
+
+
+ {{ele.kcsl}}
+ {{ele.djbh}}
+ {{ele.flxh}}
+ {{ele.bz}}
+
+
-
+
+
+
+
+
@@ -153,7 +190,7 @@
import ScanInput from '@/components/ScanInput.vue'
import Pagination from '@/components/Pagination.vue'
import GridDetail from '@/components/GridDetail.vue'
- import {getWarehouseInfo, getOrganizationInfo, allocationPage, allocationBillDetail, allocationBillConfirm, allocationBillDetailUpdate, easOutInBillSync} from '@/utils/getData2.js'
+ import {getWarehouseInfo, getOrganizationInfo, allocationPage, allocationBillDetail, allocationBillConfirm, allocationBillDetailUpdate, easOutInBillSync, inWarehouseAssignLocation, addAssignDtl, inWarehouseCommit} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -176,6 +213,7 @@
currentPage1: 1,
dataList: [], // 一级表格数据
popData: [], // 副表格点击物料编码弹出弹窗
+ popdisabled: false,
popObj: {}, // 弹窗当前主表格内容
show: false, // 弹窗显示布尔值
type: '', // 弹窗类型
@@ -185,7 +223,8 @@
range: [],
disabled1: false,
raw: '', // 副表格修改前输入框数据
- rawObj: {} // 副表格修改前行数据
+ rawObj: {} ,// 副表格修改前行数据
+ subCheckData: [] // 二级表格多选数组
}
},
onLoad () {
@@ -373,7 +412,10 @@
this.show = true
this.popObj = e
this.rawObj = obj
- }
+ } else if (type === 3 && e.subOneChecked) { // 库位分配
+ this.popObj = e
+ this._inWarehouseAssignLocation(e)
+ }
},
// 副表格修改仓库弹窗->确定
SetStorConfirm () {
@@ -421,7 +463,78 @@
} catch (e) {
this.disabled1 = false
}
- }
+ },
+ sortArr (arr) {
+ // 按单据编号排序,单据编号相同按照分录序号排序
+ arr.sort((a, b) => {
+ if (a.djbh !== b.djbh) {
+ return a.djbh < b.djbh ? -1 : 1
+ } else {
+ return a.flxh < b.flxh ? -1 : 1
+ }
+ })
+ },
+ // 分配库位弹窗表格
+ async _inWarehouseAssignLocation (e) {
+ let arr = e.subData.filter(ele => ele.checked === true)
+ let res = await inWarehouseAssignLocation(arr, 'ALLO')
+ if (res.code ===1) {
+ this.popData = [...res.result]
+ this.sortArr(this.popData)
+ this.show = true
+ } else {
+ uni.showToast({
+ title: res.desc,
+ icon: 'none'
+ })
+ }
+ },
+ // 分配库位弹窗表格 -> 点击确定按钮
+ async _addAssignDtl () {
+ this.popdisabled = true
+ if (this.popData.length === 0) {
+ this.popdisabled = false
+ return
+ }
+ try {
+ let res = await addAssignDtl(this.popData, 'ALLO')
+ if (res.code === 1) {
+ this.show = false
+ this._allocationPage(this.popObj)
+ }
+ uni.showToast({
+ title: res.desc,
+ icon: 'none'
+ })
+ this.popdisabled = false
+ } catch (e) {
+ this.popdisabled = false
+ }
+ },
+ // 库存提交
+ inWarehouseSure (e) {
+ if (e.subOneChecked) {
+ this.$refs.alertDialog.open()
+ this.popObj = e
+ let arr = e.subData.filter(ele => ele.checked === true)
+ this.subCheckData = [...arr]
+ }
+ },
+ // 库存提交-确认接口
+ async _inWarehouseCommit () {
+ try {
+ let res = await inWarehouseCommit(this.subCheckData, 'ALLO')
+ if (res.code === 1) {
+ this._allocationPage(this.popObj)
+ }
+ uni.showToast({
+ title: res.desc,
+ icon: 'none'
+ })
+ } catch (e) {
+ console.log(e)
+ }
+ },
}
}
diff --git a/pages/management/in-storage_new.vue b/pages/management/in-storage_new.vue
index 6cb3e0b..3e1577f 100644
--- a/pages/management/in-storage_new.vue
+++ b/pages/management/in-storage_new.vue
@@ -505,8 +505,8 @@
}
this.$refs.alertDialog.open()
},
- // 库存提交-确认接口
- async _inWarehouseCommit () {
+ // 库存提交-确认接口
+ async _inWarehouseCommit () {
try {
let res = await inWarehouseCommit(this.subCheckData, this.crType)
if (res.code === 1) {
@@ -531,7 +531,7 @@
} catch (e) {
this.popdisabled = false
}
- },
+ },
// 点击单据审核按钮
async _easOutInBillUpdate () {
this.disabled1 = true