马宇豪
2024-02-23 4cfbfd1b425f7b22b876ae6cae95c4fc29ae6bfb
盘库修改
已修改31个文件
1164 ■■■■■ 文件已修改
src/api/warehouse.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/warning.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flow/inStorage.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flow/outStorage.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cityESS.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cityInAndOut.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/citySaleStatistics.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/dailySaleReport.vue 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/enterpriseESS.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/enterpriseSaleStatistics.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/generation.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/person.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/personDetail.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/product.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/race.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/cityEntryStatistics.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/cityOutStatistics.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/components/statePurchaseDetail.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/enterpriseEntryStatistics.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/enterpriseOutStatistics.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/enterprisePurchaseStatistics.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/enterpriseSale.vue 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/stock/statePurchaseStatistics.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/trouble/selfexam.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/usermng/product.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/components/enterpriseStock.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/stockAnalyse.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/stockManage.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/stockSupervision.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warning/purchase.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warning/stock.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/warehouse.js
@@ -92,6 +92,18 @@
    })
}
// 各企业存货汇总信息
export function listStockHzDataByStorehouseId(params) {
    return request({
        headers: {
            'Authorization': getToken()
        },
        url: process.env.BASE_API + '/reserveManage/select/stockDetailBySidAndEid',
        method: 'get',
        params: params || {}
    })
}
// 进行盘库
export function updateStorehouseData(data) {
    return request({
src/api/warning.js
@@ -87,3 +87,14 @@
        params: params || {}
    })
}
export function setSolved(data) {
    return request({
        headers: {
            'Authorization': getToken()
        },
        url: process.env.BASE_API + '/mendAlarm',
        method: 'post',
        data
    })
}
src/views/flow/inStorage.vue
@@ -61,17 +61,17 @@
                <div style="display: block">
                    <div class="basic_search" style="padding-top: 10px;">
                    <span>按时间查询:</span>
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                    >
                    </el-date-picker>
                        <el-date-picker
                            value-format="yyyy-MM-dd HH:mm:ss"
                            v-model="validTime"
                            type="daterange"
                            :default-time="['00:00:00','23:59:59']"
                            :picker-options="pickerOptions"
                            range-separator="-"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期"
                        >
                        </el-date-picker>
                </div>
                    <div class="basic_search" style="padding-top: 10px;margin-left: 15px">
                        <span>安全监管分类:</span>
@@ -250,14 +250,6 @@
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                picker.$emit('pick', [start, end]);
              }
            }, {
              text: '最近三个月',
              onClick(picker) {
                const end = new Date();
                const start = new Date();
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                picker.$emit('pick', [start, end]);
              }
            }]
          },
        }
@@ -379,9 +371,24 @@
                    transportcert: '',
                },
            }
            this.validTime = ['', '']
            this.initValidTime()
            this.getInStorageData()
        },
        searchProductSearch(){
            this.listQuery.pageIndex = 1
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32){
                this.$message({
                    type: 'warning',
                    message: '时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getInStorageData()
        },
@@ -396,6 +403,13 @@
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportInStorage(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -534,11 +548,9 @@
            }
        },
      initValidTime(){
        const start = new Date();
        const end = new Date();
        start.setTime(end.getTime() - 3600 * 1000 * 24 * 0);
        this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
          const end = new Date();
          this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      }
    },
src/views/flow/outStorage.vue
@@ -67,7 +67,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -228,14 +228,6 @@
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                picker.$emit('pick', [start, end]);
              }
            }, {
              text: '最近三个月',
              onClick(picker) {
                const end = new Date();
                const start = new Date();
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                picker.$emit('pick', [start, end]);
              }
            }]
          },
            listQuery: {
@@ -380,9 +372,24 @@
                    transportcert: '',
                },
            }
            this.validTime = ['', '']
            this.initValidTime()
            this.getOutStorageData()
        },
        searchProductSearch(){
            this.listQuery.pageIndex = 1
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32){
                this.$message({
                    type: 'warning',
                    message: '时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getOutStorageData()
        },
@@ -396,6 +403,13 @@
        },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportOutStorage(this.listQuery)
            if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
                this.$message({
@@ -526,11 +540,9 @@
            }
        },
      initValidTime(){
        const start = new Date();
        const end = new Date();
        start.setTime(end.getTime() - 3600 * 1000 * 24 * 6);
        this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
          const end = new Date();
          this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      }
    },
src/views/purchase/cityESS.vue
@@ -38,7 +38,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        range-separator="-"
                        start-placeholder="开始日期"
@@ -51,7 +51,7 @@
                  <el-date-picker
                      value-format="yyyy-MM-dd HH:mm:ss"
                      v-model="validTime2"
                      type="datetimerange"
                      type="daterange"
                      :default-time="['00:00:00','23:59:59']"
                      range-separator="-"
                      start-placeholder="开始日期"
@@ -157,8 +157,10 @@
    },
    created() {
        // this.getProductList()
        this.initValidTime()
        this.getProvince()
        this.changeArea("province");
        // this.getProductList()
    },
    watch: {
    },
