<template>
    <z-paging ref="paging" v-model="list" :fixed-bottom="false" safe-area-inset-bottom>
        <template #top>
            <ut-navbar title="销售登记" :fixed="false"></ut-navbar>
        </template>

        <!-- 成功图标和标题 -->
        <view class="d-flex flex-cln a-c j-c pt-120 pb-40">
            <image src="https://yujin-szyy.oss-cn-chengdu.aliyuncs.com/szyy/images-plt/plant/sales/salessuccess.png" mode="widthFix" class="w-400 h-400 mb-40" />
            <text class="f-s-42 f-w-5 c-primary">销售登记成功！</text>
        </view>

        <!-- 按钮区域 -->
        <view class="pd-24">
            <!-- 两个并排按钮 -->
            <view class="d-flex gap-24 mb-24">
                <up-button text="继续销售登记" type="primary" class="flex1" :custom-style="{ backgroundColor: '#14c4c4', borderColor: '#14c4c4' }" @click="continueRegistration"></up-button>
                <up-button text="查看销售清单" type="success" class="flex1" :custom-style="{ backgroundColor: '#41c06d', borderColor: '#41c06d' }" @click="viewSalesList"></up-button>
            </view>
            <!-- 返回列表按钮 -->
            <up-button text="返回列表" type="text" :custom-style="{ backgroundColor: '#ffffff', borderColor: '#41c06d', color: '#41c06d', width: '100%' }" @click="backToList"></up-button>
        </view>
    </z-paging>
</template>

<script setup lang="ts">
const list = ref([]);
const paging = ref();

// 继续销售登记
const continueRegistration = () => {
    uni.navigateBack({
        delta: 1,
    });
};

// 查看销售清单
const viewSalesList = () => {
    uni.reLaunch({
        url: '/plant/storage/finished-product/list/index',
    });
};

// 返回列表
const backToList = () => {
    uni.reLaunch({
        url: '/plant/storage/finished-product/list/index',
    });
};
</script>

<style lang="scss" scoped>
// 页面容器
page {
    background-color: #f5f5f5;
}
</style>
