gjy 3 years ago
parent
commit
ce94582420

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

@@ -12,4 +12,6 @@ export const API_GET_WAREHOUSE_LIST = '/warehouseBaseInfo/getWarehouse'
 export const API_POST_WAREHOUSE_EDIT = '/warehouseBaseInfo/getWarehouse'
 // 获取业务编号
 export const API_GET_BILLNO = '/tradeWarehouseReceiptAppl/getBillNo'
+// 出入库记录
+export const API_GET_RECORD = 'warehouseInOutInfo/selectInfo'
 

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

@@ -6,7 +6,8 @@ import {
     API_POST_WAREHOUSE_EDIT,
     API_GET_BILLNO,
     API_GET_TRADESERVICES_LIST,
-    API_POST_RECEIPTAPPL_ADD
+    API_POST_RECEIPTAPPL_ADD,
+    API_GET_RECORD
 } from '@/api/V2/tradeServicesManagement'
 
 // 列表
@@ -20,3 +21,5 @@ export const getwarehousewarrantList = appRx.get(API_GET_WAREHOUSE_LOOK, errorCa
 export const editList = appRx.post(API_POST_WAREHOUSE_EDIT, errorCatcher, errorHandle, filter)
 // 获取业务编号
 export const getbillno = appRx.get(API_GET_BILLNO, errorCatcher, errorHandle, filter)
+// 出入库记录
+export const getrecord = appRx.get(API_GET_RECORD, errorCatcher, errorHandle, filter)

+ 250 - 17
src/views/tradeServicesManagement/inOutRecord.vue

@@ -13,10 +13,14 @@
 		</el-row>
 		<el-row>
 			<el-col :span="12">
-				<span>鲅鱼圈1号库(102仓位)</span><span>现有储量:1000吨</span>
+      <el-col :span="6">
+				<span>{{deptBudgetList.warehouseName}}(102仓位)</span><span>现有储量:1000吨</span>
+        </el-col>
+        <el-col :span="18">
 				<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
 					start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
 				</el-date-picker>
+        </el-col>
 			</el-col>
 			<el-col :span="12" class="bg-right">
 				<el-button class="bg-bottom" type="primary" size="small" @click="adjustment()">
@@ -43,22 +47,28 @@
       </el-table-column>
         <el-table-column prop="goodsName" label="货名">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="毛重(吨)">
+		<el-table-column prop="grossWeight" label="毛重(吨)">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="皮重(吨)">
+		<el-table-column prop="tare" label="皮重(吨)">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="扣重(吨)">
+		<el-table-column prop="weight" label="扣重(吨)">
+    </el-table-column>
+		<el-table-column prop="netWeight" label="净重(吨)">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="净重(吨)">
-        </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="类型">
-        </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="磅单">
+		<el-table-column prop="inOutType" label="类型">
         </el-table-column>
+		<el-table-column prop="addressUrl" label="磅单">
+      <template scope="scope">
+         <el-button @click='handleLook(1,scope.row)'>查看</el-button>
+       </template>
+    </el-table-column>
 		<el-table-column prop="operatorMajorRoleName" label="结算单">
-        </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="出入库日期">
-        </el-table-column>
+      <template scope="scope">
+         <el-button @click='handleLook(2,scope.row)' v-if="scope.row.settlementSheet">查看</el-button>
+       </template>
+    </el-table-column>
+		<el-table-column prop="inOutDate" label="出入库日期">
+    </el-table-column>
      </el-table>
 	<el-dialog :visible.sync="isShowadjustment" title="收款截图">
      <div>
@@ -86,12 +96,53 @@
         <el-button @click="typePrintCannelClick">取消</el-button>
       </div>
     </div>
+    <el-dialog :visible.sync="isCountShow" title="磅单">
+      <div class="content" v-if="true">
+        <div class="title">磅码单</div>
+        <div class="title">{{tableData.code}}</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">单位</td>
+            <td class="col" colspan="4">{{tableData.companyName}}</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col"colspan="1">{{tableData.inOutType}}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col" colspan="1">{{tableData.carNo}}</td>
+            
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">仓库</td>
+            <td class="col" colspan="4">{{tableData.warehouseName}}</td>
+            <td class="col col-bgc">仓位</td>
+            <td class="col" colspan="1">{{tableData.binNumber}}</td>
+            <td class="col col-bgc">货名</td>
+            <td class="col" colspan="1">{{tableData.goodsName}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">毛重(公斤)</td>
+            <td class="col" colspan="1">{{tableData.grossWeight}}</td>
+            <td class="col col-bgc">皮重(公斤)</td>
+            <td class="col" colspan="2">{{tableData.tare}}</td>
+            <td class="col col-bgc">扣重(公斤)</td>
+            <td class="col" colspan="1">{{tableData.weight}}</td>
+            <td class="col col-bgc">净重(公斤)</td>
+            <td class="col" colspan="1">{{tableData.netWeight}}</td>
+          </tr>
+        </table> 
+        <div class="bottom">
+          <div style='justify-content: space-between;' class="bottom-row1">
+            <div class="config">毛检:{{tableData.secretaryWeigher}}皮检:{{tableData.skinInspector}}</div>
+            <div class="autograph">日期:{{tableData.inOutDate}}</div>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
 	</div>
 </template>
 <script>
 	import {
 		getList,
-	
+    getrecord
 	} from '@/model/tradeServicesManagement/index'
 	export default {
 		components: {},
@@ -106,15 +157,53 @@
 						'打印结算单',
 					]
 				},
+        currentPage:1,
+        pageSize:10,
+        searchType:'',
+        isCountShow:false,
 				isShowPrintType:false,
 				deptBudgetList:{},
-				pickerOptions:[]
+				pickerOptions:[],
+        tableData:{}
 			}
 		},
 		activated() {
-			
+			this.getList()
 		},
 		methods: {
+      getList(){
+        getrecord({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+						// baseId: this.deptBudgetList.baseId,
+						// positionId: this.deptBudgetList.positionId,
+						// warehouseName: this.deptBudgetList.warehouseName,
+            baseId: "264d297cffb543f9a2d5004b11efc124",
+positionId: "6a46921d2f7a468d9c73663d6c28e294",
+warehouseName: "erp测试库",
+						searchType: this.searchType,
+						currentPage: this.currentPage,
+						pageSize: this.pageSize,
+        }).toPromise()
+          .then((res) => {
+            for (let i = 0; i < res.records.length; i++) {
+              if(res.records[i].grossWeight){
+                res.records[i].grossWeight*=1000
+              }
+              if(res.records[i].tare){
+                res.records[i].tare*=1000
+              }
+              if(res.records[i].netWeight){
+                res.records[i].netWeight*=1000
+              }
+              if(res.records[i].grossWeight&&res.records[i].tare&&res.records[i].netWeight){
+                  res.records[i].weight=res.records[i].grossWeight-res.records[i].tare-res.records[i].netWeight
+              }else{
+                res.records[i].weight=null
+              }
+            }
+            this.recordList = res.records
+          })
+      },
 			returnsales() {
 				this.$router.go(-1)
 			},
@@ -133,6 +222,29 @@
 			selectInit(){
 
 			},
+      handleLook(status,item){
+        if(status==1){
+          this.isCountShow=true
+          this.tableData=item
+          this.tableData.code=
+          console.log(this.tableData)
+        }else{
+
+        }
+      },
+      getdate() {
+				var date = new Date()
+				var year = date.getFullYear() //获取完整的年份(4位)
+				var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+				var datetime = date.getDate() //获取当前日(1-31)
+				if (mouth < 10) {
+					mouth = '0' + mouth
+				}
+				if (datetime < 10) {
+					datetime = '0' + datetime
+				}
+				return year + '' + mouth + datetime
+			},
 			typePrintCannelClick() {
 				this.isShowPrintType = false
 			},
@@ -148,13 +260,13 @@
     padding-right: 10px;
     text-align: right;
   }
