Browse Source

处理订单快递单号错误时重新发货

master
朱耘稷 4 years ago
parent
commit
04b480da7d
  1. 8
      src/api/yxStoreOrder.js
  2. 21
      src/views/shop/order/form.vue
  3. 11
      src/views/shop/order/index.vue

8
src/api/yxStoreOrder.js

@ -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',

21
src/views/shop/order/form.vue

@ -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,6 +79,21 @@ export default {
})
},
doEdit() {
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)
})
}else{
edit(this.form).then(res => {
this.resetForm()
this.$notify({
@ -92,6 +107,8 @@ export default {
this.loading = false
console.log(err.response.data.message)
})
}
},
resetForm() {
this.dialog = false

11
src/views/shop/order/index.vue

@ -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
},

Loading…
Cancel
Save