@@ -193,6 +195,17 @@
        },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
                this.listQuery.filter.starttime2 = this.validTime2[0]
                this.listQuery.filter.endtime2 = this.validTime2[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
                this.listQuery.filter.starttime2 = ''
                this.listQuery.filter.endtime2 = ''
            }
            let res = await getCityESSListData(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -240,6 +253,14 @@
        formatJson(filterVal, jsonData) {
            return jsonData.map(v => filterVal.map(j => v[j]))
        },
        initValidTime(){
            const end = new Date();
            this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
            this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            this.validTime2[0] = end.toISOString().slice(0, 10) + " 00:00:00";
            this.validTime2[1] = end.toISOString().slice(0, 10) + " 23:59:59";
        },
        async getProvince(){
@@ -316,9 +337,29 @@
                    endtime2: '',
                },
            }
            this.validTime = ['','']
            this.validTime2 = ['','']
            this.initValidTime()
            this.getProductList()
        },
        searchProductSearch(){
            this.listQuery.pageIndex = 1
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const date3 = new Date(this.validTime2[0]);
            const date4 = new Date(this.validTime2[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            const differenceInMs2 = Math.abs(date4 - date3);
            const differenceInDays2 = differenceInMs2 / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32 || differenceInDays2 > 32){
                this.$message({
                    type: 'warning',
                    message: '查询时间或对比时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getProductList()
        },
src/views/purchase/cityInAndOut.vue
@@ -7,7 +7,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -51,7 +51,7 @@
                        <span class="click-color" @click="openDetailDialog(scope.row.name,validTime,listQuery.filter.safetysupervision)">{{scope.row.name}}</span>
                    </template>
                </el-table-column>
                <el-table-column label="进货数量(箱)" prop="innum" align="center">
                <el-table-column label="入库数量(箱)" prop="innum" align="center">
                </el-table-column>
                <el-table-column label="出货数量(箱)" prop="outnum" align="center">
                </el-table-column>
@@ -128,14 +128,6 @@
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                picker.$emit('pick', [start, end]);
              }
            }, {
              text: '最近三个月',
              onClick(picker) {
                const end = new Date();
                const start = new Date();
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                picker.$emit('pick', [start, end]);
              }
            }]
          },
        }
@@ -178,6 +170,13 @@
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportArea(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -237,6 +236,18 @@
        },
        searchCityInOutSearch(){
            this.listQuery.pageIndex = 1
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32){
                this.$message({
                    type: 'warning',
                    message: '时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getCityInOutList()
        },
@@ -249,11 +260,14 @@
            this.getCityInOutList()
        },
      initValidTime(){
        const start = new Date();
        const end = new Date();
        start.setTime(end.getTime() - 3600 * 1000 * 24 * 6);
        this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
        // const start = new Date();
        // const end = new Date();
        // start.setTime(end.getTime() - 3600 * 1000 * 24 * 6);
        // this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        // this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
          const end = new Date();
          this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      }
    },
}
src/views/purchase/citySaleStatistics.vue
@@ -7,7 +7,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -152,14 +152,6 @@
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
            }
@@ -200,10 +192,15 @@
            showCityDetail(city){
                this.$refs.citySale.showCitySaleDetail(this.listQuery.filter.starttime,this.listQuery.filter.endtime,this.listQuery.filter.enterprisename,this.listQuery.filter.safetysupervision,city)
            },
            refresh(){
                this.getPersonProductList()
            },
            async exportToExcel(){
                if( this.validTime !== null ){
                    this.listQuery.filter.starttime = this.validTime[0]
                    this.listQuery.filter.endtime = this.validTime[1]
                }else{
                    this.listQuery.filter.starttime = ''
                    this.listQuery.filter.endtime = ''
                }
                let res = await exportCity(this.listQuery)
                if(res.data.code === '200'){
                    if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -271,9 +268,24 @@
                        itemcode:'',
                    },
                }
                this.validTime = ['', '']
                this.initValidTime()
                this.getPersonProductList()
            },
            searchProductSearch(){
                this.listQuery.pageIndex = 1
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getPersonProductList()
            },
@@ -287,30 +299,8 @@
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            }
        },
    }
src/views/purchase/dailySaleReport.vue
@@ -3,14 +3,21 @@
      <div class="filter-container" style="padding: 20px">
        <el-row>
          时间:&emsp;&emsp;
          <el-date-picker
            v-model="dateRange"
            type="datetimerange"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :clearable="false"
            :default-time="['00:00:00','23:59:59']">
          </el-date-picker>
<!--          <el-date-picker-->
<!--            v-model="dateRange"-->
<!--            type="date"-->
<!--            start-placeholder="开始日期"-->
<!--            end-placeholder="结束日期"-->
<!--            :clearable="false"-->
<!--            :default-time="['00:00:00','23:59:59']">-->
<!--          </el-date-picker>-->
            <el-date-picker
                v-model="currentDate"
                value-format="yyyy-MM-dd"
                type="date"
                @change="changeDate"
                placeholder="选择日期">
            </el-date-picker>
            <el-button class="filter-item" style="margin-left: 10px;margin-bottom: 0" type="primary" icon="el-icon-back"
                       @click="dayForward">前一天</el-button>
            <el-button class="filter-item" style="margin-left: 10px;margin-bottom: 0" type="primary" icon="el-icon-right"
