+
- 查看
+ 查看
+ 导出
@@ -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,