当前位置:网站首页>Huile optimization system -- sharing of secondary development source code of huile optimization app system
Huile optimization system -- sharing of secondary development source code of huile optimization app system
2022-06-25 12:27:00 【Procedure 15528175269】
Huile optimization system development source code sharing :
<template>
<div class="pos-order-list" ref="container">
<div class="nav acea-row row-around row-middle">
<div
class="item"
:class="where.status == 0 ? 'on' : ''"
@click="changeStatus(0)"
>
To be paid
</div>
<div
class="item"
:class="where.status == 1 ? 'on' : ''"
@click="changeStatus(1)"
>
To be delivered
</div>
<div
class="item"
:class="where.status == 2 ? 'on' : ''"
@click="changeStatus(2)"
>
To be received
</div>
<div
class="item"
:class="where.status == 3 ? 'on' : ''"
@click="changeStatus(3)"
>
To be evaluated
</div>
<div
class="item"
:class="where.status == 4 ? 'on' : ''"
@click="changeStatus(4)"
>
Completed
</div>
<div
class="item"
:class="where.status == -3 ? 'on' : ''"
@click="changeStatus(-3)"
>
refund
</div>
</div>
<div class="list">
<div class="item" v-for="(item, index) in list" :key="index">
<div class="order-num acea-row row-middle" @click="toDetail(item)">
The order number :{
{ item.order_id }}
<span class="time"> Order time :{
{ item.add_time }}</span>
</div>
<div
class="pos-order-goods"
v-for="(val, key) in item._info"
:key="key"
>
<div
class="goods acea-row row-between-wrapper"
@click="toDetail(item)"
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="val.cart_info.productInfo.image" />
</div>
<div class="text acea-row row-between row-column">
<div class="info line2">
{
{ val.cart_info.productInfo.store_name }}
</div>
<div class="attr" v-if="val.cart_info.productInfo.suk">
{
{ val.cart_info.productInfo.suk }}
</div>
</div>
</div>
<div class="money">
<div class="x-money">¥{
{ val.cart_info.productInfo.price }}</div>
<div class="num">x{
{ val.cart_info.cart_num }}</div>
<div class="y-money">
¥{
{ val.cart_info.productInfo.ot_price }}
</div>
</div>
</div>
</div>
<div class="public-total">
common {
{ item.total_num }} Commodity , Payable
<span class="money">¥{
{ item.pay_price }}</span> ( Postage ¥{
{
item.total_postage
}}
)
</div>
<div class="operation acea-row row-between-wrapper">
<div class="more">
<!-- <div class="iconfont icon-gengduo" @click="more(index)"></div>-->
<!-- <div class="order" v-show="current === index">-->
<!-- <div class="items">-->
<!-- {
{ where.status > 0 ? " Delete " : " Cancel " }} Order -->
<!-- </div>-->
<!-- <div class="arrow"></div>-->
<!-- </div>-->
</div>
<div class="acea-row row-middle">
<div class="bnt" @click="modify(item, 0)" v-if="where.status == 0">
One click price change
</div>
<div class="bnt" @click="modify(item, 1)"> Order notes </div>
<div
class="bnt"
@click="modify(item, 0)"
v-if="where.status == -3 && item.refund_status === 1"
>
Immediate refund
</div>
<div
class="bnt cancel"
v-if="item.pay_type === 'offline' && item.paid === 0"
@click="offlinePay(item)"
>
confirm the payment
</div>
<router-link
class="bnt"
v-if="where.status == 1"
:to="'/customer/delivery/' + item.order_id"
> To deliver the goods
</router-link>
</div>
</div>
</div>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading>
<PriceChange
:change="change"
:orderInfo="orderInfo"
v-on:closechange="changeclose($event)"
v-on:savePrice="savePrice"
:status="status"
></PriceChange>
</div>
</template>
<script>
import PriceChange from "@components/PriceChange";
import Loading from "@components/Loading";
import {
getAdminOrderList,
setAdminOrderPrice,
setAdminOrderRemark,
setOfflinePay,
setOrderRefund
} from "../../api/admin";
import { required, num } from "@utils/validate";
import { validatorDefaultCatch } from "@utils/dialog";
export default {
name: "AdminOrderList",
components: {
PriceChange,
Loading
},
props: {},
data: function() {
return {
current: "",
change: false,
types: 0,
where: {
page: 1,
limit: 5,
status: 0
},
list: [],
loaded: false,
loading: false,
orderInfo: {},
status: ""
};
},
watch: {
"$route.params.types": function(newVal) {
let that = this;
if (newVal != undefined) {
that.where.status = newVal;
that.init();
}
},
types: function() {
this.getIndex();
}
},
mounted: function() {
let that = this;
that.where.status = that.$route.params.types;
that.current = "";
that.getIndex();
that.$scroll(that.$refs.container, () => {
!that.loading && that.getIndex();
});
},
methods: {
more: function(index) {
if (this.current === index) this.current = "";
else this.current = index;
},
modify: function(item, status) {
this.change = true;
this.orderInfo = item;
this.status = status;
},
changeclose: function(msg) {
this.change = msg;
},
async savePrice(opt) {
let that = this,
data = {},
price = opt.price,
refund_price = opt.refund_price,
refund_status = that.orderInfo.refund_status,
remark = opt.remark;
data.order_id = that.orderInfo.order_id;
if (that.status == 0 && refund_status === 0) {
try {
await this.$validator({
price: [
required(required.message(" amount of money ")),
num(num.message(" amount of money "))
]
}).validate({ price });
} catch (e) {
return validatorDefaultCatch(e);
}
data.price = price;
setAdminOrderPrice(data).then(
function() {
that.change = false;
that.$dialog.success(" Price change succeeded ");
that.init();
},
function() {
that.change = false;
that.$dialog.error(" Price change failed ");
}
);
} else if (that.status == 0 && refund_status === 1) {
try {
await this.$validator({
refund_price: [
required(required.message(" amount of money ")),
num(num.message(" amount of money "))
]
}).validate({ refund_price });
} catch (e) {
return validatorDefaultCatch(e);
}
data.price = refund_price;
data.type = opt.type;
setOrderRefund(data).then(
res => {
that.change = false;
that.$dialog.success(res.msg);
that.init();
},
err => {
that.change = false;
that.$dialog.error(err.msg);
}
);
} else {
try {
await this.$validator({
remark: [required(required.message(" remarks "))]
}).validate({ remark });
} catch (e) {
return validatorDefaultCatch(e);
}
data.remark = remark;
setAdminOrderRemark(data).then(
res => {
that.change = false;
that.$dialog.success(res.msg);
that.init();
},
err => {
that.change = false;
that.$dialog.error(err.msg);
}
);
}
},
init: function() {
this.list = [];
this.where.page = 1;
this.loaded = false;
this.loading = false;
this.getIndex();
this.current = "";
},
getIndex: function() {
let that = this;
if (that.loading || that.loaded) return;
that.loading = true;
getAdminOrderList(that.where).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.where.limit;
that.list.push.apply(that.list, res.data);
that.where.page = that.where.page + 1;
},
err => {
that.$dialog.error(err.msg);
}
);
},
changeStatus: function(val) {
if (this.where.status != val) {
this.where.status = val;
this.init();
}
},
toDetail: function(item) {
this.$router.push({ path: "/customer/orderdetail/" + item.order_id });
},
offlinePay: function(item) {
console.log(item);
setOfflinePay({ order_id: item.order_id }).then(
res => {
this.$dialog.success(res.msg);
this.init();
},
error => {
this.$dialog.error(error.msg);
}
);
}
}
};
</script>
边栏推荐
- 15. Notes on the button style of WPF
- 2022年首期Techo Day腾讯技术开放日将于6月28日线上举办
- Hook technology
- Dark horse shopping mall ---3 Commodity management
- R language dplyr package filter function filters the data rows in the specified list whose contents in the dataframe data are not (not equal to one of the specified vectors)
- Network related encapsulation introduced by webrtc native M96 basic base module
- Tidb common commands
- R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用epiDisplay包的lrtest函数执行多个模型似然比检验对比两个模型的性能是否有差异
- Rank sum ratio comprehensive evaluation method for common models in mathematical modeling
- 19. Implementation of MVVM architecture based on WPF event to command
猜你喜欢

