|
|
@@ -259,8 +259,8 @@
|
|
|
<el-option key="YD" label="韵达" value="YD" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="物流单号" prop="deliverySn" >
|
|
|
- <el-input v-model="editDyForm.deliverySn" placeholder="请输入物流单号" />
|
|
|
+ <el-form-item label="物流单号" prop="deliveryId" >
|
|
|
+ <el-input v-model="editDyForm.deliveryId" placeholder="请输入物流单号" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -300,7 +300,7 @@
|
|
|
|
|
|
|
|
|
<script>
|
|
|
-import {getLiveOrder, syncExpress, updateLiveOrder, updateErp, getExpress, listOrderitem, tuiOrder, getUserPhone, getLiveOrderAddress} from "@/api/live/liveOrder";
|
|
|
+import {getLiveOrder, syncExpress, updateLiveOrder, updateErp, editDeliveryId,getOrderExpress, getExpress, listOrderitem, tuiOrder, getUserPhone, getLiveOrderAddress} from "@/api/live/liveOrder";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
@@ -326,9 +326,10 @@ export default {
|
|
|
followDoctorId:null,
|
|
|
},
|
|
|
editDyForm:{
|
|
|
- orderId:null,
|
|
|
- deliveryId:null,
|
|
|
- deliveryCode:null,
|
|
|
+ id: null,
|
|
|
+ orderId: null,
|
|
|
+ deliveryId: null,
|
|
|
+ deliveryCode: null,
|
|
|
},
|
|
|
showList:true,
|
|
|
edit:{
|
|
|
@@ -389,7 +390,7 @@ export default {
|
|
|
remark:"",
|
|
|
},
|
|
|
editDyRules:{
|
|
|
- deliverySn: [
|
|
|
+ deliveryId: [
|
|
|
{ required: true, message: "物流单号不能为空", trigger: "blur" }
|
|
|
],
|
|
|
deliveryCode: [
|
|
|
@@ -522,6 +523,15 @@ export default {
|
|
|
editDelivery(){
|
|
|
this.editDy.open = true;
|
|
|
this.editDyForm.orderId = this.item.orderId;
|
|
|
+ if (scope && scope.row) {
|
|
|
+ this.editDyForm.id = scope.row.id;
|
|
|
+ this.editDyForm.deliveryCode = scope.row.deliverSn;
|
|
|
+ this.editDyForm.deliveryId = scope.row.deliverId;
|
|
|
+ } else {
|
|
|
+ this.editDyForm.id = null;
|
|
|
+ this.editDyForm.deliveryCode = null;
|
|
|
+ this.editDyForm.deliveryId = '';
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
showListD(){
|
|
|
@@ -846,18 +856,28 @@ export default {
|
|
|
submitEditDyForm(){
|
|
|
this.$refs["editDyForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- console.log(this.editDyForm)
|
|
|
- updateLiveOrder(this.editDyForm).then(response => {
|
|
|
+ const params = {
|
|
|
+ orderId: this.editDyForm.orderId,
|
|
|
+ deliverSn: this.editDyForm.deliveryCode,
|
|
|
+ deliverId: this.editDyForm.deliveryId,
|
|
|
+ type: 1
|
|
|
+ };
|
|
|
+ if (this.editDyForm.id != null) {
|
|
|
+ params.id = this.editDyForm.id;
|
|
|
+ }
|
|
|
+ editDeliveryId(params).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess("操作成功");
|
|
|
this.editDy.open = false;
|
|
|
getLiveOrder(this.item.orderId).then(response => {
|
|
|
this.item = response.data;
|
|
|
- // this.getlogList(this.item.orderId);
|
|
|
this.$parent.$parent.getList();
|
|
|
});
|
|
|
+ getOrderExpress(this.item.orderId).then(response => {
|
|
|
+ this.deliverList = response.data || [];
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
},
|