shish 6 лет назад
Родитель
Сommit
da19dde1c1

+ 214 - 199
store/src/admin/order/components/sel-express-confirm.vue

@@ -1,210 +1,225 @@
 <template>
-	<div class="sel-confirm-module">
-		<!-- 列表 -->
-		<time-axis v-if="!$util.isEmpty(orderComData)">
-			<!-- 送达 -->
-			<timeaxis-item class="axis-list axis-first com-wrap" bgcolor="none">
-				<template v-slot:node>
-					<div class="tui-node node-big">
-						<div class="node-small"></div>
-					</div>
-				</template>
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">送达</div>
-						<div class="axis-det express-wrap">
-							<button class="admin-button-com big blue" @click="askConfirmReachFn">确认</button>
-							<div class="button-prompt">确认后会通知客户</div>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-			<!-- 发货 -->
-			<timeaxis-item class="axis-list confirm-wrap" bgcolor="none">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[1].actionName }}</div>
-						<div class="axis-det">
-							<div class="app-color-0 app-bold">{{ orderComData[1].addTime | formatTime }}</div>
-							<block v-if="!$util.isEmpty(orderComData[1].sendInfo)">
-								<div>配送方:{{ orderComData[1].sendInfo.sideName }}</div>
-								<div>距离:{{ orderComData[1].sendInfo.distance }}km</div>
-								<div>运费:¥{{ orderComData[1].sendInfo.cost }}</div>
-								<div>小费:¥{{ orderComData[1].sendInfo.tip }}</div>
-								<div>
-									<span>状态:</span>
-									<span class="app-color-4">{{ orderComData[1].sendInfo.status | constantfilter('SEND_STATUS') }}</span>
-								</div>
-							</block>
-							<block v-else>
-								<div>配送方:门店</div>
-							</block>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-			<!-- 制单 -->
-			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[2].actionName }}</div>
-						<div class="axis-det">
-							<div class="app-bold">{{ orderComData[2].finishTime | formatTime }}</div>
-							<block v-if="!$util.isEmpty(orderComData[2].receive)">
-								<card-name :info="orderComData[2].receive" />
-							</block>
-							<block v-else>
-								<div>无配送信息</div>
-							</block>
-							<block v-if="!$util.isEmpty(orderComData[2].receive)">
-								<div class="btn-wrap-com">
-									<!-- <button class="admin-button-com default">明细</button> -->
-									<button class="admin-button-com default" @click="mobilePrintFn">重打</button>
-								</div>
-							</block>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-			<!-- 下单 -->
-			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[3].actionName }}</div>
-						<div class="axis-det">
-							<div class="app-color-0 app-bold">{{ orderComData[3].finishTime | formatTime }}</div>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-		</time-axis>
-		<modal-module :show="showManualConfirmModal" @cancel="cancelConfirmReachFn" @click="manualConfirmReachFn" content="此订单由快递配送,送到会自动确认,确定要手动确认?" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
-	</div>
+  <div class="sel-confirm-module">
+    <!-- 列表 -->
+    <time-axis v-if="!$util.isEmpty(orderComData)">
+      <!-- 送达 -->
+      <timeaxis-item class="axis-list axis-first com-wrap" bgcolor="none">
+        <template v-slot:node>
+          <div class="tui-node node-big">
+            <div class="node-small"></div>
+          </div>
+        </template>
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">送达</div>
+            <div class="axis-det express-wrap">
+              <button class="admin-button-com big blue" @click="askConfirmReachFn">确认</button>
+              <div class="button-prompt">确认后会通知客户</div>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+      <!-- 发货 -->
+      <timeaxis-item class="axis-list confirm-wrap" bgcolor="none">
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[1].actionName }}</div>
+            <div class="axis-det">
+              <div class="app-color-0 app-bold">{{ orderComData[1].addTime | formatTime }}</div>
+              <block v-if="!$util.isEmpty(orderComData[1].sendInfo)">
+                <div>配送方:{{ orderComData[1].sendInfo.sideName }}</div>
+                <div>距离:{{ orderComData[1].sendInfo.distance }}km</div>
+                <div>运费:¥{{ orderComData[1].sendInfo.cost }}</div>
+                <div>小费:¥{{ orderComData[1].sendInfo.tip }}</div>
+                <div>
+                  <span>状态:</span>
+                  <span
+                    class="app-color-4"
+                  >{{ orderComData[1].sendInfo.status | constantfilter('SEND_STATUS') }}</span>
+                </div>
+              </block>
+              <block v-else>
+                <div>配送方:门店</div>
+              </block>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+      <!-- 制单 -->
+      <timeaxis-item class="axis-list com-wrap" bgcolor="none">
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[2].actionName }}</div>
+            <div class="axis-det">
+              <div class="app-bold">{{ orderComData[2].finishTime | formatTime }}</div>
+              <block v-if="!$util.isEmpty(orderComData[2].receive)">
+                <card-name :info="orderComData[2].receive" />
+              </block>
+              <block v-else>
+                <div>无配送信息</div>
+              </block>
+              <block v-if="!$util.isEmpty(orderComData[2].receive)">
+                <div class="btn-wrap-com">
+                  <button class="admin-button-com default" @click="mobilePrintFn">重打</button>
+                  <button class="admin-button-com default" @click="printerSetFn">打印机</button>
+                </div>
+              </block>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+      <!-- 下单 -->
+      <timeaxis-item class="axis-list com-wrap" bgcolor="none">
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[3].actionName }}</div>
+            <div class="axis-det">
+              <div class="app-color-0 app-bold">{{ orderComData[3].finishTime | formatTime }}</div>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+    </time-axis>
+    <modal-module
+      :show="showManualConfirmModal"
+      @cancel="cancelConfirmReachFn"
+      @click="manualConfirmReachFn"
+      content="此订单由快递配送,送到会自动确认,确定要手动确认?"
+      color="#333"
+      :size="32"
+      padding="30rpx 30rpx"
+    ></modal-module>
+  </div>
 </template>
 
 <script>
