|
|
@@ -0,0 +1,221 @@
|
|
|
+<template>
|
|
|
+ <div class="app-main app-content">
|
|
|
+ <div class="list-wrap">
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <div class="list" v-for="(item, index) in list.data" :key="index">
|
|
|
+ <div v-if="!$util.isEmpty(item.orderInfo)">
|
|
|
+ <orderItem :info="item.orderInfo"></orderItem>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="app-footer">
|
|
|
+ <div class="admin-button-com big blue" @click="batchFh()">全部发货</div>
|
|
|
+ <div class="admin-button-com big blue" style="margin-left:50upx;" @click="batchPrint()">合并打印</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
+import { list } from "@/mixins";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { getOrderInfoList } from "@/api/order-item";
|
|
|
+import orderItem from "../home/components/order-item"
|
|
|
+import { getListB,cloudPrintOrder,mergePrintFn,allFhAction} from "@/api/order";
|
|
|
+export default {
|
|
|
+ name: "itemOrder",
|
|
|
+ components: {
|
|
|
+ AppWrapperEmpty,
|
|
|
+ ModalModule,
|
|
|
+ orderItem,
|
|
|
+ },
|
|
|
+ mixins: [list],
|
|
|
+ computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ this.getOrderList().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ this.getOrderList().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.getOrderList()
|
|
|
+
|
|
|
+ //返回上一页时不需要刷新
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let prevPage = pages[ pages.length - 2 ];
|
|
|
+ prevPage.$vm.fromDetail = {status:1}
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+
|
|
|
+ },
|
|
|
+ batchFh(){
|
|
|
+ this.$msg('开发中')
|
|
|
+ return false
|
|
|
+ let that = this
|
|
|
+ if(this.option.ids && !this.$util.isEmpty(this.option.ids)){
|
|
|
+ that.$util.confirmModal({content:'确认全部发货?'},() => {
|
|
|
+ allFhAction({ids:this.option.ids}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('操作成功')
|
|
|
+ that.resetList()
|
|
|
+ that.getOrderList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$msg('没有订单')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ batchPrint(){
|
|
|
+ this.$msg('开发中')
|
|
|
+ return false
|
|
|
+ let that = this
|
|
|
+ if(this.option.ids && !this.$util.isEmpty(this.option.ids)){
|
|
|
+ that.$util.confirmModal({content:'确认合并打印?'},() => {
|
|
|
+ mergePrintFn({ids:this.option.ids}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('打印成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$msg('没有订单')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ printOrder(item){
|
|
|
+ let that = this
|
|
|
+ uni.showLoading({title: '打印中...'});
|
|
|
+ cloudPrintOrder({id:item.id}).then((res) => {
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.hasNoPrint == 1){
|
|
|
+ that.$util.confirmModal({content:'请先设置打印机'},() => {
|
|
|
+ that.$util.pageTo({url: "/admin/shop/print"})
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ item.printNum++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getOrderList() {
|
|
|
+ if(this.option.productId){
|
|
|
+ return getOrderInfoList({ productId:this.option.productId, page: this.list.page }).then((res) => {
|
|
|
+ this.completes(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.option.customId){
|
|
|
+ return getListB({ page: this.list.page,customId:this.option.customId }).then((res) => {
|
|
|
+ this.completes(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.option.ids){
|
|
|
+ return getListB({ page: this.list.page,ids:this.option.ids }).then((res) => {
|
|
|
+ this.completes(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content {
|
|
|
+ padding-top: 120upx;
|
|
|
+ padding-bottom: 1px;
|
|
|
+ .list-wrap {
|
|
|
+ .list {
|
|
|
+ padding: 0 30upx;
|
|
|
+ background-color: #fff;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ .list-top,.list-bottom {
|
|
|
+ padding: 20upx 0;
|
|
|
+ color: #999999;
|
|
|
+ .app-bold {
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ .freight-text {
|
|
|
+ margin-right: 60upx;
|
|
|
+ }
|
|
|
+ .app-green {
|
|
|
+ color: green;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list-bottom {
|
|
|
+ & > view {
|
|
|
+ @include disFlex(center, flex-end);
|
|
|
+ }
|
|
|
+ .list-button {
|
|
|
+ margin-top: 26upx;
|
|
|
+ .admin-button-com {
|
|
|
+ margin-left: 50upx;
|
|
|
+ padding:20upx 30upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.upload-confirm-wrap {
|
|
|
+ max-height: 600upx;
|
|
|
+ overflow-y: auto;
|
|
|
+ .modal-tit {
|
|
|
+ @include disFlex(center, center);
|
|
|
+ font-size: 40upx;
|
|
|
+ margin-top: 30upx;
|
|
|
+ margin-bottom: 50upx;
|
|
|
+ .iconfont {
|
|
|
+ color: #09bb07;
|
|
|
+ margin-right: 20upx;
|
|
|
+ font-size: 50upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .sel-wrap {
|
|
|
+ color: $fontColor2;
|
|
|
+ font-size: 32upx;
|
|
|
+ .sel-tit {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ .sel-btn {
|
|
|
+ @include disFlex(center, flex-start);
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 10upx 0 40upx;
|
|
|
+ .admin-button-com {
|
|
|
+ margin-right: 20upx;
|
|
|
+ margin-top: 20upx;
|
|
|
+ padding-top: 16upx;
|
|
|
+ padding-bottom: 16upx;
|
|
|
+ border-radius: 4upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.input-wrap {
|
|
|
+ padding: 10upx 10upx 0upx 10upx;
|
|
|
+ height:110upx;
|
|
|
+ .search-bar {
|
|
|
+ display:inline-block;
|
|
|
+ width:190upx;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|