优化打包、订单云打印

This commit is contained in:
gyq
2025-03-18 17:19:59 +08:00
parent 64f539623f
commit 177d987769
10 changed files with 116 additions and 35 deletions

View File

@@ -113,8 +113,8 @@ export default (data) => {
`;
let tableBody = "";
if (data.productDatalist && data.productDatalist.length) {
for (let item of data.productDatalist) {
if (data.productDataList && data.productDataList.length) {
for (let item of data.productDataList) {
tableBody += `
<tr>
<td style="font-size: 12px;width:75%;">

View File

@@ -28,7 +28,7 @@
</div>
<span class="title">{{ item.payName }}</span>
</div>
<div class="item" :class="{ active: payActive == 'buyer' }"
<!-- <div class="item" :class="{ active: payActive == 'buyer' }"
@click="payTypeChange('buyer', { payType: 'buyer' })">
<div class="icon">
<div class="img"
@@ -37,7 +37,7 @@
</div>
</div>
<span class="title">挂账</span>
</div>
</div> -->
</div>
<div class="input_wrap">
<div class="input" style="flex: 1">付款{{ money }}</div>
@@ -255,11 +255,16 @@ const props = defineProps({
orderList: {
type: Array,
default: []
},
isPrint: {
type: [Number, String],
default: 1,
}
});
watch(props, () => {
money.value = formatDecimal(props.amount)
payData.value.checkOrderPay.isPrint = props.isPrint
})
const emit = defineEmits(["paySuccess", 'orderExpired']);
@@ -383,14 +388,18 @@ async function payTypeChange(index, item) {
SelectVipUserRef.value.show()
}
}
if (item.payType == "buyer") {
if (item.payType == "arrears") {
// 挂账支付
showBuyerHandle();
}
if (payActive.value != "buyer") {
if (payList.value[payActive.value].payType == "deposit") {
scanModalRef.value.show();
}
if(item.payType == 'deposit'){
scanModalRef.value.show();
}
// if (payActive.value != "buyer") {
// if (payList.value[payActive.value].payType == "deposit") {
// }
// }
} catch (error) {
console.log(error);
}
@@ -406,7 +415,7 @@ async function confirmOrder() {
payData.value.checkOrderPay.couponList = [...couponResList1.value.map(item => item.id), ...couponResList2.value.map(item => item.id)];
// await staffPermission("yun_xu_shou_kuan");
if (payActive.value == "buyer") {
if (payList.value[payActive.value].payType == "arrears") {
showBuyerHandle();
return
} else if (payList.value[payActive.value].payType == "scanCode") {
@@ -823,6 +832,7 @@ function reset() {
roundAmount: 0, // 抹零金额 减免多少钱
pointsDiscountAmount: 0, // 积分抵扣金额(tb_points_basic_setting表)
pointsNum: 0, // 使用的积分数量 (扣除各类折扣 enable_deduction后使用)
isPrint: props.isPrint
},
};
}

View File

@@ -7,7 +7,7 @@
<el-button plain type="info" style="width: 100%" @click="inputHandle(item)">{{ item }}</el-button>
</div>
<div>
<el-button plain type="info" disabled style="width: 100%">.</el-button>
<el-button plain type="info" style="width: 100%" @click="inputHandle('.')">.</el-button>
</div>
<div>
<el-button plain type="info" style="width: 100%" @click="inputHandle(0)">0</el-button>
@@ -17,7 +17,8 @@
</div>
</div>
<div class="footer">
<el-button type="primary" style="width: 100%" :loading="loading" @click="confirmHandle">确认</el-button>
<el-button type="primary" style="width: 100%" :disabled="number <= 0" :loading="loading"
@click="confirmHandle">确认</el-button>
</div>
</el-dialog>
</template>
@@ -25,6 +26,7 @@
<script setup>
import { ref } from "vue";
import { ElMessage } from "element-plus";
import { clearNoNum } from '@/utils/index.js'
const props = defineProps({
type: {
@@ -61,6 +63,7 @@ function opne() {
// 输入
function inputHandle(n) {
number.value += n;
number.value = clearNoNum({ value: number.value })
}
// 删除
@@ -72,7 +75,7 @@ function delHandle() {
const loading = ref(false)
// 确认
function confirmHandle() {
if (!number.value) return
if (!number.value || !number.value <= 0) return
if (props.type == 2) {
if (number.value.length < 6) {
ElMessage.error('请输入正确的密码')