Zory vor 1 Woche
Ursprung
Commit
49d97a8f8d

+ 14 - 0
src/api/model/system.js

@@ -109,6 +109,20 @@ export default {
 			get: async function(params){
 				return await http.get(this.url, params);
 			}
+		},
+		export: {
+			url: `${config.API_URL}/tasks/export`,
+			name: "系统任务管理",
+			post: async function(params){
+				return await http.post(this.url, params);
+			}
+		},
+		import: {
+			url: `${config.API_URL}/tasks/import`,
+			name: "系统任务管理",
+			get: async function(params){
+				return await http.get(this.url, params);
+			}
 		}
 	}
 }

+ 1 - 1
src/components/imFloat/imFloat.vue

@@ -1002,7 +1002,7 @@ export default {
         },
         async getOrderList(){
             this.orderData.loading = true;
-            var resp = await this.$API.order.list.get({"page":this.orderData.page,"pageSize":this.orderData.size,"order":this.orderData.order,"openid":this.chatItem.openid});
+            var resp = await this.$API.merOrder.list.get({"page":this.orderData.page,"pageSize":this.orderData.size,"order":this.orderData.order,"openid":this.chatItem.openid});
             this.orderData.loading = false;
             if (resp.code == 0) {
                 return ;

+ 2 - 2
src/components/scFileExport/index.vue

@@ -129,7 +129,7 @@
 			downloadFile(apiObj, fileName, data={}){
 				this.downLoading = true
 				var _this = this
-				apiObj.get(data, {
+				apiObj.post(data, {
 					responseType: 'blob',
 					onDownloadProgress(e){
 						if(e.lengthComputable){
@@ -160,7 +160,7 @@
 			},
 			asyncDownload(apiObj, fileName, data={}){
 				this.asyncLoading = true
-				apiObj.get(data).then(res => {
+				apiObj.post(data).then(res => {
 					this.asyncLoading = false
 					if(res.code == 200){
 						this.dialog = false

+ 5 - 1
src/layout/components/userbar.vue

@@ -32,6 +32,9 @@
 	</div>
 	
 	<el-drawer v-model="tasksVisible" :size="450" title="任务中心" destroy-on-close>
+		<template #header>
+			<div class="task-header">任务中心<span>-只保留最近3天的下载任务</span></div>
+		</template>
 		<tasks></tasks>
 	</el-drawer>
 
@@ -158,7 +161,8 @@ export default {
 	align-items: center;
 	height: 100%;
 }
-
+.task-header{font-size: 18px;color: #000;font-weight: bold;}
+.task-header span{font-size: 12px;color: #666;font-weight: normal;margin-left: 10px;}
 .user-bar .panel-item {
 	padding: 0 10px;
 	cursor: pointer;

+ 87 - 0
src/views/manage/order/index/components/option.vue

@@ -0,0 +1,87 @@
+<template>
+    <div class="op-header-no">
+        <div class="left-panel">
+            <template v-if="trade==2">
+                <sc-file-import :apiObj="$API.common.importFile" title="导入快递单号" :data="{otherData:'demo'}" templateUrl="http://www.scuiadmin/file.xlsx" accept=".xls, .xlsx" :maxSize="30" tip="请上传小于或等于 30M 的 .xls, .xlsx 格式文件" @success="success">
+                    <template #default="{open}">
+                        <el-button type="primary" icon="sc-icon-upload" @click="open">导入快递单号</el-button>
+                    </template>
+                    <template #uploader>
+                        <el-icon class="el-icon--upload"><sc-icon-file-excel /></el-icon>
+                        <div class="el-upload__text">
+                            将文件拖到此处或 <em>点击选择文件上传</em>
+                        </div>
+                    </template>
+                </sc-file-import>
+            </template>
+            <sc-file-export :apiObj="$API.system.tasks.export" :data="searchKey" :fileName="'订单列表_'+(new Date().getTime())" async>
+                <template #default="{open}">
+                    <el-button type="danger" icon="sc-icon-download" @click="open">导出</el-button>
+                </template>
+            </sc-file-export>
+        </div>
+    </div>
+</template>
+
+<script>
+import scFileExport from '@/components/scFileExport'
+import scFileImport from '@/components/scFileImport'
+export default {
+    components: {
+        scFileExport,scFileImport
+    },
+    props: {
+        dataSelect: { type: Array, default: () => [] },
+        dataSelectFull: { type: Array, default: () => [] },
+        trade: { type: String, default: "0" },
+        searchKey: { type: Object, default: () => {} },
+    },
+    data(){
+        return {
+
+        }
+    },
+    methods: {
+        table_add(){
+            this.$router.push('/merchant/goods/add')
+        },
+        table_sync(){
+            this.$confirm(`发起同步后,请耐心等待1-2分钟后再刷新当前数据列表`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var resp = await this.$API.category.sync.get();
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        table_batch_status(status){
+            if (this.dataSelect.length == 0) {
+                return this.$message.error("请选择修改数据")
+            }
+            this.$confirm(`审核中的商品不支持该操作,请确认是否有勾选审核中的商品`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var loading = this.$loading()
+                let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
+                loading.close()
+                var resp = await this.$API.merGoods.batch.post(submitData);
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        handleSuccess(){
+            this.$emit("success");
+        }
+    }
+}
+</script>

+ 1 - 0
src/views/manage/order/index/components/table.vue

@@ -108,6 +108,7 @@
                 <div v-else>待订单完成</div>
             </template>
         </el-table-column>
+        <el-table-column label="来源" prop="scene" width="160"></el-table-column>
         <el-table-column label="下单时间" prop="create_at" width="160"></el-table-column>
         <el-table-column label="支付时间" prop="pay_at" width="160">
             <template #default="scope">

+ 8 - 4
src/views/manage/order/index/index.vue

@@ -2,11 +2,11 @@
     <el-container class="flex-column">
         <div class="table-search">
             <search @success="handleSuccess"></search>
-            <!-- <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" type="3"></optionBtn> -->
+            <optionBtn @success="handleOp" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" :searchKey="searchKey"></optionBtn>
         </div>
         <el-main class="nopadding">
             <div class="table-container">
-                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" type="3"></tablePage>
+                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull"></tablePage>
             </div>
         </el-main>
     </el-container>  
@@ -14,11 +14,11 @@
 
 <script>
 import search from './components/search';
-// import optionBtn from './components/option';
+import optionBtn from './components/option';
 import tablePage from './components/table';
 export default {
     components: {
-        search,tablePage
+        search,tablePage,optionBtn
     },
     data(){
         return {
@@ -28,6 +28,9 @@ export default {
         }
     },
     methods: {
+        handleOp(){
+            this.$refs.tablePage.upData(this.searchKey)
+        },
         tableHandle(data){
             this.dataSelect = data;
         },
@@ -35,6 +38,7 @@ export default {
             this.dataSelectFull = data;
         },
         handleSuccess(data){
+            this.searchKey = data;
             this.$refs.tablePage.upData(data)
         },
         handleClick(name){

+ 87 - 0
src/views/merchant/order/index/components/option.vue

@@ -0,0 +1,87 @@
+<template>
+    <div class="op-header-no">
+        <div class="left-panel">
+            <template v-if="trade==2">
+                <sc-file-import :apiObj="$API.common.importFile" title="导入快递单号" :data="{otherData:'demo'}" templateUrl="http://www.scuiadmin/file.xlsx" accept=".xls, .xlsx" :maxSize="30" tip="请上传小于或等于 30M 的 .xls, .xlsx 格式文件" @success="success">
+                    <template #default="{open}">
+                        <el-button type="primary" icon="sc-icon-upload" @click="open">导入快递单号</el-button>
+                    </template>
+                    <template #uploader>
+                        <el-icon class="el-icon--upload"><sc-icon-file-excel /></el-icon>
+                        <div class="el-upload__text">
+                            将文件拖到此处或 <em>点击选择文件上传</em>
+                        </div>
+                    </template>
+                </sc-file-import>
+            </template>
+            <sc-file-export :apiObj="$API.system.tasks.export" :data="searchKey" :fileName="'订单列表_'+(new Date().getTime())" async>
+                <template #default="{open}">
+                    <el-button type="danger" icon="sc-icon-download" @click="open">导出</el-button>
+                </template>
+            </sc-file-export>
+        </div>
+    </div>
+</template>
+
+<script>
+import scFileExport from '@/components/scFileExport'
+import scFileImport from '@/components/scFileImport'
+export default {
+    components: {
+        scFileExport,scFileImport
+    },
+    props: {
+        dataSelect: { type: Array, default: () => [] },
+        dataSelectFull: { type: Array, default: () => [] },
+        trade: { type: String, default: "0" },
+        searchKey: { type: Object, default: () => {} },
+    },
+    data(){
+        return {
+
+        }
+    },
+    methods: {
+        table_add(){
+            this.$router.push('/merchant/goods/add')
+        },
+        table_sync(){
+            this.$confirm(`发起同步后,请耐心等待1-2分钟后再刷新当前数据列表`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var resp = await this.$API.category.sync.get();
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        table_batch_status(status){
+            if (this.dataSelect.length == 0) {
+                return this.$message.error("请选择修改数据")
+            }
+            this.$confirm(`审核中的商品不支持该操作,请确认是否有勾选审核中的商品`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var loading = this.$loading()
+                let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
+                loading.close()
+                var resp = await this.$API.merGoods.batch.post(submitData);
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        handleSuccess(){
+            this.$emit("success");
+        }
+    }
+}
+</script>

+ 1 - 10
src/views/merchant/order/index/components/search.vue

@@ -43,13 +43,8 @@
                     </el-row>
                 </div>
                 <div class="form-line"></div>
-                <div class="form-right" style="flex: 0 0 186px;">
+                <div class="form-right">
                     <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
-                    <sc-file-export :apiObj="$API.common.exportFile" :data="searchKey" fileName="订单列表" async>
-						<template #default="{open}">
-							<el-button type="danger" icon="sc-icon-download" @click="open">导出</el-button>
-						</template>
-					</sc-file-export>
                 </div>
             </div>
         </el-form>
@@ -57,11 +52,7 @@
 </template>
 
 <script>
-import scFileExport from '@/components/scFileExport'
 export default {
-    components: {
-        scFileExport
-    },
     data(){
         return {
             searchKey:{}

+ 5 - 1
src/views/merchant/order/index/components/table.vue

@@ -97,6 +97,7 @@
                 <div v-else>待订单完成</div>
             </template>
         </el-table-column>
+        <el-table-column label="来源" prop="scene" width="160"></el-table-column>
         <el-table-column label="下单时间" prop="create_at" width="160"></el-table-column>
         <el-table-column label="支付时间" prop="pay_at" width="160">
             <template #default="scope">
@@ -107,7 +108,10 @@
             <template #default="scope">
                 <el-button-group>
                     <el-button size="small" text @click="table_view(scope.row)">详情</el-button>
-                    <el-button type="danger" text size="small" @click="table_del(scope.row)">删除</el-button>
+                    <el-button type="danger" size="small" text @click="table_error(scope.row)" v-if="trade==2 && scope.row.status==2 && scope.row.is_error==0">标记异常</el-button>
+                </el-button-group>
+                <el-button-group>
+                    <el-button type="danger" size="small" text @click="table_cancel(scope.row)" v-if="trade==2 && scope.row.status==2 && scope.row.express_status==1">取消</el-button>
                 </el-button-group>
             </template>
         </el-table-column>

+ 13 - 4
src/views/merchant/order/index/index.vue

@@ -2,11 +2,11 @@
     <el-container class="flex-column">
         <div class="table-search">
             <search @success="handleSuccess"></search>
-            <!-- <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" type="3"></optionBtn> -->
+            <optionBtn @success="handleOp" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" :trade="userInfo.trade" :searchKey="searchKey"></optionBtn>
         </div>
         <el-main class="nopadding">
             <div class="table-container">
-                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" type="3"></tablePage>
+                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" :trade="userInfo.trade"></tablePage>
             </div>
         </el-main>
     </el-container>  
@@ -14,19 +14,24 @@
 
 <script>
 import search from './components/search';
-// import optionBtn from './components/option';
+import optionBtn from './components/option';
 import tablePage from './components/table';
 export default {
     components: {
-        search,tablePage
+        search,tablePage,optionBtn
     },
     data(){
         return {
             searchKey:{},
             dataSelect:[],
             dataSelectFull:[],
+            userInfo:null
         }
     },
+    created(){
+		var userInfo = this.$TOOL.data.get("USER_INFO");
+		this.userInfo = userInfo;
+    },
     methods: {
         tableHandle(data){
             this.dataSelect = data;
@@ -34,7 +39,11 @@ export default {
         tableHandleFull(data){
             this.dataSelectFull = data;
         },
+        handleOp(){
+            this.$refs.tablePage.upData(this.searchKey)
+        },
         handleSuccess(data){
+            this.searchKey = data;
             this.$refs.tablePage.upData(data)
         },
         handleClick(name){

+ 2 - 1
src/views/service/order/index/components/option.vue

@@ -14,7 +14,7 @@
                     </template>
                 </sc-file-import>
             </template>
-            <sc-file-export :apiObj="$API.common.exportFile" :data="searchKey" fileName="订单列表" async>
+            <sc-file-export :apiObj="$API.system.tasks.export" :data="searchKey" :fileName="'订单列表_'+(new Date().getTime())" async>
                 <template #default="{open}">
                     <el-button type="danger" icon="sc-icon-download" @click="open">导出</el-button>
                 </template>
@@ -34,6 +34,7 @@ export default {
         dataSelect: { type: Array, default: () => [] },
         dataSelectFull: { type: Array, default: () => [] },
         trade: { type: String, default: "0" },
+        searchKey: { type: Object, default: () => {} },
     },
     data(){
         return {

+ 1 - 0
src/views/service/order/index/components/table.vue

@@ -124,6 +124,7 @@
                 <div v-else>待订单完成</div>
             </template>
         </el-table-column>
+        <el-table-column label="来源" prop="scene" width="160"></el-table-column>
         <el-table-column label="下单时间" prop="create_at" width="160"></el-table-column>
         <el-table-column label="支付时间" prop="pay_at" width="160">
             <template #default="scope">

+ 5 - 1
src/views/service/order/index/index.vue

@@ -2,7 +2,7 @@
     <el-container class="flex-column">
         <div class="table-search">
             <search @success="handleSuccess"></search>
-            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" :trade="userInfo.trade"></optionBtn>
+            <optionBtn @success="handleOp" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" :trade="userInfo.trade" :searchKey="searchKey"></optionBtn>
         </div>
         <el-main class="nopadding">
             <div class="table-container">
@@ -33,6 +33,9 @@ export default {
 		this.userInfo = userInfo;
     },
     methods: {
+        handleOp(){
+            this.$refs.tablePage.upData(this.searchKey)
+        },
         tableHandle(data){
             this.dataSelect = data;
         },
@@ -40,6 +43,7 @@ export default {
             this.dataSelectFull = data;
         },
         handleSuccess(data){
+            this.searchKey = data;
             this.$refs.tablePage.upData(data)
         },
         handleClick(name){