+
- 查看
+ 查看
+ 导出
@@ -62,9 +64,9 @@
layout="total, sizes, prev, pager, next, jumper">
-
-
-
+
+
+
@@ -73,6 +75,7 @@
+
\ No newline at end of file
diff --git a/src/views/invoicing/consumable/information.vue b/src/views/invoicing/consumable/information.vue
index 5b3ee65..8c22add 100644
--- a/src/views/invoicing/consumable/information.vue
+++ b/src/views/invoicing/consumable/information.vue
@@ -29,6 +29,11 @@
+
+
+
+
+
查询
重置
@@ -48,17 +53,13 @@
-
-
-
-
-
-
- {{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
-
-
+
+
+
+
-
+
+
{{ scope.row.balance }}
@@ -80,30 +81,41 @@
-
+
+ {{
+ item.productName }}
{{ scope.row.productId }}
-
+ -->
+
+
+ {{
+ item.productName }}
+
+
-
+
{{ (scope.row.balance).toFixed(2) }}
-
+
-
+
+
+
+
编辑
@@ -528,6 +540,15 @@ export default {
this.$message({ type: "error", message: "至少保留一种耗材" });
}
},
+ toGoods(data) {
+
+ this.$router.push({
+ path: '/product/product',
+ query: {
+ productId: data.productId
+ }
+ })
+ },
//添加耗材弹窗增加
ruleFormsAdd() {
console.log('add')
@@ -612,9 +633,24 @@ export default {
shopId: localStorage.getItem("shopId")
});
this.tableData.loading = false;
- this.tableData.data = res.content;
+ // this.tableData.data = res.content;
this.tableData.total = res.totalElements;
+ this.tableData.data = res.content.map(v => {
+ const productIds = v.productId ? v.productId.split(',') : []
+ return {
+ ...v,
+ 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,
+ productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
+ }
+ })
+ }
+ });
} catch (error) {
console.log(error);
}
diff --git a/src/views/product/components/addGroup.vue b/src/views/product/components/addGroup.vue
index 32727b6..01fc3b9 100644
--- a/src/views/product/components/addGroup.vue
+++ b/src/views/product/components/addGroup.vue
@@ -33,10 +33,23 @@
禁用
-
-
+
+
+
+
+
+
+
+
@@ -44,7 +57,7 @@
@@ -73,6 +86,15 @@ export default {
useTime: 0,
shopId: localStorage.getItem('shopId')
},
+ pickerOptions: {
+ selectableRange: '00:00:00 - 23:59:59'
+ // disabledDate(time) {
+ // // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
+ // // return time.getTime() < Date.now(); //只可以选择今天之后
+ // return time.getTime() < Date.now() - 8.64e7;//只可以选择今天之后包括今天
+
+ // }
+ },
rules: {
name: [
{
@@ -93,6 +115,11 @@ export default {
}
},
methods: {
+ quxiaodialogVisible() {
+ this.dialogVisible = false
+ this.$emit('success', null)
+
+ },
slectShop(res) {
if (this.productIds.length) {
res.map(async item => {
@@ -115,14 +142,12 @@ export default {
return falg
},
onSubmitHandle() {
- console.log(this.form.saleTime)
this.$refs.form.validate(async valid => {
if (valid) {
this.loading = true
try {
this.form.productIds = this.productIds.map(item => item.id);
- this.form.saleStartTime = this.form.saleTime[0]
- this.form.saleEndTime = this.form.saleTime[1]
+
let res = null
if (!this.form.id) {
await tbProductGroupPost(this.form)
@@ -152,6 +177,8 @@ export default {
}
},
show(obj) {
+ // if()
+ this.form.useTime = 0
if (obj && obj.id) {
this.form = obj
this.form.id = obj.id
@@ -159,12 +186,11 @@ export default {
this.form.name = obj.name
this.form.sort = obj.sort
this.form.productIds = obj.productIds
- if (obj.saleStartTime != null) {
- this.$set(this.form, 'saleTime', [obj.saleStartTime, obj.saleEndTime])
- }
+ // if (obj.saleStartTime != null) {
+ // this.$set(this.form, 'saleTime', [obj.saleStartTime, obj.saleEndTime])
+ // }
this.getProduts()
}
-
this.dialogVisible = true
},
close() {
diff --git a/src/views/product/group/index.vue b/src/views/product/group/index.vue
index 9fef210..65d3545 100644
--- a/src/views/product/group/index.vue
+++ b/src/views/product/group/index.vue
@@ -12,7 +12,12 @@
- {{ scope.row.useTime==1? scope.row.saleStartTime +'-'+scope.row.saleEndTime:'' }}
+
+
+
+ {{ saleEndTimeFilter(scope.row.saleStartTime, scope.row.saleEndTime) }}
+
+
@@ -66,8 +71,22 @@ export default {
this.tableDrag()
})
}
+ },
+ filters: {
+
},
methods: {
+ saleEndTimeFilter: (a, b) => {
+
+ var currentDate = new Date(); // 当前日期对象
+ var dateString = currentDate.toDateString(); // 获取当前日期的字符串表示(不包含时分秒)
+ var dateTimeString = dateString + ' ' + a; // 拼接日期和时分秒字符串
+ var dateTimeStringb = dateString + ' ' + b; // 拼接日期和时分秒字符串
+ var timestamp = Date.parse(dateTimeString); // 将日期时间字符串转换为时间戳
+ var timestamp2 = Date.parse(dateTimeStringb); // 将日期时间字符串转换为时间戳
+ let ciri = timestamp > timestamp2 ? '次日' : ''
+ return a + ' - ' + ciri + b
+ },
//表格拖拽
tableDrag() {
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')
diff --git a/src/views/product/index.vue b/src/views/product/index.vue
index 7449606..0edffff 100644
--- a/src/views/product/index.vue
+++ b/src/views/product/index.vue
@@ -130,6 +130,7 @@ export default {
}
},
async mounted() {
+ console.log(this.$route.query.productId,'tiaoshi1')
if (this.$route.query.productId) {
this.query.productId = this.$route.query.productId
}
@@ -206,11 +207,11 @@ export default {
try {
let localQuery = JSON.parse(localStorage.getItem('shopIndexQuery'))
if (localQuery != null && localQuery.hasOwnProperty('productId')) {
- this.query = localQuery
+ // this.query = localQuery
}
this.tableData.loading = true
- console.log(this.query)
+ console.log(this.query,'调试2')
const res = await tbProduct({
page: this.tableData.page,
size: this.tableData.size,
From c39792a0f67861602b0c430e32b88fa9d1667008 Mon Sep 17 00:00:00 2001
From: GYJ <1157756119@qq.com>
Date: Tue, 20 Aug 2024 10:24:14 +0800
Subject: [PATCH 21/21] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E5=85=85=E5=80=BC?=
=?UTF-8?q?=E9=87=91=E9=A2=9D=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/user_manage/active_list.vue | 34 +++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/src/views/user_manage/active_list.vue b/src/views/user_manage/active_list.vue
index 2df7e2f..2d0dc88 100644
--- a/src/views/user_manage/active_list.vue
+++ b/src/views/user_manage/active_list.vue
@@ -18,6 +18,9 @@
下载会员充值二维码
+
+ 允许充值自定义金额:
+
@@ -63,10 +66,11 @@ import handselTypes from './handselTypes'
import addActive from './components/addActive'
import QR from './components/downloadQR.vue'
import { findActivate, modityActivate } from '@/api/shop'
+import { tbShopInfo, tbShopInfoPut } from "@/api/user";
import dayjs from 'dayjs'
export default {
components: {
- addActive,QR
+ addActive, QR
},
data() {
return {
@@ -79,6 +83,9 @@ export default {
size: 10,
loading: false,
total: 0
+ },
+ shopInfo: {
+ isCustom: '0',
}
}
},
@@ -92,6 +99,7 @@ export default {
},
mounted() {
this.getTableData()
+ this.getShopInfo()
},
methods: {
// 切换状态
@@ -131,7 +139,29 @@ export default {
} catch (error) {
console.log(error)
}
+ },
+ // 请求店铺信息
+ async getShopInfo() {
+ try {
+ const res = await tbShopInfo(localStorage.getItem('shopId'))
+ this.shopInfo = res
+
+ if (this.shopInfo.isCustom == null) {
+ this.shopInfo.isCustom = '0'
+ }
+
+ console.log(this.shopInfo);
+
+ } catch (error) {
+ console.log(error)
+ }
+ },
+ customStatusChange() {
+ this.updateShopInfo()
+ },
+ async updateShopInfo() {
+ await tbShopInfoPut(this.shopInfo)
}
}
}
-
\ No newline at end of file
+