ccjgmwz vor 3 Jahren
Ursprung
Commit
b22e4b5aab

+ 39 - 45
src/views/tradeServicesManagement/inOutRecord.vue

@@ -66,7 +66,7 @@
       @selection-change="handleSelectionChange"
       :data="recordList"
       style="width: 100%"
-      height="780"
+      border height="calc(100% - 170px)"
     >
       <el-table-column type="selection" width="55"></el-table-column>
       <el-table-column type="index" label="序号" width="50">
@@ -77,7 +77,6 @@
       </el-table-column>
       <el-table-column prop="goodsName" label="货名"> </el-table-column>
       <el-table-column prop="grossWeight" label="毛重(吨)"> 
-        <template slot-scope="scope">{{scope.grossWeight}}</template>
       </el-table-column>
       <el-table-column prop="tare" label="皮重(吨)"> 
          </el-table-column>
@@ -101,6 +100,12 @@
       </el-table-column>
       <el-table-column prop="inOutDate" label="出入库日期"> </el-table-column>
     </el-table>
+    <div style="text-align: center">
+      <!-- 页数 -->
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"></el-pagination>
+    </div>
     <el-dialog :visible.sync="isShowadjustment" title="调整">
       <div>
         <el-input
@@ -345,6 +350,7 @@
             <td class="col" colspan="7">{{ printData.capitalize }}</td>
           </tr>
         </table>
+        
         <div class="bottom">
           <div class="bottom-row1">
             <div>
@@ -354,7 +360,6 @@
             <div>皮检:{{ printData.weighingManagement.skinInspector }}</div>
             <div>结算:{{ printData.settlementClerk }}</div>
             <div>付款:{{ printData.cashier }}</div>
-            <div>复点:{{}}</div>
             <div></div>
           </div>
           <div class="bottom-row2">
@@ -390,18 +395,7 @@
           <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>
