From 0468cbcdecb0526dbfb303b142b89329c2a13d29 Mon Sep 17 00:00:00 2001
From: caill <815519168@qq.com>
Date: Fri, 1 Mar 2024 15:39:56 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83=EF=BC=8C?=
=?UTF-8?q?=E5=90=88=E5=B9=B6=E5=87=BA=E5=85=A5=E5=BA=93=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/style/layout.css | 13 +-
common/style/reset.css | 2 +-
pages/home/home.vue | 8 +-
pages/login/login.vue | 2 +-
pages/management/in-storage.vue | 122 +++++-----
pages/management/out-storage.vue | 391 -------------------------------
utils/getData2.js | 4 +-
7 files changed, 81 insertions(+), 461 deletions(-)
diff --git a/common/style/layout.css b/common/style/layout.css
index c8e6e41..ea0f30e 100644
--- a/common/style/layout.css
+++ b/common/style/layout.css
@@ -418,13 +418,20 @@ uni-button{
.pop-wraper {
position: fixed;
bottom: 10%;
- left: 10%;
- width: 80%;
+ left: 15%;
+ width: 70%;
height: 80%;
padding: 1% 2%;
background: center / 100% 100% url(./static/images/pop_bg.png) no-repeat;
z-index: 2017;
- transition: all .3s;
+ transition: all .4s;
+}
+.pop-wraper_1 {
+ bottom: 30%;
+ height: 40%;
+}
+.kwcode_wraper {
+ height: calc(100% - 170rpx)
}
.pop-title {
font-size: 36rpx;
diff --git a/common/style/reset.css b/common/style/reset.css
index d8e2094..92913cd 100644
--- a/common/style/reset.css
+++ b/common/style/reset.css
@@ -151,5 +151,5 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
transform: translateY(0);
}
.pophide {
- transform: translateY(120%);
+ transform: translateY(180%);
}
\ No newline at end of file
diff --git a/pages/home/home.vue b/pages/home/home.vue
index b5fb81a..d7fef6c 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -16,7 +16,7 @@
@@ -52,11 +52,7 @@
},
toPage (e) {
let url = ''
- if (e.ywlx === 'OUT') {
- url = '/pages/management/out-storage?id=' + e.djlx + '&name=' + e.name
- } else {
- url = '/pages/management/in-storage?id=' + e.djlx + '&name=' + e.name
- }
+ url = '/pages/management/in-storage?id=' + e.djlx + '&name=' + e.name + '&type=' + e.ywlx
uni.redirectTo({
url: url
})
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 200b985..49edc87 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -225,7 +225,7 @@
line-height 90rpx
.login_icon
position absolute
- top 0
+ top 5px
right 10px
.primary-button
_wh(auto, 100rpx)
diff --git a/pages/management/in-storage.vue b/pages/management/in-storage.vue
index 2d4625b..b602d2b 100644
--- a/pages/management/in-storage.vue
+++ b/pages/management/in-storage.vue
@@ -1,6 +1,6 @@
-
+
@@ -73,10 +73,9 @@
-
-
+
-
+
@@ -85,9 +84,9 @@
-
- 库位修改
-
+
+ {{type === '1' ?'库位修改' : '库位确认'}}
+
序号
出库单号
@@ -98,26 +97,33 @@
{{t+1}}
- {{ele.code}}
- {{ele.code}}
- {{ele.code}}
+ {{ele.djbh}}
+ {{ele.kwlx}}
+ {{ele.kwlx}}
-
- {{ele.qty}}
+
+ {{ele.sl}}
+
+
+
+
+
-
+
@@ -142,6 +148,7 @@
return {
title: '',
id: '',
+ crType: '',
val1: '',
dataList1: [],
dataList2: [],
@@ -165,7 +172,8 @@
checkArr2: [],
disabled2: false,
show: false,
- disabled3: false
+ type: '',
+ kwCode: ''
};
},
onShow() {
@@ -179,6 +187,7 @@
onLoad (options) {
this.id = options.id
this.title = options.name
+ this.crType = options.type
},
created () {
this.toSearch()
@@ -256,7 +265,7 @@
toCheck1 (e) {
e.checked = !e.checked
let arr = this.dataList1.filter(el => el.checked === true)
- this.checkArr1 = arr.map(el => {return el.code})
+ this.checkArr1 = arr.map(el => {return el.id})
},
async toSure () {
this.disabled1 = true
@@ -289,44 +298,24 @@
e.checked = !e.checked
this.checkArr2 = this.dataList2.filter(el => el.checked === true)
},
- async _easOutInBillDetailUpdate () {
- this.disabled2 = true
- if (this.checkArr2.length === 0) {
- this.disabled2 = false
- return
- }
- try {
- let res = await easOutInBillDetailUpdate(this.checkArr2)
- if (res.code === 1) {
- this.disabled2 = false
- this.checkArr2 = []
- this.queryParams2 = {
- pageSize: 10,
- pageNum: 1
- }
- this.currentPage2 = 1
- this._easOutInBillDetailPage()
- uni.showToast({
- title: res.desc,
- icon: 'none'
- })
+ kuwConfirm () {
+ if (this.checkArr2.length === 0) {
+ return
+ } else if (this.checkArr2.length === 1) {
+ this.type = '1'
+ this._queryInventoryInfo()
} else {
- this.disabled2 = false
- uni.showToast({
- title: res.desc,
- icon: 'none'
- })
+ this.type = '2'
+ this.show = true
+ this.kwCode = ''
}
- } catch (e) {
- this.disabled2 = false
- }
},
async _queryInventoryInfo () {
let res = await queryInventoryInfo(this.checkArr2)
if (res.code ===1) {
res.result.map(el => {
this.$set(el, 'checked', false)
- this.$set(el, 'yqty', el.qty)
+ this.$set(el, 'yqty', el.sl)
})
this.dataList3 = [...res.result]
this.show = true
@@ -338,28 +327,47 @@
}
},
handleBlur (ele) {
+ if (Number(ele.sl) >= Number(ele.yqty)) {
+ ele.sl = ele.yqty
+ return
+ }
ele.checked = true
let index = ''
let obj = {}
this.dataList3.map((e, i) => {
if (e.id === ele.id) {
index = i
- obj = Object.assign({}, e, {'checked': false}, {'ckmc': ''}, {id: e.id + Math.random() * 1000}, {qty: Number(e.yqty) - Number(ele.qty)}, {yqty: Number(e.yqty) - Number(ele.qty)})
+ obj = Object.assign({}, e, {'checked': false}, {'wlbm': ''}, {id: e.id + Math.random() * 1000}, {sl: Number(e.yqty) - Number(ele.sl)}, {yqty: Number(e.yqty) - Number(ele.sl)})
}
})
this.dataList3.splice(index+1, 0, obj)
this.dataList3 = [...this.dataList3]
},
- async _easOutInBillDetailUpdate1 () {
- this.disabled3 = true
- if (this.dataList3.length === 0) {
- this.disabled3 = false
- return
- }
+ modalConfirm () {
+ this.disabled2 = true
+ let arr = []
+ if (this.type === '1' && this.dataList3.length === 0) {
+ this.disabled2 = false
+ return
+ } else if (this.type === '2' && this.kwCode === '') {
+ this.disabled2 = false
+ return
+ } else if (this.type === '1') {
+ arr = this.dataList3
+ } else if (this.type === '2') {
+ this.checkArr2.map(el => {
+ el.wlbm = this.kwCode
+ })
+ arr = this.checkArr2
+ }
+ this._easOutInBillDetailUpdate(arr)
+ },
+ async _easOutInBillDetailUpdate (arr) {
try {
- let res = await easOutInBillDetailUpdate(this.dataList3)
+
+ let res = await easOutInBillDetailUpdate(arr)
if (res.code === 1) {
- this.disabled3 = false
+ this.disabled2 = false
this.show = false
this.queryParams2 = {
pageSize: 10,
@@ -372,14 +380,14 @@
icon: 'none'
})
} else {
- this.disabled3 = false
+ this.disabled2 = false
uni.showToast({
title: res.desc,
icon: 'none'
})
}
} catch (e) {
- this.disabled3 = false
+ this.disabled2 = false
}
}
}
diff --git a/pages/management/out-storage.vue b/pages/management/out-storage.vue
index 9428696..e69de29 100644
--- a/pages/management/out-storage.vue
+++ b/pages/management/out-storage.vue
@@ -1,391 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{title}}
-
-
-
- 序号
- 选择
- 入库单号
- EAS单号
- 状态
- 去向
- 入库日期
- 领料人
- 制单人
-
-
-
- {{i+1}}
-
-
-
- {{e.code}}
- {{e.djbh}}
- {{e.djzt}}
- {{e.ckmc}}
- {{e.cksj}}
- {{e.llr}}
- {{e.cjr}}
-
-
-
- 序号
- 选择
- 入库单号
- 明细编号
- 存货编号
- 物料编号
- 物料名称
- 推荐库位
- 实际库位
- 已入数量
- 数量
- 单据日期
-
-
- {{j+1}}
-
- {{el.djbh}}
- {{el.zzbm}}
- {{el.kwbm}}
- {{el.wlbm}}
- {{el.wlmc}}
- {{el.djbh}}
- {{el.djbh}}
- {{el.jbsl}}
- {{el.fzsl}}
- {{el.cksj}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 库位修改
-
-
- 序号
- 出库单号
- 物料编号
- 物料名称
- 实际库位
- 数量
-
-
- {{t+1}}
- {{ele.code}}
- {{ele.code}}
- {{ele.code}}
-
-
-
-
-
- {{ele.qty}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/utils/getData2.js b/utils/getData2.js
index c5564bc..9647b23 100644
--- a/utils/getData2.js
+++ b/utils/getData2.js
@@ -42,10 +42,10 @@ export const easOutInBillDetailPage = (djid, page, size) => request({
})
// 1.3审核出入库单据
-export const easOutInBillUpdate = (djid) => request({
+export const easOutInBillUpdate = (arr) => request({
url:'api/easOutInBill/update',
data: {
- djid: djid
+ arr
}
})