-import TimeAxis from '@/admin/home/components/plugin/time-axis'
-import TimeaxisItem from '@/admin/home/components/plugin/timeaxis-item'
-import CardName from './card-name'
-import ModalModule from '@/components/plugin/modal'
+import TimeAxis from "@/admin/home/components/plugin/time-axis";
+import TimeaxisItem from "@/admin/home/components/plugin/timeaxis-item";
+import CardName from "./card-name";
+import ModalModule from "@/components/plugin/modal";
 // api
-import { orderReach } from '@/api/order'
+import { orderReach } from "@/api/order";
 export default {
-	name: 'sel-confirm-module',
-	components: {
-		TimeAxis,
-		TimeaxisItem,
-		CardName,
-		ModalModule
-	},
-	props: {
-		query: {
-			type: Object,
-			default: () => {}
-		},
-		orderData: {
-			type: Object,
-			default: () => {}
-		},
-		orderComData: {
-			type: Array,
-			default: () => []
-		}
-	},
-	data() {
-		return {
-		    showManualConfirmModal:false
-		}
+  name: "sel-confirm-module",
+  components: {
+    TimeAxis,
+    TimeaxisItem,
+    CardName,
+    ModalModule
+  },
+  props: {
+    query: {
+      type: Object,
+      default: () => {}
     },
-	methods: {
-		confirmReachFn() {
-			orderReach({
-				id: this.orderData.id,
-				option: 1
-			}).then(res => {
-				this.$msg('已确认')
-				this.$emit('nextPageSuccess', {
-					id: this.query.id,
-						pageStatus: 5
-					})
-				// setTimeout(() => {
-				// 	this.$util.pageTo({
-				// 		url: '/admin/order/ship',
-				// 		query: {
-				// 			id: this.query.id,
-				// 			pageStatus: 5
-				// 		}
-				// 	})
-				// }, 1000)
-			})
-		},
-		askConfirmReachFn(){
-		    if(this.orderData.sendType == 3){
-		        this.showManualConfirmModal = true
-		    }else{
-                this.confirmReachFn()
-		    }
-		},
-		manualConfirmReachFn(e){
-			if (e.index === 0) {
-				this.cancelConfirmReachFn()
-			} else {
-            	this.confirmReachFn()
-			}
-		},
-		cancelConfirmReachFn(){
-			this.showManualConfirmModal = false
-		},
-		mobilePrintFn(){
-		    this.$msg('此功能即将开通')
-		}
-	}
-}
+    orderData: {
+      type: Object,
+      default: () => {}
+    },
+    orderComData: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      showManualConfirmModal: false
+    };
+  },
+  methods: {
+    confirmReachFn() {
+      orderReach({
+        id: this.orderData.id,
+        option: 1
+      }).then(res => {
+        this.$msg("已确认");
+        this.$emit("nextPageSuccess", {
+          id: this.query.id,
+          pageStatus: 5
+        });
+        // setTimeout(() => {
+        // 	this.$util.pageTo({
+        // 		url: '/admin/order/ship',
+        // 		query: {
+        // 			id: this.query.id,
+        // 			pageStatus: 5
+        // 		}
+        // 	})
+        // }, 1000)
+      });
+    },
+    askConfirmReachFn() {
+      if (this.orderData.sendType == 3) {
+        this.showManualConfirmModal = true;
+      } else {
+        this.confirmReachFn();
+      }
+    },
+    manualConfirmReachFn(e) {
+      if (e.index === 0) {
+        this.cancelConfirmReachFn();
+      } else {
+        this.confirmReachFn();
+      }
+    },
+    cancelConfirmReachFn() {
+      this.showManualConfirmModal = false;
+    },
+    mobilePrintFn() {
+      this.$msg("此功能即将开通");
+    },
+    printerSetFn() {
+      this.$util.pageTo({
+        url: "/admin/order/print"
+      });
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	// 发货
-	.confirm-wrap {
-		.axis-det {
-			margin-top: 20px;
-			margin-bottom: 10px;
-			color: $fontColor2;
-			& > div {
-				margin-top: 14px;
-				&:first-child {
-					margin-top: 0;
-				}
-			}
-			.admin-button-com {
-				width: 120px;
-				margin-top: 20px;
-			}
-			.modify-btn {
-				color: $mainColor;
-				font-size: 24px;
-				margin-left: 30px;
-			}
-		}
-	}
-	// 制单
-	.com-wrap {
-		.axis-det {
-			margin-top: 14px;
-			& > div {
-				margin-top: 20px;
-				&:first-child {
-					margin-top: 0;
-				}
-			}
-		}
-		.express-wrap {
-			.admin-button-com {
-				width: 100%;
-			}
-			.button-prompt {
-				text-align: center;
-				color: $fontColor2;
-			}
-		}
-	}
+// 发货
+.confirm-wrap {
+  .axis-det {
+    margin-top: 20px;
+    margin-bottom: 10px;
+    color: $fontColor2;
+    & > div {
+      margin-top: 14px;
+      &:first-child {
+        margin-top: 0;
+      }
+    }
+    .admin-button-com {
+      width: 120px;
+      margin-top: 20px;
+    }
+    .modify-btn {
+      color: $mainColor;
+      font-size: 24px;
+      margin-left: 30px;
+    }
+  }
+}
+// 制单
+.com-wrap {
+  .axis-det {
+    margin-top: 14px;
+    & > div {
+      margin-top: 20px;
+      &:first-child {
+        margin-top: 0;
+      }
+    }
+  }
+  .express-wrap {
+    .admin-button-com {
+      width: 100%;
+    }
+    .button-prompt {
+      text-align: center;
+      color: $fontColor2;
+    }
+  }
+}
 </style>

+ 147 - 137
store/src/admin/order/components/sel-ship-confirm.vue

@@ -1,28 +1,28 @@
 <template>
-	<div class="sel-ship-confirm-module">
-		<!-- 列表 -->
-		<time-axis v-if="!$util.isEmpty(orderComData)">
-			<!-- 完成 -->
-			<timeaxis-item class="axis-list axis-first confirm-wrap" bgcolor="none">
-				<template v-slot:node>
-					<div class="tui-node node-big">
-						<div class="node-small"></div>
-					</div>
-				</template>
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[0].actionName }}</div>
-						<div class="axis-det">
-							<div class="app-color-0 app-bold">{{ orderComData[0].finishTime | formatTime }}</div>
-							<!-- <div>订单归类: {{ orderComData[0].classify.category }}</div> -->
-							<!-- <div>用途:{{ orderComData[0].classify.usage }}</div> -->
-							<!-- <div>消息推送:已推送</div> -->
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-			<!-- 送达 -->
-			<!-- <timeaxis-item class="axis-list com-wrap" bgcolor="none">
+  <div class="sel-ship-confirm-module">
+    <!-- 列表 -->
+    <time-axis v-if="!$util.isEmpty(orderComData)">
+      <!-- 完成 -->
+      <timeaxis-item class="axis-list axis-first confirm-wrap" bgcolor="none">
+        <template v-slot:node>
+          <div class="tui-node node-big">
+            <div class="node-small"></div>
+          </div>
+        </template>
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[0].actionName }}</div>
+            <div class="axis-det">
+              <div class="app-color-0 app-bold">{{ orderComData[0].finishTime | formatTime }}</div>
+              <!-- <div>订单归类: {{ orderComData[0].classify.category }}</div> -->
+              <!-- <div>用途:{{ orderComData[0].classify.usage }}</div> -->
+              <!-- <div>消息推送:已推送</div> -->
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+      <!-- 送达 -->
+      <!-- <timeaxis-item class="axis-list com-wrap" bgcolor="none">
 				<template v-slot:content>
 					<div class="axis-slot-wrap">
 						<div class="axis-title">{{ orderComData[1].actionName }}</div>