@@ -96,6 +103,7 @@
    name: "dailySaleReport",
    data(){
      return{
        currentDate: '',
        dateRange:[],
        startDate:'',
        endDate:'',
@@ -110,8 +118,9 @@
      }
    },
    mounted() {
      this.queryDateHandle();
    created() {
      this.queryDateHandle()
        this.getReportList()
    },
    methods:{
      // queryHandle(){
@@ -167,50 +176,36 @@
      },
      dayForward(){
        if (this.dateRange != null){
          const start = this.dateRange[0];
          const end = this.dateRange[1];
          start.setTime(start.getTime() - 3600 * 1000 * 24);
          end.setTime(end.getTime() - 3600 * 1000 * 24);
          start.setHours(0);
          start.setMinutes(0);
          start.setSeconds(0);
          end.setHours(23);
          end.setMinutes(59);
          end.setSeconds(59);
          this.dateRange = [start,end]
            const start = new Date(this.currentDate);
            start.setDate(start.getDate() - 1);
            this.currentDate = start.toISOString().slice(0, 10)
            this.dateRange[0] = start.toISOString().slice(0, 10) + " 00:00:00";
            this.dateRange[1] = start.toISOString().slice(0, 10) + " 23:59:59";
            this.getReportList()
        }
      },
      dayBackward(){
        if (this.dateRange != null){
          const start = this.dateRange[0];
          const end = this.dateRange[1];
          start.setTime(start.getTime() + 3600 * 1000 * 24);
          end.setTime(end.getTime() + 3600 * 1000 * 24);
          start.setHours(0);
          start.setMinutes(0);
          start.setSeconds(0);
          end.setHours(23);
          end.setMinutes(59);
          end.setSeconds(59);
          this.dateRange = [start,end]
            const start = new Date(this.currentDate);
            start.setDate(start.getDate() + 1);
            this.currentDate = start.toISOString().slice(0, 10)
            this.dateRange[0] = start.toISOString().slice(0, 10) + " 00:00:00";
            this.dateRange[1] = start.toISOString().slice(0, 10) + " 23:59:59";
            this.getReportList()
        }
      },
      queryDateHandle(){
        const end = new Date();
        const start = new Date();
        start.setHours(0);
        start.setMinutes(0);
        start.setSeconds(0);
        end.setHours(23);
        end.setMinutes(59);
        end.setSeconds(59);
        this.dateRange.push(start,end);
        this.startDate = start;
        this.endDate = end;
        this.getReportList()
          const end = new Date();
          this.currentDate = end.toISOString().slice(0, 10)
          this.dateRange[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.dateRange[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      },
        changeDate(){
          console.log(this.currentDate,555)
            this.dateRange[0] = this.currentDate + " 00:00:00"
            this.dateRange[1] = this.currentDate + " 23:59:59"
            this.getReportList()
        },
      sortChange(param){
        this.sort = param.prop;
        this.order = param.order;
src/views/purchase/enterpriseESS.vue
@@ -66,14 +66,14 @@
            <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="validTime"
                type="datetimerange"
                type="daterange"
                :default-time="['00:00:00','23:59:59']"
                :picker-options="pickerOptions"
                range-separator="-"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
            >
          </el-date-picker>
            </el-date-picker>
        </div>
        <div class="basic_search" style="padding-top: 10px">
          <span>安全监管分类:</span>
@@ -208,14 +208,6 @@
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }]
        },
      }
@@ -256,6 +248,13 @@
      },
      async exportToExcel(){
          if( this.validTime !== null ){
              this.listQuery.filter.starttime = this.validTime[0]
              this.listQuery.filter.endtime = this.validTime[1]
          }else{
              this.listQuery.filter.starttime = ''
              this.listQuery.filter.endtime = ''
          }
        let res = await getEnterpriseESSExportData(this.listQuery)
        if(res.data.code === '200'){
          if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -386,9 +385,23 @@
            itemcode: '',
          },
        }
          this.initValidTime()
          this.getProductList()
      },
      searchProductSearch(){
          this.listQuery.pageIndex = 1
          const date1 = new Date(this.validTime[0]);
          const date2 = new Date(this.validTime[1]);
          const differenceInMs = Math.abs(date2 - date1);
          const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
          if(differenceInDays > 32){
              this.$message({
                  type: 'warning',
                  message: '时间跨度超过一个月的,请联系管理员查询数据'
              })
              return
          }
        this.getProductList()
      },
@@ -401,11 +414,14 @@
        this.getProductList()
      },
      initValidTime(){
        const start = new Date();
        const end = new Date();
        start.setTime(end.getTime() - 3600 * 1000 * 24 * 6);
        this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
        // const start = new Date();
        // const end = new Date();
        // start.setTime(end.getTime() - 3600 * 1000 * 24 * 6);
        // this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        // this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
          const end = new Date();
          this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      }
    },
  }
src/views/purchase/enterpriseSaleStatistics.vue
@@ -43,7 +43,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -191,14 +191,6 @@
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
            }
@@ -243,6 +235,13 @@
            },
            async exportToExcel(){
                if( this.validTime !== null ){
                    this.listQuery.filter.starttime = this.validTime[0]
                    this.listQuery.filter.endtime = this.validTime[1]
                }else{
                    this.listQuery.filter.starttime = ''
                    this.listQuery.filter.endtime = ''
                }
                let res = await exportEnterpriseSaleStatistics(this.listQuery)
                if(res.data.code === '200'){
                    if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -346,8 +345,23 @@
                        district: '',
                    },
                }
                this.validTime = ['', '']
                this.initValidTime()
                this.getPersonProductList()
            },
            searchProductSearch(){
                this.listQuery.pageIndex = 1
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getPersonProductList()
            },
@@ -361,30 +375,8 @@
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            }
        },
    }
