zhangyuewww 2 tahun lalu
induk
melakukan
5581501b49

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -173,3 +173,5 @@ export const API_GET_CUSACTIONINFO='/cargoTitleDetails/selectCusActionInfo'
 export const API_GET_CUSACTIONINFO_REJECT='/cargoTitleDetails/api/rejection'
 // 货权转入
 export const API_SET_ROLLIN='/cargoTitleDetails/api/toChangeInto'
+//查看自己负责的仓库new
+export const API_GET_WAREHOUSENAME_NEW='/warehouseBaseInfo/selectWarehouseSelfNew'

+ 4 - 1
src/model/warehouse/index.js

@@ -84,7 +84,8 @@ import {
     API_GETROLL,
     API_GET_CUSACTIONINFO,
     API_GET_CUSACTIONINFO_REJECT,
-    API_SET_ROLLIN
+    API_SET_ROLLIN,
+    API_GET_WAREHOUSENAME_NEW
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -259,3 +260,5 @@ export const getcusationinfo = appRx.get(API_GET_CUSACTIONINFO, errorCatcher, er
 export const rejectcusationinfo = appRx.post(API_GET_CUSACTIONINFO_REJECT, errorCatcher, errorHandle, filter)
 // 货源转入
 export const setrollin = appRx.post(API_SET_ROLLIN, errorCatcher, errorHandle, filter)
+//查看自己负责的仓库new
+export const getwarehousNameNew = appRx.get(API_GET_WAREHOUSENAME_NEW,errorCatcher, errorHandle, filter)

+ 49 - 14
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -4,14 +4,14 @@
     <el-scrollbar style="height: 100%">
       <el-row>
         <el-col style="padding-left: 15px; width:48%" :span="16">
-          <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button>
+          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
+          <!-- <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button> -->
           <ws-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待结算</ws-button>
           <ws-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">已结算</ws-button>
-          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
-          <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="handleAudit()">通过
+          <!-- <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="handleAudit()">通过
           </ws-button>
           <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="handlereject()">驳回
-          </ws-button>
+          </ws-button> -->
           <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.payment`" @click="handlepayment">
             付款</ws-button>
           <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="addRemarks()">备注
@@ -20,9 +20,9 @@
           </ws-button>
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:300px" :span="8">
-          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
-            type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
-            end-placeholder="截止时间">
+          <el-date-picker value-format="yyyy-MM-dd" v-model="value2" type="daterange" align="right" unlink-panels :clearable="false"
+            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
+            class="data_css" @change="datechange">
           </el-date-picker>
         </el-col>
         <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
@@ -126,14 +126,14 @@
         <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable"></el-table-column>
         <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
         <el-table-column class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
-        <el-table-column label="状态" prop="status">
+        <!-- <el-table-column label="状态" prop="status">
           <template slot-scope="scope">
             <span v-if="scope.row.approveStatus != null">{{
               scope.row.approveStatus
             }}</span>
             <span v-else>{{ scope.row.status }}</span>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
 
       <!-- 页数 -->
@@ -283,7 +283,7 @@
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
-        searchType: '1',
+        searchType: '',
         searchTypeText: '未完成',
         searchKeyWord: '',
         contractType: 2,
@@ -358,6 +358,7 @@
       }
     },
     activated() {
+      this.getPassYearFormatDate()
       this.getContractList()
       this.showType = this.isShow
     },
@@ -670,6 +671,7 @@
           this.startDate = ''
           this.endDate = ''
         }
+        this.getContractList()
         this.getList()
       },
       //审核
@@ -885,10 +887,12 @@
       getContractList() {
         getStockPurchaseContractNoList({
             compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            roleFlag: this.roleFlag,
-            contractNo: this.contractNo,
+            startDate: this.startDate,
+            endDate: this.endDate,
+            // currentPage: this.currentPage,
+            // pageSize: this.pageSize,
+            // roleFlag: this.roleFlag,
+            // contractNo: this.contractNo,
           })
           .toPromise()
           .then((response) => {
@@ -909,7 +913,38 @@
       // handleDownload(file) {
       //   console.log(file)
       // },
+    getPassYearFormatDate() {
+      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
 
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+      } else {
+        this.startDate = localStorage.getItem('startDate')
+        this.endDate = localStorage.getItem('endDate')
+      }
+      this.value2 = [this.startDate, this.endDate]
+    },
       handlePictureCardPreviewDis(file) {
         this.depositUrl = file.data.url
         this.dialogVisible = true

+ 40 - 8
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -14,7 +14,7 @@
           </ws-button>
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:400px" :span="8">
-          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
+          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'  :clearable="false"
             type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
             end-placeholder="截止时间">
           </el-date-picker>
@@ -186,8 +186,8 @@
         </el-table-column>
         <el-table-column class="table_td" prop="collectionDate" label="收款日期">
         </el-table-column>
-        <el-table-column class="table_td" prop="status" label="状态">
-        </el-table-column>
+        <!-- <el-table-column class="table_td" prop="status" label="状态">
+        </el-table-column> -->
       </el-table>
       <!-- 他运 -->
       <el-table v-if='orderList.deliverType!=1' class="wenzi" :data="saleList.records"
@@ -314,8 +314,8 @@
         </el-table-column>
         <el-table-column class="table_td" prop="collectionDate" label="收款日期">
         </el-table-column>
-        <el-table-column class="table_td" prop="status" label="状态">
-        </el-table-column>
+        <!-- <el-table-column class="table_td" prop="status" label="状态">
+        </el-table-column> -->
       </el-table>
 
 
@@ -563,6 +563,7 @@
       month = month.toString().padStart(2, '0');
       date = date.toString().padStart(2, '0');
       this.collectionDate = `${year}-${month}-${date}`;
+      this.getPassYearFormatDate()
       this.getList()
       this.showType = this.isShow
     },
@@ -1311,9 +1312,8 @@
           })
         getStockSaleContractNoList({
             compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            roleFlag: this.roleFlag,
+            startDate: this.startDate,
+            endDate: this.endDate,
           })
           .toPromise()
           .then((response) => {
@@ -1322,6 +1322,38 @@
             this.options = this.contractNoList
           })
       },
+      getPassYearFormatDate() {
+      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+      } else {
+        this.startDate = localStorage.getItem('startDate')
+        this.endDate = localStorage.getItem('endDate')
+      }
+      this.value2 = [this.startDate, this.endDate]
+    },
       //收款截图
       handleRemove(file) {
         console.log(file)

+ 29 - 21
src/views/warehousenew/warehouseManagementList.vue

@@ -59,7 +59,10 @@
         </div>
         </div>
         <div v-for="(item , index) in totalReserves" :key="index" class="reservesInfo">
-          <div class="reservesInfo_item" v-if="warehouseType == '1'"><div class="reservesInfo_GoodsName">{{item.goodsName}}(吨)</div><span class="reservesInfo_Amount">{{item.stockNum == 0 ? "-":item.stockNum}}</span></div>
+          <div class="reservesInfo_item" v-if="warehouseType == '1'"><div class="reservesInfo_GoodsName">{{item.goodsName}}</div>
+          <span class="reservesInfo_Amount">{{item.stockNum == 0 ? "-":item.stockNum}}(吨)</span><br/>
+          <span v-if="item.stockNum&&item.cost" class="reservesInfo_Amount">{{item.cost == 0 ? "-":item.cost}}(元/吨)</span>
+          </div>
           <div class="reservesInfo_item" v-if="warehouseType == '2'"><div class="reservesInfo_GoodsName">{{item.goodsName}}(吨)</div><span class="reservesInfo_Amount">{{item.surplus == 0 ? "-":item.surplus}}</span></div>
         </div>
            <div ref="myEchart7" style="height: 250px; width:96%;border-radius: 4px; border:1px solid #D8DCE6; padding: 10px;" class="column"></div>
@@ -303,7 +306,7 @@
     getResponsible,
     deletewarehouse,
     postInWeight,
-    getwarehousName,
+    getwarehousNameNew,
     getbintype
   } from '@/model/warehouse/index'
   import mapDrag from '@/components/mapdrag/warehouseMap'
@@ -608,14 +611,14 @@
        //导出历史库存记录
        exportHistoricalData() {
         // 获取仓库
-        xiala({
-            compId: localStorage.getItem('ws-pf_compId'),
-            warehouseType: this.warehouseType,
-          })
-          .toPromise()
-          .then((response) => {
-            this.packtypeList = response
-          })
+        // xiala({
+        //     compId: localStorage.getItem('ws-pf_compId'),
+        //     warehouseType: this.warehouseType,
+        //   })
+        //   .toPromise()
+        //   .then((response) => {
+        //     this.packtypeList = response
+        //   })
         let date = new Date()
         var year = date.getFullYear();
         var month = date.getMonth() + 1;
@@ -1151,9 +1154,8 @@
                 this.responsible = response[0].staffName
               })
           // 仓库名称
-            getwarehousName({
-              compId: localStorage.getItem('ws-pf_compId'),
-              warehouseType: this.warehouseType,
+            getwarehousNameNew({
+              compId: localStorage.getItem('ws-pf_compId')
             })
               .toPromise()
               .then((response) => {
@@ -1162,20 +1164,26 @@
                 this.warehouseInfo.warehouseName = this.warehouseXiaLa[0].warehouseName
                 this.monitorUrl1 = this.warehouseXiaLa[0].monitorUrl1
                 this.monitorUrl2 = this.warehouseXiaLa[0].monitorUrl2
-                this.getList1()
-              })
-            xiala({
-              compId: localStorage.getItem('ws-pf_compId'),
-            })
-              .toPromise()
-              .then((response) => {
                 for(var tmp = 0 ; tmp < response.length ; tmp++){
                   if(response[tmp].warehouseType == '2'){
                     response[tmp].warehouseName = response[tmp].warehouseName + ' (临)'
                   }
                 }
                 this.warehouseAllXiaLa = response
+                this.getList1()
               })
+            // xiala({
+            //   compId: localStorage.getItem('ws-pf_compId'),
+            // })
+            //   .toPromise()
+            //   .then((response) => {
+            //     for(var tmp = 0 ; tmp < response.length ; tmp++){
+            //       if(response[tmp].warehouseType == '2'){
+            //         response[tmp].warehouseName = response[tmp].warehouseName + ' (临)'
+            //       }
+            //     }
+            //     this.warehouseAllXiaLa = response
+            //   })
         getsponsible({
             compId: localStorage.getItem('ws-pf_compId')
           }).toPromise()
@@ -1350,7 +1358,7 @@
     }
     .reservesInfo_Amount{
       color: #323233;
-      font-size: 16px;
+      font-size: 14px;
       font-weight: 600;
 
     }