snow 1 year ago
parent
commit
522f9655e9

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.37e9ae8e.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.39cb6c05.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.0670985e.js


BIN
dist/static/js/app.0670985e.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2e2bbc1f.js


BIN
dist/static/js/app.2e2bbc1f.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.c6a36e9c.js


BIN
dist/static/js/app.c6a36e9c.js.gz


+ 0 - 0
dist/wel.jpg → dist/welcome.jpg


+ 0 - 0
public/wel.jpg → public/welcome.jpg


+ 19 - 8
src/components/newReport/src/date-picker-title.vue

@@ -1,5 +1,5 @@
 <template>
-  <div  class="picker-title">
+  <div class="picker-title">
     <p style="margin:0">{{ title }}</p>
     <div style="display:flex;align-items: center;justify-content: flex-end;margin:10px 0px;">
       <period-date-picker :start="date[0]" :end="date[1]" size="mini" width="150px" @timeReturned="time($event)" />
@@ -10,6 +10,7 @@
 
 <script>
 import PeriodDatePicker from "@/components/period-date-picker";
+import dayjs from "dayjs";
 export default {
   name:'PickerTitle',
   props:['title'],
@@ -19,14 +20,19 @@ export default {
       date: []
     }
   },
-  watch:{
-    date: function(val) {
-      const newVal = val.filter(v => v !== "")
-      if (newVal && newVal.length === 2) {
-        this.$emit("refresh", val);
-      }
-    }
+  mounted(){
+    const current = dayjs(new Date()).format("YYYY-MM-DD")
+    this.date = [current + " 00:00:00", current + " 23:59:59"]
+    this.$emit("refresh", this.date);
   },
+  // watch:{
+  //   date: function(val) {
+  //     const newVal = val.filter(v => v !== "")
+  //     if (newVal && newVal.length === 2) {
+  //       this.$emit("refresh", val);
+  //     }
+  //   }
+  // },
   methods:{
     async time(e) {
       const { startTime, endTime } = e;
@@ -46,6 +52,11 @@ export default {
         this.date = [this.start, this.end]
       }
 
+      const val = this.date.filter(v => v !== "")
+
+      if(val && val.length === 2){
+        this.$emit("refresh", val);
+      }
     }
   }
 }

+ 42 - 6
src/components/newReport/src/notDeliverGood.vue

@@ -1,5 +1,20 @@
 <template>
   <div class="SalesReportRejectedNew" v-loading="loading">
+    <div class="picker-title">
+      <p style="margin:0">{{ title }}</p>
+      <div style="display:flex;align-items: center;justify-content: flex-end;margin:10px 0px;">
+        <el-date-picker
+          :pickerOptions="pickerOptions"
+          style="width:150px"
+          v-model="year" 
+          size="mini" 
+          type="year" 
+          placeholder="选择年份" 
+          @change="handleChange" 
+        />
+      </div>
+    </div>
+    
     <el-table :data="tableData" size="mini" border :span-method="objectSpanMethod">
       <el-table-column  width="120px" label="申请人所属部门" prop="name" />
 
