chengkun
2025-09-19 d48eff069585e2be1bd02b1299e1fe7581cb6dad
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
const App = {
    mixins: [sharedMixin],/////共用的方法/////
    data() {
        return {
            create_product_title: "新增物流产品",
            Visible_logisticsProduct: false,
            create_product_addree_title: "新增仓库地址",
            currindex: '',
            direction: 'ltr',
            clearable: false,
            useritem: {},
            logistics_product_list: [],//////物流产品/////
            platformLogisticsProductList: [],////////平台物流产品/////
            other: {},
            clearable: false,
            searchdata: {
                page: 1,
                page_size: 20,
                kw: '',
            },
            create_product_form: {
                logistics_type: 1,//////自建仓
                docking_system: 0,
            },
            docking_system_options: [
                {
                    value: 0,
                    label: '无',
                },
            ],
            logistics_vas: [],
            third_party_product_id: 0,
            suit_range_list: [{
                id: 1,
                name: '订单发货'
            }, {
                id: 2,
                name: '售后退件'
            }, {
                id: 3,
                name: '入库收货'
            }],
        };
    },
    mounted() {
        this.get_product_list();
        this.get_logistics_vas_list();
        this.getPlatformLogisticsProduct();///平台物流产品/////
    },
    created() { },
    methods: {
        reviewLogisticsProduct(status) {
            let that = this;
            let { id } = that.create_product_form;
 
            let url = "/admin/thirdPartyLogisticsProductTemp/reviewLogisticsProduct.html"
            postRequest(url, { id: id, status: status }).then(res => {
                if (res.data.code == 200) {
                    that.$notify({
                        title: '成功',
                        message: res.data.message,
                        position: 'top-left',
                        type: 'success'
                    });
                    that.create_product_form.status = status;
                    that.Visible_logisticsProduct = false;
                }
                else {
                    that.$notify.error({
                        title: '错误',
                        position: 'top-left',
                        message: res.data.message
                    });
 
                }
            });
        },
        create_product(index) {
            if (index >= 0) {
                this.create_product_title = "物流产品审核";
                this.create_product_form = this.logistics_product_list[index];
                this.third_party_product_id = this.create_product_form.id
            } else {
 
                return false;
            }
            this.Visible_logisticsProduct = true;
 
        },
        handleSizeChange(val) {
            //////设置每页多少条
            this.searchdata.page_size = val
            this.get_product_list();
        },
        handleCurrentChange(val) {
            ///改变当前页///////
            this.searchdata.p = val
            this.get_product_list();
        },
        formatDate(time) {
            return moment(time * 1000).format("YYYY-MM-DD HH:mm");
        },
        get_product_list() {
            let that = this;
            let url = "/admin/thirdPartyLogisticsProductTemp/logisticsProductList.html"
            postRequest(url, that.searchdata).then(res => {
                console.log(res.data);
                if (res.data.code == 200) {
                    that.logistics_product_list = res.data.list;
                    that.other = res.data.other;
                }
            });
        },
        get_logistics_vas_list() {
            let that = this;
            let url = "/admin/thirdPartyLogisticsProductTemp/logisticsVasList.html"
            postRequest(url, {}).then(res => {
                if (res.data.code == 200) {
                    that.logistics_vas = res.data.list;
                }
            });
        },
        getPlatformLogisticsProduct() {
            let that = this;
            let url = "/supplier/thirdPartyLogisticsProductTemp/getPlatformLogisticsProduct.html"
            postRequest(url, {}).then(res => {
                if (res.data.code == 200) {
                    that.platformLogisticsProductList = res.data.list;
                }
            });
        },
    }
};
const app = Vue.createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, {
    locale: ElementPlusLocaleZhCn,
});
app.mount("#vue_item");