当前位置:网站首页>Development with courtesy -- share the source code of the secondary development of the app system of the imitation shopping mall
Development with courtesy -- share the source code of the secondary development of the app system of the imitation shopping mall
2022-06-25 12:27:00 【Procedure 15528175269】
Be polite APP Mall system development source code sharing :
<template>
<div class="deliver-goods">
<header>
<div class="order-num acea-row row-between-wrapper">
<div class="num line1"> The order number :{
{ order_id }}</div>
<div class="name line1">
<span class="iconfont icon-yonghu2"></span>{
{ delivery.nickname }}
</div>
</div>
<div class="address">
<div class="name">
{
{ delivery.real_name
}}<span class="phone">{
{ delivery.user_phone }}</span>
</div>
<div>{
{ delivery.user_address }}</div>
</div>
<div class="line"><img src="@assets/images/line.jpg" /></div>
</header>
<div class="wrapper">
<div class="item acea-row row-between-wrapper">
<div> Delivery method </div>
<div class="mode acea-row row-middle row-right">
<div
class="goods"
:class="active === index ? 'on' : ''"
v-for="(item, index) in types"
:key="index"
@click="changeType(item, index)"
>
{
{ item.title }}<span class="iconfont icon-xuanzhong2"></span>
</div>
</div>
</div>
<div class="list" v-show="active === 0">
<div class="item acea-row row-between-wrapper">
<div> Delivery method </div>
<select class="mode" v-model="delivery_name">
<option value=""> Choose the express company </option>
<option
:value="item.name"
v-for="(item, index) in logistics"
:key="index"
>{
{ item.name }}</option
>
</select>
<span class="iconfont icon-up"></span>
</div>
<div class="item acea-row row-between-wrapper">
<div> courier number </div>
<input
type="text"
placeholder=" Fill in the express bill No "
v-model="delivery_id"
class="mode"
/>
</div>
</div>
<div class="list" v-show="active === 1">
<div class="item acea-row row-between-wrapper">
<div> The delivery man </div>
<input
type="text"
placeholder=" Fill in the shipper "
v-model="delivery_name"
class="mode"
/>
</div>
<div class="item acea-row row-between-wrapper">
<div> Delivery telephone </div>
<input
type="text"
placeholder=" Fill in the delivery telephone number "
v-model="delivery_id"
class="mode"
/>
</div>
</div>
</div>
<div style="height:1.2rem;"></div>
<div class="confirm" @click="saveInfo"> Confirm the submission </div>
</div>
</template>
<script>
import { getAdminOrderDelivery, setAdminOrderDelivery } from "../../api/admin";
import { getLogistics } from "../../api/public";
import { required } from "@utils/validate";
import { validatorDefaultCatch } from "@utils/dialog";
export default {
name: "GoodsDeliver",
components: {},
props: {},
data: function() {
return {
types: [
{
type: "express",
title: " deliver goods "
},
{
type: "send",
title: " Delivery "
},
{
type: "fictitious",
title: " No need to ship "
}
],
active: 0,
order_id: "",
delivery: [],
logistics: [],
delivery_type: "express",
delivery_name: "",
delivery_id: ""
};
},
watch: {
"$route.params.oid": function(newVal) {
let that = this;
if (newVal != undefined) {
that.order_id = newVal;
that.getIndex();
}
}
},
mounted: function() {
this.order_id = this.$route.params.oid;
this.getIndex();
this.getLogistics();
},
methods: {
changeType: function(item, index) {
this.active = index;
this.delivery_type = item.type;
this.delivery_name = "";
this.delivery_id = "";
},
getIndex: function() {
let that = this;
getAdminOrderDelivery(that.order_id).then(
res => {
that.delivery = res.data;
},
error => {
that.$dialog.error(error.msg);
}
);
},
getLogistics: function() {
let that = this;
getLogistics().then(
res => {
that.logistics = res.data;
},
error => {
that.$dialog.error(error.msg);
}
);
},
async saveInfo() {
let that = this,
delivery_type = that.delivery_type,
delivery_name = that.delivery_name,
delivery_id = that.delivery_id,
save = {};
save.order_id = that.order_id;
save.delivery_type = that.delivery_type;
switch (delivery_type) {
case "send":
try {
await this.$validator({
delivery_name: [required(required.message(" Courier Services Company "))],
delivery_id: [required(required.message(" courier number "))]
}).validate({ delivery_name, delivery_id });
} catch (e) {
return validatorDefaultCatch(e);
}
save.delivery_name = delivery_name;
save.delivery_id = delivery_id;
that.setInfo(save);
break;
case "express":
try {
await this.$validator({
delivery_name: [required(required.message(" Name of shipper "))],
delivery_id: [required(required.message(" Shipper's phone number "))]
}).validate({ delivery_name, delivery_id });
} catch (e) {
return validatorDefaultCatch(e);
}
save.delivery_name = delivery_name;
save.delivery_id = delivery_id;
that.setInfo(save);
break;
case "fictitious":
that.setInfo(save);
break;
}
},
setInfo: function(item) {
let that = this;
console.log(item);
setAdminOrderDelivery(item).then(
res => {
that.$dialog.success(res.msg);
that.$router.go(-1);
},
error => {
that.$dialog.error(error.msg);
}
);
}
}
};
</script>
边栏推荐
- Kotlin study notes
- Is it safe to open an account and buy stocks on the Internet?
- Découvrir gaussdb (pour redis): une comparaison complète avec Codis
- 19、wpf之事件转命令实现MVVM架构
- 揭秘GaussDB(for Redis):全面对比Codis
- ECSHOP upload video_ ECSHOP video list, video classification, video related product guide
- 19. Implementation of MVVM architecture based on WPF event to command
- [论]Learning Dynamic and Hierarchical Traffic Spatiotemporal Features with Transformer
- Linear regression of common mathematical modeling models for College Students
- The source code of the hottest online disk money making system in 2022 imitates Lanzou online disk / Chengtong online disk / sharing money making cloud disk system / online disk VIP Download System
猜你喜欢