src/views/purchase/generation.vue
@@ -268,6 +268,13 @@
        })
      },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportPerson(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
src/views/purchase/person.vue
@@ -8,7 +8,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -277,14 +277,6 @@
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                picker.$emit('pick', [start, end]);
              }
            }, {
              text: '最近三个月',
              onClick(picker) {
                const end = new Date();
                const start = new Date();
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                picker.$emit('pick', [start, end]);
              }
            }]
          },
        }
@@ -294,7 +286,6 @@
      uploadDialog
    },
    created() {
        console.log('Component created:', this.$options.name);
      this.initValidTime()
      this.getPersonProductList()
      this.getProvince()
@@ -342,6 +333,13 @@
        async exportToExcel(){
            this.reClickTip = true
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportPerson(this.listQuery)
            if(res.data.code === '200'){
                this.reClickTip = false
@@ -425,9 +423,24 @@
                    nation:''
                },
            }
            this.validTime = ['', '']
            this.initValidTime()
            this.getPersonProductList()
        },
        searchProductSearch(){
            this.listQuery.pageIndex = 1
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32){
                this.$message({
                    type: 'warning',
                    message: '时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getPersonProductList()
        },
@@ -440,11 +453,9 @@
            this.getPersonProductList()
        },
      initValidTime(){
        const start = new Date();
        const end = new Date();
        start.setTime(end.getTime() - 3600 * 1000 * 24 * 0);
        this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
          const end = new Date();
          this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      },
      async getProvince(){
        let res = await getProvinceListData()
src/views/purchase/personDetail.vue
@@ -284,6 +284,13 @@
        })
      },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportPerson(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
src/views/purchase/product.vue
@@ -66,7 +66,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -219,14 +219,6 @@
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                picker.$emit('pick', [start, end]);
              }
            }, {
              text: '最近三个月',
              onClick(picker) {
                const end = new Date();
                const start = new Date();
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                picker.$emit('pick', [start, end]);
              }
            }]
          },
            //总计
@@ -278,6 +270,13 @@
        },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportProduct(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -412,9 +411,24 @@
                    itemcode: '',
                },
            }
            this.validTime = ['', '']
            this.initValidTime()
            this.getProductList()
        },
        searchProductSearch(){
            this.listQuery.pageIndex = 1
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32){
                this.$message({
                    type: 'warning',
                    message: '时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getProductList()
        },
@@ -427,11 +441,9 @@
            this.getProductList()
        },
      initValidTime(){
        const start = new Date();
        const end = new Date();
        start.setTime(end.getTime() - 3600 * 1000 * 24 * 0);
        this.validTime[0] = [start.getFullYear(), start.getMonth() + 1, start.getDate()].join("-") + " 00:00:00" ;
        this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate()].join("-") +" 23:59:59";
          const end = new Date();
          this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
          this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
      }
    },
}
src/views/purchase/race.vue
@@ -284,6 +284,13 @@
        })
      },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportPerson(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
src/views/stock/cityEntryStatistics.vue
@@ -7,7 +7,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -144,14 +144,6 @@
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
            }
@@ -191,11 +183,15 @@
                }
                this.listLoading = false
            },
            refresh(){
                this.getPersonProductList()
            },
            async exportToExcel(){
                if( this.validTime !== null ){
                    this.listQuery.filter.starttime = this.validTime[0]
                    this.listQuery.filter.endtime = this.validTime[1]
                }else{
                    this.listQuery.filter.starttime = ''
                    this.listQuery.filter.endtime = ''
                }
                let res = await exportCityEntryStatistics(this.listQuery)
                if(res.data.code === '200'){
                    if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -261,9 +257,24 @@
                        itemcode:'',
                    },
                }
                this.validTime = ['','']
                this.initValidTime()
                this.getPersonProductList()
            },
            searchProductSearch(){
                this.listQuery.pageIndex = 1
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getPersonProductList()
            },
@@ -277,30 +288,8 @@
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            }
        },
    }
src/views/stock/cityOutStatistics.vue
@@ -7,7 +7,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -144,14 +144,6 @@
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
            }
@@ -191,11 +183,15 @@
                }
                this.listLoading = false
            },
            refresh(){
                this.getPersonProductList()
            },
            async exportToExcel(){
                if( this.validTime !== null ){
                    this.listQuery.filter.starttime = this.validTime[0]
                    this.listQuery.filter.endtime = this.validTime[1]
                }else{
                    this.listQuery.filter.starttime = ''
                    this.listQuery.filter.endtime = ''
                }
                let res = await exportCityOutStatistics(this.listQuery)
                if(res.data.code === '200'){
                    if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -261,9 +257,24 @@
                        itemcode:'',
                    },
                }
                this.validTime = ['','']
                this.initValidTime()
                this.getPersonProductList()
            },
            searchProductSearch(){
                this.listQuery.pageIndex = 1
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getPersonProductList()
            },
@@ -277,30 +288,8 @@
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            }
        },
    }
src/views/stock/components/statePurchaseDetail.vue
@@ -82,6 +82,7 @@
            },
            async getStatepifaBox(stateName,startTime,endTime){
                this.listLoading = true
                this.statePurchaseDetailData = []
                const listQuery = {
                    startTime: startTime,
                    endTime: endTime,
src/views/stock/enterpriseEntryStatistics.vue
@@ -43,7 +43,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -189,14 +189,6 @@
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
            }
@@ -244,6 +236,13 @@
            },
            async exportToExcel(){
                if( this.validTime !== null ){
                    this.listQuery.filter.starttime = this.validTime[0]
                    this.listQuery.filter.endtime = this.validTime[1]
                }else{
                    this.listQuery.filter.starttime = ''
                    this.listQuery.filter.endtime = ''
                }
                let res = await exportEnterpriseEntryStatistics(this.listQuery)
                if(res.data.code === '200'){
                    if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -345,8 +344,23 @@
                        district: '',
                    },
                }
                this.validTime = ['','']
                this.initValidTime()
                this.getPersonProductList()
            },
            searchProductSearch(){
                this.listQuery.pageIndex = 1
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getPersonProductList()
            },
