فهرست منبع

Merge branch 'master' of http://git.zthymaoyi.com:3000/gdc/yiliangyiyun-pc

gjy 3 سال پیش
والد
کامیت
596a17d081

+ 2 - 2
public/static/inspection.html

@@ -159,10 +159,10 @@
             <td v-if="tableData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
             <td v-else class="col col-bgc">待定单价(元/公斤)</td>
             <td class="col">{{tableData.tidalGrainPrice}}</td>
-            <td class="col " v-if="printData.type == '潮粮'">
+            <td class="col " v-if="tableData.type == '潮粮'">
               {{tableData.tidalGrainPrice}}
             </td>
-            <td class="col " v-if="printData.type == '干粮'">
+            <td class="col " v-if="tableData.type == '干粮'">
               {{tableData.dryGrainPrice}}
             </td>
           </tr>

+ 4 - 2
public/static/payprint.html

@@ -14,7 +14,9 @@
         height: 88vh;
         position: relative;
       }
-
+      .simple{
+        height: 120vh !important;
+      }
       .content {
         width: 1000px;
         margin: auto;
@@ -548,7 +550,7 @@
           </div>
           <img :src="printData.paymentScreenshot" class="paymentScreenshot" />
         </div>
-        <div class="center part1" v-if="isShowPrintType3">
+        <div class="center part1" v-if="isShowPrintType3" :class="!selectPrint? 'simple':''">
           <div class="header1">{{ printData.compName}}结算凭证</div>
           <div class="line"></div>
           <div class="line"></div>

+ 9 - 0
src/views/houseSelfCollect/inspectInfo.vue

@@ -414,6 +414,9 @@
                     .toPromise()
                     .then((response) => {
                       this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
                     })
                   this.isShowPrint = true
                   //打印
@@ -469,6 +472,9 @@
                     .toPromise()
                     .then((response) => {
                       this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
                     })
                   this.isShowPrint = true
                 })
@@ -495,6 +501,9 @@
                     .toPromise()
                     .then((response) => {
                       this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
                     })
                   this.isShowPrint = true
                 })

+ 4 - 0
src/views/houseSelfCollect/inspectionManagement.vue

@@ -332,6 +332,7 @@
 					.then((response) => {
 						console.log(response)
 						this.inspect = response.records
+						
 						this.deptBudgetTotal = response.total
 						// this.$forceUpdate();
 					})
@@ -345,6 +346,9 @@
 					.then((response) => {
 						this.isShowPrint = true
 						this.printData = response
+						    if (response.compName == '黑龙江秋收有限公司') {
+               				 this.printData.compName = '黑龙江中天昊元贸易有限公司'
+              					}
 						// window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
 					})
 			},

+ 107 - 103
src/views/houseSelfCollect/paymentManagement.vue

@@ -71,7 +71,8 @@
         <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款
         </ws-button>
         <!-- v-hasPermission="`acquisitionManagement.acquisitionPay.finace`" -->
-        <ws-button type="primary" @click="selectPrint(1)" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
+        <ws-button type="primary" @click="selectPrint(1)"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
         </ws-button>
       </template>
       <template slot="right"> </template>
