打印机字段修改

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@
</view> </view>
<view class=""> <view class="">
<view style="display: flex;justify-content: center;align-items: center;"> <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" <up-switch :activeValue="1" :inactiveValue="0" v-model="item.status" size="18"
@change="switch2Change($event,item)"></up-switch> @change="switch2Change($event,item)"></up-switch>
</view> </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>
<view class="receipts-money"> <view class="receipts-money">
<text class="money-title">成交金额 ()</text> <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>
<view class="money-list"> <view class="money-list">
<view class="money-item"> <view class="money-item">
<text class="money-title">成交笔数</text> <text class="money-title">消费笔数</text>
<view class="money-num">{{ vdata.payCount <= -1 ? '--' : vdata.payCount }}</view> <view class="money-num">{{ list.vip.useNum }}</view>
</view> </view>
<view class="money-item"> <view class="money-item">
<text class="money-title">退款金额 ()</text> <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>
<view class="money-item"> <view class="money-item">
<text class="money-title">退款笔数</text> <text class="money-title">消费笔数</text>
<view class="money-num">{{ vdata.refundCount <= -1 ? '--' : vdata.refundCount }}</view> <view class="money-num">{{ list.count.useNum }}</view>
</view> </view>
</view> </view>
<view class="money-list" v-if="vdata.memberIsShow"> <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 ent from '@/commons/utils/ent.js';
import unionScan from '@/commons/utils/unionScan.js'; import unionScan from '@/commons/utils/unionScan.js';
import storageManage from '@/commons/utils/storageManage.js'; import storageManage from '@/commons/utils/storageManage.js';
import dayjs from 'dayjs' //
import {
summaryTrade,
} from '@/http/yskApi/requestAll.js';
onMounted(() => { onMounted(() => {
vdata.memberIsShow = ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt; vdata.memberIsShow = ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt;
if (ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt) { if (ent.has('ENT_MCH_MEMBER') && storageManage.userInfo().isHasMemberEnt) {
getMemberData(); getMemberData();
} }
getList()
}); });
const emits = defineEmits(['click']); const emits = defineEmits(['click']);
const timeList = [ const timeList = [
{ title: '今天', value: 'today' }, { title: '今天', value: 'today' },
{ title: '昨天', value: 'yesterday' }, { title: '昨天', value: 'yesterday' },
{ title: '近7天', value: 'near2now_7' }, { title: '近7天', value: 'circumference' },
{ title: '近30天', value: 'near2now_30' } { title: '近30天', value: 'moon' }
]; ];
let list = ref()
const vdata = reactive({ const vdata = reactive({
timeSelected: 'today', // timeSelected: 'today', //
payAmount: -1, // payAmount: -1, //
@ -85,13 +89,41 @@ const vdata = reactive({
memberIsShow: false // memberIsShow: false //
}); });
const memberData = reactive({}); 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) { function changeTimeFunc(val) {
vdata.timeSelected = val; vdata.timeSelected = val;
refData(); getList()
if (vdata.memberIsShow) { // console.log(vdata.timeSelected,'121')
getMemberData(); // refData();
} // if (vdata.memberIsShow) {
// getMemberData();
// }
} }
// //
function refData() { 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 = () => { const getMemberData = () => {
$memberInfoCount({ queryDateRange: vdata.timeSelected }).then(({ bizData }) => { $memberInfoCount({ queryDateRange: vdata.timeSelected }).then(({ bizData }) => {
Object.assign(memberData, bizData); Object.assign(memberData, bizData);