代码更新

This commit is contained in:
GaoHao
2025-03-10 09:14:57 +08:00
parent 4f65b08c06
commit 490c513f48
48 changed files with 1162 additions and 537 deletions

View File

@@ -98,7 +98,7 @@
<view class="u-m-t-32">
<view class="u-flex u-row-right">
<text>总计</text>
<text class="font-bold u-font-32">{{data.orderAmount}}</text>
<text class="font-bold u-font-32">{{data.originAmount}}</text>
</view>
<view class="u-flex u-row-right u-m-t-24">
<view class="print" @click.stop="print(item)">重新打印</view>

View File

@@ -21,12 +21,11 @@
import { reactive, ref, watch } from 'vue';
import {onLoad,onShow,onPullDownRefresh} from '@dcloudio/uni-app'
import LIST from '@/commons/class/list.js'
import {$printOrder} from '@/http/yskApi/Instead.js'
import filterVue from './compoents/filter.vue';
import orderList from './compoents/order-list.vue';
import infoBox from '@/commons/utils/infoBox.js'
import {getTodayTimestamps} from '@/commons/utils/dayjs-time.js';
import { getOrderList } from '@/api/order.js'
import { getOrderList,printOrder } from '@/api/order.js'
const search = reactive({
placeholder: '搜索单号/商品名称',
@@ -84,33 +83,25 @@
* 是否打印该订单
* @param {Object} e
*/
function onPrintOrder(e){
function onPrintOrder(item){
uni.showModal({
title: '提示',
content: '是否打印该订单',
success(res) {
async success(res) {
if (res.confirm) {
printOrder(e)
try{
const res= await printOrder({
id :item.id
})
infoBox.showToast('已发送打印请求')
}catch(e){
infoBox.showToast('发送打印请求失败')
}
}
}
})
}
/**
* 打印该订单
* @param {Object} item
*/
async function printOrder(item){
try{
const res= await $printOrder({
tableId:item.tableId
})
infoBox.showToast('已发送打印请求')
}catch(e){
infoBox.showToast('发送打印请求失败')
}
}
/**
* 分页加载
* @param {Object} e