@@ -147,7 +148,8 @@
               (scope.row.status != '待结算' && !scope.row.approveStatus)
             " @click="print1(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务打印
           </el-button>
-          <el-button @click="previewPayOrder(scope.row)" class="my-pre" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">预览付款单
+          <el-button @click="previewPayOrder(scope.row)" class="my-pre"
+            v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">预览付款单
           </el-button>
           <el-button type="danger" v-if="
               (!scope.row.approveStatus ||
@@ -193,36 +195,22 @@
       <!-- <div v-for="(item, index) in payImg" :key="index" class="pay_img">
         <img :src="item" alt class="img" />
       </div> -->
-      <el-upload
-  action="https://www.zthymaoyi.com/upload/admin"
-  list-type="picture-card"
-  :on-success="handleAvatarSuccess1"
-  :file-list='payImg'
-  :limit='1'>
-    <i slot="default" class="el-icon-plus"></i>
-    <div slot="file" slot-scope="{file}">
-      <img
-        class="el-upload-list__item-thumbnail"
-        :src="file.url" alt=""
-      >
-      
-      <span class="el-upload-list__item-actions"> 
-        <span
-          class="el-upload-list__item-preview"
-          @click="handlePictureCardPreview(file)"
-        >
-          <i class="el-icon-zoom-in"></i>
-        </span>
-        <span
-          v-if="!disabled"
-          class="el-upload-list__item-delete"
-          @click="_handleRemove(file)"
-        >
-          <i class="el-icon-delete"></i>
-        </span>
-      </span>
-    </div>
-</el-upload>
+      <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+        :on-success="handleAvatarSuccess1" :file-list='payImg' :limit='1'>
+        <i slot="default" class="el-icon-plus"></i>
+        <div slot="file" slot-scope="{file}">
+          <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+
+          <span class="el-upload-list__item-actions">
+            <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+              <i class="el-icon-zoom-in"></i>
+            </span>
+            <span v-if="!disabled" class="el-upload-list__item-delete" @click="_handleRemove(file)">
+              <i class="el-icon-delete"></i>
+            </span>
+          </span>
+        </div>
+      </el-upload>
       <!-- <el-upload class="avatar-uploader"  action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
                 :on-success="handleAvatarSuccess1" :on-remove="_handleRemove">
                 <img @mouseout='imgshow' @mouseover="deleteshow=true" v-if="payImg" :src="payImg" class="avatar" />
@@ -251,8 +239,8 @@
       </el-dialog>
     </div>
     <el-dialog :visible.sync="dialogVisible">
-  <img width="100%" :src="dialogImageUrl" alt="">
-</el-dialog>
+      <img width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
     <!--客户信息-->
     <el-dialog width="50%" title="客户信息" :visible.sync="customerInfo" :append-to-body="true" :close="customerclose">
       <el-form class="customer">
@@ -308,17 +296,13 @@
         <el-button @click="customerclose">取 消</el-button>
       </div>
     </el-dialog>
-   <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
-     <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>  
-     <el-image
-          class="my-img"
-          ref="myImg"
-          v-if="paymentReceipt"
-          :src="paymentReceipt"
-          :preview-src-list="[paymentReceipt]">
+    <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
+      <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>
+      <el-image class="my-img" ref="myImg" v-if="paymentReceipt" :src="paymentReceipt"
+        :preview-src-list="[paymentReceipt]">
       </el-image>
     </el-dialog>
-    
+
   </div>
 </template>
 <script>
@@ -359,8 +343,8 @@
     watch: {},
     data() {
       return {
-        paymentReceipt:'',
-        isPreviewPayOrder:false,
+        paymentReceipt: '',
+        isPreviewPayOrder: false,
         printType: 0,
         isShowPrintType1: true,
         isShowPrintType2: true,
@@ -370,7 +354,7 @@
         form: {},
         formLabelWidth: '300px',
         invoicing: '',
-        deleteshow:false,
+        deleteshow: false,
         customerlist: {
           payeeAddressUrls: [],
         },
@@ -412,8 +396,8 @@
         printData: {},
         warehouse: [],
         disabled: false,
-        dialogImageUrl:'',
-        dialogVisible:false,
+        dialogImageUrl: '',
+        dialogVisible: false,
         value1: '', //付款日期
         modification: [],
         userJurisdiction: true,
@@ -447,22 +431,21 @@
       })
     },
     methods: {
-      imgshow(){
-        this.deleteshow=false
+      imgshow() {
+        this.deleteshow = false
         console.log(11111)
       },
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
-      previewPayOrder(val){
-      this.paymentReceipt = val.paymentScreenshot
-      this.isPreviewPayOrder = true
-     console.log(val.paymentScreenshot)
-        
-      },
-      paymentReceiptClose(){
+      previewPayOrder(val) {
+        this.paymentReceipt = val.paymentScreenshot
+        this.isPreviewPayOrder = true
+        console.log(val.paymentScreenshot)
+
       },
+      paymentReceiptClose() {},
       datechange() {
         this.getList()
       },
@@ -726,6 +709,9 @@
                   })
                   .toPromise()
                   .then((response) => {
+                    if (response.compName == '黑龙江秋收有限公司') {
+                      response.compName = '黑龙江中天昊元贸易有限公司'
+                    }
                     index1++
                     let date = new Date()
                     response.currentTime =
@@ -767,6 +753,9 @@
               // val 是数组中每个接口返回的值 res.data
               console.log('两个接口全部加载完成', val1, val2);
               this.printData = val2.data
+              if (val2.data.compName == '黑龙江秋收有限公司') {
+                this.printData.compName = '黑龙江中天昊元贸易有限公司'
+              }
               this.isShowPrint = true
               // if(this.printData.solidGrainPrice){
               //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
@@ -853,16 +842,18 @@
         //   })
         //   return
         // } else {
-          this.showPayImgs = true
-          this.id=row.id
-          var arr=row.paymentScreenshot.split('$')
-          console.log(arr)
-          this.payImg=[]
-          for (let i = 0; i < arr.length; i++) {
-            if(arr[i]!=''){
-              this.payImg.push({url:arr[i]})
-            }
+        this.showPayImgs = true
+        this.id = row.id
+        var arr = row.paymentScreenshot.split('$')
+        console.log(arr)
+        this.payImg = []
+        for (let i = 0; i < arr.length; i++) {
+          if (arr[i] != '') {
+            this.payImg.push({
+              url: arr[i]
+            })
           }
+        }
         // }
       },
       getWarehouse() {
@@ -879,24 +870,24 @@
               this.warehouseName = this.$route.query.warehouseName
               this.warehouseNameKey = this.$route.query.warehouseName
             } else {
-                for(let index = 0 ; index < this.warehouseList.length ; index++){
-                  
-                    if (_wareHouse && _wareHouse.value == this.warehouseList[index].warehouseName) {
-                          this.warehouseName = this.warehouseList[index].warehouseName
-                          this.warehouseNameKey = this.warehouseList[index].warehouseName
-                          return
+              for (let index = 0; index < this.warehouseList.length; index++) {
+
+                if (_wareHouse && _wareHouse.value == this.warehouseList[index].warehouseName) {
+                  this.warehouseName = this.warehouseList[index].warehouseName
+                  this.warehouseNameKey = this.warehouseList[index].warehouseName
+                  return
+                } else {
+                  this.warehouseNameKey = this.warehouseList[0].id
+                  if (this.warehouseName) {
+                    this.warehouseNameKey = this.WAREHOUSE[3].payname
                   } else {
-                    this.warehouseNameKey = this.warehouseList[0].id
-                    if (this.warehouseName) {
-                      this.warehouseNameKey = this.WAREHOUSE[3].payname
-                    } else {
-                      this.WAREHOUSE[3].payname = this.warehouseList[0].id
-                      this.warehouseName = this.warehouseList[0].warehouseName
-                    }
+                    this.WAREHOUSE[3].payname = this.warehouseList[0].id
+                    this.warehouseName = this.warehouseList[0].warehouseName
                   }
+                }
 
               }
-              
+
             }
             this.getList()
           })
@@ -906,25 +897,31 @@
         this.imageUrl = e.url
       },
       handleAvatarSuccess1(file) {
-        if(this.payImg[0]){
-          this.$set(this.payImg[0],'url',file.url)
-        }else{
-          this.payImg[0]={
-            url:file.url
+        if (this.payImg[0]) {
+          this.$set(this.payImg[0], 'url', file.url)
+        } else {
+          this.payImg[0] = {
+            url: file.url
           }
         }
-        settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
+        settlementEdit({
+            id: this.id,
+            paymentScreenshot: this.payImg[0].url
+          }).toPromise()
           .then((response) => {
-            this.showPayImgs=false
+            this.showPayImgs = false
             this.$message.success('修改成功')
             this.getList()
           })
       },
-      _handleRemove(){
-this.payImg[0].url=''
-settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
+      _handleRemove() {
+        this.payImg[0].url = ''
+        settlementEdit({
+            id: this.id,
+            paymentScreenshot: this.payImg[0].url
+          }).toPromise()
           .then((response) => {
-            this.showPayImgs=false
+            this.showPayImgs = false
             this.$message.success('修改成功')
             this.getList()
           })
@@ -1245,6 +1242,9 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
           .toPromise()
           .then((response) => {
             this.printData = response
+            if (response.compName == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
             this.isShowPrint = true
             // if(this.printData.solidGrainPrice){
             //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
@@ -1306,7 +1306,7 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
                 monitorUrl1: this.warehouseList[i].monitorUrl1,
                 monitorUrl2: this.warehouseList[i].monitorUrl2,
                 warehouseNo: this.warehouseList[i].commonWarehouseNo,
-                compId:localStorage.getItem('ws-pf_compId')
+                compId: localStorage.getItem('ws-pf_compId')
               })
             )
             this.WAREHOUSE[3].payname = this.warehouseList[i].id
@@ -1426,17 +1426,18 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
   //   width: 150px;
   //   height: 150px;
   // }
-  .avatar-uploader{
-    position:relative;
-    width:178px;
+  .avatar-uploader {
+    position: relative;
+    width: 178px;
   }
+
   .avatar-uploader .el-upload {
     border: 1px dashed #d9d9d9;
     border-radius: 6px;
     cursor: pointer;
     position: relative;
     overflow: hidden;
-    width:178px;
+    width: 178px;
   }
 
   .avatar-uploader .el-upload:hover {
@@ -1536,16 +1537,19 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
   .el-button {
     margin: 5px;
   }
-  .no-messege{
+
+  .no-messege {
     text-align: center;
     font-size: 30px;
     padding: 50px;
   }
-   .my-img{
-            width: 200px;
-            height: 200px;
-        }
-  .el-icon-delete{
-    font-size:20px;
+
+  .my-img {
+    width: 200px;
+    height: 200px;
+  }
+
+  .el-icon-delete {
+    font-size: 20px;
   }
 </style>

+ 4 - 2
src/views/houseSelfCollect/settlement.vue

@@ -736,16 +736,18 @@ export default {
           })
           return
         }
-
       this.paymentList.id=this.$route.query.id 
       this.paymentList.amountIngPayable = this.paymentList.actualPayment
       this.paymentList.settlementClerk =  localStorage.getItem('ws-pf_staffName')
       postpaymentedit(this.paymentList).toPromise().then((response) => {
          getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
              this.printData= response
+              if (response.compName == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
              console.log(this.printData,'结算打印')
+          this.isShowPrint = true
          })
-         this.isShowPrint = true
         },
         )
     },

+ 8 - 1
src/views/houseSelfCollect/weighingManagement.vue

@@ -362,6 +362,9 @@
               .toPromise()
               .then((response) => {
                 index1++;
+              if (response.compName == '黑龙江秋收有限公司') {
+              response.compName = '黑龙江中天昊元贸易有限公司'
+              }
                 this.jjSelectPrintList.push(response)
                 if (index1 == this.modification.length) {
                   this.printBig(1, this.radio)
@@ -386,6 +389,9 @@
             .toPromise()
             .then((response) => {
               this.dialogData = response
+              if (response.compName == '黑龙江秋收有限公司') {
+              this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
+              }
               this.isShowPrint = true
             })
             .catch((response) => {
@@ -448,7 +454,8 @@
               cangid: this.cangid,
               warehouseName: this.warehouseName,
               paramType: row.qualityInspectionManagement.paramType,
-              customerNumberCard: row.customerNumberCard
+              customerNumberCard: row.customerNumberCard,
+              automaticWeightAcquisition: row.automaticWeightAcquisition
             },
           })
         } else {

+ 19 - 13
src/views/houseSelfCollect/weightCheck.vue

@@ -243,7 +243,7 @@
       }
     },
     mounted() {
-      this.openPort()
+     
     },
     activated() {
       console.log(this.common.name)
@@ -283,6 +283,9 @@
       } else if (this.tpyeNo == 2) {
         this.information = '皮重'
       }
+      if(this.$route.query.automaticWeightAcquisition == '1'){
+        this.openPort()
+      }
 
     },
     deactivated() {
@@ -605,9 +608,9 @@
       },
       cancel() {
 
-        if (this.reader) {
-          this.reader.cancel()
-        }
+        // if (this.reader) {
+        //   this.reader.cancel()
+        // }
         this.$router.push({
           path: 'weighingManagement'
         })
@@ -658,9 +661,9 @@
         // })
       },
       print() {
-        if (this.reader) {
-          this.reader.cancel()
-        }
+        // if (this.reader) {
+        //   this.reader.cancel()
+        // }
         if (!this.weighingList.grossWeight) {
           this.$message({
             message: '毛重不能为空',
@@ -788,9 +791,9 @@
                           grossWeight(this.weighingList)
                           .toPromise()
                           .then((response) => {
-                            if (this.reader) {
-                              this.reader.cancel()
-                            }
+                            // if (this.reader) {
+                            //   this.reader.cancel()
+                            // }
                             this.$notify.success({
                               title: '成功',
                               message: '保存成功',
@@ -817,9 +820,9 @@
               tare(this.weighingList)
                 .toPromise()
                 .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
+                  // if (this.reader) {
+                  //   this.reader.cancel()
+                  // }
                   this.$notify.success({
                     title: '成功',
                     message: '保存成功',
@@ -830,6 +833,9 @@
                     .toPromise()
                     .then((response) => {
                       this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
                       this.inspect.a = '中天'
                       // this.tableData = response
                       this.isShowPrint = true

+ 15 - 13
src/views/warehouse/warehouseManagementGross.vue

@@ -915,7 +915,9 @@ export default {
     //   // this.deptBudgetList.inOutType = '退库'
     //   this.deptBudgetList.inOutTypeKey = '1'
     // }
-    this.openPort()
+    if(this.$route.query.automaticWeightAcquisition == '1'){
+      this.openPort()
+    }
   },
   methods: {
     async closePort() {
@@ -1186,9 +1188,9 @@ export default {
     //提交按钮
     submit() {
       
-      if(this.reader){
-        this.reader.cancel()
-      }
+      // if(this.reader){
+      //   this.reader.cancel()
+      // }
       if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -1768,9 +1770,9 @@ export default {
                   // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
                   // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
                   // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
+                  // if (this.reader) {
+                  //   this.reader.cancel()
+                  // }
                   this.$message.success('添加成功')
                   this.$router.push({
                     path: 'warehouseManagementList',
@@ -1805,9 +1807,9 @@ export default {
     },
     temporaryStorage() {
       
-        if(this.reader){
-          this.reader.cancel()
-        }
+        // if(this.reader){
+        //   this.reader.cancel()
+        // }
       if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -2302,9 +2304,9 @@ export default {
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
+                  // if (this.reader) {
+                  //   this.reader.cancel()
+                  // }
                   this.$message.success('保存成功')
                   this.$router.push({
                     path: 'warehouseManagementList',

+ 30 - 28
src/views/warehouse/warehouseManagementList.vue

@@ -325,12 +325,12 @@
         },
         accessoryTFs: false,
         isShowPrintType: false, //打印
-        headerText: "",
+        headerText: '',
         packtypeList: [], //仓库列表
         parameter: {
           radio: 3,
-          startDate: "",
-          endDate: "",
+          startDate: '',
+          endDate: '',
           proportion: ''
         },
         date: {
@@ -348,9 +348,9 @@
       //导出、打印
       outData(index) {
         if (index == 1) {
-          this.headerText = "导出记录"
+          this.headerText = '导出记录'
         } else if (index == 2) {
-          this.headerText = "打印记录"
+          this.headerText = '打印记录'
         }
         // 获取仓库
         xiala({
@@ -367,38 +367,38 @@
         var strDate = date.getDate()
         var pastdate = new Date(date.getTime() - 24 * 60 * 60 * 1000)
         this.parameter.startDate = pastdate.getFullYear() + '-' + (pastdate.getMonth() + 1) + '-' + pastdate.getDate()
-        this.parameter.endDate = "" + year + "-" + month + "-" + strDate
+        this.parameter.endDate = '' + year + '-' + month + '-' + strDate
         this.$forceUpdate();
         this.isShowPrintType = true
       },
       removePrint() {
-        this.parameter.warehouseName = ""
-        this.parameter.proportion = ""
+        this.parameter.warehouseName = ''
+        this.parameter.proportion = ''
         this.isShowPrintType = false
 
       },
       async submitClick() {
-        if (!this.parameter.radio && this.headerText == "打印记录") {
-          this.$message.error("请选择打印的类型")
+        if (!this.parameter.radio && this.headerText == '打印记录') {
+          this.$message.error('请选择打印的类型')
           return
         }
         if (!this.parameter.startDate) {
-          this.$message.error("请选择打印的起始日期")
+          this.$message.error('请选择打印的起始日期')
           return
         }
         if (!this.parameter.endDate) {
-          this.$message.error("请选择打印的截止日期")
+          this.$message.error('请选择打印的截止日期')
           return
         }
         if (new Date(this.parameter.endDate).getTime() < new Date(this.parameter.startDate).getTime()) {
-          this.$message.error("截止日期输入错误")
+          this.$message.error('截止日期输入错误')
           return
         }
         if (!this.parameter.warehouseName) {
-          this.$message.error("请选择所要打印的仓库")
+          this.$message.error('请选择所要打印的仓库')
           return
         }
-        if (this.headerText == "导出记录") {
+        if (this.headerText == '导出记录') {
           if (this.parameter.radio == 3) {
             const {
               data
@@ -435,7 +435,7 @@
             })
           }
 
-        } else if (this.headerText == "打印记录") {
+        } else if (this.headerText == '打印记录') {
           console.log(this.parameter.startDate)
           addselectinfoList({
               compId: localStorage.getItem('ws-pf_compId'),
@@ -448,7 +448,7 @@
             }).toPromise()
             .then((response) => {
               if (response.records.length == 0) {
-                this.$message.error("暂未查到所要打印的出入库信息")
+                this.$message.error('暂未查到所要打印的出入库信息')
               } else {
                 var warehousePrint = response.records
                 if (this.parameter.proportion) {
@@ -490,9 +490,9 @@
                           }
                           response1.splice(index, 1) //删除已添加过得假数据车牌号
                           if (response1.length == 0) {
-                            sessionStorage.setItem("inOutWarehouse_Print", JSON.stringify(warehousePrint))
-                            let _canshu = ""
-                            _canshu = this.parameter.radio +"&warehouseName=" + this.parameter.warehouseName+"&startDate=" + this.parameter.startDate+"&endDate=" + this.parameter.startDate
+                            sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(warehousePrint))
+                            let _canshu = ''
+                            _canshu = this.parameter.radio +'&warehouseName=' + this.parameter.warehouseName+'&startDate=' + this.parameter.startDate+'&endDate=' + this.parameter.startDate
                             window.open('../../../../../static/warehousePrint.html?type=' + _canshu)
                           }
                         } else { //增量为0时
@@ -500,16 +500,16 @@
                         }
                       }
                       //跳转
-                      sessionStorage.setItem("inOutWarehouse_Print", JSON.stringify(warehousePrint))
-                      let _canshu = ""
-                      _canshu = this.parameter.radio + "&warehouseName=" + this.parameter.warehouseName+"&startDate=" + this.parameter.startDate+"&endDate=" + this.parameter.startDate
+                      sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(warehousePrint))
+                      let _canshu = ''
+                      _canshu = this.parameter.radio + '&warehouseName=' + this.parameter.warehouseName+'&startDate=' + this.parameter.startDate+'&endDate=' + this.parameter.startDate
                       window.open('../../../../../static/warehousePrint.html?type=' + _canshu)
 
                     })
                 } else { //没有增量比例的直接打印
-                  sessionStorage.setItem("inOutWarehouse_Print", JSON.stringify(response.records))
-                  let _canshu1 = ""
-                  _canshu1 = this.parameter.radio + "&warehouseName=" + this.parameter.warehouseName+"&startDate=" + this.parameter.startDate+"&endDate=" + this.parameter.startDate
+                  sessionStorage.setItem('inOutWarehouse_Print', JSON.stringify(response.records))
+                  let _canshu1 = ''
+                  _canshu1 = this.parameter.radio + '&warehouseName=' + this.parameter.warehouseName+'&startDate=' + this.parameter.startDate+'&endDate=' + this.parameter.startDate
                   window.open('../../../../../static/warehousePrint.html?type=' + _canshu1)
                 }
               }
@@ -611,7 +611,8 @@
             warehouseType: this.warehouseType,
             createType: item.createType,
             information: '毛重检斤',
-            allowEdit: item.allowEdit
+            allowEdit: item.allowEdit,
+            automaticWeightAcquisition: item.automaticWeightAcquisition
           },
         })
       },
@@ -628,7 +629,8 @@
             warehouseType: this.warehouseType,
             warehouseId: item.warehouseId,
             information: '皮重检斤',
-            allowEdit: item.allowEdit
+            allowEdit: item.allowEdit,
+            automaticWeightAcquisition: item.automaticWeightAcquisition
           },
         })
       },

+ 3 - 2
src/views/warehouse/warehouseManagementNoWeight.vue

@@ -317,7 +317,7 @@ export default {
             deductionAmount:row.deductionAmount,
             deductionWeight:row.deductionWeight,
             allowEdit:row.allowEdit,
-
+            automaticWeightAcquisition: row.automaticWeightAcquisition
           },
         })
       } else if (row.inOutFlag == 1) {
@@ -359,7 +359,8 @@ export default {
             pureWeight:row.pureWeight,
             deductionAmount:row.deductionAmount,
             deductionWeight:row.deductionWeight,
-            allowEdit:row.allowEdit
+            allowEdit:row.allowEdit,
+            automaticWeightAcquisition:row.automaticWeightAcquisition
           },
         })
       }

+ 10 - 7
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -824,7 +824,6 @@ export default {
     }
   },
   mounted() {
-	  this.openPort()
 	},
   activated() {
     if (this.$route.query.allowEdit == 1) {
@@ -886,6 +885,10 @@ export default {
       .then((response) => {
         this.deptBudgetList2 = response
       })
+      
+    if(this.$route.query.automaticWeightAcquisition == '1'){
+      this.openPort()
+    }
   },
   methods: {
     async closePort() {
@@ -1248,9 +1251,9 @@ export default {
     //提交按钮
     submit() {
       
-      if(this.reader){
-        this.reader.cancel()
-      }
+      // if(this.reader){
+      //   this.reader.cancel()
+      // }
       if (!this.dataList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -1775,9 +1778,9 @@ export default {
                   this.dataList.deductionWeight = Math.round(
                     this.dataList.deductionWeight * 1000
                   )
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
+                  // if (this.reader) {
+                  //   this.reader.cancel()
+                  // }
                   this.$message.success('提交成功')
                   this.$confirm(`是否打印磅单`, {
                     cancelButtonText: '取消',

+ 10 - 7
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -613,7 +613,6 @@ export default {
     }
   },
   mounted() {
-	  this.openPort()
 	},
   activated() {
     if (this.$route.query.allowEdit == 1) {
@@ -656,6 +655,10 @@ export default {
       .then((response) => {
         this.deptBudgetList2 = response
       })
+      
+    if(this.$route.query.automaticWeightAcquisition == '1'){
+      this.openPort()
+    }
   },
   methods: {
     async closePort() {
@@ -970,9 +973,9 @@ export default {
     //提交按钮
     submit() {
       
-      if(this.reader){
-        this.reader.cancel()
-      }
+      // if(this.reader){
+      //   this.reader.cancel()
+      // }
       if (!this.dataList.goodsName) {
         this.$message({
           message: '货名不能为空',
@@ -1396,9 +1399,9 @@ export default {
               addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
+                  // if (this.reader) {
+                  //   this.reader.cancel()
+                  // }
                   this.$message.success('提交成功')
                   this.$confirm(`是否打印磅单`, {
                     cancelButtonText: '取消',

+ 9 - 7
src/views/warehouse/warehouseManagementTare.vue

@@ -773,7 +773,9 @@ export default {
         console.log(response)
         this.deptBudgetList1 = response
       })
-     this.openPort()  
+    if(this.$route.query.automaticWeightAcquisition == '1'){
+      this.openPort()
+    }
   },
   methods: {
     async closePort() {
@@ -1403,9 +1405,9 @@ export default {
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
+                  // if (this.reader) {
+                  //   this.reader.cancel()
+                  // }
                   this.$message.success('保存成功')
                   this.$router.push({
                     path: 'warehouseManagementList',
@@ -1879,9 +1881,9 @@ export default {
             addstorageputList(this.deptBudgetList)
               .toPromise()
               .then((response) => {
-                if (this.reader) {
-                  this.reader.cancel()
-                }
+                // if (this.reader) {
+                //   this.reader.cancel()
+                // }
                 this.$message.success('添加成功')
                 this.$router.push({
                   path: 'warehouseManagementList',