quanwei
2025-10-28 36cacbaf78e510713002fcd5e3d61cece2e01421
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
    
    <view class="import-order">
        
        <view class="uni-product-list">
            <view class="uni-product" v-for="(product,index) in productList" :key="index" @click="goDetailPage(product.product_id)">
                <view class="image-view">
                    <image class="uni-product-image" :src="product.image[0].file_path"></image>
                    <view class="number" v-if="product.sku[0].stock_num < 100000">库存:{{product.sku[0].stock_num}}</view>
                </view>
                <view class="uni-product-title">
                    {{product.product_name}}
                </view>
            </view>
        </view>
        
    </view>
    
</template>
 
<script>
    
    export default {
        data() {
            return {
                /*列表数据*/
                productList: []
            }
        },
        onLoad() {
            document.title = '订单导入'; 
        },
        onShow:function(){
            this.getData();
        },
        methods: {
            getData() {
                let _this = this;
                _this._get('product/lists', {}, function(res) {
                    _this.productList = res.data.list;
                });
            },
            /*跳转页面*/
            goDetailPage(product_id) {
                this.gotoPage('/pages/order/order-detail?product_id='+product_id);
            }
        }
    }
    
</script>
 
<style>
    
    .import-order{ padding:20upx 20upx 80upx;}
    .import-order .uni-product{ padding:0 0 20upx; margin: 10upx; background: #FFFFFF;}
    .import-order .image-view{ position: relative; margin-top: 0; margin-bottom: 0; border-bottom: 2upx solid #CCCCCC;}
    .import-order .image-view .number{ position: absolute; top: 0; right: 0; padding: 0 10upx; font-size: 24upx; background:rgb(27, 216, 13); color: #FFFFFF;}
    .import-order .uni-product-title{ margin-left: 20upx; margin-right: 10upx; padding-top: 20upx; }
    
 
</style>