打印机字段修改

This commit is contained in:
duan 2024-10-18 11:16:44 +08:00
parent b80ce77096
commit 9c97a912a7
12 changed files with 214 additions and 78 deletions

View File

@ -37,7 +37,7 @@
</view>
<view>
<view style="color: #318AFE;">
{{item.balance}}
{{item.stockNumber-item.stockConsume}}
</view>
<view>
剩余库存
@ -177,11 +177,13 @@
})
} else if (index == 3) {
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
consId: actionSheet.activeId
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
} else if (index == 4) {
toUrl('PAGES_SALES_OUTBOUND', {
consId: actionSheet.activeId
consId: actionSheet.activeId,
item: JSON.stringify(actionSheet.active)
})
}
}

View File

@ -1,6 +1,22 @@
<template>
<view class="warehouseEntry">
<ul>
<li>
<view>
耗材名称
</view>
<view>
{{datas.item.conName}}
</view>
</li>
<li>
<view>
现有库存
</view>
<view>
{{datas.item.stockNumber-datas.item.stockConsume}}
</view>
</li>
<li>
<view>
出库数量
@ -11,10 +27,10 @@
</li>
<li>
<view>
</view>
<view>
<input type="text" placeholder="请输入价(元)" v-model="datas.form.list.price" name="" id="">
<input type="text" placeholder="请输入价(元)" v-model="datas.form.list.price" name="" id="">
</view>
</li>
<li>
@ -97,16 +113,25 @@
list: {},
actualPayment: 0
},
item: ""
})
const props = defineProps({
consId: {
type: String
},
item: {
type: String
}
})
onMounted(() => {
getList()
datas.item = JSON.parse(props.item)
})
function toggle() {
go.to('PAGES_ADD_SUPPLIER')
}
function getList() {
tbShopPurveyor({
shopId: uni.getStorageSync("shopId"),
@ -176,11 +201,11 @@
.warehouseEntry {
width: 694rpx;
height: 640rpx;
// height: 640rpx;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
margin: 32rpx;
padding: 1rpx 24rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
>ul {

View File

@ -1,6 +1,22 @@
<template>
<view class="warehouseEntry">
<ul>
<li>
<view>
耗材名称
</view>
<view>
{{datas.item.conName}}
</view>
</li>
<li>
<view>
现有库存
</view>
<view>
{{datas.item.stockNumber-datas.item.stockConsume}}
</view>
</li>
<li>
<view>
入库数量
@ -11,10 +27,10 @@
</li>
<li>
<view>
</view>
<view>
<input type="text" placeholder="请输入价(元)" v-model="datas.form.list.price" name="" id="">
<input type="text" placeholder="请输入价(元)" v-model="datas.form.list.price" name="" id="">
</view>
</li>
<li>
@ -97,16 +113,25 @@
list: {},
actualPayment: 0
},
item: ""
})
const props = defineProps({
consId: {
type: String
},
item: {
type: String
}
})
onMounted(() => {
getList()
datas.item = JSON.parse(props.item)
})
function toggle() {
go.to('PAGES_ADD_SUPPLIER')
}
function getList() {
tbShopPurveyor({
shopId: uni.getStorageSync("shopId"),
@ -177,11 +202,12 @@
.warehouseEntry {
width: 694rpx;
height: 640rpx;
// height: 640rpx;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
margin: 32rpx;
padding: 1rpx 24rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
>ul {

View File

@ -114,15 +114,15 @@
<view class="u-m-t-16">
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'printMethod')">
<label class="radio u-m-r-60">
<radio value="all" :checked="form.printMethod == '1'" class="scale7" />
<radio value="all" :checked="form.printMethod == 'all'" class="scale7" />
<text>打印全部</text>
</label>
<label class="radio u-m-r-60">
<radio value="one" :checked="form.printMethod == '2'" class="scale7" />
<radio value="one" :checked="form.printMethod == 'one'" class="scale7" />
<text>仅打印制作单[厨房]</text>
</label>
<label class="radio u-m-r-60">
<radio value="normal" :checked="form.printMethod == '2'" class="scale7" />
<radio value="normal" :checked="form.printMethod == 'normal'" class="scale7" />
<text>仅打印结账单[前台]</text>
</label>
</radio-group>
@ -146,9 +146,6 @@
</up-checkbox-group>
</view>
</view>
<!-- <view class="u-p-b-24 u-m-b-24 border-bottom">
<view class="title">打印单据</view>
<view class="u-m-t-16">
@ -197,7 +194,8 @@
<my-button shape="circle" @click="save">保存</my-button>
</view>
</view>
<!-- 消息提示 -->
<up-toast ref="uToastRef"></up-toast>
<!-- 选择分类 -->
<choose-category v-model="chooseCategoryShow"></choose-category>
@ -223,7 +221,8 @@
computed,
watch,
onMounted,
toRef
toRef,
getCurrentInstance
} from 'vue';
import go from '@/commons/utils/go.js';
@ -243,6 +242,7 @@
list: brand,
selIndex: '',
})
const refs = getCurrentInstance()
//
const receipt = reactive({
list: receipts,
@ -313,17 +313,39 @@
}))
let form = reactive({
sort: "0",
status: 0,
status: 1,
connectionType: "network",
printType: [],
name: '',
receiptSize: '58mm',
classifyPrint: '0',
printQty: 'm1^1',
printType: ["refund", 'handover', 'queue'],
printMethod: "all",
selectcheckbox:[]
})
async function save() {
//
if (!form.contentType || !form.subType || !form.name || !form.address) {
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "请输入必填项",
})
return
}
if (form.classifyPrint == 1 && form.selectcheckbox.length == 0) {
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "请选择部分分类",
})
return
}
//
if (form.classifyPrint == 1) {
let idstr = ''
let arr = []
console.log(form.selectcheckbox, '提交')
form.selectcheckbox.forEach(element => {
idstr += element + ','
arr.push(partList.value.filter(ele => ele.id == element)[0])

View File

@ -61,19 +61,23 @@
<view class="table-scroll">
<table cellspacing="0">
<thead>
<tr style="background-color: #aebad2;color: #fff;" height='80'>
<th>排名</th>
<th>商品名称</th>
<th>数量</th>
<tr style="background-color: #aebad2;color: #fff;" height='41'>
<th style="width: 540rpx;">商品名称</th>
<th style="width: 215rpx;">总数量</th>
<th>金额</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in tableList" :key="item.productId">
<td>{{++index}}</td>
<td>{{item.productName}}</td>
<td>{{item.num}}</td>
<td>{{item.salesAmount}}</td>
<td style="width: 500rpx;padding-left: 16rpx;">
<image v-if="index==0" src="../pageTable/index/images/1.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
<image v-else-if="index==1" src="../pageTable/index/images/2.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
<image v-else-if="index==2" src="../pageTable/index/images/3.png" style="width: 22rpx;height: 30rpx;" mode=""></image>
<span v-else>{{index}}</span>
&nbsp;&nbsp;{{item.productName}}
</td>
<td style="padding-left: 16rpx;">{{item.num}}</td>
<td style="padding-left: 16rpx;">{{item.salesAmount}}</td>
</tr>
</tbody>
</table>
@ -222,21 +226,24 @@
return `${y}-${m}-${d}`
}
</script>
<style scoped lang="less">
<style>
page {
background-color: #f9f9f9;
background: #f6f6f6;
}
</style>
<style scoped lang="less">
.time-wrapper {
display: flex;
justify-content: space-around;
background-color: #fff;
padding-bottom: 20rpx;
padding-bottom: 16rpx;
padding-top: 16rpx;
background-color: #fff;
.timelistbox {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
.time-item {
font-size: 28rpx;
@ -248,9 +255,9 @@
width: 40rpx;
height: 3rpx;
background-color: #318AFE;
position: absolute;
left: 16rpx;
bottom: 0;
// position: absolute;
// left: 16rpx;
// bottom: 0;
}
}
@ -267,6 +274,7 @@
background-size: 694rpx 320rpx;
padding: 48rpx 28rpx;
.df;
justify-content: space-between;
flex-wrap: wrap;
>view {
@ -291,31 +299,32 @@
.table-scroll table {
table-layout: fixed;
width: calc(100% - 10rpx);
// width: calc(100% - 10rpx);
}
.table-scroll thead {
display: table-row;
background-color: bisque;
font-size: 24rpx;
height: 82rpx;
}
.table-scroll tbody {
overflow-y: scroll;
overflow-x: hidden;
display: block;
width: 1040rpx;
// width: 1040rpx;
width: 100%;
// width: calc(100% );
}
.table-scroll th,
td {
height: 80rpx;
height: 82rpx;
overflow: hidden;
text-overflow: ellipsis;
min-width: 250rpx;
border: 1.2rpx solid #7E9BD4;
width: 250rpx;
// border: 0.7rpx solid red;
border: 0.7rpx solid rgba(126, 155, 212, 0.27);
}
.bottombtn {

View File

@ -2,8 +2,7 @@
<view class="table-scroll">
<table cellspacing="0">
<thead>
<tr style="background-color: #aebad2;color: #fff;" height='80'>
<th>排名</th>
<tr style="background-color: #aebad2;color: #fff;" height='41'>
<th>商品名称</th>
<th>数量</th>
<th>金额</th>
@ -11,10 +10,9 @@
</thead>
<tbody>
<tr v-for="(item,index) in tableList" :key="item.productId">
<td>{{++index}}</td>
<td>{{item.productName}}</td>
<td>{{item.num}}</td>
<td>{{item.salesAmount}}</td>
<td style="padding-left: 16rpx;">{{item.productName}}</td>
<td style="padding-left: 16rpx;">{{item.num}}</td>
<td style="padding-left: 16rpx;">{{item.salesAmount}}</td>
</tr>
</tbody>
</table>
@ -57,7 +55,7 @@
.table-scroll {
overflow-x: scroll;
white-space: nowrap;
margin: 0 28rpx;
margin: 32rpx 28rpx;
margin-right: 30rpx;
border-radius: 30rpx 30rpx 0 0;
@ -65,28 +63,27 @@
.table-scroll table {
table-layout: fixed;
width: calc(100% - 10rpx);
}
.table-scroll thead {
display: table-row;
background-color: bisque;
font-size: 24rpx;
}
.table-scroll tbody {
overflow-y: scroll;
overflow-x: hidden;
display: block;
width: 1040rpx;
width: 100%;
}
.table-scroll th,
td {
height: 80rpx;
height: 82rpx;
overflow: hidden;
text-overflow: ellipsis;
min-width: 250rpx;
border: 2rpx solid #7E9BD4;
width: 250rpx;
border: 0.7rpx solid rgba(126, 155, 212, 0.27);
}
</style>

View File

@ -114,7 +114,8 @@
})
let datas = reactive({
formData: {
permissions: []
permissions: [],
maxDiscountAmount:0
},
rolesList: [],
columns: [],

View File

@ -12,7 +12,7 @@
</view>
<view class="">
<view style="display: flex;justify-content: center;align-items: center;">
<span style="font-size: 28rpx;color: #999999;">是否启用</span>
<span style="font-size: 28rpx;color: #999999;">是否启用</span>
<up-switch :activeValue="1" :inactiveValue="0" v-model="item.status" size="18"
@change="switch2Change($event,item)"></up-switch>
</view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

View File

@ -14,20 +14,20 @@
</view>
<view class="receipts-money">
<text class="money-title">成交金额 ()</text>
<view class="money-num">{{ vdata.payAmount <= -1 ? '--' : cal.cert2Dollar(vdata.payAmount) }}</view>
<view class="money-num">{{ list.sale.incomeAmountAll}}</view>
</view>
<view class="money-list">
<view class="money-item">
<text class="money-title">成交笔数</text>
<view class="money-num">{{ vdata.payCount <= -1 ? '--' : vdata.payCount }}</view>
<text class="money-title">消费笔数</text>
<view class="money-num">{{ list.vip.useNum }}</view>
</view>
<view class="money-item">
<text class="money-title">退款金额 ()</text>
<view class="money-num">{{ vdata.refundAmount <= -1 ? '--' : cal.cert2Dollar(vdata.refundAmount) }}</view>
<view class="money-num">{{ list.sale.outAmount}}</view>
</view>
<view class="money-item">
<text class="money-title">退款笔数</text>
<view class="money-num">{{ vdata.refundCount <= -1 ? '--' : vdata.refundCount }}</view>
<text class="money-title">消费笔数</text>
<view class="money-num">{{ list.count.useNum }}</view>
</view>
</view>
<view class="money-list" v-if="vdata.memberIsShow">
@ -61,21 +61,25 @@ import ak from '@/commons/utils/ak.js';
import ent from '@/commons/utils/ent.js';
import unionScan from '@/commons/utils/unionScan.js';
import storageManage from '@/commons/utils/storageManage.js';
import dayjs from 'dayjs' //
import {
summaryTrade,
} from '@/http/yskApi/requestAll.js';
onMounted(() => {
vdata.memberIsShow = ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt;
if (ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt) {
getMemberData();
}
getList()
});
const emits = defineEmits(['click']);
const timeList = [
{ title: '今天', value: 'today' },
{ title: '昨天', value: 'yesterday' },
{ title: '近7天', value: 'near2now_7' },
{ title: '近30天', value: 'near2now_30' }
{ title: '近7天', value: 'circumference' },
{ title: '近30天', value: 'moon' }
];
let list = ref()
const vdata = reactive({
timeSelected: 'today', //
payAmount: -1, //
@ -85,13 +89,41 @@ const vdata = reactive({
memberIsShow: false //
});
const memberData = reactive({});
function getList(){
let startTime, endTime;
if (vdata.timeSelected == 'today') {
startTime = dayjs().format('YYYY-MM-DD') + ' 00:00:00'
endTime = dayjs().format('YYYY-MM-DD') + ' 23:59:59'
} else if (vdata.timeSelected == 'yesterday') {
startTime = formatTime() + ' 00:00:00'
endTime = formatTime() + ' 23:59:59'
} else if (vdata.timeSelected == 'circumference') {
startTime = dayjs().add(-7, 'day').format('YYYY-MM-DD 00:00:00')
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
} else if (vdata.timeSelected == 'moon') {
startTime = dayjs().add(-30, 'day').format('YYYY-MM-DD 00:00:00')
endTime = dayjs().format('YYYY-MM-DD 23:59:59')
} else if (vdata.timeSelected == 'custom') {
startTime = start
endTime = end
}
summaryTrade({
shopId: uni.getStorageSync('shopId'),
startTime,
endTime,
}).then((res) => {
list.value = res
})
}
//
function changeTimeFunc(val) {
vdata.timeSelected = val;
refData();
if (vdata.memberIsShow) {
getMemberData();
}
getList()
// console.log(vdata.timeSelected,'121')
// refData();
// if (vdata.memberIsShow) {
// getMemberData();
// }
}
//
function refData() {
@ -118,6 +150,28 @@ function scanFunc() {
}
});
}
//
function getdate() {
const dt = new Date();
const y = dt.getFullYear();
const m = (dt.getMonth() + 1 + "").padStart(2, "0");
const d = (dt.getDate() + "").padStart(2, "0");
const hh = (dt.getHours() + "").padStart(2, "0");
const mm = (dt.getMinutes() + "").padStart(2, "0");
const ss = (dt.getSeconds() + "").padStart(2, "0");
return `${y}-${m}-${d}`;
}
//
const formatTime = () => {
let strDate = getdate()
let dateFormat = new Date(strDate);
dateFormat = dateFormat.setDate(dateFormat.getDate() - 1);
dateFormat = new Date(dateFormat);
let y = dateFormat.getFullYear()
let m = (dateFormat.getMonth() + 1).toString().padStart(2, '0')
let d = dateFormat.getDate().toString().padStart(2, '0')
return `${y}-${m}-${d}`
}
const getMemberData = () => {
$memberInfoCount({ queryDateRange: vdata.timeSelected }).then(({ bizData }) => {
Object.assign(memberData, bizData);