@@ -360,30 +374,8 @@
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            }
        },
    }
src/views/stock/enterpriseOutStatistics.vue
@@ -43,7 +43,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -189,14 +189,6 @@
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
            }
@@ -239,11 +231,15 @@
                }
                this.listLoading = false
            },
            refresh(){
                this.getPersonProductList()
            },
            async exportToExcel(){
                if( this.validTime !== null ){
                    this.listQuery.filter.starttime = this.validTime[0]
                    this.listQuery.filter.endtime = this.validTime[1]
                }else{
                    this.listQuery.filter.starttime = ''
                    this.listQuery.filter.endtime = ''
                }
                let res = await exportEnterpriseOutStatistics(this.listQuery)
                if(res.data.code === '200'){
                    if(res.data.result === null ||res.data.result === [] || res.data.result.length === 0){
@@ -345,8 +341,23 @@
                        district: '',
                    },
                }
                this.validTime = ['','']
                this.initValidTime()
                this.getPersonProductList()
            },
            searchProductSearch(){
                this.listQuery.pageIndex = 1
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getPersonProductList()
            },
@@ -360,31 +371,9 @@
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
            }
        },
    }
</script>
src/views/stock/enterprisePurchaseStatistics.vue
@@ -43,7 +43,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -166,16 +166,7 @@
                            end.setTime(end.getTime() + 3600 * 1000 * 24)
                            picker.$emit('pick', [start, end])
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date()
                            const start = new Date()
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 89)
                            end.setTime(end.getTime() + 3600 * 1000 * 24)
                            picker.$emit('pick', [start, end])
                        }
                    },]
                    }]
                },
                provinceList:[],
                cityList:[],
