|
|
@@ -1,64 +1,80 @@
|
|
|
<template>
|
|
|
- <appResult :title="option.title">
|
|
|
-<!-- <button class="admin-button-com blue big" @click="gotoOrderDetails">发货详情</button>-->
|
|
|
- <button v-if="option.title!='报损成功'" class="admin-button-com blue big" @click="gotoOrderSend">发货</button>
|
|
|
-
|
|
|
-<!-- <button class="admin-button-com big" @click="gotoOrderPrint">打印单据</button>-->
|
|
|
- <button v-if="option.title!='报损成功'" class="admin-button-com big" @click="gotoOrderDetails">订单详情</button>
|
|
|
- <button v-if="option.title!='报损成功'" class="admin-button-com big" @click="gotoOrderList">订单列表</button>
|
|
|
- <button class="admin-button-com big" @click="gotoPlace">继续开单</button>
|
|
|
- </appResult>
|
|
|
+ <appResult :title="option.title">
|
|
|
+ <button v-if="option.title != '报损成功'" class="admin-button-com blue big" @click="printOrder">
|
|
|
+ 打印
|
|
|
+ </button>
|
|
|
+ <button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderSend">发货</button>
|
|
|
+ <button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderDetail">
|
|
|
+ 订单详情
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button class="admin-button-com big" @click="gotoOrderList">返回</button>
|
|
|
+ </appResult>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import appResult from "@/components/app-result";
|
|
|
+import { getDetail} from "@/api/order/index";
|
|
|
+import BLE from "@/mixins/BLE";
|
|
|
export default {
|
|
|
- name: "BillingResult", // 开单结果
|
|
|
- components: {
|
|
|
- appResult
|
|
|
- },
|
|
|
- methods: {
|
|
|
- gotoOrderSend(){
|
|
|
- uni.navigateTo({url: `/pagesOrder/ship?id=${this.option.orderId}`});
|
|
|
- },
|
|
|
- gotoOrderDetails() {
|
|
|
- uni.navigateTo({url: `/pagesOrder/detail?id=${this.option.orderId}`});
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/admin/order/detail?id=${this.option.orderId}`,
|
|
|
- // success: result => {},
|
|
|
- // fail: () => {},
|
|
|
- // complete: () => {}
|
|
|
- // });
|
|
|
- },
|
|
|
- gotoPlace() {
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1
|
|
|
- });
|
|
|
- },
|
|
|
- gotoOrderPrint() {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/admin/order/print?id=${this.option.orderId}`,
|
|
|
- success: result => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
- },
|
|
|
- gotoOrderList() {
|
|
|
- this.$util.pageTo({
|
|
|
- url: "/admin/home/order",
|
|
|
- type: 4,
|
|
|
- query: {
|
|
|
- tabIndex: 0
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ name: "BillingResult",
|
|
|
+ components: {
|
|
|
+ appResult,
|
|
|
+ },
|
|
|
+ mixins: [BLE],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ detailInfo: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //打印订单
|
|
|
+ printOrder() {
|
|
|
+ let BleVal = JSON.parse(this.detailInfo.printData);
|
|
|
+ switch (uni.getSystemInfoSync().platform) {
|
|
|
+ case "android":
|
|
|
+ this.destroyed(BleVal);
|
|
|
+ break;
|
|
|
+ case "ios":
|
|
|
+ this.autoLinkBle(BleVal);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async init() {
|
|
|
+ if (this.option.title != "报损成功") {
|
|
|
+ const res = await getDetail({
|
|
|
+ id: this.option.orderId,
|
|
|
+ });
|
|
|
+ this.detailInfo = res.data;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //发货
|
|
|
+ gotoOrderSend() {
|
|
|
+ uni.navigateTo({ url: `/pagesOrder/ship?id=${this.option.orderId}` });
|
|
|
+ },
|
|
|
+ //订单详情
|
|
|
+ gotoOrderDetail() {
|
|
|
+ uni.navigateTo({ url: `/pagesOrder/detail?id=${this.option.orderId}` });
|
|
|
+ },
|
|
|
+ gotoPlace() {
|
|
|
+ uni.navigateBack({ delta: 1 });
|
|
|
+ },
|
|
|
+ gotoOrderPrint() {
|
|
|
+ uni.navigateTo({ url: `/admin/order/print?id=${this.option.orderId}` });
|
|
|
+ },
|
|
|
+ gotoOrderList() {
|
|
|
+ this.$util.pageTo({
|
|
|
+ url: "/admin/home/order",
|
|
|
+ type: 4,
|
|
|
+ query: { tabIndex: 0 },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.admin-button-com {
|
|
|
- margin-bottom: 20px;
|
|
|
- width: 100%;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
</style>
|