@@ -31,125 +31,135 @@
 						</div>
 					</div>
 				</template>
-			</timeaxis-item> -->
-			<!-- 发货 -->
-			<timeaxis-item class="axis-list confirm-wrap" bgcolor="none">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[1].actionName}}</div>
-						<div class="axis-det">
-							<div class="app-color-0 app-bold">{{ orderComData[1].addTime | formatTime }}</div>
-							<block v-if="!$util.isEmpty(orderComData[1].sendInfo)">
-								<div>配送方:{{ orderComData[1].sendInfo.sideName }}</div>
-								<div>距离:{{ orderComData[1].sendInfo.distance }}km</div>
-								<div>运费:¥{{ orderComData[1].sendInfo.cost }}</div>
-								<div>小费:¥{{ orderComData[1].sendInfo.tip }}</div>
-								<div>状态:{{ orderComData[1].sendInfo.status | constantfilter('SEND_STATUS') }}</div>
-							</block>
-							<block v-else>
-								<div>配送方:门店</div>
-							</block>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-			<!-- 制单 -->
-			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[2].actionName}}</div>
-						<div class="axis-det">
-							<div class="app-bold">{{ orderComData[2].addTime | formatTime }}</div>
-							<card-name v-if="!$util.isEmpty(orderComData[2].receive)" :info="orderComData[2].receive" />
-							<block v-else>
-								<div>已手写</div>
-							</block>
-							<div class="btn-wrap-com" v-if="!$util.isEmpty(orderComData[2].receive)" >
-								<!-- <button class="admin-button-com default">明细</button> -->
-								<button class="admin-button-com default" @click="() => { alert('打印功能待开发!') }">重打</button>
-							</div>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-			<!-- 下单 -->
-			<timeaxis-item class="axis-list com-wrap" bgcolor="none">
-				<template v-slot:content>
-					<div class="axis-slot-wrap">
-						<div class="axis-title">{{ orderComData[3].actionName}}</div>
-						<div class="axis-det">
-							<div class="app-bold">{{ orderComData[3].addTime | formatTime }}</div>
-						</div>
-					</div>
-				</template>
-			</timeaxis-item>
-		</time-axis>
-	</div>
+      </timeaxis-item>-->
+      <!-- 发货 -->
+      <timeaxis-item class="axis-list confirm-wrap" bgcolor="none">
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[1].actionName}}</div>
+            <div class="axis-det">
+              <div class="app-color-0 app-bold">{{ orderComData[1].addTime | formatTime }}</div>
+              <block v-if="!$util.isEmpty(orderComData[1].sendInfo)">
+                <div>配送方:{{ orderComData[1].sendInfo.sideName }}</div>
+                <div>距离:{{ orderComData[1].sendInfo.distance }}km</div>
+                <div>运费:¥{{ orderComData[1].sendInfo.cost }}</div>
+                <div>小费:¥{{ orderComData[1].sendInfo.tip }}</div>
+                <div>状态:{{ orderComData[1].sendInfo.status | constantfilter('SEND_STATUS') }}</div>
+              </block>
+              <block v-else>
+                <div>配送方:门店</div>
+              </block>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+      <!-- 制单 -->
+      <timeaxis-item class="axis-list com-wrap" bgcolor="none">
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[2].actionName}}</div>
+            <div class="axis-det">
+              <div class="app-bold">{{ orderComData[2].addTime | formatTime }}</div>
+              <card-name
+                v-if="!$util.isEmpty(orderComData[2].receive)"
+                :info="orderComData[2].receive"
+              />
+              <block v-else>
+                <div>已手写</div>
+              </block>
+              <div class="btn-wrap-com" v-if="!$util.isEmpty(orderComData[2].receive)">
+                <button class="admin-button-com default" @click="() => { alert('打印功能待开发!') }">重打</button>
+                <button class="admin-button-com default" @click="printerSetFn">打印机</button>
+              </div>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+      <!-- 下单 -->
+      <timeaxis-item class="axis-list com-wrap" bgcolor="none">
+        <template v-slot:content>
+          <div class="axis-slot-wrap">
+            <div class="axis-title">{{ orderComData[3].actionName}}</div>
+            <div class="axis-det">
+              <div class="app-bold">{{ orderComData[3].addTime | formatTime }}</div>
+            </div>
+          </div>
+        </template>
+      </timeaxis-item>
+    </time-axis>
+  </div>
 </template>
 
 <script>