devsecops与devops的理解与建设

Dark horse shopping mall ---3 Commodity management

Execution order of MySQL query statements join, on and where

SDN system method | 9 Access network

刷入Magisk通用方法

Full nanny tutorial of Market Research Competition (experience sharing)

一篇文章讲清楚MySQL的聚簇/联合/覆盖索引、回表、索引下推

Uncover gaussdb (for redis): comprehensive comparison of CODIS

The cloud native data lake has passed the evaluation and certification of the ICT Institute with its storage, computing, data management and other capabilities

What is principal component analysis? Dimension reduction of classical case analysis variables
随机推荐
Hook technology
MYSQL中对复杂JSON的更新
SDN系统方法 | 9. 接入网
如果你也想做自媒体,不妨听大周给您点建议
Windows下MySQL的安装和删除
Database Series: MySQL index optimization summary (comprehensive version)
R language uses the multinom function of NNET package to build an unordered multi classification logistic regression model, and uses the lrtest function of epidisplay package to perform multiple model
VIM common commands and shortcut keys
机器学习自学成才的十条戒律
2022年首期Techo Day腾讯技术开放日将于6月28日线上举办
网络 | 衡量网络好坏的指标及测试方法
R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用summary函数获取模型汇总统计信息
Set the transparency of the picture to gradient from left to right
Mysql database logs binlog save aging (expire\u logs\u days)
Mpai data science platform SVM support vector machine classification \ explanation of regression parameter adjustment
ECSHOP upload video_ ECSHOP video list, video classification, video related product guide
Dark horse shopping mall ---1 Project introduction - environment construction
JS to realize the calculation of discrete aggregation points
How to open an account for trading futures Shanghai nickel products online
RecyclerView滚动到指定位置