@@ -345,37 +336,29 @@
                    city: '',
                    district: '',
                }
                this.validTime = ['','']
                this.initValidTime()
                this.getpifaBox()
            },
            searchProductSearch(){
                const date1 = new Date(this.validTime[0]);
                const date2 = new Date(this.validTime[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getpifaBox()
            },
            initValidTime(){
                const end = new Date();
                if(end.getDate() - 1 === 0){
                    this.validTime[0] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() , this.returnDay(end.getMonth(),end.getFullYear())].join("-") +" 23:59:59";
                }else if(end.getDate() - 1 === 0 && end.getMonth() === 0){
                    this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") +" 23:59:59";
                }
                else{
                    this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00" ;
                    this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") +" 23:59:59";
                }
            },
            returnDay(value,year){
                if(value === 1 || value === 3|| value === 5 || value === 7 || value === 8 || value === 10 || value === 12){
                    return 31
                }else if(value === 2){
                    if(year % 4 === 0){
                        return 29
                    }else{
                        return 28
                    }
                }else{
                    return 30
                }
                this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
                this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            },
            showDetail(param){
                if( this.validTime !== null ){
src/views/stock/enterpriseSale.vue
@@ -4,12 +4,15 @@
            <el-row>
                时间:&emsp;&emsp;
                <el-date-picker
                    value-format="yyyy-MM-dd HH:mm:ss"
                    v-model="dateRange"
                    type="datetimerange"
                    type="daterange"
                    :default-time="['00:00:00','23:59:59']"
                    :picker-options="pickerOptions"
                    range-separator="-"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    :clearable="false"
                    :default-time="['00:00:00','23:59:59']">
                >
                </el-date-picker>
                <el-button class="filter-item" style="margin-left: 15px;" type="primary" icon="el-icon-refresh"
                           @click="refreshHandle">刷新
@@ -220,6 +223,25 @@
                    community:'',
                    enterpriseType:'',
                },
                pickerOptions: {
                    shortcuts: [{
                        text: '最近一周',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近一个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
              totalRow:{}
            }
        },
@@ -228,7 +250,7 @@
            outStorageDetail,
            saleDetail
        },
        mounted(){
        created(){
            getManufacturerTree().then(res=>{
                this.manufacturerTree=(res.data) ;
            });
@@ -300,10 +322,35 @@
                this.$router.push({path:'/sale/info',query:{enterpriseNumber:enterpriseNumber,beginDate:this.queryForm.beginDate,endDate:this.queryForm.endDate}})
            },
            refreshHandle: function () {
                this.currentPage = 1
                this.queryForm = {
                    name: '',
                    beginDate:'',
                    endDate:'',
                    province:'',
                    city:'',
                    area:'',
                    town:'',
                    community:'',
                    enterpriseType:'',
                }
                this.dateRange = []
                this.queryDateHandle()
                this.getSaleList();
            },
            queryHandle: function () {
                this.currentPage = 1;
                const date1 = new Date(this.dateRange[0]);
                const date2 = new Date(this.dateRange[1]);
                const differenceInMs = Math.abs(date2 - date1);
                const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
                if(differenceInDays > 32){
                    this.$message({
                        type: 'warning',
                        message: '时间跨度超过一个月的,请联系管理员查询数据'
                    })
                    return
                }
                this.getSaleList();
            },
            handleSizeChange: function (val) {
@@ -400,15 +447,20 @@
            },
            queryDateHandle(){
                // const end = new Date();
                // const start = new Date();
                // start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                // start.setHours(0);
                // start.setMinutes(0);
                // start.setSeconds(0);
                // this.dateRange.push(start,end);
                // this.queryForm.beginDate = start;
                // this.queryForm.endDate = end;
                const end = new Date();
                const start = new Date();
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                start.setHours(0);
                start.setMinutes(0);
                start.setSeconds(0);
                this.dateRange.push(start,end);
                this.queryForm.beginDate = start;
                this.queryForm.endDate = end;
                const start = new Date(end);
                start.setDate(start.getDate() - 7);
                this.dateRange[0] = start.toISOString().slice(0, 10) + " 00:00:00";
                this.dateRange[1] = end.toISOString().slice(0, 10) + " 23:59:59";
            },
            exportAllHandle () {
                const _this = this;
src/views/stock/statePurchaseStatistics.vue
@@ -43,7 +43,7 @@
                    <el-date-picker
                        value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="validTime"
                        type="datetimerange"
                        type="daterange"
                        :default-time="['00:00:00','23:59:59']"
                        :picker-options="pickerOptions"
                        range-separator="-"
@@ -171,14 +171,6 @@
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                        picker.$emit('pick', [start, end]);
                    }
                }]
@@ -324,7 +316,6 @@
        },
        reset() {
            this.initValidTime()
            this.listQuery = {
                startTime: '',
                endTime: '',
@@ -333,38 +324,57 @@
                city: '',
                district: '',
            }
            this.validTime = ['', '']
            this.initValidTime()
            this.getRegionPifaBox()
        },
        searchProductSearch() {
            const date1 = new Date(this.validTime[0]);
            const date2 = new Date(this.validTime[1]);
            const differenceInMs = Math.abs(date2 - date1);
            const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24)
            if(differenceInDays > 32){
                this.$message({
                    type: 'warning',
                    message: '时间跨度超过一个月的,请联系管理员查询数据'
                })
                return
            }
            this.getRegionPifaBox()
        },
        initValidTime() {
            // const end = new Date();
            // if (end.getDate() - 1 === 0) {
            //     this.validTime[0] = [end.getFullYear(), end.getMonth(), this.returnDay(end.getMonth(), end.getFullYear())].join("-") + " 00:00:00";
            //     this.validTime[1] = [end.getFullYear(), end.getMonth(), this.returnDay(end.getMonth(), end.getFullYear())].join("-") + " 23:59:59";
            // } else if (end.getDate() - 1 === 0 && end.getMonth() === 0) {
            //     this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00";
            //     this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") + " 23:59:59";
            // } else {
            //     this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00";
            //     this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 23:59:59";
            // }
            const end = new Date();
            if (end.getDate() - 1 === 0) {
                this.validTime[0] = [end.getFullYear(), end.getMonth(), this.returnDay(end.getMonth(), end.getFullYear())].join("-") + " 00:00:00";
                this.validTime[1] = [end.getFullYear(), end.getMonth(), this.returnDay(end.getMonth(), end.getFullYear())].join("-") + " 23:59:59";
            } else if (end.getDate() - 1 === 0 && end.getMonth() === 0) {
                this.validTime[0] = [end.getFullYear() - 1, 12, 31].join("-") + " 00:00:00";
                this.validTime[1] = [end.getFullYear() - 1, 12, 31].join("-") + " 23:59:59";
            } else {
                this.validTime[0] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 00:00:00";
                this.validTime[1] = [end.getFullYear(), end.getMonth() + 1, end.getDate() - 1].join("-") + " 23:59:59";
            }
            // const start = new Date(end);
            // start.setDate(start.getDate() - 7);
            // this.validTime[0] = start.toISOString().slice(0, 10) + " 00:00:00";
            this.validTime[0] = end.toISOString().slice(0, 10) + " 00:00:00";
            this.validTime[1] = end.toISOString().slice(0, 10) + " 23:59:59";
        },
        returnDay(value, year) {
            if (value === 1 || value === 3 || value === 5 || value === 7 || value === 8 || value === 10 || value === 12) {
                return 31
            } else if (value === 2) {
                if (year % 4 === 0) {
                    return 29
                } else {
                    return 28
                }
            } else {
                return 30
            }
        },
        // returnDay(value, year) {
        //     if (value === 1 || value === 3 || value === 5 || value === 7 || value === 8 || value === 10 || value === 12) {
        //         return 31
        //     } else if (value === 2) {
        //         if (year % 4 === 0) {
        //             return 29
        //         } else {
        //             return 28
        //         }
        //     } else {
        //         return 30
        //     }
        // },
        showDetail(param) {
            if( this.validTime !== null ){
                if(param.subRegionData){
src/views/trouble/selfexam.vue
@@ -264,6 +264,13 @@
        },
        async exportToExcel(){
            if( this.validTime !== null ){
                this.listQuery.filter.starttime = this.validTime[0]
                this.listQuery.filter.endtime = this.validTime[1]
            }else{
                this.listQuery.filter.starttime = ''
                this.listQuery.filter.endtime = ''
            }
            let res = await exportSelfExam(this.listQuery)
            if(res.data.code === '200'){
                if(res.data.result === null || res.data.result === []){
src/views/usermng/product.vue
@@ -104,7 +104,7 @@
            <span>{{ scope.row.specification }}</span>
          </template>
        </el-table-column>
        <el-table-column label="单挂(个)含药量" prop="explosiveContent" align="center" sortable="custom">
        <el-table-column label="箱含药量" prop="explosiveContent" align="center" sortable="custom">
          <template slot-scope="scope">
            <span>{{ scope.row.explosiveContent }}</span>
          </template>
src/views/warehouse/components/enterpriseStock.vue
@@ -55,7 +55,7 @@
<script>
    import {computePageCount} from "@/utils";
    import {listStockDataByStorehouseId} from "../../../api/warehouse";
    import {listStockDataByStorehouseId, listStockHzDataByStorehouseId} from "../../../api/warehouse";
    export default {
        name: "index",
@@ -70,8 +70,13 @@
        },
        components: {},
        methods:{
            open(data){
                this.getList(data.id || data.storehouseId)
            open(data,type){
                console.log(data,'data')
                if(type == '监管' || type == '管理'){
                    this.getList(data.id || data.storehouseId)
                }else{
                    this.getHzList(data)
                }
                this.dialogVisible = true
            },
            async getList(id){
@@ -87,6 +92,25 @@
                    })
                }
                this.listLoading = false
            },
            async getHzList(data){
                this.listLoading = true
                let res = await listStockHzDataByStorehouseId({sid: data.storehouseId,eid: data.gId})
                if(res.data.code === "200"){
                    if(res.data.result && res.data.result.stockDataInfos.length>0 && res.data.result.reserveName && res.data.result.storehouseName){
                        this.listData = res.data.result.stockDataInfos
                        this.title = '库区:'+res.data.result.reserveName +' 仓库:'+ res.data.result.storehouseName + '各企业库存情况'
                    }else{
                        this.listData = []
                        this.title = '暂无企业库存情况'
                    }
                }else{
                    this.$message({
                        type:'warning',
                        message:res.data.message
                    })
                }
                this.listLoading = false
            }
        }
    }
src/views/warehouse/stockAnalyse.vue
@@ -106,7 +106,7 @@
                <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width" fixed="right">
                    <template slot-scope="scope" v-if="scope.row.storehouseName !== '本库区合计' && scope.row.storehouseName !== '合计'">
                        <el-button type="text" @click="showEnterprises(scope.row)">查看详情</el-button>
                        <el-button type="text" @click="delData(scope.row)">删除</el-button>
<!--                        <el-button type="text" @click="delData(scope.row)">删除</el-button>-->
                    </template>
                </el-table-column>
            </el-table>
@@ -187,7 +187,7 @@
                        }
                    })
                }
                console.log(gData,'gData')
                if(Array.isArray(gData)){
                    gData.map(item=>{
                        if(Array.isArray(item.storehouse.warehouses) && item.storehouse.whTotal){
@@ -212,7 +212,8 @@
                            item.storehouse.warehouses.map((subRes, subIndex)=>{
                                let content2 = {}
                                content2 = subRes
                                content2['gId'] = item.enterpriseId
                                content2['gId'] = item.gId
                                content2['ggId'] = item.enterpriseId
                                content2['gStock'] = item.gStock
                                content2['gName'] = item.gName
                                content2['gNum'] = item.gNum || null
@@ -237,6 +238,7 @@
                        topId: null,
                        reserveName: total.name,
                        gId: null,
                        ggId: null,
                        gName: total.name,
                        gStock: total.enterpriseTotalStock,
                        storehouseName: total.name,
@@ -260,6 +262,7 @@
                    }
                    this.stateStockData.push(totalObj)
                }
                console.log(this.stateStockData,'G')
            }else{
                this.$message({
                    type:'warning',
@@ -281,7 +284,7 @@
        showEnterprises(row){
            const t = this
            t.$refs.enterStock.open(row)
            t.$refs.enterStock.open(row,'汇总')
        },
        openStock(type,data){
src/views/warehouse/stockManage.vue
@@ -58,8 +58,8 @@
                </el-table-column>
                <el-table-column label="是否允许盘库" align="center" width="120" class-name="small-padding fixed-width" fixed="right">
                    <template slot-scope="scope">
                        <span type="text" v-if="scope.row.inventoryStatus == 1">否</span>
                        <el-button v-if="scope.row.inventoryStatus == 0" type="text" @click="stockEdit(scope.row)">允许盘库</el-button>
                        <span type="text" v-if="scope.row.inventoryStatus == 0">否</span>
                        <el-button v-if="scope.row.inventoryStatus == 1" type="text" @click="stockEdit(scope.row)">盘库</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -97,12 +97,19 @@
            stateStockData: [],
            rowIndex: '-1',
            OrderIndexArr: [],
            hoverOrderArr: []
            hoverOrderArr: [],
            isAdmin: false
        }
    },
    created() {
        const t = this
        t.getList()
        const roles = JSON.parse(Cookies.get('roles'))
        if(roles.find(i=>i.name == '管理员'|| i.name == '监管部门')){
            this.isAdmin = true
        }else{
            this.isAdmin = false
        }
    },
    mounted() {
    },
@@ -158,7 +165,7 @@
        },
        showEnterprises(row){
            const t = this
            t.$refs.enterStock.open(row)
            t.$refs.enterStock.open(row,'管理')
        },
        deliverUsage(row){
            const t = this
src/views/warehouse/stockSupervision.vue
@@ -86,6 +86,7 @@
                <el-table-column label="库容量/箱" prop="approvedReserves" align="center"></el-table-column>
                <el-table-column label="核药量/kg" prop="nuclearDose" align="center"></el-table-column>
                <el-table-column label="当前总库存" prop="totalStock" align="center"></el-table-column>
<!--                <el-table-column label="存药量" prop="totalStock" align="center"></el-table-column>-->
                <el-table-column label="爆竹类(箱)" prop="firecracker" align="center"></el-table-column>
                <el-table-column label="喷花类(箱)" prop="spray" align="center"></el-table-column>
                <el-table-column label="旋转类(箱)" prop="rotation" align="center"></el-table-column>
@@ -267,7 +268,7 @@
        showEnterprises(row){
            const t = this
            t.$refs.enterStock.open(row)
            t.$refs.enterStock.open(row,'监管')
        },
        openStock(type,data){
@@ -333,6 +334,7 @@
                        message: res.data.message
                    })
                }
                await this.getList()
            }).catch(() => {
                this.getList()
            })
src/views/warning/purchase.vue
@@ -167,6 +167,12 @@
                        type="text"
                        @click="showDetailHandle(scope.row)"
                    >购买明细</el-button>
                    <el-button
                        v-if="isAdmin"
                        :disabled="scope.row.ismend == 1"
                        type="text"
                        @click="markSolved(scope.row)"
                    >标记已处理</el-button>
                </template>
                </el-table-column>
            </el-table>
@@ -246,7 +252,7 @@
<script>
    import { mapGetters } from 'vuex'
    import { getPurchaseWarningList, getPurchaseDetailList } from '@/api/warning'
    import { getPurchaseWarningList, getPurchaseDetailList, setSolved } from '@/api/warning'
    import { parseTime, computePageCount } from '@/utils'
    import { parseError } from '@/utils/messageDialog'
    import Cookies from 'js-cookie'
@@ -281,6 +287,7 @@
                tableKey: 0,
                stockWarningData: null,
                listLoading: true,
                isAdmin: false,
                queryForm: {
                    warnlevel: '',
                    customer:'',
@@ -357,6 +364,12 @@
        created() {
            this.setDateRange();
            this.getPurchaseWarningList()
            const roles = JSON.parse(Cookies.get('roles'))
            if(roles.find(i=>i.name == '管理员'|| i.name == '监管部门')){
                this.isAdmin = true
            }else{
                this.isAdmin = false
            }
        },
        methods: {
            setDateRange(){
@@ -480,6 +493,29 @@
                this.detailCurrentPage = 1
                this.getEntryDetailInfoList()
            },
            markSolved(row){
                MessageBox.confirm('确定将该数据标记为已处理', '标记已处理', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(async () => {
                    const res = await setSolved({id: row.id})
                    if(res.data.code === "200"){
                        this.$message({
                            type:'success',
                            message: '标记成功'
                        })
                        this.getPurchaseWarningList()
                    }else{
                        this.$message({
                            type:'warning',
                            message:res.data.message
                        })
                    }
                }).catch(() => {
                    console.log('已取消')
                })
            },
            handleDetailSizeChange: function(val) {
                this.detailPageSize = val
                this.detailCurrentPage = 1
src/views/warning/stock.vue
@@ -235,6 +235,20 @@
                        <span>{{ scope.row.modifieddate | parseTime('{y}-{m}-{d}') }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    label="操作"
                    align="center"
                    width="100"
                    class-name="small-padding fixed-width"
                    v-if="isAdmin"
                ><template slot-scope="scope">
                    <el-button
                        type="text"
                        :disabled="scope.row.ismend == 1"
                        @click="markSolved(scope.row)"
                    >标记已处理</el-button>
                </template>
                </el-table-column>
            </el-table>
            <br>
            <el-pagination
@@ -256,7 +270,7 @@
<script>
    import { mapGetters } from 'vuex'
    import { getStockWarningList } from '@/api/warning'
    import { getStockWarningList, setSolved } from '@/api/warning'
    import { parseTime, computePageCount } from '@/utils'
    import { parseError } from '@/utils/messageDialog'
    import Cookies from 'js-cookie'
@@ -316,6 +330,7 @@
                    }
                ],
                dateRange: [],
                isAdmin: false,
                pickClear:false,
                pickerOptions: {
                    shortcuts: [{
@@ -368,6 +383,12 @@
            this.getProvince();
            this.getDictionaryEnterpriseType();
            this.getCertWarningList();
            const roles = JSON.parse(Cookies.get('roles'))
            if(roles.find(i=>i.name == '管理员'|| i.name == '监管部门')){
                this.isAdmin = true
            }else{
                this.isAdmin = false
            }
        },
        methods: {
            setDateRange(){
@@ -491,6 +512,30 @@
                this.currentPage = val
                this.getCertWarningList()
            },
            markSolved(row){
                MessageBox.confirm('确定将该数据标记为已处理', '标记已处理', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(async () => {
                    const res = await setSolved({id: row.id})
                    if(res.data.code === "200"){
                        this.$message({
                            type:'success',
                            message: '标记成功'
                        })
                        this.getCertWarningList()
                    }else{
                        this.$message({
                            type:'warning',
                            message:res.data.message
                        })
                    }
                }).catch(() => {
                    console.log('已取消')
                })
            },
            getBtnPermission(btnType) {
                return checkBtnPermission(this.userType, btnType)
            },