|
|
@ -8,7 +8,7 @@ |
|
|
|
v-for="item in express" |
|
|
|
v-for="item in express" |
|
|
|
:key="item.id" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id" |
|
|
|
:value="item.name" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -25,7 +25,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
import { add, edit, get } from '@/api/yxStoreOrder' |
|
|
|
import { add, edit, get,updateDelivery } from '@/api/yxStoreOrder' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
isAdd: { |
|
|
|
isAdd: { |
|
|
@ -79,19 +79,36 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
doEdit() { |
|
|
|
doEdit() { |
|
|
|
edit(this.form).then(res => { |
|
|
|
if(this.form._status == 4){ |
|
|
|
this.resetForm() |
|
|
|
updateDelivery(this.form).then(res => { |
|
|
|
this.$notify({ |
|
|
|
this.resetForm() |
|
|
|
title: '操作成功', |
|
|
|
this.$notify({ |
|
|
|
type: 'success', |
|
|
|
title: '操作成功', |
|
|
|
duration: 2500 |
|
|
|
type: 'success', |
|
|
|
|
|
|
|
duration: 2500 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
this.$parent.init() |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
console.log(err.response.data.message) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.loading = false |
|
|
|
}else{ |
|
|
|
this.$parent.init() |
|
|
|
edit(this.form).then(res => { |
|
|
|
}).catch(err => { |
|
|
|
this.resetForm() |
|
|
|
this.loading = false |
|
|
|
this.$notify({ |
|
|
|
console.log(err.response.data.message) |
|
|
|
title: '操作成功', |
|
|
|
}) |
|
|
|
type: 'success', |
|
|
|
|
|
|
|
duration: 2500 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
this.$parent.init() |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
console.log(err.response.data.message) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
resetForm() { |
|
|
|
resetForm() { |
|
|
|
this.dialog = false |
|
|
|
this.dialog = false |
|
|
|