|
@@ -559,13 +559,11 @@ export default {
|
|
|
cardName
|
|
cardName
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
- orderData: {
|
|
|
|
|
- type: Object,
|
|
|
|
|
- default: () => {}
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ id: String
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ orderData: {},
|
|
|
// draw
|
|
// draw
|
|
|
showShipManage: false,
|
|
showShipManage: false,
|
|
|
shipData: [],
|
|
shipData: [],
|
|
@@ -669,9 +667,13 @@ export default {
|
|
|
this.orderForm.latitude = res.shop.shopLat || 0;
|
|
this.orderForm.latitude = res.shop.shopLat || 0;
|
|
|
this.orderForm.longitude = res.shop.shopLong || 0;
|
|
this.orderForm.longitude = res.shop.shopLong || 0;
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ this.$service.order.info({ id: this.id }).then(res => {
|
|
|
|
|
+ this.orderData = res;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
getDet() {
|
|
getDet() {
|
|
|
- this.$service.single.orderSendDet({ id: this.orderData.id }).then(res => {
|
|
|
|
|
|
|
+ this.$service.single.orderSendDet({ id: this.id }).then(res => {
|
|
|
this.shipData = res;
|
|
this.shipData = res;
|
|
|
this.showShipManage = true;
|
|
this.showShipManage = true;
|
|
|
});
|
|
});
|
|
@@ -706,7 +708,7 @@ export default {
|
|
|
submitOrderFn() {
|
|
submitOrderFn() {
|
|
|
this.$service.order
|
|
this.$service.order
|
|
|
.orderSheet({
|
|
.orderSheet({
|
|
|
- id: this.orderData.id,
|
|
|
|
|
|
|
+ id: this.id,
|
|
|
...this.orderForm
|
|
...this.orderForm
|
|
|
})
|
|
})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -741,23 +743,30 @@ export default {
|
|
|
// =========================
|
|
// =========================
|
|
|
//有配送单
|
|
//有配送单
|
|
|
hasDeliver() {
|
|
hasDeliver() {
|
|
|
- this.$service.single.printOrder({ id: this.orderData.id, option: 1 }).then(res => {
|
|
|
|
|
|
|
+ this.$service.single.printOrder({ id: this.id, option: 1 }).then(res => {
|
|
|
this.getDet();
|
|
this.getDet();
|
|
|
|
|
+
|
|
|
|
|
+ this.$service.order.info({ id: this.id }).then(res => {
|
|
|
|
|
+ this.orderData = res;
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//打单
|
|
//打单
|
|
|
async printOrderFn() {
|
|
async printOrderFn() {
|
|
|
- await this.$service.single.printOrder({ id: this.orderData.id, option: 2 });
|
|
|
|
|
|
|
+ await this.$service.single.printOrder({ id: this.id, option: 2 });
|
|
|
this.getDet();
|
|
this.getDet();
|
|
|
- this.$service.order.getDeliverDetail({ id: this.orderData.id }).then(res => {
|
|
|
|
|
|
|
+ this.$service.order.getDeliverDetail({ id: this.id }).then(res => {
|
|
|
this.deliver.data = res;
|
|
this.deliver.data = res;
|
|
|
this.printOrder();
|
|
this.printOrder();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//重打
|
|
//重打
|
|
|
rePrintOrderFn() {
|
|
rePrintOrderFn() {
|
|
|
- console.log('建构执行', this.shopInfo)
|
|
|
|
|
- this.printOrder();
|
|
|
|
|
|
|
+ // this.printOrder();
|
|
|
|
|
+ this.$service.order.getDeliverDetail({ id: this.id }).then(res => {
|
|
|
|
|
+ this.deliver.data = res;
|
|
|
|
|
+ this.printOrder();
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
// 填单
|
|
// 填单
|
|
|
fillFormFn() {
|
|
fillFormFn() {
|
|
@@ -768,7 +777,7 @@ export default {
|
|
|
this.sendMySelfConfirm = false;
|
|
this.sendMySelfConfirm = false;
|
|
|
this.shipForm.sendType = 2;
|
|
this.shipForm.sendType = 2;
|
|
|
this.$service.single
|
|
this.$service.single
|
|
|
- .orderDeliver({ id: this.orderData.id, option: 1, ...this.shipForm })
|
|
|
|
|
|
|
+ .orderDeliver({ id: this.id, option: 1, ...this.shipForm })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.$message.success('已确认!');
|
|
this.$message.success('已确认!');
|
|
|
this.$emit('song-success');
|
|
this.$emit('song-success');
|
|
@@ -790,7 +799,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.shipForm.sendType = 3;
|
|
this.shipForm.sendType = 3;
|
|
|
this.$service.single
|
|
this.$service.single
|
|
|
- .orderDeliver({ id: this.orderData.id, option: 1, ...this.shipForm })
|
|
|
|
|
|
|
+ .orderDeliver({ id: this.id, option: 1, ...this.shipForm })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.$message.success('已提交!');
|
|
this.$message.success('已提交!');
|
|
|
|
|
|
|
@@ -801,7 +810,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 确认送达
|
|
// 确认送达
|
|
|
orderReachFn() {
|
|
orderReachFn() {
|
|
|
- this.$service.single.orderReach({ id: this.orderData.id, option: 1 }).then(res => {
|
|
|
|
|
|
|
+ this.$service.single.orderReach({ id: this.id, option: 1 }).then(res => {
|
|
|
this.$message.success('已确认!');
|
|
this.$message.success('已确认!');
|
|
|
this.getDet();
|
|
this.getDet();
|
|
|
this.confirmSendVisit = false;
|
|
this.confirmSendVisit = false;
|
|
@@ -820,18 +829,17 @@ export default {
|
|
|
this.$message.error('请先选择分类或者用途!');
|
|
this.$message.error('请先选择分类或者用途!');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- this.$service.single
|
|
|
|
|
- .orderClass({ id: this.orderData.id, ...this.categoryForm })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- this.$message.success('订单分类成功!');
|
|
|
|
|
- this.getDet();
|
|
|
|
|
- // this.categoryDialog = false;
|
|
|
|
|
- this.resetForm();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$service.single.orderClass({ id: this.id, ...this.categoryForm }).then(res => {
|
|
|
|
|
+ this.$message.success('订单分类成功!');
|
|
|
|
|
+ this.getDet();
|
|
|
|
|
+ // this.categoryDialog = false;
|
|
|
|
|
+ this.resetForm();
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
// 打印配置
|
|
// 打印配置
|
|
|
printOrder() {
|
|
printOrder() {
|
|
|
this.deliver.visible = true;
|
|
this.deliver.visible = true;
|
|
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
let LODOP = getLodop();
|
|
let LODOP = getLodop();
|
|
|
LODOP.PRINT_INIT('配送单');
|
|
LODOP.PRINT_INIT('配送单');
|