SDN system method | 9 Access network

为什么ping不通网站 但是却可以访问该网站?
![[论]Learning Dynamic and Hierarchical Traffic Spatiotemporal Features with Transformer](/img/58/d68112a3d019de66150e2f5102f436.png)
[论]Learning Dynamic and Hierarchical Traffic Spatiotemporal Features with Transformer

Understanding and construction of devsecops and Devops

Installation and removal of MySQL under Windows

ECSHOP commodity page multi-attribute batch purchase plug-ins ECSHOP wholesale plug-ins multi-attribute order placing, multi-attribute batch purchase of commodities

A commonly used statistical modeling method -- difference analysis

Uncover gaussdb (for redis): comprehensive comparison of CODIS

15、wpf之button样式小记

Explain AHP in human language (very detailed principle + simple tool implementation)
随机推荐
ARM V7 协处理器
20、wpf之MVVM命令绑定
Why can't you Ping the website but you can access it?
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
ECSHOP whole site custom URL supports directory type
R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的计数个数、均值和中位数、在每个函数内部指定na.rm参数、通过list指定函数列表
[data midrange] what is the oneid of the data midrange? Isn't the master data fragrant?
黑马畅购商城---6.品牌、规格统计、条件筛选、分页排序、高亮显示
Linear regression of common mathematical modeling models for College Students
揭秘GaussDB(for Redis):全面對比Codis
Explain factor analysis in simple terms, with case teaching (full)
How to use SPSS to do grey correlation analysis? Quick grasp of hand-to-hand Teaching
网络上开户买股票是否安全呢?
Database Series: MySQL index optimization summary (comprehensive version)
如果你也想做自媒体,不妨听大周给您点建议
学习笔记 2022 综述 | 自动图机器学习,阐述 AGML 方法、库与方向
VIM common commands and shortcut keys
Hook技术
Quarkus SaaS dynamic data source switching implementation, simple and perfect
How do super rookies get started with data analysis?