gjy 2 éve
szülő
commit
aa454df104

+ 33 - 5
src/views/profitable/expenseallot.vue

@@ -67,7 +67,7 @@
         合计分配:{{amount}}元
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==3&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==1' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -75,7 +75,15 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+            <template slot-scope="scope">
+              <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
+                <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                  style="color: #8890b1" />
+              </el-select>
+            </template>
+          </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"
@@ -83,15 +91,19 @@
               </ws-select>
             </template>
           </el-table-column>
+          <el-table-column v-if='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.expensesPurpose==3' 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="goodsSource" label="货源">
-            </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货源">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' 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)})">
@@ -299,6 +311,22 @@
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
+      receiptDocDatechange1(e,index){
+        var arr=[]
+        this.goodsourcelist[index]=[]
+        if(this.feeDetailsDistributions[index].warehouseName&&this.feeDetailsDistributions[index].receiptDocDate){
+          getwarehousingorder({warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
+            }
+            this.feeDetailsDistributions[index].goodsSource=''
+            this.feeDetailsDistributions[index].weight=''
+             this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
+          })
+        }
+        
+      },
       returnsales(){
         this.$router.go(-1)
       },

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

@@ -124,11 +124,11 @@
                 <el-button v-if='scope.row.status=="待确认"&&scope.row.expensesType==1' @click="shoukuanqueren(scope.row)" type="primary">确认</el-button>
               </div>
               <!-- <el-button v-if='scope.row.approveStatus=="待确认"' @click="accomplish(scope.row)" type="primary">完成</el-button> -->
-              <el-button v-if='scope.row.expensesPurpose==1&&scope.row.status=="已收款"&&!scope.row.approveStatus||scope.row.expensesPurpose==1&&scope.row.status=="已付款"&&!scope.row.approveStatus' @click="accomplish(scope.row)" type="primary">完成</el-button>
+              <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=="已付款"' @click="allot(scope.row)" type="primary">分配</el-button>
+              ||!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.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>
@@ -138,7 +138,7 @@
           <el-table-column prop="expenseRemarks" label="分配状态">
             <template slot-scope="scope">
               <span>{{scope.row.distributionStatus}}</span>
-              <el-tooltip v-if='scope.row.rejectionReason' class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
+              <el-tooltip v-if='scope.row.rejectionReason&&scope.row.distributionStatus' class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
                 <i class="el-icon-question"></i>
               </el-tooltip>
             </template>

+ 43 - 6
src/views/profitable/expensemanagentedit.vue

@@ -95,7 +95,7 @@
         <span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -103,7 +103,15 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+            <template slot-scope="scope">
+              <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
+                <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                  style="color: #8890b1" />
+              </el-select>
+            </template>
+          </el-table-column>
+          <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"
@@ -117,9 +125,13 @@
               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>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
+          <el-table-column v-if='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="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -330,6 +342,22 @@ weight: 4000}]],
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
+      receiptDocDatechange1(e,index){
+        var arr=[]
+        this.goodsourcelist[index]=[]
+        if(this.feeDetailsDistributions[index].warehouseName&&this.feeDetailsDistributions[index].receiptDocDate){
+          getwarehousingorder({warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
+            }
+            this.feeDetailsDistributions[index].goodsSource=''
+            this.feeDetailsDistributions[index].weight=''
+             this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
+          })
+        }
+        
+      },
       selectcontent(e){
 
       },
@@ -626,7 +654,7 @@ weight: 4000}]],
                     id:data[q].id,weight:data[q].inWarehouseWeight,goodsName:data[q].goodsName,goodsNameKey:data[q].goodsNameKey})
                 }
                 this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
-              }else if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
+              }else if(this.deptBudgetList.expensesPurpose==1){
                 const data  = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
                 this.datelist[i]=[]
                 for (let q = 0; q < data.length; q++) {
@@ -634,6 +662,15 @@ weight: 4000}]],
                   arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight,goodsSource:data[i].goodsSource})
                 }
                 this.$set(this.datelist,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]=[]
+                for (let q = 0; q < data.length; q++) {
+                  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.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
               }
             }
             console.log(this.goodsourcelist,this.datelist)

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

@@ -872,7 +872,7 @@ export default {
           (String(this.deductionAmount).indexOf('.') + 1) >
           2) ||
         (this.deductionAmount && this.deductionAmount > 100000) ||
-        (this.deductionAmount && this.deductionAmount < 0)
+        (this.deductionAmount && this.deductionAmount < -100000)
       ) {
         this.$message({
           message: '扣款金额输入错误',