diff --git a/App.vue b/App.vue index c7aac52..b85cd05 100644 --- a/App.vue +++ b/App.vue @@ -9,6 +9,7 @@ App.vue本身不是页面,这里不能编写视图元素,也就是没有{ - if( (orderInfo.status == 'done' || orderInfo.status == 'part_refund') && v.status != 'return' && v.status != 'refund' && v.status != 'refunding' ){ + if( orderInfo.refundAmount < orderInfo.payAmount || (orderInfo.status == 'done' || orderInfo.status == 'part_refund' ) && v.status != 'return' && v.status != 'refund' && v.status != 'refunding' && (v.returnNum+v.refundNum < v.num) ){ data = true return data } @@ -50,4 +51,15 @@ export function numSum(arr) { return a + b * 100 }, 0) return (sum / 100).toFixed(2) +} +export function mathFloorPrice(price,item) { + if( item ){ + if( item.productType == 'weight' || item.type == 'weight'){ + return (Math.floor(price * 100)/100).toFixed(2) + } else { + return parseFloat(price).toFixed(2) + } + } else { + return parseFloat(price).toFixed(2) + } } \ No newline at end of file diff --git a/commons/utils/websocket.js b/commons/utils/websocket.js index 291f37d..33cc979 100644 --- a/commons/utils/websocket.js +++ b/commons/utils/websocket.js @@ -13,6 +13,7 @@ class WebsocketUtil { this.reconnectTimeout = null; // 重连定时器 this.heartbeatInterval = null; // 心跳定时器 this.messageCallbacks = []; // 存储外部注册的消息回调函数的数组 + this.messageCallbacks = []; // 存储外部注册的消息回调函数的数组 // 初始化 WebSocket 连接 this.initializeWebSocket(); @@ -27,7 +28,6 @@ class WebsocketUtil { url: this.url, success: () => { console.log('WebSocket连接成功'); - return this.socketTask; }, fail: (error) => { diff --git a/components/my-components/edit-discount.vue b/components/my-components/edit-discount.vue index cbb9f2e..730575c 100644 --- a/components/my-components/edit-discount.vue +++ b/components/my-components/edit-discount.vue @@ -102,9 +102,7 @@ const form = reactive({ ...$form }) - console.log(form) watch(()=>props.price,(newval)=>{ - console.log(newval); form.price=newval form.currentPrice=newval }) @@ -129,7 +127,6 @@ const emits = defineEmits(['confirm']) function confirm() { - console.log(form); emits('confirm',{...form,currentPrice:Number(form.currentPrice).toFixed(2)}) close() } diff --git a/http/api/cons.js b/http/api/cons.js index d3278be..db30404 100644 --- a/http/api/cons.js +++ b/http/api/cons.js @@ -192,3 +192,31 @@ export function stockReportDamage(data, urlType = 'product') { } }) } + +/** + * 耗材库存变动记录 + * @returns + */ +export function stockFlow(data, urlType = 'product') { + return request({ + url: `${urlType}/admin/product/stock/flow`, + method: "GET", + data: { + ...data + } + }) +} + +/** + * 耗材统计 + * @returns + */ +export function consStatistics(data, urlType = 'product') { + return request({ + url: `${urlType}/admin/product/cons/statistics`, + method: "GET", + data: { + ...data + } + }) +} \ No newline at end of file diff --git a/http/api/pay.js b/http/api/pay.js index 1f4b8dc..6bf963c 100644 --- a/http/api/pay.js +++ b/http/api/pay.js @@ -84,3 +84,17 @@ export function vipPay(data, urlType = 'order') { } }) } + +/** + * 查询订单状态 + * @returns + */ +export function queryOrderStatus(data, urlType = 'order') { + return request({ + url: `${urlType}/pay/queryOrderStatus`, + method: "GET", + data: { + ...data + } + }) +} diff --git a/pageConsumables/index.vue b/pageConsumables/index.vue index 55d7877..62817eb 100644 --- a/pageConsumables/index.vue +++ b/pageConsumables/index.vue @@ -148,7 +148,6 @@ getConsGrpupList({ page: 1, size: 30, - shopId: uni.getStorageSync("shopId"), }).then(res => { datas.typeList = res res.forEach(ele => { diff --git a/pageConsumables/viewrecords.vue b/pageConsumables/viewrecords.vue index 9b10dbc..71d2b66 100644 --- a/pageConsumables/viewrecords.vue +++ b/pageConsumables/viewrecords.vue @@ -1,72 +1,60 @@