Browse Source

下单记录

shish 1 năm trước cách đây
mục cha
commit
f4baa4bcf9

+ 221 - 0
hdApp/src/admin/order/itemOrder.vue

@@ -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>

+ 40 - 0
hdApp/src/api/order-item/index.js

@@ -0,0 +1,40 @@
+import https from "@/plugins/luch-request_0.0.7/request";
+
+export const chageItem = data => {
+	return https.post("/order-item/change-item", data);
+};
+
+export const modifyBookItem = data => {
+	return https.post("/order-item/modify-book-item", data);
+};
+
+export const addItem = data => {
+	return https.post("/order-item/add-item", data);
+};
+
+export const delItem = data => {
+	return https.post("/order-item/del-item", data);
+};
+
+//赠送花材
+export const giveItem = data => {
+	return https.post("/order-item/give-item", data);
+};
+
+//获取订单的花材
+export const getOrderProduct = data => {
+	return https.get("/order-item/get-order-product", data);
+};
+
+//根据花材获取订单
+export const getOrderInfoList = data => {
+	return https.get("/order-item/get-order-info-list", data);
+};
+
+export const filterName = data => {
+	return https.get("/order-item/filter-name", data);
+};
+
+export const updateRemarkItemFn = data => {
+	return https.get("/order-item/update-item-remark", data);
+};

+ 4 - 0
hdApp/src/api/product/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const delStatusUpdate = data => {
+	return https.post("/product/del-status-update", data);
+};
+
 export const print = data => {
 	return https.get("/product/print", data);
 };

+ 2 - 1
hdApp/src/pages.json

@@ -376,7 +376,8 @@
 				{ "path": "debtList", "style": { "navigationBarTitleText": "待结订单" } },
 				{ "path": "workOrder", "style": { "navigationBarTitleText": "开单" } },
 				{ "path": "modify", "style": { "navigationBarTitleText": "修改" } },
-				{ "path": "clearRemind","style": {"navigationBarTitleText": "如何查看还有多少待结订单"}}
+				{ "path": "clearRemind","style": {"navigationBarTitleText": "如何查看还有多少待结订单"}},
+				{ "path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}}
 			]
 		},
 		{