-import TimeAxis from '@/admin/home/components/plugin/time-axis'
-import TimeaxisItem from '@/admin/home/components/plugin/timeaxis-item'
-import CardName from './card-name'
+import TimeAxis from "@/admin/home/components/plugin/time-axis";
+import TimeaxisItem from "@/admin/home/components/plugin/timeaxis-item";
+import CardName from "./card-name";
 export default {
-	name: 'sel-ship-confirm-module',
-	components: {
-		TimeAxis,
-		TimeaxisItem,
-		CardName
-	},
-	props: {
-		query: {
-			type: Object,
-			default: () => {}
-		},
-		orderData: {
-			type: Object,
-			default: () => {}
-		},
-		orderComData: {
-			type: Array,
-			default: () => []
-		}
-	}
-}
+  name: "sel-ship-confirm-module",
+  components: {
+    TimeAxis,
+    TimeaxisItem,
+    CardName
+  },
+  props: {
+    query: {
+      type: Object,
+      default: () => {}
+    },
+    orderData: {
+      type: Object,
+      default: () => {}
+    },
+    orderComData: {
+      type: Array,
+      default: () => []
+    }
+  },
+  method: {
+    printerSetFn() {
+      this.$util.pageTo({
+        url: "/admin/order/print"
+      });
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	// 发货
-	.confirm-wrap {
-		.axis-det {
-			margin-top: 20px;
-			margin-bottom: 10px;
-			color: $fontColor2;
-			& > div {
-				margin-top: 10px;
-				&:first-child {
-					margin-top: 0;
-				}
-			}
-			.admin-button-com {
-				width: 120px;
-				margin-top: 20px;
-			}
-			.modify-btn {
-				color: $mainColor;
-				font-size: 24px;
-				margin-left: 30px;
-			}
-		}
-	}
-	// 制单
-	.com-wrap {
-		.axis-det {
-			margin-top: 14px;
-			& > div {
-				margin-top: 20px;
-				&:first-child {
-					margin-top: 0;
-				}
-			}
-		}
-	}
+// 发货
+.confirm-wrap {
+  .axis-det {
+    margin-top: 20px;
+    margin-bottom: 10px;
+    color: $fontColor2;
+    & > div {
+      margin-top: 10px;
+      &:first-child {
+        margin-top: 0;
+      }
+    }
+    .admin-button-com {
+      width: 120px;
+      margin-top: 20px;
+    }
+    .modify-btn {
+      color: $mainColor;
+      font-size: 24px;
+      margin-left: 30px;
+    }
+  }
+}
+// 制单
+.com-wrap {
+  .axis-det {
+    margin-top: 14px;
+    & > div {
+      margin-top: 20px;
+      &:first-child {
+        margin-top: 0;
+      }
+    }
+  }
+}
 </style>
 

+ 6 - 0
store/src/admin/order/components/sel-ship-manage.vue

@@ -41,6 +41,7 @@
                 <card-name :info="orderComData[1].receive" />
                 <div class="btn-wrap-com">
                   <button class="admin-button-com default" @click="mobilePrintFn">重打</button>
+                  <button class="admin-button-com default" @click="printerSetFn">打印机</button>
                 </div>
               </block>
             </div>
@@ -264,6 +265,11 @@ export default {
     },
     mobilePrintFn() {
       this.$msg("即将开通...");
+    },
+    printerSetFn() {
+      this.$util.pageTo({
+        url: "/admin/order/print"
+      });
     }
   }
 };