@@ -449,12 +443,12 @@ export default {
        printList1: [],
       newList:[],
       count:0,
-      startDate:"",
-      endDate:"",
+      startDate:'',
+      endDate:'',
     }
   },
   activated() {
-    localStorage.setItem("pageUp","1")
+    localStorage.setItem('pageUp','1')
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
@@ -464,8 +458,8 @@ export default {
   },
   methods: {
     find(){
-        this.startDate = ""
-        this.endDate = ""
+        this.startDate = ''
+        this.endDate = ''
       if(this.value2){
           this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
           this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
@@ -486,27 +480,27 @@ export default {
       })
         .toPromise()
         .then((res) => {
-          for (let i = 0; i < res.records.length; i++) {
-            if (res.records[i].grossWeight) {
-              res.records[i].grossWeight = Number(res.records[i].grossWeight * 1000).toFixed(3)
-            }
-            if (res.records[i].tare) {
-              res.records[i].tare = Number(res.records[i].tare * 1000).toFixed(3)
-            }
-            if (res.records[i].netWeight) {
-              res.records[i].netWeight = Number(res.records[i].netWeight*1000).toFixed(3)
+          // for (let i = 0; i < res.records.length; i++) {
+          //   if (res.records[i].grossWeight) {
+          //     res.records[i].grossWeight = Number(res.records[i].grossWeight * 1000).toFixed(3)
+          //   }
+          //   if (res.records[i].tare) {
+          //     res.records[i].tare = Number(res.records[i].tare * 1000).toFixed(3)
+          //   }
+          //   if (res.records[i].netWeight) {
+          //     res.records[i].netWeight = Number(res.records[i].netWeight*1000).toFixed(3)
               
-            }
-            if (
-              res.records[i].grossWeight &&
-              res.records[i].tare &&
-              res.records[i].netWeight
-            ) {
-              res.records[i].weight = Number(res.records[i].grossWeight - res.records[i].tare -  res.records[i].netWeight).toFixed(3)
-            } else {
-              res.records[i].weight = null
-            }
-          }
+          //   }
+          //   if (
+          //     res.records[i].grossWeight &&
+          //     res.records[i].tare &&
+          //     res.records[i].netWeight
+          //   ) {
+          //     res.records[i].weight = Number(res.records[i].grossWeight - res.records[i].tare -  res.records[i].netWeight).toFixed(3)
+          //   } else {
+          //     res.records[i].weight = null
+          //   }
+          // }
           this.recordList = res.records
           this.deptBudgetTotal = res.total
         })
@@ -583,14 +577,14 @@ export default {
       this.printList1 = []
       this.count = 0
        for(let j = 0 ; j < this.ruleForm.type.length ; j++){
-          if(this.ruleForm.type[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] == "打印结算单"){
+         else if(this.ruleForm.type[j] == '打印结算单'){
             for(let index = 0 ; index < selection.length ; index++){
               if(!selection[index].paymentId){
                  this.$message.error('只有收购入库的条目才能打印结算单,请重新勾选!')
@@ -600,7 +594,7 @@ export default {
             this.printSettlementSheet(selection)
           }
         }
-        if(this.ruleForm.type.length == 1 && this.ruleForm.type[0] == "打印磅单"){
+        if(this.ruleForm.type.length == 1 && this.ruleForm.type[0] == '打印磅单'){
             sessionStorage.setItem('inOutRecord_printBD', JSON.stringify(this.printList))
              window.open('../../../../../static/tradeServicesPrint.html')
         }
@@ -616,8 +610,8 @@ export default {
                  if(this.count == list.length){
                    sessionStorage.setItem('inOutRecord_printBD', JSON.stringify(this.printList))
                     sessionStorage.setItem('inOutRecord_printJSD', JSON.stringify(this.printList1))
-                    console.log("磅单",this.printList)
-                    console.log("结算单",this.printList1)
+                    console.log('磅单',this.printList)
+                    console.log('结算单',this.printList1)
                    window.open('../../../../../static/tradeServicesPrint.html')
                     }
                })

+ 42 - 21
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -29,13 +29,13 @@
       </el-form-item>
       <el-form-item label="仓库名称" prop="warehouseName" class="forlist">
         <el-select v-model="deptBudgetList.warehouseName" filterable placeholder="请选择仓库" @change="changeWarehouse" clearable>
-          <el-option v-for="(item,index) in warehouseList" :key='index' :label="item.warehouseName" :value="item.id">
+          <el-option v-for="(item,index) in warehouseList" :key='index' :label="item.warehouseName" :value="item.warehouseName">
           </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓位号" prop="warehouseNo" class="forlist">
         <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" @change="changeWarehouseNo" filterable clearable>
-          <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'>
+          <el-option :label="item.binNumber" :value="item.binNumber" v-for="(item,index) in cwNumberList" :key='index'>
           </el-option>
         </el-select>
       </el-form-item>
@@ -43,19 +43,20 @@
         <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名">
-        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName" filterable clearable>
-          <el-option :label="item.goodsName" :value="item.id" v-for="(item,index) in goodsList" :key='index' >
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="dataFlush" filterable clearable>
+          <el-option v-for="item in goodsList" :key="item.goodsName" :label="item.goodsName"
+                  :value="item.goodsName" >
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="grade" label="品级">
+      <!-- <el-form-item prop="grade" label="品级">
         <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" filterable clearable>
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
           <el-option label="三等" value="三等"></el-option>
           <el-option label="等外" value="等外"></el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="现有储量" prop="nowWeight" class="forlist">
         <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
       </el-form-item>
@@ -122,7 +123,12 @@
     data() {
       return {
         deptBudgetList: {
-          grade:"二等"
+          goodsName:'',
+          goodsNameKey:'',
+          useWeight:'',
+          nowWeight:'',
+          warehouseNo:'',
+          warehouseName:''
         },
         size: 10,
         compId: '',
@@ -143,7 +149,7 @@
     activated() {
       this.compId = localStorage.getItem('ws-pf_compId')
       this.deptBudgetList.compId = this.compId
-      let i = localStorage.getItem("pageUp")
+      let i = localStorage.getItem('pageUp')
       if(i != 1){
       this.getcompList()
       this.getList()
@@ -166,10 +172,10 @@
       },
       getList() {
         // this.deptBudgetList.grade = '二等'
-        WarehouseReceiptBankList({constId:"BANK1"}).toPromise().then((response) => {
+        WarehouseReceiptBankList({constId:'BANK1'}).toPromise().then((response) => {
           this.bankList = response
         })
-         WarehouseReceiptBankList({constId:"THREE1"}).toPromise().then((response) => {
+         WarehouseReceiptBankList({constId:'THREE1'}).toPromise().then((response) => {
           this.threeList = response
         })
 
@@ -218,10 +224,10 @@
                   this.deptBudgetList.goodsName = this.goodsList[0].goodsName
                   this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
                 }else {
-                    this.deptBudgetList.nowWeight = ""
-                  this.deptBudgetList.useWeight = ""
-                  this.deptBudgetList.goodsName =""
-                  this.deptBudgetList.goodsNameKey = ""
+                    this.deptBudgetList.nowWeight = ''
+                  this.deptBudgetList.useWeight = ''
+                  this.deptBudgetList.goodsName =''
+                  this.deptBudgetList.goodsNameKey = ''
                 }
             
               }
@@ -235,12 +241,26 @@
       changeGoodsName(val) {
         let _data = this.goodsList
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].id == val) {
+          if (_data[i].goodsName == val) {
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
             this.deptBudgetList.nowWeight = _data[i].storage
             this.deptBudgetList.useWeight =  _data[i].useStorage                                       
-            return
+          }
+        }
+      },
+      dataFlush(){
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].warehouseName == this.deptBudgetList.warehouseName) {
+            let tmpGoodsName = this.warehouseList[i].goodsNameInfos;
+            for(let j = 0;j<tmpGoodsName.length;j++){
+              if(tmpGoodsName[j].binNumber == this.deptBudgetList.warehouseNo){
+                if(tmpGoodsName[j].goodsName == this.deptBudgetList.goodsName){
+                  this.deptBudgetList.useWeight = tmpGoodsName[j].useStorage;
+                  this.deptBudgetList.nowWeight = tmpGoodsName[j].storage;
+                }
+              }
+            }                                   
           }
         }
       },
@@ -257,7 +277,7 @@
         
         let _data = this.cwNumberList
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].id == val) {
+          if (_data[i].binNumber == val) {
             this.deptBudgetList.warehouseNoId = _data[i].id
             this.deptBudgetList.warehouseNo = _data[i].binNumber
             this.deptBudgetList.baseId = _data.baseId
@@ -274,10 +294,11 @@
           }
         }
         if(this.goodsList.length == 0){
-          this.deptBudgetList.goodsName = ""
+          this.deptBudgetList.goodsName = ''
         }else{
            this.deptBudgetList.goodsName = this.goodsList[0].goodsName
         }
+        this.dataFlush();
       },
       // 名头切换
       changeCompOptionList(val) {
@@ -296,7 +317,7 @@
         console.log('切换后仓库数据', val)
         let _data = this.warehouseList
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].id == val) {
+          if (_data[i].warehouseName == val) {
             this.deptBudgetList.warehouseName = _data[i].warehouseName
             this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
             this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
@@ -404,7 +425,7 @@
           }).then(() => {
             addList(this.deptBudgetList).toPromise().then((response) => {
               // this.tableData = response.records
-              localStorage.removeItem("pageUp")
+              localStorage.removeItem('pageUp')
               this.$message.success('提交成功')
               this.$router.push({
                 path: 'warehouseReceiptRegulation'
@@ -428,7 +449,7 @@
           })
       },
       cancel() {
-        localStorage.removeItem("pageUp")
+        localStorage.removeItem('pageUp')
         this.$router.push({
           path: 'warehouseReceiptRegulation'
         })

+ 3 - 3
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -52,14 +52,14 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="grade" label="品级" span="1">
+      <!-- <el-form-item prop="grade" label="品级" span="1">
         <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled>
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
           <el-option label="三等" value="三等"></el-option>
           <el-option label="等外" value="等外"></el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
         <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small" class="existing">
         </el-input>
@@ -184,7 +184,7 @@
       }
     },
     activated() {
-      localStorage.removeItem("pageUp")
+      localStorage.removeItem('pageUp')
       this.getList(this.$route.query.id)
       // this.getcompList()
     },