处理订单快递单号错误时重新发货
This commit is contained in:
@ -23,6 +23,14 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function updateDelivery(data) {
|
||||
return request({
|
||||
url: 'api/yxStoreOrder/updateDelivery',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function editT(data) {
|
||||
return request({
|
||||
url: 'api/yxStoreOrder/check',
|
||||
|
@ -8,7 +8,7 @@
|
||||
v-for="item in express"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { add, edit, get } from '@/api/yxStoreOrder'
|
||||
import { add, edit, get,updateDelivery } from '@/api/yxStoreOrder'
|
||||
export default {
|
||||
props: {
|
||||
isAdd: {
|
||||
@ -79,19 +79,36 @@ export default {
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
edit(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
title: '操作成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
if(this.form._status == 4){
|
||||
updateDelivery(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
title: '操作成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
}else{
|
||||
edit(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
title: '操作成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
resetForm() {
|
||||
this.dialog = false
|
||||
|
@ -159,6 +159,14 @@
|
||||
@click="edit(scope.row)"
|
||||
>
|
||||
去发货</el-button>
|
||||
<el-button
|
||||
v-if="scope.row._status == 4"
|
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="edit(scope.row)"
|
||||
>
|
||||
修改快递</el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<el-button
|
||||
@ -396,7 +404,8 @@
|
||||
shippingType: data.shippingType,
|
||||
isChannel: data.isChannel,
|
||||
isRemind: data.isRemind,
|
||||
isSystemDel: data.isSystemDel
|
||||
isSystemDel: data.isSystemDel,
|
||||
_status:data._status
|
||||
}
|
||||
_this.dialog = true
|
||||
},
|
||||
|
Reference in New Issue
Block a user