|
|
@@ -795,14 +795,19 @@ export default {
|
|
|
submitEditDyForm() {
|
|
|
this.$refs["editDyForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- // 如果没有id就表明是添加物流信息
|
|
|
- updateDeliveryId(this.editDyForm).then(response => {
|
|
|
+ const payload = { ...this.editDyForm };
|
|
|
+ if (!payload.deliverName) {
|
|
|
+ const selectedOption = this.deliveryOptions.find(option => option.value === payload.deliverSn);
|
|
|
+ payload.deliverName = selectedOption ? selectedOption.label : null;
|
|
|
+ }
|
|
|
+ updateDeliveryId(payload).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess("操作成功");
|
|
|
this.editDy.open = false;
|
|
|
this.getOrder(this.order.orderId);
|
|
|
}
|
|
|
}).finally(() => {
|
|
|
+ this.editDyForm.id = null;
|
|
|
this.editDyForm.deliverSn = null;
|
|
|
this.editDyForm.deliverId = null;
|
|
|
this.editDyForm.deliverName = null;
|
|
|
@@ -934,7 +939,9 @@ export default {
|
|
|
this.editDyForm.id = scope.row.id;
|
|
|
this.editDyForm.deliverId = scope.row.deliverId;
|
|
|
this.editDyForm.deliverSn = scope.row.deliverSn;
|
|
|
+ this.editDyForm.deliverName = scope.row.deliverName;
|
|
|
} else {
|
|
|
+ this.editDyForm.id = null;
|
|
|
this.editDyForm.deliverSn = null;
|
|
|
this.editDyForm.deliverId = null;
|
|
|
this.editDyForm.deliverName = null;
|