diff --git a/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue b/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue new file mode 100644 index 0000000..a27fa6d --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundryFlow/detail-dialog.vue @@ -0,0 +1,359 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqLaundryFlow/difference-dialog.vue b/antis-ncc-admin/src/views/LqLaundryFlow/difference-dialog.vue new file mode 100644 index 0000000..f3ec0ee --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundryFlow/difference-dialog.vue @@ -0,0 +1,295 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqLaundryFlow/index.vue b/antis-ncc-admin/src/views/LqLaundryFlow/index.vue new file mode 100644 index 0000000..c594955 --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundryFlow/index.vue @@ -0,0 +1,478 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqLaundryFlow/return-dialog.vue b/antis-ncc-admin/src/views/LqLaundryFlow/return-dialog.vue new file mode 100644 index 0000000..40fa20c --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundryFlow/return-dialog.vue @@ -0,0 +1,279 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqLaundryFlow/send-dialog.vue b/antis-ncc-admin/src/views/LqLaundryFlow/send-dialog.vue new file mode 100644 index 0000000..c877aa2 --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundryFlow/send-dialog.vue @@ -0,0 +1,198 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqLaundrySupplier/form-dialog.vue b/antis-ncc-admin/src/views/LqLaundrySupplier/form-dialog.vue new file mode 100644 index 0000000..2ef1256 --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundrySupplier/form-dialog.vue @@ -0,0 +1,173 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqLaundrySupplier/index.vue b/antis-ncc-admin/src/views/LqLaundrySupplier/index.vue new file mode 100644 index 0000000..7b2169a --- /dev/null +++ b/antis-ncc-admin/src/views/LqLaundrySupplier/index.vue @@ -0,0 +1,359 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqStoreConsumableInventory/form-dialog.vue b/antis-ncc-admin/src/views/LqStoreConsumableInventory/form-dialog.vue new file mode 100644 index 0000000..f117a13 --- /dev/null +++ b/antis-ncc-admin/src/views/LqStoreConsumableInventory/form-dialog.vue @@ -0,0 +1,185 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/LqStoreConsumableInventory/index.vue b/antis-ncc-admin/src/views/LqStoreConsumableInventory/index.vue new file mode 100644 index 0000000..faec776 --- /dev/null +++ b/antis-ncc-admin/src/views/LqStoreConsumableInventory/index.vue @@ -0,0 +1,368 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/lqInventory/AddUsageRecordForm.vue b/antis-ncc-admin/src/views/lqInventory copy/AddUsageRecordForm.vue index 0f12909..0f12909 100644 --- a/antis-ncc-admin/src/views/lqInventory/AddUsageRecordForm.vue +++ b/antis-ncc-admin/src/views/lqInventory copy/AddUsageRecordForm.vue diff --git a/antis-ncc-admin/src/views/lqInventory/InventoryForm.vue b/antis-ncc-admin/src/views/lqInventory copy/InventoryForm.vue index d17b97c..d17b97c 100644 --- a/antis-ncc-admin/src/views/lqInventory/InventoryForm.vue +++ b/antis-ncc-admin/src/views/lqInventory copy/InventoryForm.vue diff --git a/antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue b/antis-ncc-admin/src/views/lqInventory copy/InventoryInfoDialog.vue index ad5e01f..ad5e01f 100644 --- a/antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue +++ b/antis-ncc-admin/src/views/lqInventory copy/InventoryInfoDialog.vue diff --git a/antis-ncc-admin/src/views/lqInventory/UsageRecordDialog.vue b/antis-ncc-admin/src/views/lqInventory copy/UsageRecordDialog.vue index 653b406..653b406 100644 --- a/antis-ncc-admin/src/views/lqInventory/UsageRecordDialog.vue +++ b/antis-ncc-admin/src/views/lqInventory copy/UsageRecordDialog.vue diff --git a/antis-ncc-admin/src/views/lqInventory copy/index.vue b/antis-ncc-admin/src/views/lqInventory copy/index.vue new file mode 100644 index 0000000..2e1a924 --- /dev/null +++ b/antis-ncc-admin/src/views/lqInventory copy/index.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/antis-ncc-admin/src/views/lqInventory/index.vue b/antis-ncc-admin/src/views/lqInventory/index.vue index 2e1a924..12088d7 100644 --- a/antis-ncc-admin/src/views/lqInventory/index.vue +++ b/antis-ncc-admin/src/views/lqInventory/index.vue @@ -1,289 +1,378 @@ - // 获取库存列表 - getList() { - this.listLoading = true - getInventoryList(this.query).then(response => { - if (response.code === 200) { - this.list = response.data.list || [] - this.total = (response.data.pagination && response.data.pagination.total) || 0 - } else { - this.$message.error(response.msg || '获取库存列表失败') - } - this.listLoading = false - }).catch(() => { - this.listLoading = false - }) - }, + diff --git a/antis-ncc-admin/src/views/lqInventory/inventory-form.vue b/antis-ncc-admin/src/views/lqInventory/inventory-form.vue new file mode 100644 index 0000000..27aa10e --- /dev/null +++ b/antis-ncc-admin/src/views/lqInventory/inventory-form.vue @@ -0,0 +1,170 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/lqInventory/product-detail-dialog.vue b/antis-ncc-admin/src/views/lqInventory/product-detail-dialog.vue new file mode 100644 index 0000000..a84c366 --- /dev/null +++ b/antis-ncc-admin/src/views/lqInventory/product-detail-dialog.vue @@ -0,0 +1,916 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/lqInventory/product-form.vue b/antis-ncc-admin/src/views/lqInventory/product-form.vue new file mode 100644 index 0000000..40ec335 --- /dev/null +++ b/antis-ncc-admin/src/views/lqInventory/product-form.vue @@ -0,0 +1,282 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/lqInventory/usage-form.vue b/antis-ncc-admin/src/views/lqInventory/usage-form.vue new file mode 100644 index 0000000..f7050ed --- /dev/null +++ b/antis-ncc-admin/src/views/lqInventory/usage-form.vue @@ -0,0 +1,289 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/lqInventory/usage-multi-form.vue b/antis-ncc-admin/src/views/lqInventory/usage-multi-form.vue new file mode 100644 index 0000000..1ce85e8 --- /dev/null +++ b/antis-ncc-admin/src/views/lqInventory/usage-multi-form.vue @@ -0,0 +1,283 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/statisticsList/form1.vue b/antis-ncc-admin/src/views/statisticsList/form1.vue index d40b391..57e3cd5 100644 --- a/antis-ncc-admin/src/views/statisticsList/form1.vue +++ b/antis-ncc-admin/src/views/statisticsList/form1.vue @@ -19,9 +19,7 @@ value-format="timestamp" format="yyyy-MM-dd HH:mm:ss" placeholder="开始时间" - > - - + /> @@ -32,15 +30,14 @@ value-format="timestamp" format="yyyy-MM-dd HH:mm:ss" placeholder="结束时间" - > - - + /> 查询 重置 + 字段设置 @@ -143,109 +140,128 @@ -
- - - - +
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ + + +
+
+ 全选 + 清空 +
+ + + {{ col.label }} + + +
+ +
@@ -265,41 +281,47 @@ export default { summaryData: null, records: [], listLoading: false, - startTimePickerOptions: { - disabledDate: (time) => { - const timeMs = time.getTime() - const nowMs = Date.now() - const ninetyDaysMs = 90 * 24 * 60 * 60 * 1000 - // 不能选择未来日期 - if (timeMs > nowMs) return true - // 若已选择结束时间:开始时间需在 [end-90天, end] 区间内 - if (this.query.endTime) { - const minStart = this.query.endTime - ninetyDaysMs - return timeMs < minStart || timeMs > this.query.endTime - } - return false - } + showColumnDialog: false, + selectedColumns: [], + sortInfo: { + prop: '', + order: '' }, - endTimePickerOptions: { - disabledDate: (time) => { - const timeMs = time.getTime() - const nowMs = Date.now() - const ninetyDaysMs = 90 * 24 * 60 * 60 * 1000 - // 不能选择未来日期 - if (timeMs > nowMs) return true - // 若已选择开始时间:结束时间需在 [start, start+90天] 区间内 - if (this.query.startTime) { - const maxEnd = this.query.startTime + ninetyDaysMs - return timeMs < this.query.startTime || timeMs > maxEnd - } - return false - } - } + // 所有列配置 + columnOptions: [ + { prop: 'date', label: '开单日期', width: 120, sortable: false, align: 'left' }, + { prop: 'customerName', label: '客户姓名', width: 100, sortable: false, align: 'left' }, + { prop: 'customerPhone', label: '客户电话', width: 120, sortable: false, align: 'left' }, + { prop: 'goldTriangle', label: '金三角', width: 100, sortable: false, align: 'left' }, + { prop: 'customerType', label: '客户类型', width: 100, sortable: false, align: 'left' }, + { prop: 'purchasedItems', label: '购买项目', minWidth: 200, sortable: false, align: 'left' }, + { prop: 'giftedItems', label: '赠送项目', minWidth: 200, sortable: false, align: 'left' }, + { prop: 'experienceItems', label: '体验项目', minWidth: 200, sortable: false, align: 'left' }, + { prop: 'healthTeachers', label: '健康师', minWidth: 150, sortable: false, align: 'left' }, + { prop: 'paidAmount', label: '已付金额', width: 100, sortable: true, align: 'left' }, + { prop: 'debtAmount', label: '欠款金额', width: 100, sortable: true, align: 'left' }, + { prop: 'totalAmount', label: '总金额', width: 100, sortable: true, align: 'left' }, + { prop: 'paymentMethod', label: '支付方式', width: 100, sortable: false, align: 'left' }, + { prop: 'remark', label: '备注', minWidth: 150, sortable: false, align: 'left' }, + { prop: 'createTime', label: '开单时间', width: 150, sortable: true, align: 'left' } + ] + } + }, + computed: { + // 可见的列 + visibleColumns() { + return this.columnOptions.filter(col => this.selectedColumns.includes(col.prop)) + }, + // 计算表格高度 + tableHeight() { + // 根据视口高度动态计算,减去筛选条件、统计卡片等的高度 + return 'calc(100vh - 400px)' } }, created() { this.initStoreOptions() this.setDefaultTimeRange() + this.initColumnSettings() }, methods: { // 初始化门店选项 @@ -382,31 +404,6 @@ export default { this.setDefaultTimeRange() }, - // 导出数据 - exportData() { - if (!this.query.storeId) { - this.$message({ - type: 'warning', - message: '请先选择门店并查询数据', - duration: 1500 - }) - return - } - - const params = { - storeId: this.query.storeId, - startTime: this.query.startTime, - endTime: this.query.endTime - } - - // 这里可以调用导出接口 - this.$message({ - type: 'info', - message: '导出功能开发中...', - duration: 1500 - }) - }, - // 格式化金额 formatMoney(amount) { if (!amount && amount !== 0) return '0.00' @@ -444,6 +441,96 @@ export default { const minutes = String(date.getMinutes()).padStart(2, '0') const seconds = String(date.getSeconds()).padStart(2, '0') return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` + }, + + // 初始化列设置 + initColumnSettings() { + // 默认显示所有列 + this.selectedColumns = this.columnOptions.map(col => col.prop) + // 尝试从本地存储读取 + const savedColumns = localStorage.getItem('form1_column_settings') + if (savedColumns) { + try { + const columns = JSON.parse(savedColumns) + if (Array.isArray(columns) && columns.length > 0) { + this.selectedColumns = columns + } + } catch (e) { + console.error('读取列设置失败:', e) + } + } + }, + + // 全选列 + selectAllColumns() { + this.selectedColumns = this.columnOptions.map(col => col.prop) + }, + + // 清空列 + clearAllColumns() { + this.selectedColumns = [] + }, + + // 保存列设置 + saveColumnSettings() { + if (this.selectedColumns.length === 0) { + this.$message({ + type: 'warning', + message: '至少需要显示一列', + duration: 1500 + }) + return + } + // 保存到本地存储 + localStorage.setItem('form1_column_settings', JSON.stringify(this.selectedColumns)) + this.showColumnDialog = false + this.$message({ + type: 'success', + message: '字段设置已保存', + duration: 1500 + }) + }, + + // 排序变化 + handleSortChange({ column, prop, order }) { + this.sortInfo = { + prop: prop || '', + order: order || '' + } + this.sortList() + }, + + // 排序列表 + sortList() { + if (!this.sortInfo.prop || !this.sortInfo.order) { + return + } + + const prop = this.sortInfo.prop + const order = this.sortInfo.order + const isAsc = order === 'ascending' + + this.records.sort((a, b) => { + let aVal = a[prop] + let bVal = b[prop] + + // 处理空值 + if (aVal === null || aVal === undefined) aVal = 0 + if (bVal === null || bVal === undefined) bVal = 0 + + // 转换为数字进行比较 + aVal = Number(aVal) + bVal = Number(bVal) + + if (isNaN(aVal)) aVal = 0 + if (isNaN(bVal)) bVal = 0 + + if (isAsc) { + return aVal - bVal + } else { + return bVal - aVal + } + }) } } } @@ -541,6 +628,34 @@ export default { font-weight: 500; } +.table-wrapper { + height: 100%; + overflow: hidden; + + ::v-deep .el-table { + width: 100%; + } + + ::v-deep .el-table__body-wrapper { + overflow-y: auto; + overflow-x: auto; + } + + ::v-deep .el-table__header-wrapper { + overflow-x: auto; + overflow-y: hidden; + // 隐藏滚动条但保持滚动功能 + scrollbar-width: none; // Firefox + -ms-overflow-style: none; // IE 和 Edge + + &::-webkit-scrollbar { + display: none; // Chrome, Safari, Opera + width: 0; + height: 0; + } + } +} + // 响应式设计 @media (max-width: 768px) { .statistics-cards { diff --git a/antis-ncc-admin/src/views/statisticsList/form12.vue b/antis-ncc-admin/src/views/statisticsList/form12.vue index b3532b8..c39d6cc 100644 --- a/antis-ncc-admin/src/views/statisticsList/form12.vue +++ b/antis-ncc-admin/src/views/statisticsList/form12.vue @@ -115,6 +115,23 @@ + + + + + + + + 查询 重置 @@ -126,6 +143,7 @@
{ + if (res.code == 200 && res.data) { + this.memberTypeOptions = res.data.map(item => ({ + fullName: item.Name, + id: item.Value + '', + value: item.Value + '', + label: item.Name, + })) + } else { + this.memberTypeOptions = [] + } + }).catch((err) => { + console.error('获取客户类型失败:', err) + this.memberTypeOptions = [] + }) + }, + // 查询数据 search() { this.listLoading = true @@ -523,7 +566,8 @@ export default { BillingUserId: undefined, PurchaseItemId: undefined, GiftItemId: undefined, - ExperienceItemId: undefined + ExperienceItemId: undefined, + memberType: undefined } this.listQuery.currentPage = 1 this.listQuery.pageSize = 20 diff --git a/antis-ncc-admin/src/views/statisticsList/form13.vue b/antis-ncc-admin/src/views/statisticsList/form13.vue index 1e05078..aef02ab 100644 --- a/antis-ncc-admin/src/views/statisticsList/form13.vue +++ b/antis-ncc-admin/src/views/statisticsList/form13.vue @@ -477,6 +477,7 @@ export default { this.listQuery.pageSize = 20 this.list = [] this.total = 0 + this.search() }, // 获取品项类型的标签类型 diff --git a/antis-ncc-admin/src/views/statisticsList/form14.vue b/antis-ncc-admin/src/views/statisticsList/form14.vue new file mode 100644 index 0000000..04f7674 --- /dev/null +++ b/antis-ncc-admin/src/views/statisticsList/form14.vue @@ -0,0 +1,498 @@ + + + + + + diff --git a/antis-ncc-admin/src/views/statisticsList/form4.vue b/antis-ncc-admin/src/views/statisticsList/form4.vue index efd912e..460af80 100644 --- a/antis-ncc-admin/src/views/statisticsList/form4.vue +++ b/antis-ncc-admin/src/views/statisticsList/form4.vue @@ -54,6 +54,7 @@ 查询 重置 + 字段设置 @@ -110,63 +111,61 @@
-
- - - +
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
@@ -178,6 +177,29 @@ :end-time="query.endTime" @close="dialogVisible = false" /> + + + +
+
+ 全选 + 清空 +
+ + + {{ col.label }} + + +
+ +
@@ -204,13 +226,49 @@ export default { list: [], listLoading: false, dialogVisible: false, - currentItemId: null + currentItemId: null, + showColumnDialog: false, + selectedColumns: [], + sortInfo: { + prop: '', + order: '' + }, + // 所有列配置 + columnOptions: [ + { prop: 'ItemNumber', label: '品项编号', width: 120, sortable: true, align: 'left' }, + { prop: 'ItemName', label: '品项名称', minWidth: 150, sortable: true, align: 'left', slot: true }, + { prop: 'BillingAmount', label: '开单金额', width: 120, sortable: true, align: 'right', slot: true }, + { prop: 'BillingAmountRatio', label: '开单占比', width: 110, sortable: true, align: 'right', slot: true }, + { prop: 'TotalBuyers', label: '购买人数', width: 100, sortable: true, align: 'right' }, + { prop: 'ItemRatio', label: '人次占比', width: 110, sortable: true, align: 'right', slot: true }, + { prop: 'RepeatBuyers', label: '复购人数', width: 100, sortable: true, align: 'right' }, + { prop: 'RepeatBuyRate', label: '复购率', width: 100, sortable: true, align: 'right', slot: true }, + { prop: 'ConsumeAmount', label: '耗卡金额', width: 120, sortable: true, align: 'right', slot: true }, + { prop: 'ConsumeAmountRatio', label: '耗卡占比', width: 110, sortable: true, align: 'right', slot: true }, + { prop: 'ConsumePurchaseCount', label: '购买耗卡次数', width: 140, sortable: true, align: 'right' }, + { prop: 'ConsumeGiftCount', label: '赠送耗卡次数', width: 140, sortable: true, align: 'right' }, + { prop: 'ConsumeExperienceCount', label: '体验耗卡次数', width: 140, sortable: true, align: 'right' }, + { prop: 'RefundAmount', label: '退款金额', width: 120, sortable: true, align: 'right', slot: true }, + { prop: 'RefundCount', label: '退款次数', width: 100, sortable: true, align: 'right', slot: true } + ] + } + }, + computed: { + // 可见的列 + visibleColumns() { + return this.columnOptions.filter(col => this.selectedColumns.includes(col.prop)) + }, + // 计算表格高度 + tableHeight() { + // 根据视口高度动态计算,减去筛选条件、统计卡片等的高度 + return 'calc(100vh - 400px)' } }, created() { this.setDefaultTimeRange() this.initStoreOptions() this.initItemOptions() + this.initColumnSettings() this.search() }, methods: { @@ -379,6 +437,96 @@ export default { this.currentItemId = row.ItemId this.dialogVisible = true + }, + + // 初始化列设置 + initColumnSettings() { + // 默认显示所有列 + this.selectedColumns = this.columnOptions.map(col => col.prop) + // 尝试从本地存储读取 + const savedColumns = localStorage.getItem('form4_column_settings') + if (savedColumns) { + try { + const columns = JSON.parse(savedColumns) + if (Array.isArray(columns) && columns.length > 0) { + this.selectedColumns = columns + } + } catch (e) { + console.error('读取列设置失败:', e) + } + } + }, + + // 全选列 + selectAllColumns() { + this.selectedColumns = this.columnOptions.map(col => col.prop) + }, + + // 清空列 + clearAllColumns() { + this.selectedColumns = [] + }, + + // 保存列设置 + saveColumnSettings() { + if (this.selectedColumns.length === 0) { + this.$message({ + type: 'warning', + message: '至少需要显示一列', + duration: 1500 + }) + return + } + // 保存到本地存储 + localStorage.setItem('form4_column_settings', JSON.stringify(this.selectedColumns)) + this.showColumnDialog = false + this.$message({ + type: 'success', + message: '字段设置已保存', + duration: 1500 + }) + }, + + // 排序变化 + handleSortChange({ column, prop, order }) { + this.sortInfo = { + prop: prop || '', + order: order || '' + } + this.sortList() + }, + + // 排序列表 + sortList() { + if (!this.sortInfo.prop || !this.sortInfo.order) { + return + } + + const prop = this.sortInfo.prop + const order = this.sortInfo.order + const isAsc = order === 'ascending' + + this.list.sort((a, b) => { + let aVal = a[prop] + let bVal = b[prop] + + // 处理空值 + if (aVal === null || aVal === undefined) aVal = 0 + if (bVal === null || bVal === undefined) bVal = 0 + + // 转换为数字进行比较 + aVal = Number(aVal) + bVal = Number(bVal) + + if (isNaN(aVal)) aVal = 0 + if (isNaN(bVal)) bVal = 0 + + if (isAsc) { + return aVal - bVal + } else { + return bVal - aVal + } + }) } } } @@ -456,5 +604,33 @@ export default { text-decoration: underline; } } + +.table-wrapper { + height: 100%; + overflow: hidden; + + ::v-deep .el-table { + width: 100%; + } + + ::v-deep .el-table__body-wrapper { + overflow-y: auto; + overflow-x: auto; + } + + ::v-deep .el-table__header-wrapper { + overflow-x: auto; + overflow-y: hidden; + // 隐藏滚动条但保持滚动功能 + scrollbar-width: none; // Firefox + -ms-overflow-style: none; // IE 和 Edge + + &::-webkit-scrollbar { + display: none; // Chrome, Safari, Opera + width: 0; + height: 0; + } + } +} diff --git a/绿纤uni-app/apis/modules/laundry-flow.js b/绿纤uni-app/apis/modules/laundry-flow.js new file mode 100644 index 0000000..3cc3c96 --- /dev/null +++ b/绿纤uni-app/apis/modules/laundry-flow.js @@ -0,0 +1,35 @@ +import request from '@/service/request.js' +import config from '@/common/config.js' + +export default { + // 获取毛巾流水列表 + getLaundryFlowList(params) { + return request.get(`${config.getApiBaseUrl()}/api/Extend/LqLaundryFlow/GetList`, params); + }, + + // 创建送出记录 + createSendRecord(data) { + return request.post(`${config.getApiBaseUrl()}/api/Extend/LqLaundryFlow/Send`, data); + }, + + // 创建送回记录 + createReturnRecord(data) { + return request.post(`${config.getApiBaseUrl()}/api/Extend/LqLaundryFlow/Return`, data); + }, + + // 获取清洗商列表 + getSupplierList(params) { + return request.get(`${config.getApiBaseUrl()}/api/Extend/LqLaundrySupplier/GetList`, params); + }, + + // 获取毛巾流水详情 + getLaundryFlowDetail(id) { + return request.get(`${config.getApiBaseUrl()}/api/Extend/LqLaundryFlow/${id}`); + }, + + // 获取产品类型列表 + getProductTypeList() { + return request.get(`${config.getApiBaseUrl()}/api/Extend/LqStoreConsumableInventory/consumable-product-type`); + } +} + diff --git a/绿纤uni-app/apis/modules/usage.js b/绿纤uni-app/apis/modules/usage.js new file mode 100644 index 0000000..93b38bc --- /dev/null +++ b/绿纤uni-app/apis/modules/usage.js @@ -0,0 +1,23 @@ +import request from '@/service/request.js' +import config from '@/common/config.js' + +export default { + // 获取使用记录列表 + getUsageList(params) { + return request.get(`${config.getApiBaseUrl()}/api/Extend/LqInventoryUsage/GetList`, params); + }, + + // 批量创建使用记录 + batchCreateUsage(data) { + return request.post(`${config.getApiBaseUrl()}/api/Extend/LqInventoryUsage/BatchCreate`, data); + }, + + // 作废使用记录 + cancelUsage(id, remarks) { + return request.put(`${config.getApiBaseUrl()}/api/Extend/LqInventoryUsage/Cancel`, { + id: id, + remarks: remarks || '' + }); + } +} + diff --git a/绿纤uni-app/common/config.js b/绿纤uni-app/common/config.js index c156a1c..ab8ccef 100644 --- a/绿纤uni-app/common/config.js +++ b/绿纤uni-app/common/config.js @@ -10,8 +10,8 @@ const ENV_CONFIG = { // 正式环境 production: { name: '正式环境', - // apiBaseUrl: 'http://erp_test.lvqianmeiye.com', - apiBaseUrl: 'https://erp.lvqianmeiye.com', + apiBaseUrl: 'http://erp_test.lvqianmeiye.com', + // apiBaseUrl: 'https://erp.lvqianmeiye.com', description: '生产环境服务器' } }; diff --git a/绿纤uni-app/pages.json b/绿纤uni-app/pages.json index c7f5756..e8ddd8e 100644 --- a/绿纤uni-app/pages.json +++ b/绿纤uni-app/pages.json @@ -244,6 +244,48 @@ { "navigationBarTitleText" : "报销申请详情" } + }, + { + "path" : "pages/usage-list/usage-list", + "style" : + { + "navigationBarTitleText" : "使用记录" + } + }, + { + "path" : "pages/usage-form/usage-form", + "style" : + { + "navigationBarTitleText" : "添加使用记录" + } + }, + { + "path" : "pages/laundry-flow-list/laundry-flow-list", + "style" : + { + "navigationBarTitleText" : "毛巾记录" + } + }, + { + "path" : "pages/laundry-flow-send/laundry-flow-send", + "style" : + { + "navigationBarTitleText" : "创建送出记录" + } + }, + { + "path" : "pages/laundry-flow-return/laundry-flow-return", + "style" : + { + "navigationBarTitleText" : "创建送回记录" + } + }, + { + "path" : "pages/laundry-flow-detail/laundry-flow-detail", + "style" : + { + "navigationBarTitleText" : "毛巾记录详情" + } } ], "globalStyle": { diff --git a/绿纤uni-app/pages/clue-list/clue-list.vue b/绿纤uni-app/pages/clue-list/clue-list.vue index c6e6da7..9f7ecaa 100644 --- a/绿纤uni-app/pages/clue-list/clue-list.vue +++ b/绿纤uni-app/pages/clue-list/clue-list.vue @@ -135,6 +135,16 @@ > 剩余权益 + + + @@ -315,7 +325,13 @@ this.loadCustomerData(true); }, 500); }, - + // 跳转到服务日志页面 + goToServiceLog(item) { + console.log('跳转到服务日志:', item) + uni.navigateTo({ + url: `/pages/serviceDiary/serviceDiary?consumeId=${item.id}&memberName=${encodeURIComponent(item.name || '未知会员')}` + }) + }, // 跨店开关变化 onCrossStoreChange() { // 重置分页状态 diff --git a/绿纤uni-app/pages/index/index.vue b/绿纤uni-app/pages/index/index.vue index eda8ebe..ce219b5 100644 --- a/绿纤uni-app/pages/index/index.vue +++ b/绿纤uni-app/pages/index/index.vue @@ -128,6 +128,18 @@ 报销申请 + + + + + 使用记录 + + + + + + 毛巾记录 + diff --git a/绿纤uni-app/pages/laundry-flow-detail/laundry-flow-detail.vue b/绿纤uni-app/pages/laundry-flow-detail/laundry-flow-detail.vue new file mode 100644 index 0000000..4b7d7b9 --- /dev/null +++ b/绿纤uni-app/pages/laundry-flow-detail/laundry-flow-detail.vue @@ -0,0 +1,343 @@ + + + + + + diff --git a/绿纤uni-app/pages/laundry-flow-list/laundry-flow-list.vue b/绿纤uni-app/pages/laundry-flow-list/laundry-flow-list.vue new file mode 100644 index 0000000..5835649 --- /dev/null +++ b/绿纤uni-app/pages/laundry-flow-list/laundry-flow-list.vue @@ -0,0 +1,605 @@ + + + + + + diff --git a/绿纤uni-app/pages/laundry-flow-return/laundry-flow-return.vue b/绿纤uni-app/pages/laundry-flow-return/laundry-flow-return.vue new file mode 100644 index 0000000..4776e47 --- /dev/null +++ b/绿纤uni-app/pages/laundry-flow-return/laundry-flow-return.vue @@ -0,0 +1,603 @@ + + + + + + diff --git a/绿纤uni-app/pages/laundry-flow-send/laundry-flow-send.vue b/绿纤uni-app/pages/laundry-flow-send/laundry-flow-send.vue new file mode 100644 index 0000000..dea6caf --- /dev/null +++ b/绿纤uni-app/pages/laundry-flow-send/laundry-flow-send.vue @@ -0,0 +1,558 @@ + + + + + + diff --git a/绿纤uni-app/pages/usage-form/usage-form.vue b/绿纤uni-app/pages/usage-form/usage-form.vue new file mode 100644 index 0000000..80a7ac3 --- /dev/null +++ b/绿纤uni-app/pages/usage-form/usage-form.vue @@ -0,0 +1,678 @@ + + + + + + diff --git a/绿纤uni-app/pages/usage-list/usage-list.vue b/绿纤uni-app/pages/usage-list/usage-list.vue new file mode 100644 index 0000000..33d9f64 --- /dev/null +++ b/绿纤uni-app/pages/usage-list/usage-list.vue @@ -0,0 +1,663 @@ + + + + + +