Browse Source

Merge branch 'test' into 'master'

Test

See merge request quanshu/mp-ui-pc!317
zhong chunping 3 years ago
parent
commit
6c2f9ff00a

+ 11 - 1
src/api/finance/withdraw.js

@@ -26,4 +26,14 @@ export function withdrawVerify(data) {
     method: 'post',
     data
   })
-}
+}
+
+// 导出
+export function exchangeWithdrawExport(data) {
+  return request({
+    url: '/api/v1/mp/admin/channel/withdraw/export',
+    method: 'post',
+    timeout: 15 * 60 * 1000,
+    data
+  })
+}

+ 38 - 1
src/views/finance/withdraw/index.vue

@@ -43,13 +43,27 @@
         >
       </el-form-item>
     </el-form>
+
     <!-- 刷新 -->
     <el-row :gutter="10">
+      <el-col :span="1.5">
+        <el-button
+          type="infor"
+          plain
+          icon="el-icon-download"
+          size="small"
+          @click="handleExportDraw"
+          v-hasPermi="['finance:withdraw:export']"
+        >导出记录</el-button
+        >
+      </el-col>
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
       ></right-toolbar>
     </el-row>
+    <br>
+
     <!-- 列表状态 -->
     <el-tabs type="card" v-model="state" @tab-click="handleClick">
       <el-tab-pane label="全部" name="null"></el-tab-pane>
@@ -121,7 +135,7 @@
   </div>
 </template>
 <script>
-import { withdrawList, withdrawDetail } from "@/api/finance/withdraw";
+import { withdrawList, withdrawDetail, exchangeWithdrawExport } from "@/api/finance/withdraw";
 import WithdrawDetail from './components/Detail'
 export default {
   name: "Withdraw",
@@ -250,6 +264,29 @@ export default {
       this.detailShow = false;
       this.getList();
     },
+    // 导出订单
+    handleExportDraw() {
+      this.$confirm("是否确认导出记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.vloading = this.$loading({
+            lock: true,
+            text: "正在导出记录.....",
+            background: "rgba(0, 0, 0, 0.7)",
+          });
+          return exchangeWithdrawExport(this.queryParams);
+        })
+        .then((response) => {
+          this.vloading.close();
+          this.download(response.msg);
+        })
+        .catch(() => {
+          this.vloading.close();
+        });
+    },
   },
 };
 </script>

+ 16 - 0
src/views/order/deliver/index.vue

@@ -75,6 +75,11 @@
           @change="pageParams.pageNum = 1;handleQuery()"
         />
       </el-form-item>
+      <el-form-item label="供应商" prop="supplierId">
+        <el-select v-model="queryParams.supplierId" placeholder="请选择供应商" filterable clearable  @clear="pageParams.pageNum = 1;handleQuery()" @change="pageParams.pageNum = 1;handleQuery()">
+          <el-option :label="item.name" :value="item.id" v-for="(item, index) in SupplierList" :key="index" />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button
           type="primary"
@@ -287,6 +292,7 @@ import {publicFileGetUrl} from "@/api/common";
 import {getToken, getSign} from "@/utils/auth";
 import SendGoods from "./components/SendGoods";
 import { randomStr20 } from '@/utils/util'
+import { getSupplierList } from '@/api/business/supplier'
 export default {
   name: "Deliver",
   components: {
@@ -306,6 +312,7 @@ export default {
         endTime: "",
         status: "",
         tel: "",
+        supplierId: "",
       },
       // 分页
       pageParams: {
@@ -336,12 +343,20 @@ export default {
       fileSaveUrl: '',
       reqData: {},
       responseData:'',
+      SupplierList: [],
     };
   },
   created() {
     this.getList();
+    this.getSupplierItems()
   },
   methods: {
+    //获取供应商
+    getSupplierItems(){
+      getSupplierList('',{}).then(res => {
+        this.SupplierList = res && res.rows
+      })
+    },
     handleClose(done) {
       this.$confirm('确认关闭?')
         .then(_ => {
@@ -469,6 +484,7 @@ export default {
         endTime: "",
         status: "",
         tel: "",
+        supplierId: "",
       };
       this.state = "no"
       this.tradeTimeArr = [];