From 97685234d491d743b97d01747798edeb1036aa01 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 20 Jul 2024 17:33:30 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E8=80=97=E6=9D=90=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=80=E5=B1=9E=E5=95=86=E5=93=81=EF=BC=8C?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=B1=85=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../invoicing/consumable/cons_record.vue | 52 ++++++++++++++++---
1 file changed, 44 insertions(+), 8 deletions(-)
diff --git a/src/views/invoicing/consumable/cons_record.vue b/src/views/invoicing/consumable/cons_record.vue
index e3f22e3..c6258a3 100644
--- a/src/views/invoicing/consumable/cons_record.vue
+++ b/src/views/invoicing/consumable/cons_record.vue
@@ -25,10 +25,10 @@
{{scope.row.balance }}
-
-
-
-
+
+
+
+
@@ -36,7 +36,19 @@
-
+
+
+ {{item.productName}}
+
+
+
+
0){
return 'green'
@@ -107,8 +127,10 @@ export default {
}
},
lookDetail(row){
- console.log(row)
- this.$refs.recodeDetail.open(row)
+ this.$refs.recodeDetail.open({
+ "consId": row.consId,
+ "conName": row.conName
+})
},
resetHandle() {
this.clickseetableData.page = 0;
@@ -135,7 +157,20 @@ export default {
shopId: localStorage.getItem("shopId")
});
this.clickseetableData.loading = false;
- this.clickseetableData.data = res.content;
+ this.clickseetableData.data = res.content.map(v=>{
+ const productIds=v.productId.split(',')
+ const productNames=v.productName.split(',')
+ return{
+ ...v,
+ product:productIds.map((id,index)=>{
+ return {
+ productId:id,
+ productName:productNames[index]+`${(index==productIds.length-1)?'':','}`
+ }
+ })
+ }
+ });
+ console.log(this.clickseetableData.data)
this.clickseetableData.total = res.totalElements;
} catch (error) {
console.log(error);
@@ -154,4 +189,5 @@ export default {
font-weight: bold;
}
+
\ No newline at end of file
From bb2e166af274591e3968c87e628d29a75762c103 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 20 Jul 2024 17:35:55 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=80=97=E6=9D=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/invoicing/consumable/specifications.vue | 10 +++++++++-
src/views/product/index.vue | 11 ++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/views/invoicing/consumable/specifications.vue b/src/views/invoicing/consumable/specifications.vue
index cb6bb09..bd40946 100644
--- a/src/views/invoicing/consumable/specifications.vue
+++ b/src/views/invoicing/consumable/specifications.vue
@@ -616,7 +616,8 @@ export default {
this.informationdialogshow = false;
},
haocaiConfirm() {
- if(JSON.stringify(haocaiSelectedMap)!=='{}' ){
+ let hasEmpty=JSON.stringify(haocaiSelectedMap)=='{}'
+ if(!hasEmpty){
this.commodityArr.forEach((ele) => {
if (ele.skuId == this.ALLisDistribute.skuId) {
ele.haocais = [];
@@ -634,6 +635,13 @@ export default {
}
}
});
+ }else{
+ //当选中耗材为空,重置耗材
+ this.commodityArr.forEach((ele) => {
+ if (ele.skuId == this.ALLisDistribute.skuId) {
+ ele.haocais = [{...haocaisBasic}];
+ }
+ });
}
this.informationdialogshow = false;
diff --git a/src/views/product/index.vue b/src/views/product/index.vue
index f393d78..35a9037 100644
--- a/src/views/product/index.vue
+++ b/src/views/product/index.vue
@@ -110,6 +110,7 @@ export default {
return {
dayjs,
query: {
+ productId:'',
name: '',
categoryId: '',
typeEnum: ''
@@ -126,6 +127,11 @@ export default {
}
},
async mounted() {
+ if (this.$route.query.productId) {
+ this.query.productId = this.$route.query.productId
+ }
+ console.log(this.query)
+
await this.tbShopCategoryGet()
await this.getTableData()
if (this.isPcBowser) {
@@ -183,6 +189,7 @@ export default {
this.query.name = ''
this.query.categoryId = ''
this.query.typeEnum = ''
+ this.query.productId = ''
this.tableData.page = 0
localStorage.setItem('shopIndexQuery', JSON.stringify(this.query))
this.getTableData()
@@ -196,16 +203,18 @@ export default {
async getTableData() {
try {
let localQuery = JSON.parse(localStorage.getItem('shopIndexQuery'))
- if (localQuery != null) {
+ if (localQuery != null&&localQuery.hasOwnProperty('productId')) {
this.query = localQuery
}
this.tableData.loading = true
+ console.log(this.query)
const res = await tbProduct({
page: this.tableData.page,
size: this.tableData.size,
name: this.query.name,
categoryId: this.query.categoryId,
+ id:this.query.productId,
typeEnum: this.query.typeEnum,
shopId: localStorage.getItem('shopId')
})
From 015ca6ae4e8d2322c3f2df22d9bf748adcfd4aa8 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 20 Jul 2024 17:41:54 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=80=97=E6=9D=90?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=89=80=E5=B1=9E=E5=95=86=E5=93=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/invoicing/consumable/cons_record.vue | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/views/invoicing/consumable/cons_record.vue b/src/views/invoicing/consumable/cons_record.vue
index c6258a3..c24b07a 100644
--- a/src/views/invoicing/consumable/cons_record.vue
+++ b/src/views/invoicing/consumable/cons_record.vue
@@ -159,13 +159,15 @@ export default {
this.clickseetableData.loading = false;
this.clickseetableData.data = res.content.map(v=>{
const productIds=v.productId.split(',')
- const productNames=v.productName.split(',')
return{
...v,
- product:productIds.map((id,index)=>{
+ product:productIds.map((str,index)=>{
+ const startIndex=str.indexOf('_')
+ const productId=str.slice(0,startIndex)
+ const productName=str.slice(startIndex+1,str.length)
return {
- productId:id,
- productName:productNames[index]+`${(index==productIds.length-1)?'':','}`
+ productId,
+ productName:productName+`${(index==productIds.length-1)?'':','}`
}
})
}