From 2edd98620286e487729f977a11f2681f91f7a0c8 Mon Sep 17 00:00:00 2001
From: xiaofajia <1665375861@qq.com>
Date: Thu, 21 Nov 2024 15:14:48 +0800
Subject: [PATCH 1/3] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages-warehouse/inOutWarehouse/part.vue | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/pages-warehouse/inOutWarehouse/part.vue b/pages-warehouse/inOutWarehouse/part.vue
index 71b9c5a..0e2470c 100644
--- a/pages-warehouse/inOutWarehouse/part.vue
+++ b/pages-warehouse/inOutWarehouse/part.vue
@@ -393,13 +393,15 @@ export default {
}).then(res => {
this.partList = Object.entries(res.data)
this.partList = this.partList.map(([key, value]) => {
- return [key, value.filter(item => (!item.inCount && item.inCount !== item.goodsCount))]
+ return [key, value.filter(item => {
+ return item.inCount !== item.goodsCount
+ })]
})
this.partList = this.partList.filter(([key, value]) => value.length > 0)
this.partList.forEach(([key, value]) => {
value.forEach(item => {
- item.goodsCount = item.goodsCount - item?.inCount | 0
- item.inCount = item.goodsCount - item?.inCount | 0
+ item.goodsCount = item.goodsCount - (item.inCount ? item.inCount : 0)
+ item.inCount = item.goodsCount
})
})
const values = this.partList.map(([key, value]) => value)
@@ -426,11 +428,13 @@ export default {
id: this.soId,
soNo: createUniqueCodeByHead("RK")
}
+ const values = this.partList.map(([key, value]) => value).reduce((acc, item) => acc.concat(item))
if (this.selectRows && this.selectRows.length > 0){
- data.soiList = [...this.selectRows]
- data.waresList = [...this.selectRows.map(item => item.wares)]
+ const ids = this.selectRows.map(item => item.id)
+ const newSelect = values.filter(item => ids.includes(item.id))
+ data.soiList = [...newSelect]
+ data.waresList = [...newSelect.map(item => item.wares)]
}else {
- const values = this.partList.map(([key, value]) => value).reduce((acc, item) => acc.concat(item))
data.soiList = [...values]
data.waresList = [...values.map(item => item.wares)]
}
From b00333d103a2b46586933d19b4127cea208e6cdf Mon Sep 17 00:00:00 2001
From: xiaofajia <1665375861@qq.com>
Date: Thu, 21 Nov 2024 15:30:42 +0800
Subject: [PATCH 2/3] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=E5=92=8C=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E9=98=B2=E6=8A=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages-home/service/todoDetail.vue | 101 +++++++++++++-----------
pages-warehouse/inOutWarehouse/part.vue | 63 ++++++++-------
2 files changed, 88 insertions(+), 76 deletions(-)
diff --git a/pages-home/service/todoDetail.vue b/pages-home/service/todoDetail.vue
index 4a0c14a..9b1cda8 100644
--- a/pages-home/service/todoDetail.vue
+++ b/pages-home/service/todoDetail.vue
@@ -199,6 +199,7 @@ export default {
},
//是否可以点击
canClick:true,
+ subLoading: false
};
},
onLoad(data) {
@@ -356,54 +357,60 @@ export default {
})
},
confirmOpe(type) {
- if(this.selectWares.length==0){
- uni.showToast({
- title: '请选中要审核的配件!',
- icon: 'none'
- })
- return
- }
- if (this.canClick) {
- this.canClick = false
- let url = '/admin-api/repair/tw/audit'
- let dataObj = {
- id: this.id,
- type: "01",
- status: "yes" == type ? "01" : "02"
- }
- try {
- if (this.selectWares && this.selectWares.length > 0) {
- dataObj.items = [...this.selectWares.map(item => {
- return {
- id: item.id
- }
- })]
- } else {
- dataObj.items = []
- this.repairList.map((groupItem) => {
- groupItem.twItemList.map((item) => {
- dataObj.items.push({id: item.id})
- })
- })
- }
- request({
- url: url,
- method: 'POST',
- data: dataObj
- }).then((res) => {
- this.canClick = true
- if (res.code == 200) {
- uni.showToast({
- title: '审批成功!',
- icon: 'none'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 700)
- }
+ if (!this.subLoading){
+ this.subLoading = true
+ if(this.selectWares.length==0){
+ uni.showToast({
+ title: '请选中要审核的配件!',
+ icon: 'none'
})
- } catch (e) {
- this.canClick = true
+ this.subLoading = false
+ return
+ }
+ if (this.canClick) {
+ this.canClick = false
+ let url = '/admin-api/repair/tw/audit'
+ let dataObj = {
+ id: this.id,
+ type: "01",
+ status: "yes" == type ? "01" : "02"
+ }
+ try {
+ if (this.selectWares && this.selectWares.length > 0) {
+ dataObj.items = [...this.selectWares.map(item => {
+ return {
+ id: item.id
+ }
+ })]
+ } else {
+ dataObj.items = []
+ this.repairList.map((groupItem) => {
+ groupItem.twItemList.map((item) => {
+ dataObj.items.push({id: item.id})
+ })
+ })
+ }
+ request({
+ url: url,
+ method: 'POST',
+ data: dataObj
+ }).then((res) => {
+ this.canClick = true
+ if (res.code == 200) {
+ uni.showToast({
+ title: '审批成功!',
+ icon: 'none'
+ })
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 700)
+ }
+ this.subLoading = false
+ })
+ } catch (e) {
+ this.subLoading = false
+ this.canClick = true
+ }
}
}
},
diff --git a/pages-warehouse/inOutWarehouse/part.vue b/pages-warehouse/inOutWarehouse/part.vue
index 0e2470c..92e7397 100644
--- a/pages-warehouse/inOutWarehouse/part.vue
+++ b/pages-warehouse/inOutWarehouse/part.vue
@@ -96,7 +96,7 @@
保存
- 入库
+ 入库
@@ -143,6 +143,7 @@ export default {
unitList: [],
query: null,
selectRows: [],
+ subLoading: false
};
},
onLoad(data) {
@@ -424,35 +425,39 @@ export default {
* 入库
*/
inWare() {
- const data = {
- id: this.soId,
- soNo: createUniqueCodeByHead("RK")
- }
- const values = this.partList.map(([key, value]) => value).reduce((acc, item) => acc.concat(item))
- if (this.selectRows && this.selectRows.length > 0){
- const ids = this.selectRows.map(item => item.id)
- const newSelect = values.filter(item => ids.includes(item.id))
- data.soiList = [...newSelect]
- data.waresList = [...newSelect.map(item => item.wares)]
- }else {
- data.soiList = [...values]
- data.waresList = [...values.map(item => item.wares)]
- }
- request({
- url: '/admin-api/repair/so/inWare',
- method: 'post',
- data: data
- }).then((res) => {
- if (res.code == 200) {
- uni.showToast({
- title: '入库成功!',
- icon: 'none'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 700)
+ if (!this.subLoading){
+ this.subLoading = true
+ const data = {
+ id: this.soId,
+ soNo: createUniqueCodeByHead("RK")
}
- })
+ const values = this.partList.map(([key, value]) => value).reduce((acc, item) => acc.concat(item))
+ if (this.selectRows && this.selectRows.length > 0){
+ const ids = this.selectRows.map(item => item.id)
+ const newSelect = values.filter(item => ids.includes(item.id))
+ data.soiList = [...newSelect]
+ data.waresList = [...newSelect.map(item => item.wares)]
+ }else {
+ data.soiList = [...values]
+ data.waresList = [...values.map(item => item.wares)]
+ }
+ request({
+ url: '/admin-api/repair/so/inWare',
+ method: 'post',
+ data: data
+ }).then((res) => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '入库成功!',
+ icon: 'none'
+ })
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 700)
+ }
+ this.subLoading = false
+ })
+ }
// this.partList.forEach(item => {
// item.inCount = item.count
// item.goodsId = item.id
From 0dc9c57c40589180d0b26740f8c47a293fab71be Mon Sep 17 00:00:00 2001
From: xiaofajia <1665375861@qq.com>
Date: Thu, 21 Nov 2024 15:32:44 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=9C=B0=E5=9D=80?=
=?UTF-8?q?=E6=94=B9=E5=9B=9E=E5=8E=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.js b/config.js
index 07e5515..7101f2f 100644
--- a/config.js
+++ b/config.js
@@ -1,9 +1,9 @@
// 应用全局配置
module.exports = {
- // baseUrl: 'https://www.nuoyunr.com',
+ baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'http://124.222.105.7:48080',
// baseUrl: 'http://192.168.1.4:48080',
- baseUrl: "http://localhost:48080",
+ // baseUrl: "http://localhost:48080",
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio/',
shareUrl: 'https://www.lighting-it.cn/share?inviteId=',