Explorar o código

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan %!s(int64=2) %!d(string=hai) anos
pai
achega
3a96a4adaa

+ 1 - 1
src/components/WsUpload/index.vue

@@ -785,7 +785,7 @@ $ctrl-margin-left: 10px;
 /*  color: #ffffff;*/
 /*}*/
 
-.operate-bg:hover {
+.el-upload-list__item:hover .operate-bg {
   opacity: 0;
 }
 </style>

+ 59 - 13
src/views/home/index.vue

@@ -18,8 +18,11 @@
             <span class="title-text">易粮易运大数据分析平台</span>
           </div>
         </div>
-        <div class="timers ">
-
+        <div class="btn">
+         <div :class="btnIndex==1?'activeBtn':''" @click="selectData(1)" class="btn-style">新季</div>
+         <div :class="btnIndex==2?'activeBtn':''" @click="selectData(2)" class="btn-style">历史</div>  
+        </div>
+        <div class="timers">
           {{ dateYear }} {{ dateWeek }} {{ dateDay }}
           <i class=" blq-icon-shezhi02" style="margin-left:10px" @click="showSetting"></i>
         </div>
@@ -134,6 +137,8 @@ export default {
   },
   data() {
     return {
+      dataListTimer:null,
+      btnIndex:1,
       MapList:[],
       rightBottomDataList:[],
       rightCenterDataList:[],
@@ -159,10 +164,33 @@ export default {
   created() {
   },
   mounted() {
-    gChartsData({
+    this.timeFn();
+    this.selectData(1)
+
+    this.dataListTimer = setInterval(() => {
+      this.selectData(1)
+      }, 30000);
+    
+
+  },
+  beforeDestroy() {
+    clearInterval(this.timing);
+    clearInterval(this.dataListTimer);
+    
+  },
+  methods: {
+    selectData(type){
+      let _seachMoth = ''
+      this.btnIndex = type
+      if(type==2){
+        _seachMoth = '2021-10-10'  
+      }else{
+        _seachMoth = '2022-10-10'  
+      }
+      gChartsData({
       compId: localStorage.getItem('ws-pf_compId'),
       loadingstatus: 1,
-      seachMoth: '2022-10-10'
+      seachMoth: _seachMoth
     }).toPromise().then(res => {
       console.log('··············', res)
       this.leftTopDataList = res[0].biViewInfoList
@@ -181,17 +209,11 @@ export default {
       this.rightCenterDataList = res[7].biViewInfoList
       this.rightBottomDataList = res[8].contractManagementInfos
       this.MapList =  res[3].biViewInfoList
-      this.timeFn();
+      
       this.cancelLoading();
       this.china_map();
-
     })
-
-  },
-  beforeDestroy() {
-    clearInterval(this.timing);
-  },
-  methods: {
+    },
     //中国地图
     china_map() {
       
@@ -532,7 +554,7 @@ export default {
       right: 11%;
       transform: rotate(180deg);
     }
-
+  
     .timers {
       position: absolute;
       right: 0;
@@ -546,6 +568,15 @@ export default {
         cursor: pointer;
       }
     }
+    .btn{
+      position: absolute;
+      left: 0;
+      top: 30px;
+      font-size: 18px;
+      display: flex;
+      align-items: center;
+      color:#fff;
+    }
   }
 
   .title {
@@ -917,4 +948,19 @@ export default {
 .row1 {
   display: flex
 }
+.btn-style{
+//   width: 70px;
+// height: 28px;
+background: rgba(47,108,233,0.2);
+border-radius: 4px;
+border: 1px solid rgba(0,220,255,0.2);
+padding: 5px 20px;
+box-sizing: border-box;
+font-size: 16px;
+margin-right: 10px;
+cursor:pointer
+}
+.activeBtn{
+  color:#06DBF1
+}
 </style>

+ 39 - 3
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -688,6 +688,7 @@ export default {
       value1: false,
       isQy: false,
       isZj: false,
+      bulkDensityMin:'',
       qyJurisdiction: false,
       zjJurisdiction: false,
       fjJurisdiction:false,
@@ -1032,7 +1033,15 @@ export default {
       if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) { }
     },
     obtainPrice(){
-      getinspectLookUnitPrice({
+      if(this.deptBudgetList.bulkDensity<this.bulkDensityMin){
+        this.$alert('容重低于收购标准', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {
+           
+          }
+        });
+      }else{
+        getinspectLookUnitPrice({
           warehouseId: this.cangid,
           goodsName: this.deptBudgetList.goodsName,
           bulkDensity: this.deptBudgetList.bulkDensity,
@@ -1044,6 +1053,8 @@ export default {
             }
 
           })
+      }
+      
 
     },
     opendBtn() {
@@ -2029,6 +2040,13 @@ export default {
       if (this.reader) {
         this.reader.cancel()
       }
+      if(this.deptBudgetList.bulkDensity<this.bulkDensityMin){
+        this.$message({
+            message: '容重低于收购标准',
+            type: 'warning',
+          })
+          return
+      }
       if(this.qyJurisdiction&&this.serviceManagementType==1&&this.statusTypetext=='初检'&&!this.zjJurisdiction&&!this.fjJurisdiction&&!this.qrJurisdiction){
         this.$message({
             message: '钎样员只能进行收购入库添加',
@@ -3297,8 +3315,26 @@ export default {
           this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
         ) {
           console.log(this.outContractNo[i])
-          this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
-          this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+          if(this.serviceManagementType==3){
+            var arr=this.goodnameList.filter((item)=>{return item.goodsName==this.outContractNo[i].goodsName})
+            console.log(arr)
+            if(arr.length>0){
+              this.bulkDensityMin=arr[0].bulkDensityMin
+              this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            }else{
+              this.deptBudgetList.goodsName=''
+              this.deptBudgetList.goodsNameKey=''
+              this.$message({
+                message: `当前仓库未设置:`+this.outContractNo[i].goodsName,
+                type: 'warning',   
+              });
+              break;
+            }
+          }else{
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+          }
           this.goodsNameChange(this.deptBudgetList.goodsName)
           this.deptBudgetList.grade = this.outContractNo[i].grade
           if (this.outContractNo[i].inOutType == '采购入库') {

+ 3 - 3
src/views/profitable/cashout.vue

@@ -322,14 +322,14 @@
       },
       selectware(e,index){
         var arr=[]
-        this.datelist=[]
+        this.datelist[index]=[]
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
               response[i].issuingDate=response[i].issuingTime.split(' ')[0]
-              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
+              arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
             }
-            this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
+            this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
       selectgoodsSource(e,item,index){

+ 15 - 13
src/views/profitable/expenseallot.vue

@@ -54,7 +54,11 @@
           <div v-else>暂无附件</div>
         </el-form-item>
         </el-form>
-        <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
+        <div style="display:flex;">
+          <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
+          <div>可分配金额{{deptBudgetList.unallocatedAmount}}元</div>
+        </div>
+        
         <div style='margin:10px auto;width:90%;'>
             <ws-select v-model="mode" placeholder="费用分配方式" class="typeselect" @change="modeselect">
           <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
@@ -85,10 +89,8 @@
           </el-table-column>
           <el-table-column v-if='deptBudgetList.expensesPurpose==1' prop="date" label="日期">
             <template slot-scope="scope">
-               <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
-                <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time+item.goodsSource" :value="item.time"
-                  style="color: #8890b1" />
-              </ws-select>
+              <el-date-picker @change="((value)=>{selectware(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
+              value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
           <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
@@ -103,7 +105,7 @@
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' prop="date" label="货源">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -220,14 +222,14 @@
       },
       selectware(e,index){
         var arr=[]
-        this.datelist=[]
-        getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
+        this.datelist[index]=[]
+        getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
               response[i].issuingDate=response[i].issuingTime.split(' ')[0]
-              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight,goodsSource:response[i].goodsSource})
+              arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
             }
-            this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
+            this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
       selectgoodsSource(e,item,index){
@@ -259,7 +261,7 @@
               return total + currentValue.inWarehouseWeight;
           }, 0)
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
-              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              this.$set(this.feeDetailsDistributions[i],'distributionMoney',Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney))
               money+=this.feeDetailsDistributions[i].distributionMoney
           }
         }
@@ -412,7 +414,7 @@
           }
         }
         if(this.mode=='全部分配'){
-          if(this.amount!=this.deptBudgetList.amountMoney){
+          if(this.amount!=this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '请款金额与分配金额不相等!',
                 type: 'warning',
@@ -421,7 +423,7 @@
           }
         }
         if(this.mode=='部分分配'){
-          if(this.amount>this.deptBudgetList.amountMoney){
+          if(this.amount>this.deptBudgetList.unallocatedAmount){
             this.$message({
                 message: '分配金额不可超过请款金额!',
                 type: 'warning',

+ 1 - 1
src/views/profitable/expenseallotaduit.vue

@@ -99,7 +99,7 @@
                 value-format="yyyy-MM-dd"   ></el-date-picker>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="goodsSource" label="货源">
+            <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="goodsSource" label="货源">
             </el-table-column>
             <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货源">
                 <template slot-scope="scope">

+ 3 - 2
src/views/profitable/expensemanagementdetails.vue

@@ -127,8 +127,9 @@
               <el-button v-if='scope.row.expensesPurpose==1&&scope.row.status=="已收款"&&!scope.row.approveStatus||scope.row.expensesPurpose==1&&scope.row.status=="已付款"&&!scope.row.approveStatus||scope.row.expensesPurpose==2&&scope.row.status=="已付款"&&!scope.row.approveStatus' @click="accomplish(scope.row)" type="primary">完成</el-button>
               <el-button  v-if='scope.row.status=="已驳回"' @click="edit(scope.row)" type="primary">编辑</el-button>
               <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
-              <el-button v-if='!scope.row.distributionStatus&&scope.row.expensesPurpose==1&&scope.row.costType==3&&!scope.row.approveStatus&&scope.row.status=="已付款"
-              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"&&scope.row.storageFeeFlag!=1||scope.row.expensesPurpose==2&&scope.row.status=="已付款"&&!scope.row.distributionStatus' @click="allot(scope.row)" type="primary">分配</el-button>
+              <el-button v-if='!scope.row.distributionStatus&&scope.row.expensesPurpose==1&&scope.row.costType==3&&!scope.row.approveStatus&&scope.row.status=="已付款"&&scope.row.unallocatedAmount>0
+              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"&&scope.row.storageFeeFlag!=1&&scope.row.unallocatedAmount>0
+              ||scope.row.expensesPurpose==2&&scope.row.status=="已付款"&&!scope.row.distributionStatus&&scope.row.unallocatedAmount>0' @click="allot(scope.row)" type="primary">分配</el-button>
               <!-- <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button> -->
               <el-button v-if='scope.row.status=="已驳回"' @click="del(0,scope.row)" type="danger">删除</el-button>
               <el-button v-if='scope.row.approveStatus=="待财务审核"||scope.row.approveStatus=="待决策人审核"||scope.row.approveStatus=="待内勤审核"' @click="aduit(scope.row)" type="primary">审核</el-button>

+ 11 - 9
src/views/profitable/expensemanagentedit.vue

@@ -124,27 +124,27 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
+          <!-- <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
                <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
                 <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time+'/'+item.goodsSource" :value="item.time"
                   style="color: #8890b1" />
               </ws-select>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2' prop="date" label="货源">
+          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -672,16 +672,18 @@ weight: 4000}]],
                 }
                 this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
               }else if(this.deptBudgetList.expensesPurpose==1){
-                const data  = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
-                this.datelist[i]=[]
+                const data  = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName,receiptDocDate:this.feeDetailsDistributions[i].receiptDocDate}).toPromise()
+                this.goodsourcelist[i]=[]
                 for (let q = 0; q < data.length; q++) {
                   data[i].issuingDate=data[i].issuingTime.split(' ')[0]
-                  arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight,goodsSource:data[i].goodsSource})
+                  arr.push({
+                    goodsSource:data[q].goodsSource,
+                    id:data[q].id,weight:data[q].inWarehouseWeight,goodsName:data[q].goodsName,goodsNameKey:data[q].goodsNameKey})
                 }
-                this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
+                this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
               }else if(this.deptBudgetList.expensesPurpose==2){
                 const data  = await getwarehousingorder({receiptDocDate:this.feeDetailsDistributions[i].receiptDocDate,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
-                this.datelist[i]=[]
+                this.goodsourcelist[i]=[]
                 for (let q = 0; q < data.length; q++) {
                   arr.push({
                     goodsSource:data[q].goodsSource,

+ 1 - 1
src/views/profitable/expensemanagentlook.vue

@@ -98,7 +98,7 @@
                 value-format="yyyy-MM-dd"   ></el-date-picker>
               </template>
             </el-table-column>
-            <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="goodsSource" label="货源">
+            <el-table-column v-if='deptBudgetList.expensesPurpose==2||deptBudgetList.expensesPurpose==1' prop="goodsSource" label="货源">
             </el-table-column>
             <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货源">
                 <template slot-scope="scope">

+ 4 - 4
src/views/statisticalReport/autoSettlementList.vue

@@ -22,10 +22,10 @@
         <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="12">
           <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
             maxlength="500" type="input" class="findValue">
-            <el-option v-if="item.reportStatus" v-for="item in options" :key="item.constKey"
-              :label="item.contractNo + '(' + item.reportStatus + ')'" :value="item.contractNo" />
-            <el-option v-if="!item.reportStatus" v-for="item in options" :key="item.constKey" :label="item.contractNo"
-              :value="item.contractNo" />
+            <el-option v-for="item in options" :key="item.id"
+              :label="item.reportStatus?(item.contractNo + '(' + item.reportStatus + ')'):item.contractNo" :value="item.contractNo" />
+            <!-- <el-option v-if="!item.reportStatus" v-for="item in options" :key="item.constKey" :label="item.contractNo"
+              :value="item.contractNo" /> -->
           </el-select>
           <el-select v-model="warehouseName" filterable placeholder="" @change="warehouseNameChange" >
             <el-option key="全部仓库" label="全部仓库" value="" style="color: #8890b1" />