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");
|