+ 6 - 11
store/src/admin/order/components/sel-ship.vue

@@ -28,9 +28,9 @@
               <div>{{ orderComData[0].addTime | formatTime }}</div>
               <card-name :info="orderComData[0].receive" />
               <div class="btn-wrap-com">
-                <button class="admin-button-com default" @click="mobilePrintFn">打印</button>
+                <button class="admin-button-com default" @click="printOrderFn">打印</button>
                 <button class="admin-button-com default" @click="modifyPrintFn">修改</button>
-                <button class="admin-button-com default" @click="printOrderFn">下一步</button>
+                <button class="admin-button-com default" @click="printerSetFn">打印机</button>
               </div>
             </div>
           </div>
@@ -88,17 +88,12 @@ export default {
            id: this.orderData.id,
             pageStatus: 7
         })
-        // this.$util.pageTo({
-        //   url: "/admin/order/ship",
-        //   query: {
-        //     id: this.orderData.id,
-        //     pageStatus: 7
-        //   }
-        // });
       });
     },
-    mobilePrintFn() {
-      this.$msg("即将开通");
+    printerSetFn() {
+        this.$util.pageTo({
+          url: "/admin/order/print"
+        });
     },
     modifyPrintFn() {
       this.$msg("即将开通");

+ 10 - 8
store/src/admin/order/print.vue

@@ -1,15 +1,13 @@
 <template>
 	<view>
-		<button @click="searchBle">搜索蓝牙</button>
+		<button @click="searchBle">搜索蓝牙打印机</button>
 		<view style="margin-top: 30upx;" :key="index" v-for="(item,index) in devices">
 			<button style="width: 400upx; color: #0081FF;" @click="onConn(item)">{{item.name}}</button>
 		</view>
 		<button style="margin-top: 100upx;" @click="senBleLabel()">标签打印</button>
 		<textarea @blur="bindTextAreaBlur" auto-height placeholder-style="color:#F76260" placeholder="请输入票据信息" v-model="piaojuText" />
-		<button style="margin-top: 100upx;" @click="senBleLabel2()">票据打印</button>
+		<button style="margin-top: 100upx;" @click="billPrint()">票据打印</button>
 	</view>
-
-
 </template>
 
 <script>
@@ -110,6 +108,7 @@
 					complete(res) {
 						if (res.errMsg == "createBLEConnection:ok") {
 							console.log("连接蓝牙-[" + item.name + "]--成功")
+							that.$msg("连接蓝牙-[" + item.name + "]--成功");
 							that.connId = deviceId;
 							that.currDev = item
 							setTimeout(function() {
@@ -227,16 +226,19 @@
 				let serviceId = this.currDev.services[0].serviceId;
 				let characteristicId = this.currDev.services[0].characteristicId;
 				var command = tsc.jpPrinter.createNew()
-				// console.log(command)
 			    command.setSize(40, 30)
                 command.setGap(2)
                 command.setCls()
-                command.setText(50, 10, "TSS24.BF2", 1, 1, "打印测试")
-                command.setQR(50, 50, "L", 5, "A", "977767937@qq.com")
+                // command.setText(50, 10, "TSS24.BF2", 1, 1, "打印测试")
+				// command.setQR(50, 50, "L", 5, "A", "977767937@qq.com")
+				command.setText(10, 50, "TSS24.BF2", 1, 1, "收花人姓名:小明")
+				command.setText(10, 90, "TSS24.BF2", 1, 1, "收花人电话:15280215347")
+				command.setText(10, 130, "TSS24.BF2", 1, 1, "收花时间:2020-6-10 上午")
+				command.setText(10, 170, "TSS24.BF2", 1, 1, "收花地址:厦门市集美区凤林前山路147号110室")
 				command.setPagePrint()
 				this.senBlData(deviceId, serviceId, characteristicId,command.getData())
 			},
-			senBleLabel2(){
+			billPrint(){
 				//票据模式
 				let deviceId = this.currDev.deviceId;
 				let serviceId = this.currDev.services[0].serviceId;