|
@@ -1,6 +1,15 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="app-main app-content">
|
|
<view class="app-main app-content">
|
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
|
|
|
|
|
+ <view class="input-wrap" >
|
|
|
|
|
+ <view class="search-bar">
|
|
|
|
|
+ <app-search-module v-model="py" placeholder="输入编号" @input="searchFn" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style="float:right">
|
|
|
|
|
+ <button class="admin-button-com middle blue" style="margin-right:15upx;" @click="selectStaffFn()">选择开单人</button>
|
|
|
|
|
+ <button class="admin-button-com middle blue" @click="cancelSelectFn()">取消选择</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
<view class="list-wrap">
|
|
<view class="list-wrap">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<view class="list" v-for="(item, index) in list.data" :key="index" @click="pageTo({ url: '/admin/order/detail', query: { id: item.id } })" >
|
|
<view class="list" v-for="(item, index) in list.data" :key="index" @click="pageTo({ url: '/admin/order/detail', query: { id: item.id } })" >
|
|
@@ -19,6 +28,7 @@
|
|
|
<span class="app-size-30 app-bold">¥{{ item.orderPrice ? parseFloat(item.orderPrice) :0 }}</span>
|
|
<span class="app-size-30 app-bold">¥{{ item.orderPrice ? parseFloat(item.orderPrice) :0 }}</span>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="list-button">
|
|
<view class="list-button">
|
|
|
|
|
+ <view class="admin-button-com middle" @click.stop="sendOrderFn(item)">发货</view>
|
|
|
<view class="admin-button-com middle" v-if="item.payStatus == 1" @click.stop="printOrder(item)">打印</view>
|
|
<view class="admin-button-com middle" v-if="item.payStatus == 1" @click.stop="printOrder(item)">打印</view>
|
|
|
<view class="admin-button-com default" v-else>打印</view>
|
|
<view class="admin-button-com default" v-else>打印</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -30,6 +40,19 @@
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
|
<NotLogin></NotLogin>
|
|
<NotLogin></NotLogin>
|
|
|
|
|
+
|
|
|
|
|
+ <!--选择员工 -->
|
|
|
|
|
+ <uni-popup ref="getStaffRef" background-color="#fff" type="center" :animation="false">
|
|
|
|
|
+ <view style="display:flex;padding:20upx;height:25vh;justify-content: space-between;align-items:center;flex-wrap:wrap;">
|
|
|
|
|
+
|
|
|
|
|
+ <text v-for="(item, index) in staffList" :key="index" @click="getCurrentStaff(item.id)"
|
|
|
|
|
+ style="margin-left:25upx;border:1upx solid #999999;width:100upx;height:100upx;border-radius:20upx;justify-content:center;align-items:center;display:flex;">
|
|
|
|
|
+ {{item.name}}
|
|
|
|
|
+ </text>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -41,8 +64,10 @@ import { getCategory, getUsage } from '@/utils/config'
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
import { mapGetters } from 'vuex';
|
|
import { mapGetters } from 'vuex';
|
|
|
import { orderClass,onlinePrintOrder } from '@/api/order'
|
|
import { orderClass,onlinePrintOrder } from '@/api/order'
|
|
|
-import { getListB, freeShipping } from "@/api/order";
|
|
|
|
|
|
|
+import { getListB, freeShipping,sendOrder } from "@/api/order";
|
|
|
import NotLogin from "@/components/not-login";
|
|
import NotLogin from "@/components/not-login";
|
|
|
|
|
+import {getStaffList} from '@/api/staff'
|
|
|
|
|
+import AppSearchModule from "@/components/module/app-search"
|
|
|
export default {
|
|
export default {
|
|
|
name: "order-list",
|
|
name: "order-list",
|
|
|
components: {
|
|
components: {
|
|
@@ -50,7 +75,8 @@ export default {
|
|
|
AppTabs,
|
|
AppTabs,
|
|
|
AppWrapperEmpty,
|
|
AppWrapperEmpty,
|
|
|
ModalModule,
|
|
ModalModule,
|
|
|
- NotLogin
|
|
|
|
|
|
|
+ NotLogin,
|
|
|
|
|
+ AppSearchModule
|
|
|
},
|
|
},
|
|
|
mixins: [list],
|
|
mixins: [list],
|
|
|
data () {
|
|
data () {
|
|
@@ -61,7 +87,10 @@ export default {
|
|
|
operateIndex: null,
|
|
operateIndex: null,
|
|
|
operateData: {},
|
|
operateData: {},
|
|
|
freeShipModal: false,
|
|
freeShipModal: false,
|
|
|
- classifyForm: { categoryId: '', usageId: '' }
|
|
|
|
|
|
|
+ classifyForm: { categoryId: '', usageId: '' },
|
|
|
|
|
+ staffList:[],
|
|
|
|
|
+ shopAdminId:0,
|
|
|
|
|
+ sendNum:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh () {
|
|
onPullDownRefresh () {
|
|
@@ -87,15 +116,53 @@ export default {
|
|
|
getCategory()
|
|
getCategory()
|
|
|
getUsage()
|
|
getUsage()
|
|
|
},
|
|
},
|
|
|
- onLoad: function () {},
|
|
|
|
|
|
|
+ onLoad: function () {
|
|
|
|
|
+ },
|
|
|
onShow () {
|
|
onShow () {
|
|
|
let tabIndex = uni.getStorageSync("switchTabQuery") || null;
|
|
let tabIndex = uni.getStorageSync("switchTabQuery") || null;
|
|
|
if (tabIndex) {
|
|
if (tabIndex) {
|
|
|
uni.removeStorageSync("switchTabQuery");
|
|
uni.removeStorageSync("switchTabQuery");
|
|
|
this.tabIndex = parseInt(tabIndex.tabIndex);
|
|
this.tabIndex = parseInt(tabIndex.tabIndex);
|
|
|
}
|
|
}
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ getStaffList().then(res=>{
|
|
|
|
|
+ if(res.code ==1){
|
|
|
|
|
+ this.staffList = res.data.list
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ searchFn(e) {
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.sendNum = e;
|
|
|
|
|
+ this.getOrderList()
|
|
|
|
|
+ },
|
|
|
|
|
+ sendOrderFn(item){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ that.$util.confirmModal({content:'确认已发货?'},() => {
|
|
|
|
|
+ sendOrder({id:item.id}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg('操作成功')
|
|
|
|
|
+ that.resetList()
|
|
|
|
|
+ that.getOrderList()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getCurrentStaff(id){
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.shopAdminId = id
|
|
|
|
|
+ this.$refs.getStaffRef.close()
|
|
|
|
|
+ this.getOrderList()
|
|
|
|
|
+ },
|
|
|
|
|
+ selectStaffFn(){
|
|
|
|
|
+ this.$refs.getStaffRef.open('top')
|
|
|
|
|
+ },
|
|
|
|
|
+ cancelSelectFn(){
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.shopAdminId = 0
|
|
|
|
|
+ this.getOrderList()
|
|
|
|
|
+ },
|
|
|
printOrder(item){
|
|
printOrder(item){
|
|
|
onlinePrintOrder({id:item.id}).then(res=>{
|
|
onlinePrintOrder({id:item.id}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
@@ -111,6 +178,8 @@ export default {
|
|
|
return getListB({
|
|
return getListB({
|
|
|
status: status,
|
|
status: status,
|
|
|
search: "",
|
|
search: "",
|
|
|
|
|
+ shopAdminId:this.shopAdminId,
|
|
|
|
|
+ sendNum:this.sendNum,
|
|
|
page: this.list.page
|
|
page: this.list.page
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
this.completes(res);
|
|
this.completes(res);
|
|
@@ -257,4 +326,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.input-wrap {
|
|
|
|
|
+ padding: 10upx 10upx 10upx 10upx;
|
|
|
|
|
+ .search-bar {
|
|
|
|
|
+ display:inline-block;
|
|
|
|
|
+ width:350upx;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|