|
|
@@ -79,7 +79,7 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-if="item.payStatus == 1 && item.classify == 0">
|
|
|
- <div class="admin-button-com mini" @click.stop="classifyOrder()" >分类</div>
|
|
|
+ <div class="admin-button-com mini" @click.stop="classifyOrder(item.id)" >分类</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -99,6 +99,33 @@
|
|
|
:size="32"
|
|
|
padding="30rpx 30rpx"
|
|
|
></modal-module>
|
|
|
+
|
|
|
+ <!-- 选取分类 -->
|
|
|
+ <modal-module :show="classifyModal" :maskClosable="false" @cancel="modalCancel" @click="confirmClassify" title="订单分类" padding="30rpx 30rpx">
|
|
|
+ <template v-slot:content>
|
|
|
+ <div class="upload-confirm-wrap">
|
|
|
+ <!-- 选择分类 -->
|
|
|
+ <div class="sel-wrap">
|
|
|
+ <div class="sel-tit">类型</div>
|
|
|
+ <div class="sel-btn">
|
|
|
+ <block v-for="(item, index) in categoryData" :key="index">
|
|
|
+ <button class="admin-button-com" :class="[classifyForm.categoryId == item.id ? '' : 'default']" @click="selCategoryFn(item)">{{ item.categoryName || '暂无' }}</button>
|
|
|
+ </block>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 选择用途 -->
|
|
|
+ <div class="sel-wrap">
|
|
|
+ <div class="sel-tit">用途</div>
|
|
|
+ <div class="sel-btn">
|
|
|
+ <block v-for="(item, index) in usageData" :key="index">
|
|
|
+ <button class="admin-button-com" :class="[classifyForm.usageId == item.id ? '' : 'default']" @click="selUsageFn(item)">{{ item.usageName || '暂无' }}</button>
|
|
|
+ </block>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -107,8 +134,10 @@ import AppTabs from "@/components/plugin/tabs";
|
|
|
import ListModule from "@/components/module/app-order-list";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
+import { getCategory, getUsage } from '@/utils/config'
|
|
|
import { list } from "@/mixins";
|
|
|
-// api
|
|
|
+import { mapGetters } from 'vuex';
|
|
|
+import { orderClass } from '@/api/order'
|
|
|
import { getListB, freeShipping } from "@/api/order";
|
|
|
export default {
|
|
|
name: "order-list",
|
|
|
@@ -122,6 +151,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
tabIndex: 0,
|
|
|
+ classifyModal:false,
|
|
|
tabs: [
|
|
|
{
|
|
|
name: "全部",
|
|
|
@@ -147,7 +177,11 @@ export default {
|
|
|
operateIndex: null,
|
|
|
operateData: {},
|
|
|
// 免发货
|
|
|
- freeShipModal: false
|
|
|
+ freeShipModal: false,
|
|
|
+ classifyForm: {
|
|
|
+ categoryId: '',
|
|
|
+ usageId: ''
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -165,6 +199,14 @@ export default {
|
|
|
uni.stopPullDownRefresh();
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({ categoryData: 'getCategory' }),
|
|
|
+ ...mapGetters({ usageData: 'getUsage' })
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ getCategory()
|
|
|
+ getUsage()
|
|
|
+ },
|
|
|
onLoad: function() {},
|
|
|
onShow() {
|
|
|
let tabIndex = uni.getStorageSync("switchTabQuery") || null;
|
|
|
@@ -235,9 +277,30 @@ export default {
|
|
|
// 关闭弹窗
|
|
|
modalCancel() {
|
|
|
this.freeShipModal = false;
|
|
|
+ this.classifyModal = false;
|
|
|
+ },
|
|
|
+ classifyOrder(id){
|
|
|
+ this.classifyModal = true
|
|
|
+ this.currentOrderId = id;
|
|
|
+ },
|
|
|
+ confirmClassify(e) {
|
|
|
+ if (e.index === 0) {
|
|
|
+ this.modalCancel()
|
|
|
+ } else {
|
|
|
+ orderClass({
|
|
|
+ id: this.currentOrderId,
|
|
|
+ ...this.classifyForm
|
|
|
+ }).then(res => {
|
|
|
+ this.classifyModal = false;
|
|
|
+ this.$msg('分类成功!')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selCategoryFn(item) {
|
|
|
+ this.classifyForm.categoryId = item.id
|
|
|
},
|
|
|
- classifyOrder(){
|
|
|
-
|
|
|
+ selUsageFn(item) {
|
|
|
+ this.classifyForm.usageId = item.id
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -284,4 +347,44 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 弹窗
|
|
|
+ .upload-confirm-wrap {
|
|
|
+ max-height: 600px;
|
|
|
+ overflow-y: auto;
|
|
|
+ .modal-tit {
|
|
|
+ @include disFlex(center, center);
|
|
|
+ font-size: 40px;
|
|
|
+ margin-top: 30px;
|
|
|
+ margin-bottom: 50px;
|
|
|
+ .iconfont {
|
|
|
+ color: #09bb07;
|
|
|
+ margin-right: 20px;
|
|
|
+ font-size: 50px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 分类
|
|
|
+ .sel-wrap {
|
|
|
+ color: $fontColor2;
|
|
|
+ font-size: 32px;
|
|
|
+ .sel-tit {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ .sel-btn {
|
|
|
+ @include disFlex(center, flex-start);
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 10px 0 40px;
|
|
|
+ .admin-button-com {
|
|
|
+ // width: 170px;
|
|
|
+ margin-right: 20px;
|
|
|
+ margin-top: 20px;
|
|
|
+ padding-top: 16px;
|
|
|
+ padding-bottom: 16px;
|
|
|
+ border-radius: 4px;
|
|
|
+ // &:nth-child(3n + 1) {
|
|
|
+ // margin-left: 0;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|