@@ -27,6 +42,7 @@
 <script>
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
+import dayjs from "dayjs";
 import { addition, division } from "./_utils";
 
 function unit2TenThousand(value){
@@ -38,7 +54,7 @@ function unit2TenThousand(value){
 export default {
   name: "Consult",
   mixins: [setHeight],
-  props: ['date'],
+  props: ['title'],
   watch: {
     date: function(val) {
       this.dataTime = val;
@@ -49,7 +65,15 @@ export default {
   },
   data() {
     return {
+      pickerOptions: {
+        disabledDate(time) {
+          //  return time.getTime() > Date.now() - 8.64e7;
+          return time.getTime() > Date.now();
+        }
+      },
       tableData:[],
+      date:"",
+      year:"",
       months: ['1','2','3','4','5','6','7','8','9','10','11','12'],
       loading:false,
       statusOptions: [
@@ -61,6 +85,7 @@ export default {
     };
   },
   async created() {
+    this.handleChange(dayjs(new Date()).format('YYYY'))
     window.onresize = () => {
       this.getHeight();
     };
@@ -69,7 +94,7 @@ export default {
     this.$nextTick(() => {
       this.getHeight();
     });
-    this.searchList();
+    // this.searchList();
   },
   methods: {
     getStatus(row){
@@ -78,6 +103,16 @@ export default {
       return (this.statusOptions.find(({id}) => {
         return id === row.result[key]['1'].send_status
       }) || {}).label || '--'
+    },
+    handleChange(val){
+      if(!val){
+        this.$message.warning("请选择年份!")
+        return
+      }
+
+      const year = dayjs(val).format('YYYY')
+      this.year = year;
+      this.searchList();
     },
         //获取要合并的行数
     getSpanNumber(data, prop) {
@@ -135,7 +170,7 @@ export default {
         return addition(prev, (row.result[key]['1'] || {}).num || 0)
       },0)
     },
-    getField(month,row,isTotalPrice){
+    getField(month, row, isTotalPrice){
       if(Array.isArray(row.result[month])) return 0
       if(month === 'status') {
         return 0
@@ -143,19 +178,20 @@ export default {
 
       if(isTotalPrice){
         const { total_price } =  row.result[month]
-
         return Number(total_price) === 0 ? "0元" : unit2TenThousand(total_price) + "元"
       }
 
       return (row.result[month]['1'] || {}).num || 0
     },
     async searchList() {
+      // if(!this.year){
+      //   return
+      // }
       this.loading = true;
       this.tableData = [];
 
       const res = await asyncRequest.wsendOrder({
-        start: this.date[0] || "",
-        end: this.date[1] || ""
+        start_y: this.year,
       });
 
       if (res.code === 0 && res.data && res.data.result.length > 0) {

+ 1 - 1
src/components/newReport/src/purchase.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="SalesReportRejectedNew" v-loading="loading">
     <el-table :data="tableData" size="mini" border>
-      <el-table-column label="采购员" prop="cgder" width="110px" />
+      <el-table-column label="业务公司" prop="cgder" width="200px" />
       <el-table-column width="110px" label="采购单总量" prop="total_cgd" />
       <el-table-column label="库存品" prop="tag_1" />
       <el-table-column label="非库存品" prop="tag_2" />

+ 42 - 10
src/components/newReport/src/sendExp.vue

@@ -1,10 +1,23 @@
 <template>
   <div class="SalesReportRejectedNew" v-loading="loading">
+    <div class="picker-title">
+      <p style="margin:0">{{ title }}</p>
+      <div style="display:flex;align-items: center;justify-content: flex-end;margin:10px 0px;">
+        <el-date-picker
+          :pickerOptions="pickerOptions"
+          style="width:150px"
+          v-model="day" 
+          size="mini" 
+          type="date" 
+          placeholder="截止日期" 
+          @change="handleChange" 
+        />
+      </div>
+    </div>
+
     <el-table :data="tableData" size="mini" border :span-method="objectSpanMethod">
       <el-table-column width="70px" label="部门" prop="name" />
-
-      <el-table-column width="140px" show-overflow-tooltip label="供应商负责人" prop="0" />
-      
+      <el-table-column width="90px" show-overflow-tooltip label="商品类型" prop="0" />
       <el-table-column label="时效" align="center">
         <el-table-column label="A24小时" prop="1" />
         <el-table-column label="B48小时" prop="2" />
@@ -27,10 +40,12 @@
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
 import { addition } from "./_utils";
+import dayjs from "dayjs";
+
 export default {
   name: "Consult",
   mixins: [setHeight],
-  props: ['date'],
+  props: ['date', 'title'],
   watch: {
     date: function(val) {
       this.dataTime = val;
@@ -42,7 +57,14 @@ export default {
   data() {
     return {
       loading:false,
-      tableData:[]
+      tableData:[],
+      day:"",
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+          //  return time.getTime() > Date.now() - 8.64e7;
+        }
+      }
     };
   },
   async created() {
@@ -51,19 +73,29 @@ export default {
     };
   },
   mounted() {
+    this.handleChange(dayjs(new Date()).format('YYYY-MM-DD'))
     this.$nextTick(() => {
       this.getHeight();
     });
-
-    this.searchList();
+    // this.searchList();
   },
   methods: {
     getTotal(row){
       const keys = ['1','2','3','4','5','6']
-      return keys.reduce((prev,key) => (
+      return keys.reduce((prev, key) => (
         addition(row[key], prev)
       ),0)
     },
+    handleChange(val){
+      if(!val){
+        this.$message.warning("请选择截止日期!")
+        return
+      }
+
+      const day = dayjs(val).format('YYYY-MM-DD')
+      this.day = day;
+      this.searchList();
+    },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (columnIndex == 0) {
         //合并相同的名字
@@ -112,8 +144,8 @@ export default {
       this.tableData = [];
 
       const res = await asyncRequest.outOrder({
-        start: this.date[0] || "",
-        end: this.date[1] || ""
+        // start: this.date[0] || "",
+        end: this.day
       });
 
       if (res.code === 0 && res.data && res.data.length > 0) {

+ 42 - 10
src/components/newReport/src/sendOrder.vue

@@ -1,9 +1,24 @@
 <template>
   <div class="SalesReportRejectedNew" v-loading="loading">
+    <div class="picker-title">
+      <p style="margin:0">{{ title }}</p>
+      <div style="display:flex;align-items: center;justify-content: flex-end;margin:10px 0px;">
+        <el-date-picker
+          :pickerOptions="pickerOptions"
+          style="width:150px"
+          v-model="day" 
+          size="mini" 
+          type="date" 
+          placeholder="截止日期" 
+          @change="handleChange" 
+        />
+      </div>
+    </div>
+
     <el-table :data="tableData" size="mini" border :span-method="objectSpanMethod">
       <el-table-column label="部门" width="70"   prop="name">
       </el-table-column>
-      <el-table-column width="140px" label="仓库负责人"  prop="0"  />
+      <el-table-column width="90px" label="商品类型"  prop="0"  />
       <el-table-column label="时效" align="center">
         <el-table-column label="A24小时" prop="1" />
         <el-table-column label="B48小时" prop="2" />
@@ -25,10 +40,11 @@
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
 import { addition } from "./_utils";
+import dayjs from "dayjs";
 export default {
   name: "Consult",
   mixins: [setHeight],
-  props: ['date'],
+  props: ['date', 'title'],
   watch: {
     date: function(val) {
       this.dataTime = val;
@@ -40,7 +56,14 @@ export default {
   data() {
     return {
       loading:false,
-      tableData:[]
+      tableData:[],
+      day:"",
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+          //  return time.getTime() > Date.now() - 8.64e7;
+        }
+      }
     };
   },
   async created() {
@@ -49,10 +72,9 @@ export default {
     };
   },
   mounted() {
-    this.$nextTick(() => {
-      this.getHeight();
-    });
-    this.searchList();
+    this.handleChange(dayjs(new Date()).format('YYYY-MM-DD'))
+    this.$nextTick(() => { this.getHeight() });
+    // this.searchList();
   },
   methods: {
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
@@ -68,7 +90,6 @@ export default {
     //获取要合并的行数
     getSpanNumber(data, prop) {
       //data要处理的数组,prop要合并的属性,比如name
-
       //数组的长度,有时候后台可能返回个null而不是[]
       let length = Array.isArray(data) ? data.length : 0;
       if (length > 0) {
@@ -104,13 +125,24 @@ export default {
         addition(row[key], prev)
       ),0)
     },
+    handleChange(val){
+      if(!val){
+        this.$message.warning("请选择截止日期!")
+        return
+      }
+
+      const day = dayjs(val).format('YYYY-MM-DD')
+      this.day = day;
+      this.searchList();
+    },
     async searchList() {
       this.loading = true;
       this.tableData = [];
 
       const res = await asyncRequest.outChildOrder({
-        start: this.date[0] || "",
-        end: this.date[1] || ""
+        // start: this.date[0] || "",
+        // end: this.date[1] || ""
+        end: this.day
       });
 
       if (res.code === 0 && res.data && res.data.length > 0) {

+ 11 - 4
src/components/newReport/src/theSales.vue

@@ -1,6 +1,7 @@
 <template>
-  <div class="SalesReportRejectedNew" v-loading="loading">
-    <el-table :data="tableData" size="mini" border>
+  <div class="SalesReportRejectedNew">
+    <date-picker-title :title="title" @refresh="handleRefresh" />
+    <el-table :data="tableData" size="mini" border v-loading="loading">
       <el-table-column type="index" width="40px" />
       <el-table-column label="产品编码" prop="good_code" width="160px" show-overflow-tooltip />
       <el-table-column label="产品名称" prop="good_name" min-width="160px" show-overflow-tooltip />
@@ -17,11 +18,13 @@
 <script>
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
+import DatePickerTitle from "./date-picker-title.vue";
 import { addition } from "./_utils";
 export default {
   name: "Consult",
   mixins: [setHeight],
-  props: ['date'],
+  components:{ DatePickerTitle },
+  props: ['date','title'],
   watch: {
     date: function(val) {
       this.dataTime = val;
@@ -33,7 +36,8 @@ export default {
   data() {
     return {
       loading: false,
-      tableData:[]
+      tableData:[],
+      date:[],
     };
   },
   async created() {
@@ -48,6 +52,9 @@ export default {
     this.searchList();
   },
   methods: {
+    handleRefresh(val){
+      this.date = val;
+    },
     async searchList() {
       this.loading = true;
       this.tableData = [];

+ 10 - 2
src/pages/accountsReceivable.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="SalesReportRejectedNew">
+  <div class="SalesReportRejectedNew" style="min-height:300px">
     <div v-if="!state.error && isShow">
       <div class="table-header" style="line-height:36px">万宇应收账款报表看板</div>
       <el-table
@@ -15,41 +15,49 @@
         <el-table-column label="业务公司" fixed="left" width="80" prop="depart">
           <template slot-scope="scope">{{scope.row.depart.split('@')[1] || '总计'}}</template>
         </el-table-column>
+
         <el-table-column label="应收账款" prop="wpay_fee" align="center" >
           <template slot-scope="scope">
              {{ unit2TenThousand(scope.row.wpay_fee) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="已开票未回票" prop="wpay_ainv_fee" align="center" >
           <template slot-scope="scope">
              {{ unit2TenThousand(scope.row.wpay_ainv_fee) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="未开票" prop="winv_fee" align="center">
           <template slot-scope="scope">
             {{ unit2TenThousand(scope.row.winv_fee) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="待开票" prop="inv_fee" align="center">
           <template slot-scope="scope">
             {{ unit2TenThousand(scope.row.inv_fee) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="已发货未开票" prop="winv_asend_fee" align="center">
           <template slot-scope="scope">
             {{ unit2TenThousand(scope.row.winv_asend_fee) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="未发货" prop="wpay_send_fee" align="center">
           <template slot-scope="scope">
             {{ unit2TenThousand(scope.row.wpay_send_fee) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="超60天已发货未开票" prop="winv_two_month" align="center">
           <template slot-scope="scope">
             {{ unit2TenThousand(scope.row.winv_two_month) }}
           </template>
         </el-table-column>
+        
         <el-table-column label="超180天应收账款" prop="wpay_six_month" align="center">
           <template slot-scope="scope">
             {{ unit2TenThousand(scope.row.wpay_six_month) }}
@@ -68,7 +76,7 @@
 import asyncRequest from "@/api/report";
 import userRequest from "@/api/index"
 import setHeight from "@/mixins/index";
-import { getOpenid, getParameterByName } from "../utils/auth";
+import { getOpenid, getParameterByName, removeOpenid, setOpenid } from "../utils/auth";
 import UnusualState from "@/components/unusual/index.vue"
 
 import { 

+ 1 - 1
src/pages/index.vue

@@ -19,7 +19,7 @@ export default {
         {label:'利润看板', link:'/?path=report'},
         {label:'应收账款', link:'/?path=accountsReceivable'},
         {label:'订单情况', link:'/?path=newReport'},
-        {label:'库存情况', link:'/?path=stock'}
+        {label:'发货情况', link:'/?path=stock'}
       ]
     }
   },

+ 1 - 1
src/pages/login.vue

@@ -9,7 +9,7 @@ export default {
   async mounted () {
       const path = (this.$route.query || {}).path
       const source = 'http://stat.caixiao365.com/'
-      const local = "http://localhost:8081/"
+      // const local = "http://localhost:8081/"
       const redirect_url = encodeURIComponent(source + (path ? `#/${path}` : ''))
       var state = 'wx_' + Math.random().toString(36).substr(2, 15)
       const scope = 'snsapi_userinfo'

+ 55 - 58
src/pages/stock.vue

@@ -1,36 +1,30 @@
 <template>
   <div class="new-report" v-loading="state.loading" style="min-height:300px">
     <div v-if="!state.error && isShow">
-      <div style="display:flex;justify-content:flex-end">
+      <!-- <div style="display:flex;justify-content:flex-end">
         <period-date-picker :start="date[0]" :end="date[1]" size="mini" width="150px" @timeReturned="time($event)" />
-      </div>
+      </div> -->
     
       <el-row :gutter="20">
         <el-col :xs="24">
-          <p class="title">1.无地址销售订单统计</p>
-          <not-deliver-good :date="date" />
+          <not-deliver-good :title="'1.无地址销售订单统计'" :date="date" />
         </el-col>
 
-
-        <!-- :sm="12" :md="12" :lg="12" :xl="12" -->
         <el-col :xs="24">
-          <p class="title">2.发货工单未发货时效统计</p>
-          <send-order :date="date" />
+          <!-- <p class="title">2.发货工单未发货时效统计</p> -->
+          <send-order :title="'2.发货工单未发货时效统计'" :date="date" />
         </el-col>
 
         <el-col :xs="24">
-          <p class="title">3.待采购备货统计</p>
-          <send-exp :date="date" />
+          <!-- <p class="title">3.待采购备货统计</p> -->
+          <send-exp :title="'3.待采购备货统计'" :date="date" />
         </el-col>
 
         <el-col :xs="24">
-          <p class="title">4.当日库存销售统计</p>
-          <the-sales :date="date" />
+          <!-- <p class="title">4.当日库存销售统计</p> -->
+          <the-sales :title="'4.当日库存销售统计'" :date="date" />
         </el-col>
-
-        <!-- :sm="12" :md="12" :lg="12" :xl="12"> -->
       </el-row>
-
     </div>
 
     <template v-else-if="!state.loading">
@@ -87,6 +81,7 @@ export default {
     };
   },
   mounted() {
+    document.body.style.position = "static"
     document.title = "库存情况"
     if(!getParameterByName('code')){ this.login() }else{
       this.requestUserinfo()
@@ -121,54 +116,55 @@ export default {
        this.state.loading = true;
        const openid = getOpenid()
        const code = getParameterByName('code')
-       const result = await userRequest.userinfo({ 
-          ...( openid ? { openid } :  { code })
-        })
-
-      // const result ={
-      // "code": 0,
-      // "message": "获取成功",
-      // "data": {
-		  //     "id": "1",
-		  //     "openid": "oOpc26KiZFBKIm7SB8knFGvov1qg",
-		  //     "mobile": "",
-		  //     "gender": "0",
-		  //     "nickname": "雪寒",
-		  //     "avatar": "",
-		  //     "subscribe_time": "2022-12-21 15:52:14",
-		  //     "addr": "\/\/",
-		  //     "status": "1",
-		  //     "is_show": ["1", "2", "4", "5"],
-		  //     "companyArr": [{
-		  //     	"companyNo": "GS2302231125079621",
-		  //     	"companyName": "北京百辰荣达国际科贸有限公司",
-		  //     	"info": [1,2]
-		  //     }, {
-		  //     	"companyNo": "GS2302231323386950",
-		  //     	"companyName": "北京泓源广诚国际商贸有限公司",
-		  //     	"info": [1,2]
-		  //     }, {
-		  //     	"companyNo": "GS2304031312553746",
-		  //     	"companyName": "北京锦兴弘昌科技有限公司",
-		  //     	"info": [1, 2]
-		  //     }, {
-		  //     	"companyNo": "GS2302231124114965",
-		  //     	"companyName": "北京普润心堂商贸有限公司",
-		  //     	"info": [1, 2]
-		  //     }, {
-		  //     	"companyNo": "GS2203161855277894",
-		  //     	"companyName": "北京万宇恒通国际科贸有限公司",
-		  //     	"info": [1, 2]
-		  //     }],
-		  //     "addtime": "2023-04-10 18:11:07",
-		  //     "updatetime": "2023-05-09 16:22:33"
-      // 	}
-      // }
+      //  const result = await userRequest.userinfo({ 
+      //     ...( openid ? { openid } :  { code })
+      //   })
+
+      const result ={
+      "code": 0,
+      "message": "获取成功",
+      "data": {
+		      "id": "1",
+		      "openid": "oOpc26KiZFBKIm7SB8knFGvov1qg",
+		      "mobile": "",
+		      "gender": "0",
+		      "nickname": "雪寒",
+		      "avatar": "",
+		      "subscribe_time": "2022-12-21 15:52:14",
+		      "addr": "\/\/",
+		      "status": "1",
+		      "is_show": ["1", "2", "4", "5"],
+		      "companyArr": [{
+		      	"companyNo": "GS2302231125079621",
+		      	"companyName": "北京百辰荣达国际科贸有限公司",
+		      	"info": [1,2]
+		      }, {
+		      	"companyNo": "GS2302231323386950",
+		      	"companyName": "北京泓源广诚国际商贸有限公司",
+		      	"info": [1,2]
+		      }, {
+		      	"companyNo": "GS2304031312553746",
+		      	"companyName": "北京锦兴弘昌科技有限公司",
+		      	"info": [1, 2]
+		      }, {
+		      	"companyNo": "GS2302231124114965",
+		      	"companyName": "北京普润心堂商贸有限公司",
+		      	"info": [1, 2]
+		      }, {
+		      	"companyNo": "GS2203161855277894",
+		      	"companyName": "北京万宇恒通国际科贸有限公司",
+		      	"info": [1, 2]
+		      }],
+		      "addtime": "2023-04-10 18:11:07",
+		      "updatetime": "2023-05-09 16:22:33"
+      	}
+      }
       
         this.state.loading = false
         switch(Number(result.code)){
           case 0:
            this.isShow =  (result.data.is_show || []).includes(5) || (result.data.is_show || []).includes('5')
+           console.log(this.isShow)
            setOpenid(result.data.openid)
            break
           default:
@@ -193,6 +189,7 @@ export default {
 .new-report {
   padding: 10px;
   box-sizing: border-box;
+  position: static;
 
   .title {
     padding-left: 5px;

Some files were not shown because too many files changed in this diff