This commit is contained in:
2023-10-08 22:53:13 +08:00
parent b883b02fb9
commit e36d60d015
83 changed files with 18303 additions and 9590 deletions

View File

@@ -0,0 +1,146 @@
<template>
<view>
<view class="card">
<view>订单号{{ goodInfo.oid }}</view>
<view class="line"></view>
<view class="container">
<image
class="image"
:src="goodInfo.cover"
mode="widthFix"
></image>
<view class="info">
<view class="title">{{ goodInfo.goods_name }}</view>
<view class="num"
>数量:
<text style="color: red">{{
goodInfo.count
}}</text></view
>
</view>
<view></view>
</view>
<view class="line"></view>
<view class="cz">
<nut-button size="small" type="primary" @click="subVerify"
>确定核销</nut-button
>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import Taro from "@tarojs/taro";
import {
getJfVerifyList,
getActiveVerifyList,
activeOrderVerify,
orderVerify,
} from "@/api/admin";
import { ref } from "vue";
const opt = ref<any>({});
Taro.useLoad((options) => {
opt.value = options;
getData(options);
});
const goodInfo = ref<any>({});
const getData = async (options: any) => {
let res;
if (Number(options.mer_type) === 1) {
res = await getActiveVerifyList({
oid: options.oid,
});
} else {
res = await getJfVerifyList({
oid: options.oid,
});
}
if (!res.data.data.oid) {
Taro.showToast({
title: "没有此订单",
icon: "none",
});
setTimeout(() => {
Taro.navigateBack({
delta: 1,
});
}, 3000);
}
goodInfo.value = res.data.data;
};
const subVerify = async () => {
try {
let res;
if (Number(opt.value.mer_type) === 1) {
res = await activeOrderVerify({
oid: goodInfo.value.oid,
});
} else {
res = await orderVerify({
oid: goodInfo.value.oid,
});
}
Taro.showToast({
title: res.msg,
icon: "none",
});
setTimeout(() => {
Taro.navigateBack({
delta: 1,
});
}, 3000);
} catch (error) {
Taro.showToast({
title: error.msg,
icon: "none",
});
throw error;
}
};
</script>
<style lang="scss">
.card {
padding: 20rpx;
background-color: #fff;
margin: 10px auto;
width: 90%;
border-radius: 7px;
.container {
display: flex;
image {
width: 200px;
height: 100%;
border-radius: 7px;
display: block;
}
.info {
margin-left: 20px;
}
.title {
margin-bottom: 10px;
}
}
.line {
width: 100%;
height: 1px;
background-color: #f5f5f5;
margin: 10px 0;
}
.cz {
text-align: right;
}
}
</style>