-	.title {
+	.bg-left.title {
     position: relative;
   }
 .bg-bottom {
     margin: 15px 0px;
   }
-  .title::before {
+  .bg-left.title::before {
     content: '';
     display: inline-block;
     width: 5px;
@@ -194,5 +306,126 @@
   .print-type-checkbox {
     padding-left: 20px;
   }
+  .page2-content {
+    border: 1px solid #D8DCE6;
+    margin-top: 20px;
+    padding: 10px;
+    box-sizing: border-box;
+    text-align: center;
+    border-radius: 4px;
+    padding-bottom: 20px;
+  }
+  table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      #app {
+        /* height: 98vh;
+        position: relative; */
+      }
+
+      .content {
+        // width: 1000px;
+        // padding: 70px 20px 20px 20px;
+        // font-size: 22px;
+        // position: absolute;
+        // top: 0;
+        // bottom: 0;
+        // left: 0;
+        // right: 0;
+        .title {
+          text-align: center;
+          font-size: 36px;
+          font-weight: 500;
+          margin-bottom: 20px;
+        }
+        img {
+          width: 41px;
+          height: 41px;
+          margin-right: 118px;
+        }
+      }
+
+      .table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+      .bottom-row1 {
+        display: flex;
+        /* justify-content: space-between; */
+        margin-top: 5px 0;
+      }
+
+      .bottom-row2 {
+        display: flex;
+      }
+
+      
+
+      .config {
+        margin-top: 10px;
+        margin-right: 240px;
+      }
+      .autograph{
+    margin-top: 10px;
+     }
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .number {
+        text-align: right;
+        margin-bottom: 10px;
+        margin-top: 20px;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 400px;
+        margin: 0 auto;
+        border: 1px solid #ccc;
+        padding: 20px 20px 160px 20px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        margin: auto;
+        height: 450px;
+      }
+
+      .small-title {
+        text-align: center;
+        font-size: 18px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+      }
+
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
 
+      .small-img {
+        margin-right: 0;
+      }
+      .sign{
+        margin-right: 100px;
+      }
 </style>