zhongtianhaoyuan 3 anni fa
parent
commit
fd7addb138

+ 19 - 10
public/static/tradeServicesPrint.html

@@ -218,6 +218,8 @@
               
             </div>
         </div>
+      </div>
+      <div v-for="(item,index) in printData1" :key="index">
 
       <div  v-if="item.printType == '打印结算单'" class="center">
         <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
@@ -435,15 +437,22 @@
       },
       mounted() {
         this.date = new Date().toLocaleString()
-        let _data = decodeURIComponent(this.getQueryVariable('dataList'))
-        if (!_data) {
-          this.selectPrint = true;
-          this.printData1 = JSON.parse(sessionStorage.getItem('selectPrint_selectPrintList'))
-        } else {
-          this.printData = JSON.parse(_data)
-          console.log("打印磅单",this.printData)
-          this.selectPrint = false;
-        }
+        // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
+        // console.log("cdsjkvdjkljklkcj",JSON.parse(_data))
+        // inOutRecord_print
+        this.printData = JSON.parse(sessionStorage.getItem('inOutRecord_printBD'))
+        this.printData1 = JSON.parse(sessionStorage.getItem('inOutRecord_printJSD'))
+        console.log("磅单",this.printData)
+        console.log("结算单",this.printData1)
+
+        // if (!_data) {
+        //   this.selectPrint = true;
+        //   this.printData1 = JSON.parse(sessionStorage.getItem('selectPrint_selectPrintList'))
+        // } else {
+        //   this.printData = JSON.parse(_data)
+        //   console.log("打印磅单",this.printData)
+        //   this.selectPrint = false;
+        // }
         // let _type = decodeURIComponent(this.getQueryVariable('type'))
         // this.showType = decodeURIComponent(this.getQueryVariable('printTypeList'))
         // let _data1 = decodeURIComponent(this.getQueryVariable('customerList'))
@@ -502,7 +511,7 @@
         //   this.bigContent = false
         // }
 
-        document.title = this.printData.compName + '结算凭证'
+        // document.title = this.printData.compName + '结算凭证'
         window.print()
         window.onafterprint = function(event) {
           window.history.back(-1)

+ 101 - 14
src/views/tradeServicesManagement/approveWarehouseReceipt.vue

@@ -242,28 +242,30 @@
         <el-input
           v-model="deptBudgetList.paymentAmount"
           placeholder="请输入发放金额"
+          @input="customEdit"
+          type="number"
           size="small"
         ></el-input>
       </el-form-item>
-	 
+	
 	 <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense1" :disabled="costOne">(元)</el-input></div>
-		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.applicationAmount" placeholder="请输入金额" :disabled="costOne" @input="customEdit"></el-input></div>
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense1" :disabled="costOne" maxlength="8"></el-input></div>
+		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.applicationAmount" placeholder="请输入金额" :disabled="costOne" @input="customEdit" ></el-input></div>
 		  <span @click="switch1(1)" class="span_text">{{deptBudgetList.applicationAmountFlag}}</span>
 	  </div>
 	   <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense2"  :disabled="costTwo"></el-input></div>
-		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.supervisionFee" placeholder="请输入金额"  :disabled="costTwo" @input="customEdit"></el-input></div>
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense2" :disabled="costTwo"  maxlength="8"></el-input></div>
+		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.supervisionFee" placeholder="请输入金额"  :disabled="costTwo" @input="customEdit"></el-input></div>
 		  <span @click="switch1(2)" class="span_text">{{deptBudgetList.supervisionFeeFlag}}</span>
 	  </div>
 	   <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense3"  :disabled="costThree"></el-input></div>
-		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.insurancePremium" placeholder="请输入金额" :disabled="costThree" @input="customEdit"></el-input></div>
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense3"  :disabled="costThree"  maxlength="8"></el-input></div>
+		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.insurancePremium" placeholder="请输入金额" :disabled="costThree" @input="customEdit"></el-input></div>
 		  <span @click="switch1(3)" class="span_text">{{deptBudgetList.insurancePremiumFlag}}</span>
 	  </div>
 	   <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense4"  :disabled="costFour"></el-input></div>
-		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.otherFee" placeholder="请输入金额"  :disabled="costFour" @input="customEdit"></el-input></div>
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense4"  :disabled="costFour"  maxlength="8"></el-input></div>
+		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.otherFee" placeholder="请输入金额"  :disabled="costFour" @input="customEdit"></el-input></div>
 		  <span @click="switch1(4)" class="span_text">{{deptBudgetList.otherFeeFlag}}</span>
 	  </div>
 	  <!-- <el-form-item label="利息" span="1" prop="taskNo">
@@ -304,7 +306,7 @@
       </el-form-item>
       <div>
         <el-button @click="outerVisible = true" type="primary">驳回</el-button>
-        <el-button @click="outerVisible1 = true" type="primary">通过</el-button>
+        <el-button @click="submit" type="primary">通过</el-button>
       </div>
       <div class="title1">审核记录</div>
       <el-table class="wenzi" :data="taskhistories" style="width: 100%">
@@ -406,9 +408,10 @@ export default {
     this.getcompList()
   },
   methods: {
-	  switch1(num){
+	  switch1(num){  
 		  if(num == 1){
 			  this.costOne = !this.costOne
+        this.deptBudgetList.applicationAmount = ""
 			  if(this.costOne){
 				   this.deptBudgetList.applicationAmountFlag = "隐藏中"
 			  }else{
@@ -416,6 +419,7 @@ export default {
 			  }
 		  }else if(num == 2){
 				this.costTwo = !this.costTwo
+        this.deptBudgetList.supervisionFee = ""
 				  if(this.costTwo){
 				   this.deptBudgetList.supervisionFeeFlag = "隐藏中"
 			  }else{
@@ -423,12 +427,15 @@ export default {
 			  }
 		  }else if(num == 3){
 			  this.costThree = !this.costThree
+          this.deptBudgetList.insurancePremium = ""
 			    if(this.costThree){
 				   this.deptBudgetList.insurancePremiumFlag = "隐藏中"
 			  }else{
 				  this.deptBudgetList.insurancePremiumFlag = "显示中"
 			  }
 		  }else if(num == 4){
+         this.costFour = !this.costFour
+          this.deptBudgetList.otherFee = ""
 			    if(this.costFour){
 				    this.deptBudgetList.otherFeeFlag = "隐藏中"
 			  }else{
@@ -437,7 +444,7 @@ export default {
 		  }
 	  },
 	  customEdit(){
-		  this.deptBudgetList.amountDue = this.deptBudgetList.paymentAmount + Number(this.deptBudgetList.applicationAmount ? this.deptBudgetList.applicationAmount : 0) + Number(this.deptBudgetList.supervisionFee ? this.deptBudgetList.supervisionFee : 0) + Number(this.deptBudgetList.insurancePremium ? this.deptBudgetList.insurancePremium : 0) + Number(this.deptBudgetList.otherFee? this.deptBudgetList.otherFee : 0)
+		  this.deptBudgetList.amountDue = Number(this.deptBudgetList.paymentAmount) + Number(this.deptBudgetList.applicationAmount ? this.deptBudgetList.applicationAmount : 0) + Number(this.deptBudgetList.supervisionFee ? this.deptBudgetList.supervisionFee : 0) + Number(this.deptBudgetList.insurancePremium ? this.deptBudgetList.insurancePremium : 0) + Number(this.deptBudgetList.otherFee? this.deptBudgetList.otherFee : 0)
 	  },
     //返回
     cancel() {
@@ -474,15 +481,89 @@ export default {
           })
       }
     },
+    validate() {
+        function _Validate(min, max, saveNum, type, inputVal) {
+          let _val1 = inputVal
+          let _pointVal1 = _val1.toString().split('.')[1]
+          if (_pointVal1 == undefined) _pointVal1 = 0
+          if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
+          if (Number(_val1) <= Number(max) && Number(_val1) >= Number(min) && _pointVal1 <= saveNum) {
+            return false
+          }
+          return true
+        }
+        if (!this.deptBudgetList.contractNo || this.deptBudgetList.contractNo.length < 6 || this.deptBudgetList.contractNo.length > 30) {
+          this.$message.error('合同编号不能为空且长度为6-30个字符!');
+          return false
+        }
+        if (!this.deptBudgetList.paymentAmount || _Validate(1, 1000000000, 2, '', this.deptBudgetList.paymentAmount)) {
+          if (!this.deptBudgetList.paymentAmount) {
+            this.$message.error('发放金额不能为空!');
+          } else {
+            this.$message.error('发放金额输入错误,1-1000000000之间,最多保留2位小数!');
+          }
+          return false
+        }
+        
+        if(!this.costOne){
+          if (!this.deptBudgetList.applicationAmount || _Validate(1, 100000000, 2, '', this.deptBudgetList.applicationAmount)) {
+          if (!this.deptBudgetList.applicationAmount) {
+            this.$message.error(this.deptBudgetList.modifyExpense1 + '不能为空!');
+          } else {
+            this.$message.error(this.deptBudgetList.modifyExpense1 + '输入错误,1-1000000000之间,最多保留2位小数!');
+          }
+          return false
+         }
+        }
+         if(!this.costTwo){
+          if (!this.deptBudgetList.supervisionFee || _Validate(1, 100000000, 2, '', this.deptBudgetList.supervisionFee)) {
+          if (!this.deptBudgetList.supervisionFee) {
+            this.$message.error(this.deptBudgetList.modifyExpense2 + '不能为空!');
+          } else {
+            this.$message.error(this.deptBudgetList.modifyExpense2 + '输入错误,1-1000000000之间,最多保留2位小数!');
+          }
+          return false
+         }
+        }
+         if(!this.costThree){
+          if (!this.deptBudgetList.insurancePremium || _Validate(1, 100000000, 2, '', this.deptBudgetList.insurancePremium)) {
+          if (!this.deptBudgetList.insurancePremium) {
+            this.$message.error(this.deptBudgetList.modifyExpense3 + '不能为空!');
+          } else {
+            this.$message.error(this.deptBudgetList.modifyExpense3 + '输入错误,1-1000000000之间,最多保留2位小数!');
+          }
+          return false
+         }
+        }
+         if(!this.costFour){
+          if (!this.deptBudgetList.otherFee || _Validate(1, 100000000, 2, '', this.deptBudgetList.otherFee)) {
+          if (!this.deptBudgetList.otherFee) {
+            this.$message.error(this.deptBudgetList.modifyExpense4 + '不能为空!');
+          } else {
+            this.$message.error(this.deptBudgetList.modifyExpense4 + '输入错误,1-1000000000之间,最多保留2位小数!');
+          }
+          return false
+         }
+        }
+        return true
+      },
+      submit(){
+        let isValidate = false
+        isValidate = this.validate()
+        if(isValidate){
+          this.outerVisible1 = true
+        }
+      },
     // 提交
     adoptSubmit() {
+        
       if (!this.adoptText || this.adoptText.length > 50) {
         this.$message.error('审核意见不能为空且不能超出50字')
       } else {
 		WarehouseReceiptUpdate(this.deptBudgetList)
         .toPromise()
         .then((response) => {
-           this.$message.success('提交成功')
+          //  this.$message.success('提交成功')
 		woekflowhandle({
           taskId: this.deptBudgetList.taskId,
           approved: true,
@@ -491,7 +572,7 @@ export default {
         })
           .toPromise()
           .then((response) => {
-            this.$message.success('审成功')
+            this.$message.success('审成功')
             this.$router.push({
           path: 'warehouseReceiptRegulation'
         })
@@ -584,6 +665,10 @@ export default {
 		      this.deptBudgetList.supervisionFeeFlag="隐藏中"
 		      this.deptBudgetList.insurancePremiumFlag="隐藏中"
 		      this.deptBudgetList.otherFeeFlag="隐藏中"
+          this.deptBudgetList.applicationAmount = ""
+         this.deptBudgetList.supervisionFee = ""
+          this.deptBudgetList.insurancePremium = ""
+           this.deptBudgetList.otherFee = ""
         })
         .catch((req) => {
           
@@ -610,6 +695,8 @@ export default {
             baseId: this.deptBudgetList.baseId,
             positionId: this.deptBudgetList.warehouseNoId,
             warehouseName: this.deptBudgetList.warehouseName,
+            nowWeight:this.deptBudgetList.nowWeight,
+            warehouseNo:this.deptBudgetList.warehouseNo
           }
         })
 	}

+ 99 - 96
src/views/tradeServicesManagement/inOutRecord.vue

@@ -25,8 +25,8 @@
     <el-row>
       <el-col :span="12">
         <el-col :span="6">
-          <span>{{ deptBudgetList.warehouseName }}(102仓位)</span
-          ><span>现有储量:1000吨</span>
+          <span>{{ deptBudgetList.warehouseName }}({{deptBudgetList.warehouseNo}}仓位)</span
+          ><span>现有储量:{{deptBudgetList.nowWeight}}吨</span>
         </el-col>
         <el-col :span="18">
           <el-date-picker
@@ -66,6 +66,7 @@
       @selection-change="handleSelectionChange"
       :data="recordList"
       style="width: 100%"
+      height="780"
     >
       <el-table-column type="selection" width="55"></el-table-column>
       <el-table-column type="index" label="序号" width="50">
@@ -384,6 +385,18 @@
           <el-button type="primary" @click="printBig">打印单据</el-button>
         </div>
       </el-dialog> -->
+       <div class="pageNumber">
+    <!-- 页数 -->
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
+      </div>
   </div>
 </template>
 <script>
@@ -394,6 +407,7 @@ import {
 } from '@/model/tradeServicesManagement/index'
 import { getpaymentexamine } from '@/model/houseSelfCollect/index'
 import paymentPrint from './component/paymentPrint.vue'
+import { loadAsync } from 'jszip'
 export default {
   components: {
     paymentPrint,
@@ -411,6 +425,8 @@ export default {
       },
       currentPage: 1,
       pageSize: 10,
+      deptBudgetTotal:0,
+      deptCircularPage:{},
       searchType: '',
       isCountShow: false,
       isShowPrint: false,
@@ -425,12 +441,17 @@ export default {
         weighingManagement: {},
       },
       printList: [],
+       printList1: [],
+      newList:[],
+      count:0,
     }
   },
   activated() {
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+    this.deptBudgetList.warehouseNo = this.$route.query.warehouseNo
+    this.deptBudgetList.nowWeight = this.$route.query.nowWeight
     this.getList()
   },
   methods: {
@@ -470,7 +491,18 @@ export default {
             }
           }
           this.recordList = res.records
+          this.deptBudgetTotal = res.total
         })
+    },
+     handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
     },
     returnsales() {
       this.$router.go(-1)
@@ -484,7 +516,11 @@ export default {
       }
     },
     print() {
-      this.isShowPrintType = true
+      if(this.selection.length == 0){
+         this.$message.error('请勾选要打印的条目')
+      }else{
+         this.isShowPrintType = true
+      }
     },
     adjustmentClick() {
       postwarehouseadjustment({
@@ -502,105 +538,66 @@ export default {
       console.log(this.ruleForm.type)
     },
     typePrintClick(selection) {
-      debugger
-      let index1 = 0
-      let index2 = 0
-      var that = this
-      let _bdList = []
-      let _jsList = []
-      for (let i = 0; i < selection.length; i++) {
-        for (let j = 0; j < this.ruleForm.type.length; j++) {
-          if (
-            this.ruleForm.type[j] == '打印磅单' &&
-            this.ruleForm.type.length < 1
-          ) {
-            selection[i].code =
-              this.getdate() +
-              selection[i].commonWarehouseNo +
-              this.verifyinit()
-            selection[i].printType = '打印磅单'
-            _bdList.push(selection[i])
-            index1++
-            if (index1 == selection.length) {
-              sessionStorage.setItem(
-                'inOutRecord_printbd',
-                JSON.stringify(_bdList)
-              )
-              window.open('../../../../../static/tradeServicesPrint.html')
-            }
-          } else if (
-            this.ruleForm.type[j] == '打印结算单' &&
-            this.ruleForm.type.length < 1
-          ) {
-            if (!selection[i].paymentId) {
-              this.$message.error(
-                '选择条目错误,收购入库结算单才能打印,请重新勾选!'
-              )
-              return
-            } else {
-              getpaymentexamine({ id: selection[i].paymentId })
-                .toPromise()
-                .then((res) => {
-                  res.printType = '打印结算单'
-                  index2++
-                  _jsList.push(res)
-                  if (index2 == this.selection.length) {
-                    sessionStorage.setItem(
-                      'inOutRecord_printjs',
-                      JSON.stringify(_jsList)
-                    )
-                    window.open('../../../../../static/tradeServicesPrint.html')
-                    // this.isShowPrint = true
-                    // this.printBig();
-                  }
-                })
-            }
-          } else {
-            // 两条都打
 
-            if (!selection[i].paymentId) {
-              this.$message.error(
-                '选择条目错误,收购入库结算单才能打印,请重新勾选!'
-              )
-              return
-            } else {
-              selection[i].code =
-                this.getdate() +
-                selection[i].commonWarehouseNo +
-                this.verifyinit()
-              selection[i].printType = '打印磅单'
-              _bdList.push(selection[i])
-              index1++
-              // if (index1 == selection.length && index2 == selection.length) {
-                sessionStorage.setItem(
-                  'inOutRecord_printbd',
-                  JSON.stringify(_bdList)
-                )
-                // window.open('../../../../../static/tradeServicesPrint.html')
-              // }
-              getpaymentexamine({ id: selection[i].paymentId })
-                .toPromise()
-                .then((res) => {
-                  res.printType = '打印结算单'
-                  index2++
-                  _jsList.push(res)
-                  if (
-                    index2 == selection.length
-                  ) {
-                    sessionStorage.setItem(
-                      'inOutRecord_printjs',
-                      JSON.stringify(_jsList)
-                    )
-                    window.open('../../../../../static/tradeServicesPrint.html')
-                    // this.isShowPrint = true
-                    // this.printBig();
-                  }
-                })
+       for(let j = 0 ; j < this.ruleForm.type.length ; j++){
+          if(this.ruleForm.type[j] == "打印磅单"){
+              for(let i = 0 ; i < selection.length ; i++){
+                selection[i].printType = "打印磅单"
+              selection[i].code = this.getdate() + selection[i].commonWarehouseNo + this.verifyinit()
+                 this.printList.push(selection[i])
+              }
+          }
+         else if(this.ruleForm.type[j] == "打印结算单"){
+            for(let index = 0 ; index < selection.length ; index++){
+              if(!selection[index].paymentId){
+                 this.$message.error('只有收购入库的条目才能打印结算单,请重新勾选!')
+                 return
+              }
             }
+            this.printSettlementSheet(selection)
           }
         }
+        
+        for(let num = 0 ; num < selection.length ; num++){
+          if(this.count == selection.length){
+            
+            console.log(this.count , selection.length)
+            console.log("bang单",this.printList)
+            console.log("结算单",this.printList1)
+            sessionStorage.setItem('inOutRecord_printBD', JSON.stringify(this.printList))
+            sessionStorage.setItem('inOutRecord_printJSD', JSON.stringify(this.printList1))
+              window.open('../../../../../static/tradeServicesPrint.html')
+          }
+        }
+    },
+    async printSettlementSheet(list){
+      for(let i = 0 ; i < list.length ; i++ ){
+        // if(list[i].paymentId){
+           getpaymentexamine({ id: list[i].paymentId })
+               .toPromise()
+               .then((res) => {
+                 console.log(res)
+                 res.printType = "打印结算单"
+                this.printList1.push(res)
+                this.count++
+               })
+        // }
+        
       }
     },
+    // async tiaozhuan(){
+    //   for(let num = 0 ; num < selection.length ; num++){
+    //       if(this.count == selection.length){
+    //         console.log(this.count , selection.length)
+    //         console.log("bang单",this.printList)
+    //         console.log("结算单",this.printList1)
+    //         sessionStorage.setItem('inOutRecord_printBD', JSON.stringify(this.printList))
+    //         sessionStorage.setItem('inOutRecord_printJSD', JSON.stringify(this.printList1))
+    //           // window.open('../../../../../static/tradeServicesPrint.html')
+    //       }
+    //     }
+
+    // },
 
     handleSelectionChange(val) {
       this.selection = val
@@ -871,4 +868,10 @@ table tr td {
 .bottom-btn {
   margin: 20px;
 }
+.pageNumber{
+  text-align: center;
+}
+ /deep/.el-table .cell{
+    text-align: center;
+  }
 </style>

+ 8 - 8
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -44,7 +44,7 @@
       </el-form-item>
       <el-form-item prop="goodsName" label="货名">
         <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName">
-          <el-option v-for="(item,index) in goodsList" :key='index' :label="item.goodsName" :value="item.id">
+          <el-option :label="item.goodsName" :value="item.id" v-for="(item,index) in goodsList" :key='index' >
           </el-option>
         </el-select>
       </el-form-item>
@@ -186,7 +186,6 @@
         getcompList()
           .toPromise()
           .then((res) => {
-            console.log('公司下拉列表数据', res)
             this.compOptionList = res
             this.deptBudgetList.renown = res[0].compName
           })
@@ -198,7 +197,6 @@
             compId: this.compId
           }).toPromise()
           .then(response => {
-            console.log('仓库信息', response)
             this.warehouseList = response
             this.deptBudgetList.warehouseName = response[0].warehouseName
             this.cwNumberList = response[0].positionInfos
@@ -211,15 +209,13 @@
             this.goodsList = response[0].goodsNameInfos
             this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
               .storage : ''
-            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
-            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+            // this.deptBudgetList.useWeight = '10'
             this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
               .goodsName : ''
             this.deptBudgetList.warehouseId = response[0].id
             if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
             if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
-            this.deptBudgetList.bankId = 'bankId'
-            this.deptBudgetList.threeId = 'threeId'
             this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
               .id : ''
             this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
@@ -228,6 +224,7 @@
       },
       //货名切换
       changeGoodsName(val) {
+        console.log(val)
         let _data = this.goodsList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].id == val) {
@@ -282,7 +279,7 @@
             this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
             this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage :
               ''
-            // this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
+            this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
             this.deptBudgetList.useWeight = '10'
             this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName :
               ''
@@ -297,12 +294,15 @@
         }
       },
       inoutput() {
+        console.log(this.warehouseList.warehouseNo)
         this.$router.push({
           name: 'inOutRecord',
           query: {
             baseId: this.deptBudgetList.baseId,
             positionId: this.deptBudgetList.warehouseNoId,
             warehouseName: this.deptBudgetList.warehouseName,
+            warehouseNo:this.deptBudgetList.warehouseNo,
+            nowWeight:this.deptBudgetList.nowWeight
           }
         })
       },

+ 26 - 42
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -187,8 +187,8 @@
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if="scope.row.approved">通过</span>
-            <span v-if="!scope.row.approved">驳回</span>
+            <span v-if="scope.row.approved" class="examine1">通过</span>
+            <span v-if="!scope.row.approved" class="examine2">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
@@ -239,6 +239,7 @@ export default {
     }
   },
   activated() {
+    
     this.getList()
     this.getcompList()
     this.getWarehouse()
@@ -265,7 +266,15 @@ export default {
     },
     //出入库记录
     inoutput() {
-      this.$router.push({ name: 'inOutRecord' })
+      this.$router.push({ name: 'inOutRecord',
+      query:{ 
+        baseId: this.deptBudgetList.baseId,
+        positionId: this.deptBudgetList.warehouseNoId,
+        warehouseName: this.deptBudgetList.warehouseName,
+        warehouseNo:this.deptBudgetList.warehouseNo,
+        nowWeight:this.deptBudgetList.nowWeight
+        }
+      })
     },
     //名头改变
     changeCompOptionList(val){
@@ -281,7 +290,6 @@ export default {
     },
       //货名切换
       changeGoodsName(val) {
-        console.log(val)
         let _data = this.goodsList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].id == val) {
@@ -292,7 +300,6 @@ export default {
       },
     //仓库切换
     changeWarehouse(val) {
-        console.log('切换后仓库数据', val)
         let _data = this.warehouseList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].id == val) {
@@ -305,10 +312,6 @@ export default {
             this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
             this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage :
               ''
-            // this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
-            this.deptBudgetList.useWeight = '10'
-            this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName :
-              ''
             this.deptBudgetList.warehouseId = _data[i].id
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0]
               .goodsNameKey : ''
@@ -331,6 +334,7 @@ export default {
         }
       },
     getcompList(){
+      //公司名下拉
        getcompList()
           .toPromise()
           .then((res) => {
@@ -345,32 +349,8 @@ export default {
             compId: this.compId
           }).toPromise()
           .then(response => {
-            console.log('仓库信息', response)
             this.warehouseList = response
-            this.deptBudgetList.warehouseName = response[0].warehouseName
-            this.cwNumberList = response[0].positionInfos
-            this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
-              .binNumber : ''
-            this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
-              .baseId : ''
-            this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity +
-              response[0].warehouseArea + response[0].detailedAddress
-            this.goodsList = response[0].goodsNameInfos
-            this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
-              .storage : ''
-            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
-            this.deptBudgetList.useWeight = '10'
-            this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
-              .goodsName : ''
-            this.deptBudgetList.warehouseId = response[0].id
-            if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
-            if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
-            this.deptBudgetList.bankId = 'bankId'
-            this.deptBudgetList.threeId = 'threeId'
-            this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
-              .id : ''
-            this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
-              .goodsNameKey : ''
+            this.changeWarehouse(this.deptBudgetList.warehouseId)
           })
     },
     getList() {
@@ -380,20 +360,19 @@ export default {
          WarehouseReceiptBankList({constId:"THREE1"}).toPromise().then((response) => {
           this.threeList = response
         })
-      //审核记录
-      getWarehouseReceiptExamine({businessKey: this.$route.query.id,workflowId: this.$route.query.workflowId}).toPromise()
-          .then((response) => {
-            this.taskhistories=response
-          })
+   
        getWarehouseReceiptLook({id:this.$route.query.id,workflowId:this.$route.query.workflowId})
         .toPromise()
         .then((response) => {
          this.deptBudgetList = response
         })
         .catch((req) => {
-          // this.tableData = response.records
-          // this.$message.success('提交失败')
         })
+           //审核记录
+      getWarehouseReceiptExamine({businessKey: this.$route.query.id,workflowId: this.$route.query.workflowId}).toPromise()
+          .then((response) => {
+            this.taskhistories=response
+          })
     },
     submit() {
       let isValidate = false
@@ -420,7 +399,6 @@ export default {
         .handleSaveBill()
         .then(async (response) => {
           this.deptBudgetList.appendix = response
-          console.log( "dfvbgf",this.deptBudgetList.appendix)
         })
         .catch((res) => {
           EventBus.$emit('error', (JSON.parse(res) || {}).message)
@@ -555,5 +533,11 @@ export default {
     font-weight: 600;
     margin: 20px 0;
   }
+  .examine1{
+    color: #50CAD4;
+  }
+   .examine2{
+    color: #FF9F24;
+  }
 
 </style>

+ 50 - 6
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -3,7 +3,7 @@
   <div class="center">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left titleup">修改仓单</h2>
+        <h2 class="bg-left titleup">查看仓单</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
@@ -18,6 +18,12 @@
       </el-col>
     </el-row>
 
+     <!-- <el-carousel indicator-position="outside">
+    <el-carousel-item v-for="item in 4" :key="item">
+      <h3>{{ item }}</h3>
+    </el-carousel-item>
+  </el-carousel> -->
+
     <el-form
       ref="deptBudgetList"
       :rules="rules"
@@ -81,7 +87,9 @@
           v-model="deptBudgetList.nowWeight"
           placeholder="请输入现有储量"
           size="small"
+          class="existing"
         ></el-input>
+          <el-button  type="primary" @click="poundList">磅单</el-button>
       </el-form-item>
       <el-form-item
         label="可用储量(吨)"
@@ -167,7 +175,7 @@
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
         :editable="false"
       />
-      <div>
+      <div  v-if="deptBudgetList.status == '待还款'">
       <div class="title1">发放信息</div>
        <el-form-item prop="contractNo" label="合同编号" span="1">
         <el-input
@@ -251,8 +259,8 @@
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if="scope.row.approved">通过</span>
-            <span v-if="!scope.row.approved">驳回</span>
+            <span v-if="scope.row.approved" class="examine1">通过</span>
+            <span v-if="!scope.row.approved" class="examine2">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
@@ -356,6 +364,19 @@ export default {
           })
           .catch((err) => {})
     },
+    	//磅单跳转
+	poundList(){
+		 this.$router.push({
+          name: 'inOutRecord',
+		  query: {
+            baseId: this.deptBudgetList.baseId,
+            positionId: this.deptBudgetList.warehouseNoId,
+            warehouseName: this.deptBudgetList.warehouseName,
+            nowWeight:this.deptBudgetList.nowWeight,
+            warehouseNo:this.deptBudgetList.warehouseNo
+          }
+        })
+	},
     getWarehouse(){
       //获取仓库
         selectWarehouseSelf({
@@ -399,7 +420,6 @@ export default {
        getWarehouseReceiptLook({id:id})
         .toPromise()
         .then((response) => {
-         console.log("mdl;sgjkdl",response)
          this.deptBudgetList = response
         })
         .catch((req) => {
@@ -414,7 +434,6 @@ export default {
         .handleSaveBill()
         .then(async (response) => {
           this.deptBudgetList.appendix = response
-          console.log( "dfvbgf",this.deptBudgetList.appendix)
         })
         .catch((res) => {
           EventBus.$emit('error', (JSON.parse(res) || {}).message)
@@ -481,5 +500,30 @@ export default {
     font-weight: 600;
     margin: 20px 0;
   }
+  .examine1{
+    color: #50CAD4;
+  }
+   .examine2{
+    color: #FF9F24;
+  }
+  //轮播图
+  .el-carousel__item h3 {
+    color: #475669;
+    font-size: 14px;
+    opacity: 0.75;
+    line-height: 200px;
+    margin: 0;
+  }
+  
+  .el-carousel__item:nth-child(2n) {
+    background-color: #99a9bf;
+  }
+  
+  .el-carousel__item:nth-child(2n+1) {
+    background-color: #d3dce6;
+  }
+  .existing{
+	width: 330px;
+}
 
 </style>

+ 18 - 13
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -18,11 +18,11 @@
     </div>
     <div class="content2">
       <div class="header">
-        <el-button type="" :type="searchType == 0 ? 'primary' : ''" @click="handlestatus(1)">全部</el-button>
-        <el-button type="" :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(2)">待审核</el-button>
-        <el-button type="" :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(3)">待审批</el-button>
-        <el-button type="" :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(4)">待还</el-button>
-        <el-button type="" :type="searchType == 4 ? 'primary' : ''" @click="handlestatus(5)">已还</el-button>
+        <el-button type="" :type="searchType == 0 ? 'primary' : ''" @click="handlestatus(0)">全部</el-button>
+        <el-button type="" :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</el-button>
+        <el-button type="" :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待审批</el-button>
+        <el-button type="" :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">待还</el-button>
+        <el-button type="" :type="searchType == 4 ? 'primary' : ''" @click="handlestatus(4)">已还</el-button>
         <el-input placeholder="可按业务编号、合同编号、仓库名查找" class="search-input" v-model="searchKeyWord"></el-input>
         <el-button type="primary" @click='findList'>查找</el-button>
         <el-button type="primary" v-hasPermission=" `tradeServicesManagement.tradeService.add`" class="add" @click="add">添加</el-button>
@@ -47,9 +47,9 @@
         <el-table-column prop="amountDue" label="应还金额(元)"></el-table-column>
         <el-table-column prop="amountRepaid" label="已还金额(元)"></el-table-column>
         <el-table-column prop="amountToRepaid" label="待还金额(元)"></el-table-column>
-        <el-table-column prop="approveStatus" label="状态">
+        <el-table-column prop="status" label="状态">
           <template slot-scope="scope">
-            <div>{{scope.row.approveStatus}}</div>
+            <div>{{scope.row.status}}</div>
           </template>
         </el-table-column>
         <el-table-column prop="address" label="操作" width="430">
@@ -60,7 +60,7 @@
               审核</el-button>
             <el-button v-if="scope.row.taskId&&scope.row.approveStatus=='待审批'" size="mini" @click="approveBtnClick(scope.row, 2)">
               审批</el-button>
-            <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="repaymentBtnClick(scope.row, 2)">
+            <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="repaymentBtnClick(scope.row, 2)" v-if="scope.row.status == '待还款'">
               还款</el-button>
             <el-button v-hasPermission=" `tradeServicesManagement.tradeService.edit`" size="mini" @click="rowEditBtnClick(scope.row)">修改</el-button>
             <el-button v-hasPermission=" `tradeServicesManagement.tradeService.delete`" size="mini" type="danger" @click="rowDeleteBtnClick(scope.row)">删除</el-button>
@@ -147,7 +147,7 @@
         this.searchType = status
         // this.currentPage:=1
         // this.pageSize=10
-        // this.getList()
+        this.getList()
       },
       lookBtnClick(row, val2) {
         this.$router.push({
@@ -180,12 +180,18 @@
           query: { id: row.id, workflowId: row.workflowId }
         })
       },
-      rowDeleteBtnClick(val1) {
-          deleteTrageInfo().toPromise().then((response) => {
+      rowDeleteBtnClick(row) {
+         this.$confirm('确定删除本条申请?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            deleteTrageInfo({id:row.id}).toPromise().then((response) => {
              this.$message.success('删除成功')
             // this.mapInfo = response.data.records
           })
-
+          })
       },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
@@ -228,7 +234,6 @@
           })
           .toPromise()
           .then((response) => {
-            console.log('列表数据', response)
             this.tradeServicesList = response.records
           })
       },

+ 2 - 2
src/views/warehouse/warehouseManagementGross.vue

@@ -353,8 +353,8 @@
           warehouseInOutDetail: {},
           deductionAmount: 0,
           deductionWeight: 0,
-          grossWeight: 0,
-          tare: 0
+          grossWeight: "",
+          tare: "",
         },
         historyList: [],
         cost: '',