pull/7/head^2
parent
e20c0db450
commit
4fc5ba412c
|
@ -9,8 +9,7 @@
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
<el-form ref="form" :model="orders" label-width="100px">
|
<el-form ref="form" :model="orders" label-width="100px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
订单编号:<el-input v-model="orders.ordersNum" placeholder="编号" style="width: 130px;margin-right: 50px"></el-input>
|
||||||
订单编号:<el-input v-model="orders.ordersNum" placeholder="编号" style="width: 180px;margin-right: 50px"></el-input>
|
|
||||||
订单款项状态:
|
订单款项状态:
|
||||||
<el-select v-model="orders.ordersState" placeholder="请选择状态" style="margin-right: 30px" clearable>
|
<el-select v-model="orders.ordersState" placeholder="请选择状态" style="margin-right: 30px" clearable>
|
||||||
<el-option v-for="item in options"
|
<el-option v-for="item in options"
|
||||||
|
@ -19,24 +18,21 @@
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<br/> <br/>
|
|
||||||
选择时间:
|
选择时间:
|
||||||
<el-date-picker v-model="orders.startDate" type="date" placeholder="开始时间" />
|
<el-date-picker v-model="orders.startDate" type="date" placeholder="开始时间" style="width: 130px;"/>
|
||||||
-----
|
-----
|
||||||
<el-date-picker v-model="orders.endDate" type="date" placeholder="结束时间"/>
|
<el-date-picker v-model="orders.endDate" type="date" placeholder="结束时间" style="width: 130px;"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<br>
|
||||||
<br>
|
<button style="float: right; padding: 3px 10px" type="text" @click="orderslist">返回订单列表</button>
|
||||||
|
<br>
|
||||||
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 10px">
|
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 10px">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>回收站列表</span>
|
<span>回收站列表</span>
|
||||||
<button @click="add(1)" style="float: right; padding: 3px 10px" type="text">添加</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
|
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55"></el-table-column>
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
<el-table-column label="日期" width="150" align="center">
|
<el-table-column label="日期" width="150" align="center">
|
||||||
|
@ -44,120 +40,81 @@
|
||||||
<span style="margin-left: 10px">{{ scope.row.ordersLaunchdate }}</span>
|
<span style="margin-left: 10px">{{ scope.row.ordersLaunchdate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="购买信息">
|
<el-table-column label="购买信息">
|
||||||
<el-table-column label="订单编号" width="120" align="center">
|
<el-table-column label="订单编号" width="150" align="center">
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px"> {{ scope.row.ordersNum }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="订单所属人" width="100" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="购买详情">
|
|
||||||
<el-table-column prop="province" label="购买接口" width="150" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="订单金额" width="100" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="订单规格" width="300" align="center">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
|
<span style="margin-left: 10px"> {{ scope.row.ordersNum }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单款项状态" width="110" align="center">
|
<el-table-column label="订单所属人" width="100" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
</template>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
</el-table-column>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">售后(申请退款)</span>
|
|
||||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">已退款</span>
|
<el-table-column label="购买详情">
|
||||||
</template>
|
<el-table-column prop="province" label="购买接口" width="200" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="订单金额" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="订单规格" width="300" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="订单款项状态" width="130" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">售后(申请退款)</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">已退款</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
@click="handleEdit(scope.row)">恢复</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
@click="ordersDelete(scope.row)">彻底删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
@click="handleEdit(scope.row)">编辑</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
@click="ordersDelete(scope.row)">删除</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="pay(scope.row)" >支付</el-button>
|
|
||||||
<!-- v-if="scope.row.status === '待支付'"-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination style="float: right"
|
<el-pagination style="float: right"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
:current-page="orders.pageNum"
|
:current-page="orders.pageNum"
|
||||||
:page-sizes="[2, 4, 6, 8]"
|
:page-sizes="[5, 10, 50, 100]"
|
||||||
:page-size="orders.pageSize"
|
:page-size="orders.pageSize"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="orders.total">
|
:total="orders.total">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog
|
</div>
|
||||||
:title="addtitle"
|
|
||||||
:visible.sync="addordersoff"
|
|
||||||
width="50%"
|
|
||||||
:before-close="handleClose">
|
|
||||||
<div v-if="this.index==1">
|
|
||||||
<h2>管理员慎重填写</h2><br>
|
|
||||||
<el-form :model="ordersForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
||||||
<el-form-item label="订单编号:" prop="ordersNum">
|
|
||||||
<el-input type="text" v-model="ordersForm.ordersNum" autocomplete="off"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="订单产品:" prop="ordersProduct">
|
|
||||||
<el-input type="text" v-model="ordersForm.ordersProduct" autocomplete="off"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="订单所属人:" prop="ordersUser">
|
|
||||||
<el-input type="text" v-model="ordersForm.ordersUser" autocomplete="off"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="订单金额:" prop="ordersPrice">
|
|
||||||
<el-input type="text" v-model="ordersForm.ordersPrice" autocomplete="off"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="订单规格:" prop="ordersSpecification">
|
|
||||||
<el-input type="text" v-model="ordersForm.ordersSpecification" autocomplete="off"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<center>
|
|
||||||
<el-button @click="addordersoff = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="addorders(ordersForm)">提交</el-button>
|
|
||||||
</center>
|
|
||||||
</div>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { selectList, update, addordersup, ordersDelete ,pay} from '@/api/market/orders'
|
import { ordersDelete, listreclaim, updateByExist} from '@/api/market/orders'
|
||||||
import { diGui } from "@/api/market/orders";
|
import { diGui } from "@/api/market/orders";
|
||||||
|
|
||||||
|
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||||
//例如:import 《组件名称》 from '《组件路径》,
|
//例如:import 《组件名称》 from '《组件路径》,
|
||||||
export default {
|
export default {
|
||||||
dicts:['product_name','orders_num','orders_state','orders_launchdate'],
|
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
|
@ -172,15 +129,9 @@ export default {
|
||||||
},
|
},
|
||||||
arr:[],
|
arr:[],
|
||||||
type:[],
|
type:[],
|
||||||
|
|
||||||
Cascader:{ expandTrigger:'hover',value:'id',label:'typeName',children:'parentPOS' },
|
|
||||||
typeId:[],
|
|
||||||
startDate: null,
|
startDate: null,
|
||||||
endDate: null,
|
endDate: null,
|
||||||
|
|
||||||
index:'',
|
index:'',
|
||||||
addtitle:'',
|
|
||||||
addordersoff:false,
|
|
||||||
ordersForm:{},
|
ordersForm:{},
|
||||||
|
|
||||||
options: [{
|
options: [{
|
||||||
|
@ -210,110 +161,83 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
// 删除
|
|
||||||
ordersDelete(row){
|
|
||||||
ordersDelete(row.ordersId).then(
|
|
||||||
res => {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.selectList()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
// 重置
|
|
||||||
chong(){
|
|
||||||
this.orders={}
|
|
||||||
this.selectList()
|
|
||||||
},
|
|
||||||
// 分页
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.orders.pageSize=val
|
|
||||||
this.selectList()
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
this.orders.pageNum=val
|
|
||||||
this.selectList()
|
|
||||||
},
|
|
||||||
|
|
||||||
handleClose(done) {
|
|
||||||
this.$confirm('确认关闭?')
|
|
||||||
.then(_ => {
|
|
||||||
done();
|
|
||||||
})
|
|
||||||
.catch(_ => {});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
pay(row){
|
|
||||||
window.open("http://localhost:9701/alipay/pay?subject=" + row.name
|
|
||||||
+ "& traceNo=" + row.no + "& totalAmount=" + row.ordersPrice)
|
|
||||||
this.$message.success('付款成功')
|
|
||||||
this.load();
|
|
||||||
|
|
||||||
}
|
|
||||||
,
|
|
||||||
// 上架,新品,推荐修改
|
|
||||||
updateShop(orders){
|
|
||||||
update(orders).then(
|
|
||||||
res => {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.selectList()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
// 修改跳转路径
|
|
||||||
handleEdit(orders){
|
|
||||||
if (this.orders.serviceIds && typeof this.orders.serviceIds === 'string') {
|
|
||||||
orders.serviceid = this.orders.serviceIds.split(',');
|
|
||||||
// ... 后续操作
|
|
||||||
}
|
|
||||||
console.log(JSON.stringify(orders))
|
|
||||||
orders.serviceid=orders.serviceIds.split(',').map(id => parseInt(id, 10));
|
|
||||||
console.log(JSON.stringify(orders))
|
|
||||||
this.$router.push({path:'/product/info/update',query:{orders:orders}})
|
|
||||||
},
|
|
||||||
|
|
||||||
addorders(ordersForm){
|
|
||||||
addordersup(ordersForm).then(response=>{
|
|
||||||
alert(response.msg)
|
|
||||||
if (response.code==200){}
|
|
||||||
this.addordersoff=false
|
|
||||||
})
|
|
||||||
location.reload();
|
|
||||||
},
|
|
||||||
// 查询
|
|
||||||
findShop(){
|
|
||||||
this.selectList()
|
|
||||||
},
|
|
||||||
// 添加跳转路径
|
|
||||||
add(index){
|
|
||||||
this.index=index
|
|
||||||
if (this.index === 1) {
|
|
||||||
this.addtitle= '添加订单';
|
|
||||||
}
|
|
||||||
// else if (this.index === 2) {
|
|
||||||
// this.dialogtitle= '';
|
|
||||||
// }
|
|
||||||
this.addordersoff=true
|
|
||||||
},
|
|
||||||
// 多选框
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val;
|
|
||||||
},
|
|
||||||
//商品列表
|
//商品列表
|
||||||
selectList() {
|
listreclaim() {
|
||||||
selectList(this.orders).then(
|
listreclaim(this.orders).then(
|
||||||
res => {
|
res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.arr = res.data.list
|
this.arr = res.data.list
|
||||||
this.orders.total = res.data.total
|
this.orders.total = res.data.total
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
//复原
|
||||||
|
handleEdit(row){
|
||||||
|
const result = window.confirm(`你确定要执行此操作吗?`);
|
||||||
|
if (result) {
|
||||||
|
updateByExist(row.ordersId).then(
|
||||||
|
res =>{
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.listreclaim()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
location.reload();
|
||||||
|
// 用户点击确定后的逻辑处理,这里可以使用传入的 id
|
||||||
|
console.log(`用户点击了确定,ID 为 ${id}`);
|
||||||
|
} else {
|
||||||
|
// 用户点击取消后的逻辑处理
|
||||||
|
console.log('用户点击了取消');
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
ordersDelete(row){
|
||||||
|
const result = window.confirm(`你确定要执行此操作吗?`);
|
||||||
|
if (result) {
|
||||||
|
ordersDelete(row.ordersId).then(
|
||||||
|
res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.listreclaim()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
location.reload();
|
||||||
|
// 用户点击确定后的逻辑处理,这里可以使用传入的 id
|
||||||
|
console.log(`用户点击了确定,ID 为 ${id}`);
|
||||||
|
} else {
|
||||||
|
// 用户点击取消后的逻辑处理
|
||||||
|
console.log('用户点击了取消');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
chong(){
|
||||||
|
this.orders={}
|
||||||
|
this.listreclaim()
|
||||||
|
},
|
||||||
|
// 多选框
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val;
|
||||||
|
},
|
||||||
|
// 分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.orders.pageSize=val
|
||||||
|
this.listreclaim()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.orders.pageNum=val
|
||||||
|
this.listreclaim()
|
||||||
|
},
|
||||||
|
orderslist(){
|
||||||
|
this.$router.push({path:"/market/orders"})
|
||||||
|
},
|
||||||
|
// 查询
|
||||||
|
findShop(){
|
||||||
|
this.listreclaim()
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
created() {
|
created() {
|
||||||
// this.diGui()
|
this.listreclaim()
|
||||||
this.selectList()
|
|
||||||
},
|
},
|
||||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
Loading…
Reference in New Issue