Pārlūkot izejas kodu

feat:付款批量审核、发票数据下载

snow 1 gadu atpakaļ
vecāks
revīzija
3e6bd6c227

+ 1 - 1
src/apis/service/customerService/paymentApply/index.js

@@ -12,7 +12,7 @@ export default {
   feedList: (data, params) => http(api + "consultbidlist", data, "post", params),
   // 分页查询
   list: (data, params) => http(api + "list", data, "post", params),
-  batch: (data, params) => http(api + "batch", data, "post", params),
+  batch: (data, params) => http(api + "batchCheck", data, "post", params),
 
 
   // 添加

+ 1 - 1
src/config/env.development.js

@@ -8,7 +8,7 @@ module.exports = {
 
   },
   webUrl: 'http://project.web.caixiao365.com/#/test-good-share?id=',
-  fileURL: `https://api2.edu.futurelab.tv`,
+  fileURL: 'http://hwpro.test241.wanyuhengtong.com/',
   shareWebUrl: 'http://post.web.caixiao365.com/?prod=1&outCode=',
   // 分仓
   // wmUrl: 'http://stockwm.test241.wanyuhengtong.com',

+ 30 - 17
src/views/customerService/demandOrder/columns.js

@@ -113,38 +113,56 @@ const demandDetailColumns = [
     span:8
   },
   {
-    prop:'shortname',
-    label:'活动城市',
+    prop: 'companyName',
+    label: '公司名称',
     span:8
   },
   {
-    prop:'require_item',
-    label:'活动需求',
+    prop:'require_item_name',
+    label:'活动名称',
+    span:8
+  },
+  {
+    prop:'shortname',
+    label:'意向位置',
     span:8
   },
   {
     prop:'act_time',
     label:'活动时间',
-    span:8
+    span:8,
+    _slot_:'act_time'
   },  
   {
     prop:'participant',
     label:'活动人数',
+    span:8,
+    _slot_: 'participant'
+  },
+  {
+    prop:'budget_name',
+    label:'活动预算',
     span:8
   },
   {
     prop:'req_demand',
     label:'项目需求',
-    span:8
+    span:8,
+    _slot_:'req_demand_name'
   },
   {
-    prop:'req_endtime',
-    label:'招标截止时间',
+    prop:'req_tel',
+    label:'联系电话',
     span:8
   },
   {
-    prop: 'companyName',
-    label: '需求公司',
+    prop: 'update_time',
+    label: '创建时间',
+    span: 8
+  },
+  {
+    prop:'req_endtime',
+    label:'招标截止时间',
     span:8
   },
   {
@@ -157,20 +175,15 @@ const demandDetailColumns = [
     label:'活动执行供应商',
     span:8
   },
-  {
-    prop:'budget',
-    label:'需求预算',
-    span:8
-  },
   {
     prop:'TODO',
     label:'预付类型',
-    span:8,
+    span:12,
     _slot_:'prepaymentType'
   },
   {
     label:'预付金额',
-    span:8,
+    span:12,
     _slot_:'prepaymentAmount'
   },
   {

+ 29 - 0
src/views/customerService/demandOrder/components/demandDetail/index.vue

@@ -20,6 +20,10 @@
         </div>
       </template>
 
+      <template #act_time>
+        {{sitem.act_time}} , 共{{sitem.act_day_count}}天
+      </template>
+
       <template #prepaymentAmount>
         <div class="flex-between align-center" style="height:18px;padding-top:5px">
           <p style="margin-left:5px">{{sitem.prepay_amount}}</p>
@@ -31,6 +35,23 @@
         </div>
       </template>
 
+      <template #participant>
+        <span v-if="Number(sitem.participant_max) === 0">{{
+          sitem.participant_min
+        }}+</span>
+        <span v-else>
+          {{sitem.participant_min}} ~ {{sitem.participant_max}}
+        </span> 人
+      </template>
+
+      <template #req_demand_name>
+        <el-tooltip placement="top" :content="'项目需求 : ' + sitem.req_demand_name.map(({name}) => name).join('+')">
+          <i class="text">
+             {{ sitem.req_demand_name.map(({name}) => name).join(" + ") }}
+          </i>
+        </el-tooltip>
+      </template>
+
       <template #currentStatus>
         <div class="align-center" style="height:18px; padding-top:5px">
           <el-tag size="mini" style="margin-left:5px">{{
@@ -103,3 +124,11 @@ export default {
   }
 }
 </script>
+
+<style scoped>
+.text{
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>

+ 51 - 8
src/views/customerService/invoiceApproval/index.vue

@@ -120,7 +120,7 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
-                  @click="downloadInvoice"
+                  @click="download"
                 >
                   下载发票数据
                 </el-button>
@@ -217,6 +217,7 @@ import { listCol, statusList } from "./columns";
 import { mapGetters } from "vuex";
 import { invoiceTypeList } from '@/assets/js/statusList';
 import InvoiceModal from "./components/invoice-modal.vue"
+import urlConfig from "@/apis/url-config";
 
 
 
@@ -264,6 +265,8 @@ export default {
       visible: false,
       isDetail: false,
       modelId: 0,
+            //全局url
+      fileUrl: urlConfig.baseURL,
       parmValue: {
         create_start:"", // 创建开始时间
         create_end:"", // 创建结束时间
@@ -295,7 +298,6 @@ export default {
       },
       // 表格 - 列参数
       columns: listCol,
-
       resultValue: "", //处理结果
     };
   },
@@ -332,13 +334,54 @@ export default {
       this.visible = false
       this.searchList()
     },
-    downloadInvoice(){
-      if(this.selected.length === 0){
-        this.$message.warning('至少选择一个发票申请')
-        return
+    async download() {
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/invoiceInfo/invoiceDown",
+          responseType: "blob",
+          data: model,
+          headers: {
+            // 'Content-Type': 'multipart/form-data',
+            // Accept: "application/vnd.ms-excel"
+            Accept: httpType,
+          },
+        })
+          .then((res) => {
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  type: httpType,
+                })
+              );
+              let link = document.createElement("a");
+              link.style.display = "none";
+              link.href = url;
+              let excelName = "发票数据.xlsx";
+              link.setAttribute("download", excelName);
+              document.body.appendChild(link);
+              link.click();
+              link.remove();
+              window.URL.revokeObjectURL(url); //释放掉blob对象
+              this.$message.success(`导出成功!`);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            } else {
+              this.$message.error(res.data.message);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            }
+          })
+          .catch((error) => {
+            console.log(error);
+            this.loading = false;
+          });
       }
-
-      const ids = this.selected.map(({id}) => id)
     },
     onBatchApprovalInvoice(){
       if(this.selected.length === 0){

+ 2 - 1
src/views/customerService/paymentApply/index.vue

@@ -342,7 +342,8 @@ export default {
         type:'warning'
       }).then(async () => {
         const { code } = await asyncRequest.batch({
-          ids:this.selected.map(({id}) => id)
+          id: this.selected.map(({id}) => id),
+          status:3
         })
         if(code !== 1) return
         this.searchList()

+ 54 - 2
src/views/platformService/invoice/index.vue

@@ -121,7 +121,7 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
-                  @click="downloadInvoice"
+                  @click="download"
                 >
                   下载发票数据
                 </el-button>
@@ -172,7 +172,7 @@
         </template>
 
         <template #demandOrder="{ scope }">{{
-            scope.row.platformsettle.reqCode
+            scope.row.platformsettle ? scope.row.platformsettle.reqCode : ""
           }}</template>
 
         <template #status="{ scope }">
@@ -212,6 +212,7 @@ import { listCol, statusList } from "./columns";
 import { mapGetters } from "vuex";
 import { invoiceTypeList } from '@/assets/js/statusList';
 import InvoiceModal from "./components/invoice-modal.vue"
+import urlConfig from "@/apis/url-config";
 
 
 /**
@@ -250,6 +251,8 @@ export default {
       selected:[],
       select: "1",
       s_input: "",
+                  //全局url
+      fileUrl: urlConfig.baseURL,
       invoiceTypeList,
       customerCode: [], //客户公司code
       statusList,
@@ -325,6 +328,55 @@ export default {
       if(code !== 1) return
       this.visible = false
       this.searchList()
+    },
+        async download() {
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/invoiceInfo/invoiceDown",
+          responseType: "blob",
+          data: model,
+          headers: {
+            // 'Content-Type': 'multipart/form-data',
+            // Accept: "application/vnd.ms-excel"
+            Accept: httpType,
+          },
+        })
+          .then((res) => {
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  type: httpType,
+                })
+              );
+              let link = document.createElement("a");
+              link.style.display = "none";
+              link.href = url;
+              let excelName = "发票数据.xlsx";
+              link.setAttribute("download", excelName);
+              document.body.appendChild(link);
+              link.click();
+              link.remove();
+              window.URL.revokeObjectURL(url); //释放掉blob对象
+              this.$message.success(`导出成功!`);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            } else {
+              this.$message.error(res.data.message);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            }
+          })
+          .catch((error) => {
+            console.log(error);
+            this.loading = false;
+          });
+      }
     },
     onBatchApprovalInvoice(){
       if(this.selected.length === 0){