优化页面缓存,增加订单取消
This commit is contained in:
@@ -22,6 +22,7 @@ export function edit(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//订单通过审核
|
||||
export function check(data) {
|
||||
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) {
|
||||
return request({
|
||||
url: '/bxg/api/yxStoreOrder/updateDelivery',
|
||||
|
||||
@@ -684,6 +684,7 @@ export default {
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.resetForm()
|
||||
this.$router.push({path: '/bxg/activity/combination'});
|
||||
}, 500);
|
||||
}).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) {
|
||||
if (status === false) {
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
<el-table-column prop="title" label="拼团名称" />
|
||||
<el-table-column prop="people" label="参团人数" />
|
||||
<el-table-column prop="price" label="拼团价" />
|
||||
<el-table-column prop="cost" label="原价" />
|
||||
<el-table-column prop="stock" label="库存" />
|
||||
<!-- <el-table-column prop="cost" label="原价" /> -->
|
||||
<el-table-column prop="productPrice" label="售价" />
|
||||
<el-table-column prop="stock" label="活动库存" />
|
||||
<el-table-column prop="browse" label="浏览量" />
|
||||
<el-table-column prop="countPeopleAll" label="参与人数" />
|
||||
<el-table-column prop="countPeoplePink" label="成团数量" />
|
||||
|
||||
@@ -673,6 +673,7 @@ export default {
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.resetForm()
|
||||
this.$router.push({ path: '/bxg/activity/seckill' });
|
||||
}, 500);
|
||||
}).catch(res => {
|
||||
@@ -735,8 +736,90 @@ export default {
|
||||
return btn;
|
||||
}, 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() {
|
||||
this.resetForm()
|
||||
}
|
||||
|
||||
@@ -963,6 +963,7 @@ export default {
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.resetForm();
|
||||
this.$router.push({ path: '/bxg/shop/goods' });
|
||||
}, 500);
|
||||
}).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) {
|
||||
if (status === false) {
|
||||
|
||||
@@ -176,6 +176,17 @@
|
||||
>
|
||||
订单备注</el-button>
|
||||
</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-button
|
||||
v-if="scope.row._status == 2"
|
||||
@@ -279,7 +290,7 @@
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission'
|
||||
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 eDetail from './detail1'
|
||||
import eRefund from './refund'
|
||||
@@ -403,6 +414,21 @@
|
||||
this.isAdd = 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){
|
||||
this.loading=true
|
||||
check(data).then(res => {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<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 label="是否开启">
|
||||
<el-radio-group v-model="form.status">
|
||||
|
||||
Reference in New Issue
Block a user