优化页面缓存,增加订单取消
This commit is contained in:
@@ -22,6 +22,7 @@ export function edit(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//订单通过审核
|
//订单通过审核
|
||||||
export function check(data) {
|
export function check(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -31,6 +32,15 @@ export function check(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//未付款订单进行取消
|
||||||
|
export function cancel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bxg/api/orderCancel',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function updateDelivery(data) {
|
export function updateDelivery(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/bxg/api/yxStoreOrder/updateDelivery',
|
url: '/bxg/api/yxStoreOrder/updateDelivery',
|
||||||
|
|||||||
@@ -684,6 +684,7 @@ export default {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.resetForm()
|
||||||
this.$router.push({path: '/bxg/activity/combination'});
|
this.$router.push({path: '/bxg/activity/combination'});
|
||||||
}, 500);
|
}, 500);
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
@@ -698,7 +699,86 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
resetForm(){
|
||||||
|
this.$refs['formValidate'].resetFields()
|
||||||
|
this.oneFormValidate=[
|
||||||
|
{
|
||||||
|
imageArr: [],
|
||||||
|
pic: '',
|
||||||
|
price: 0,
|
||||||
|
cost: 0,
|
||||||
|
ot_price: 0,
|
||||||
|
stock: 0,
|
||||||
|
pink_stock: 0,
|
||||||
|
pink_price: 0,
|
||||||
|
seckill_stock: 0,
|
||||||
|
seckill_price: 0,
|
||||||
|
bar_code: '',
|
||||||
|
weight: 0,
|
||||||
|
volume: 0,
|
||||||
|
brokerage: 0,
|
||||||
|
brokerage_two: 0,
|
||||||
|
integral: 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
this.formValidate={
|
||||||
|
slider_image: [],
|
||||||
|
is_sub: 0,
|
||||||
|
id: 0,
|
||||||
|
combinationId: 0,
|
||||||
|
productId: '',
|
||||||
|
merId: '',
|
||||||
|
image: '',
|
||||||
|
images: '',
|
||||||
|
imageArr: [],
|
||||||
|
sliderImageArr: [],
|
||||||
|
productPrice:0,
|
||||||
|
title: '',
|
||||||
|
attr: '',
|
||||||
|
people: 1,
|
||||||
|
info: '',
|
||||||
|
price: '',
|
||||||
|
sort: 0,
|
||||||
|
integral: 0,
|
||||||
|
sales: '',
|
||||||
|
stock: '',
|
||||||
|
addTime: '',
|
||||||
|
isHost: '',
|
||||||
|
isShow: 1,
|
||||||
|
isDel: 0,
|
||||||
|
merUse: '',
|
||||||
|
isPostage: '',
|
||||||
|
postage: '',
|
||||||
|
description: '',
|
||||||
|
startTime: '',
|
||||||
|
stopTime: '',
|
||||||
|
effectiveTime: 1,
|
||||||
|
cost: '',
|
||||||
|
unitName: '',
|
||||||
|
combination: 1,
|
||||||
|
browse: 0,
|
||||||
|
startTimeDate: '',
|
||||||
|
endTimeDate: '',
|
||||||
|
spec_type: 0,
|
||||||
|
temp_id: '',
|
||||||
|
attrs: [],
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
pic: '',
|
||||||
|
price: 0,
|
||||||
|
pink_stock: 0,
|
||||||
|
pink_price: 0,
|
||||||
|
cost: 0,
|
||||||
|
ot_price: 0,
|
||||||
|
stock: 0,
|
||||||
|
bar_code: '',
|
||||||
|
integral: 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
header: [],
|
||||||
|
selectRule: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
// 表单验证
|
// 表单验证
|
||||||
validate(prop, status, error) {
|
validate(prop, status, error) {
|
||||||
if (status === false) {
|
if (status === false) {
|
||||||
|
|||||||
@@ -42,8 +42,9 @@
|
|||||||
<el-table-column prop="title" label="拼团名称" />
|
<el-table-column prop="title" label="拼团名称" />
|
||||||
<el-table-column prop="people" label="参团人数" />
|
<el-table-column prop="people" label="参团人数" />
|
||||||
<el-table-column prop="price" label="拼团价" />
|
<el-table-column prop="price" label="拼团价" />
|
||||||
<el-table-column prop="cost" label="原价" />
|
<!-- <el-table-column prop="cost" label="原价" /> -->
|
||||||
<el-table-column prop="stock" label="库存" />
|
<el-table-column prop="productPrice" label="售价" />
|
||||||
|
<el-table-column prop="stock" label="活动库存" />
|
||||||
<el-table-column prop="browse" label="浏览量" />
|
<el-table-column prop="browse" label="浏览量" />
|
||||||
<el-table-column prop="countPeopleAll" label="参与人数" />
|
<el-table-column prop="countPeopleAll" label="参与人数" />
|
||||||
<el-table-column prop="countPeoplePink" label="成团数量" />
|
<el-table-column prop="countPeoplePink" label="成团数量" />
|
||||||
|
|||||||
@@ -673,6 +673,7 @@ export default {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.resetForm()
|
||||||
this.$router.push({ path: '/bxg/activity/seckill' });
|
this.$router.push({ path: '/bxg/activity/seckill' });
|
||||||
}, 500);
|
}, 500);
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
@@ -735,8 +736,90 @@ export default {
|
|||||||
return btn;
|
return btn;
|
||||||
}, 37);
|
}, 37);
|
||||||
},
|
},
|
||||||
|
resetForm(){
|
||||||
|
this.$refs['formValidate'].resetFields()
|
||||||
|
this.formValidate={
|
||||||
|
slider_image: [],
|
||||||
|
otPrice: '',
|
||||||
|
giveIntegral: '',
|
||||||
|
status: '',
|
||||||
|
num: 1,
|
||||||
|
id: 0,
|
||||||
|
timeId: null,
|
||||||
|
seckillId: 0,
|
||||||
|
productId: '',
|
||||||
|
merId: '',
|
||||||
|
image: '',
|
||||||
|
images: '',
|
||||||
|
imageArr:[],
|
||||||
|
sliderImageArr: [],
|
||||||
|
title: '',
|
||||||
|
attr: '',
|
||||||
|
people: '',
|
||||||
|
info: '',
|
||||||
|
price: '',
|
||||||
|
sort: 0,
|
||||||
|
sales: '',
|
||||||
|
stock: '',
|
||||||
|
integral: 0,
|
||||||
|
addTime: '',
|
||||||
|
isHost: '',
|
||||||
|
isShow: '',
|
||||||
|
isDel: 0,
|
||||||
|
merUse: '',
|
||||||
|
isPostage: '',
|
||||||
|
postage: 0,
|
||||||
|
description: '',
|
||||||
|
startTime: '',
|
||||||
|
stopTime: '',
|
||||||
|
effectiveTime: '',
|
||||||
|
cost: '',
|
||||||
|
unitName: '',
|
||||||
|
combination: 1,
|
||||||
|
browse: 0,
|
||||||
|
startTimeDate: '',
|
||||||
|
endTimeDate: '',
|
||||||
|
is_sub: '',
|
||||||
|
spec_type: 0,
|
||||||
|
temp_id: '',
|
||||||
|
attrs: [],
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
pic: '',
|
||||||
|
price: 0,
|
||||||
|
pink_stock: 0,
|
||||||
|
pink_price: 0,
|
||||||
|
cost: 0,
|
||||||
|
ot_price: 0,
|
||||||
|
stock: 0,
|
||||||
|
bar_code: '',
|
||||||
|
integral: 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
header: [],
|
||||||
|
selectRule: ''
|
||||||
|
},
|
||||||
|
this.oneFormValidate=[
|
||||||
|
{
|
||||||
|
imageArr: [],
|
||||||
|
pic: '',
|
||||||
|
price: 0,
|
||||||
|
cost: 0,
|
||||||
|
ot_price: 0,
|
||||||
|
stock: 0,
|
||||||
|
pink_stock: 0,
|
||||||
|
pink_price: 0,
|
||||||
|
seckill_stock: 0,
|
||||||
|
seckill_price: 0,
|
||||||
|
bar_code: '',
|
||||||
|
weight: 0,
|
||||||
|
volume: 0,
|
||||||
|
brokerage: 0,
|
||||||
|
integral: 0,
|
||||||
|
brokerage_two: 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -963,6 +963,7 @@ export default {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.resetForm();
|
||||||
this.$router.push({ path: '/bxg/shop/goods' });
|
this.$router.push({ path: '/bxg/shop/goods' });
|
||||||
}, 500);
|
}, 500);
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
@@ -980,7 +981,78 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//清空表单
|
||||||
|
resetForm(){
|
||||||
|
this.$refs['formValidate'].resetFields()
|
||||||
|
this.formValidate = {
|
||||||
|
parameter:[],
|
||||||
|
imageArr:[],
|
||||||
|
sliderImageArr: [],
|
||||||
|
store_name: '',
|
||||||
|
cate_id: '',
|
||||||
|
brand_id:'',
|
||||||
|
keyword: '',
|
||||||
|
unit_name: '',
|
||||||
|
store_info: '',
|
||||||
|
image: '',
|
||||||
|
slider_image: [],
|
||||||
|
description: '',
|
||||||
|
ficti: 0,
|
||||||
|
give_integral: 0,
|
||||||
|
sort: 0,
|
||||||
|
is_show: 1,
|
||||||
|
is_hot: 0,
|
||||||
|
is_benefit: 0,
|
||||||
|
benefit_sort:0,
|
||||||
|
best_sort:0,
|
||||||
|
is_best: 0,
|
||||||
|
is_new: 0,
|
||||||
|
is_hot_list:0,
|
||||||
|
hotListId:null,
|
||||||
|
is_good: 0,
|
||||||
|
is_postage: 0,
|
||||||
|
is_sub: 0,
|
||||||
|
is_integral: 0,
|
||||||
|
id: 0,
|
||||||
|
spec_type: 0,
|
||||||
|
temp_id: '',
|
||||||
|
config:[],
|
||||||
|
attrs: [],
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
pic: '',
|
||||||
|
price: 0,
|
||||||
|
cost: 0,
|
||||||
|
ot_price: 0,
|
||||||
|
stock: 0,
|
||||||
|
bar_code: '',
|
||||||
|
integral:0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
header: [],
|
||||||
|
selectRule: ''
|
||||||
|
},
|
||||||
|
this.oneFormValidate=[
|
||||||
|
{
|
||||||
|
imageArr: [],
|
||||||
|
pic: '',
|
||||||
|
price: 2,
|
||||||
|
cost: 0,
|
||||||
|
ot_price: 0,
|
||||||
|
stock: 0,
|
||||||
|
seckill_stock: 0,
|
||||||
|
seckill_price: 0,
|
||||||
|
pink_stock: 0,
|
||||||
|
pink_price: 0,
|
||||||
|
bar_code: '',
|
||||||
|
weight: 0,
|
||||||
|
volume: 0,
|
||||||
|
brokerage: 0,
|
||||||
|
brokerage_two: 0,
|
||||||
|
integral: 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
// 表单验证
|
// 表单验证
|
||||||
validate (prop, status, error) {
|
validate (prop, status, error) {
|
||||||
if (status === false) {
|
if (status === false) {
|
||||||
|
|||||||
@@ -176,6 +176,17 @@
|
|||||||
>
|
>
|
||||||
订单备注</el-button>
|
订单备注</el-button>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row._status == 1"
|
||||||
|
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="cancel(scope.row)"
|
||||||
|
>
|
||||||
|
取消订单
|
||||||
|
</el-button>
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row._status == 2"
|
v-if="scope.row._status == 2"
|
||||||
@@ -279,7 +290,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission'
|
import checkPermission from '@/utils/permission'
|
||||||
import initData from '@/mixins/crud'
|
import initData from '@/mixins/crud'
|
||||||
import {check, del, edit} from '@/api/bxg/yxStoreOrder'
|
import {check, del, edit,cancel} from '@/api/bxg/yxStoreOrder'
|
||||||
import eForm from './form'
|
import eForm from './form'
|
||||||
import eDetail from './detail1'
|
import eDetail from './detail1'
|
||||||
import eRefund from './refund'
|
import eRefund from './refund'
|
||||||
@@ -403,6 +414,21 @@
|
|||||||
this.isAdd = true
|
this.isAdd = true
|
||||||
this.$refs.form.dialog = true
|
this.$refs.form.dialog = true
|
||||||
},
|
},
|
||||||
|
cancel(data){
|
||||||
|
this.loading=true
|
||||||
|
cancel(data).then(res => {
|
||||||
|
this.$notify({
|
||||||
|
title: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2500
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
this.handleOrder()
|
||||||
|
}).catch(err => {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
check(data){
|
check(data){
|
||||||
this.loading=true
|
this.loading=true
|
||||||
check(data).then(res => {
|
check(data).then(res => {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</el-time-select>
|
</el-time-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="持续时间(整数小时)">
|
<el-form-item label="持续时间(整数小时)">
|
||||||
<el-input v-model="form.continued" style="width: 270px;"/>
|
<el-input v-model="form.continued" type="number" style="width: 270px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否开启">
|
<el-form-item label="是否开启">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
|
|||||||
Reference in New Issue
Block a user