浏览代码

前端 pc 更新代码sdy

zhongtianhaoyuan 3 年之前
父节点
当前提交
866a98ebfd
共有 24 个文件被更改,包括 1291 次插入567 次删除
  1. 281 71
      public/static/print.html
  2. 3 3
      public/static/weightCheck.html
  3. 0 1
      src/views/contractManagement/futuresSalesContractAdd.vue
  4. 262 203
      src/views/houseSelfCollect/acquisitionManagement.vue
  5. 229 108
      src/views/houseSelfCollect/acquisitionManagementAdd.vue
  6. 1 1
      src/views/houseSelfCollect/component/weightCheckPrint.vue
  7. 119 44
      src/views/houseSelfCollect/inspectInfo.vue
  8. 21 13
      src/views/houseSelfCollect/inspectionManagement.vue
  9. 1 13
      src/views/houseSelfCollect/paymentManagement.vue
  10. 17 12
      src/views/houseSelfCollect/settlement.vue
  11. 4 7
      src/views/houseSelfCollect/weighingManagement.vue
  12. 26 15
      src/views/houseSelfCollect/weightCheck.vue
  13. 0 1
      src/views/outboundManagement/weighingManagement.vue
  14. 31 6
      src/views/statisticalReport/stockPurchaseReceiptReportList.vue
  15. 43 18
      src/views/statisticalReport/stockSaleOutReportList.vue
  16. 1 1
      src/views/tranManagement/tranManagementFireFeedback.vue
  17. 1 1
      src/views/tranManagement/tranManagementReceivingloading.vue
  18. 1 1
      src/views/tranManagement/tranManagementTransporFeedback.vue
  19. 0 1
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  20. 89 7
      src/views/warehouse/warehouseManagementDelivery.vue
  21. 29 1
      src/views/warehouse/warehouseManagementPerfectDelivery.vue
  22. 110 31
      src/views/warehouse/warehouseManagementPerfectput.vue
  23. 20 8
      src/views/warehouse/warehouseManagementPut.vue
  24. 2 0
      src/views/workNotification/message.vue

+ 281 - 71
public/static/print.html

@@ -1,79 +1,261 @@
 <!DOCTYPE html>
 <html>
-  <head>
-    <meta charset="utf-8">
-    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
-    <title></title>
-    <style>
-    .content{
+
+<head>
+  <meta charset="utf-8">
+  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+  <title></title>
+  <style>
+    .content {
       text-align: center;
       display: flex;
       align-items: center;
       justify-content: center;
       flex-direction: column;
     }
-    .title{
+
+    .title {
       width: 600px;
       position: relative;
-      border-top: 1px solid #EBEEF5;
-       border-left: 1px solid #EBEEF5;
-        border-right: 1px solid #EBEEF5;
-        padding: 20px;
-        box-sizing: border-box;
+      /* border-top: 1px solid #EBEEF5;
+      border-left: 1px solid #EBEEF5;
+      border-right: 1px solid #EBEEF5; */
+      /* padding: 20px; */
+      box-sizing: border-box;
     }
-    .name{
-      font-size: 20px;
+
+    .name {
+      font-size: 16px;
       font-weight: 500;
       color: #323233;
+      margin: 10px;
     }
-    .price{
+
+    .price {
       position: absolute;
-     top: 25px;
-         right: 10px;
-         bottom: 0;
-         margin: auto;
-         font-size: 14px;
+      right: 10px;
+      bottom: 0;
+      margin: auto;
+      font-size: 14px;
+      top: 0;
+      display: flex;
+    align-items: center;
+    }
+    .tableBox {
+      width: 80px;
+      border-left: 1px solid #ccc;
+      /* border-right: 1px solid #ccc; */
+    }
+    .tableBox tr {
+      font-size: 12px;
+      padding: 0 !important;
+      display: flow-root;
+      /* border-left:1px solid #ccc; */
+      /* border-right:1px solid #ccc;*/
+      border-bottom:1px solid #ccc; 
+      display: flex;
+      justify-content: space-between;
+      padding-right: 10px;
+    }
+
+    .tableBox td {
+      font-size: 12px;
+      padding: 0 !important;
+    }
 
+    .tableBox .cell {
+      text-align: center;
+      padding: 0!important;
+      /* margin:0 2px!important; */
+    }
+    .table-row{
+      display: flex;
+      border-top: 1px solid #ccc;
+    }
+    .el-table--scrollable-x .el-table__body-wrapper{
+      overflow: hidden!important;
     }
-    </style>
-  </head>
-  <body>
-    <div id="app">
-      <div class="content">
-        <div class="title">
-          <div class="name">{{name}}价格对照表(按水分)</div>
-          <div class="price">价格单位:元/公斤</div>
-        </div>
-         <el-table :data="tableData" style="width: 600px" :row-class-name="tableRowClassName" :row-style="{height:'45px'}">
-           <el-table-column prop="waterMin" label="水分下限(%)">
-           </el-table-column>
-           <el-table-column prop="waterMax" label="水分上限(%)">
-           </el-table-column>
-           <el-table-column prop="price1" label="一等单价">
-           </el-table-column>
-           <el-table-column prop="price2" label="二等单价">
-           </el-table-column>
-           <el-table-column prop="price3" label="三等单价">
-           </el-table-column>
-           <el-table-column prop="priceOther" label="等外单价">
-           </el-table-column>
-         </el-table>
+    .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
+    border: 0;
+    padding: 0;
+    text-overflow: initial;
+    border-right: 1px solid #ccc;
+}
+.el-table__row td:nth-of-type(1){
+  width: 40%;
+  /* border-right: 1px solid #ccc!important; */
+  background: #cccccc3d;
+}
+.el-table__row td:nth-of-type(2){
+  width: 60%;
+}
+.el-table::before {
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    height: 0px;
+}
+.content0{
+  margin-bottom: 30vh;
+  /* padding-top: 5vh; */
+}
+.content1{
+  margin-bottom: 30vh;
+  /* padding-top: 5vh; */
+
+}
+.content2{
+  /* padding-top: 5vh; */
+  /* margin-bottom: 30vh; */
+}
+.content3{
+  /* padding-top: 10px; */
+}
+.has-gutter th:nth-of-type(1){
+  width: 40%;
+}
+.tableBox7 tr{
+border-right: 1px solid #ccc!important;
+}
+  </style>
+</head>
+
+<body>
+  <div id="app">
+    <div class="content" :class="'content'+index" v-for="(item,index) in 4">
+      <div class="title">
+        <div class="name" v-if="index==0">一等单价 {{name}}价格对照表(按水分)</div>
+        <div class="name" v-if="index==1">二等单价 {{name}}价格对照表(按水分)</div>
+        <div class="name" v-if="index==2">三等单价 {{name}}价格对照表(按水分)</div>
+        <div class="name" v-if="index==3">等外单价 {{name}}价格对照表(按水分)</div>
+        <div class="price">价格单位:元/公斤</div>
+      </div>
+      <div class="table-row" >
+        <el-table :data="tableData1" :row-class-name="tableRowClassName" class="tableBox">
+          <el-table-column prop="waterMin" label="水分" header-align="center">
+          </el-table-column>
+          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+            </el-table-column> -->
+          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+          </el-table-column>
+          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+          </el-table-column>
+        </el-table>
+        <el-table :data="tableData2" :row-class-name="tableRowClassName" class="tableBox">
+          <el-table-column prop="waterMin" label="水分" header-align="center">
+          </el-table-column>
+          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+           </el-table-column> -->
+          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+          </el-table-column>
+          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+          </el-table-column>
+        </el-table>
+        <el-table :data="tableData3" :row-class-name="tableRowClassName" class="tableBox">
+          <el-table-column prop="waterMin" label="水分" header-align="center">
+          </el-table-column>
+          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+           </el-table-column> -->
+          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+          </el-table-column>
+          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+          </el-table-column>
+        </el-table>
+        <el-table :data="tableData4" :row-class-name="tableRowClassName" class="tableBox">
+          <el-table-column prop="waterMin" label="水分" header-align="center">
+          </el-table-column>
+          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+           </el-table-column> -->
+          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+          </el-table-column>
+          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+          </el-table-column>
+        </el-table>
+        <el-table :data="tableData5" :row-class-name="tableRowClassName" class="tableBox">
+          <el-table-column prop="waterMin" label="水分" header-align="center">
+          </el-table-column>
+          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+           </el-table-column> -->
+          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+          </el-table-column>
+          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+          </el-table-column>
+          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+          </el-table-column>
+        </el-table>
+          <el-table :data="tableData6" :row-class-name="tableRowClassName" class="tableBox">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+             </el-table-column> -->
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
+          <el-table :data="tableData7" :row-class-name="tableRowClassName" class="tableBox tableBox7">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+             </el-table-column> -->
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
       </div>
 
     </div>
-  </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
-  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
-  <script type="text/javascript">
-    new Vue({
-      el: '#app',
-      data: {
-        tableData: "",
-        name:""
-      },
-      computed: {},
-      methods: {
-  tableRowClassName({
+
+  </div>
+</body>
+<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+<script src="https://unpkg.com/element-ui/lib/index.js"></script>
+<script type="text/javascript">
+  new Vue({
+    el: '#app',
+    data: {
+      tableData: [],
+      tableData1: [],
+      tableData2: [],
+      tableData3: [],
+      tableData4: [],
+      tableData5: [],
+      tableData6: [],
+      tableData7: [],
+      name: "",
+      waterMin: '',
+      waterMax: ''
+    },
+    computed: {},
+    methods: {
+      tableRowClassName({
         row,
         rowIndex
       }) {
@@ -95,21 +277,49 @@
         }
         return (false);
       }
-      },
-      mounted() {
-       let _data = localStorage.getItem("pricePrintList")
-         this.name = decodeURIComponent(this.getQueryVariable("name"))
-        console.log(_data)
-        this.tableData = JSON.parse(_data)
-        document.title = this.name+'价格对照表(按水分)'
-        window.print()
-        window.onafterprint = function(event) {
-          window.history.back(-1)
-        };
-      },
-      watch: {
+    },
+    mounted() {
+      let _data = localStorage.getItem("pricePrintList")
+      this.name = decodeURIComponent(this.getQueryVariable("name"))
+      console.log(_data)
+      this.tableData = JSON.parse(_data)
+      // 构造显示数据
+      this.waterMin = this.tableData[0].waterMin
+      this.waterMax = this.tableData[0].waterMax
+      document.title = this.name + '价格对照表(按水分)'
+      for (let i = 0; i < this.tableData.length; i++) {
+        // if(!this.tableData[i].waterMin.toString().split(".")[1]){
+        //   this.tableData[i].waterMin = this.tableData[i].waterMin+'.0'
+        // }
+        if (i <= 39) {
+          this.tableData1.push(this.tableData[i])
+        } else if (i <= 79 && i > 39) {
+          this.tableData2.push(this.tableData[i])
+        }
+        else if (i <= 119 && i > 79) {
+          this.tableData3.push(this.tableData[i])
+        }
+        else if (i <= 159 && i > 119) {
+          this.tableData4.push(this.tableData[i])
+        }
+        else if (i <= 199 && i > 159) {
+          this.tableData5.push(this.tableData[i])
+        }
+        else if (i <= 239 && i > 199) {
+          this.tableData6.push(this.tableData[i])
+        }
+        else if (i <= 279 && i > 239) {
+          this.tableData7.push(this.tableData[i])
+        }
       }
-    })
-  </script>
+      // window.print()
+      window.onafterprint = function (event) {
+        window.history.back(-1)
+      };
+    },
+    watch: {
+    }
+  })
+</script>
 
 </html>

+ 3 - 3
public/static/weightCheck.html

@@ -164,7 +164,7 @@
             <td class="col col-bgc">霉变粒(%)</td>
             <td class="col">{{tableData.qualityInspectionManagement.mildewGrain}}</td>
             <td class="col col-bgc">扣杂(公斤)</td>
-            <td class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td class="col">{{tableData.qualityInspectionManagement.buckleMiscellaneous}}</td>
             <td class="col col-bgc">净重(公斤)</td>
             <td class="col">{{tableData.netWeight}}</td>
           </tr>
@@ -256,10 +256,10 @@
             <div>{{tableData.grossDate}}</div>
           </div>
         
-        <div class="small-row">
+        <!-- <div class="small-row">
           <div>扣杂(公斤)</div>
           <div>{{tableData.buckleMiscellaneous}}</div>
-        </div>
+        </div> -->
         <div class="small-row">
           <div>净重(公斤)</div>
           <div>{{tableData.netWeight}}</div>

+ 0 - 1
src/views/contractManagement/futuresSalesContractAdd.vue

@@ -1457,7 +1457,6 @@ export default {
           }else{ 
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
           }
-          debugger
           addList(this.deptBudgetList)
             .toPromise()
             .then((response) => {

+ 262 - 203
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -3,14 +3,31 @@
   <div>
     <BaseHeaderLayout :leftSpan="12">
       <template slot="left">
-        <el-button type="primary" @click="newAcquisition('','','新增')"
-          v-hasPermission=" `acquisitionManagement.acquisitionCustomer.add`">新增</el-button>
+        <el-button
+          type="primary"
+          @click="newAcquisition('','','新增')"
+          v-hasPermission=" `acquisitionManagement.acquisitionCustomer.add`"
+        >新增</el-button>
         <div>
-          <el-select v-model="selectVal" placeholder="请选择" @change="warehouseChange" style="margin:0 20px">
-            <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
-            </el-option>
+          <el-select
+            v-model="selectVal"
+            placeholder="请选择"
+            @change="warehouseChange"
+            style="margin:0 20px"
+          >
+            <el-option
+              v-for="item in warehouseList"
+              :key="item.id"
+              :label="item.warehouseName"
+              :value="item.id"
+            ></el-option>
           </el-select>
-          <el-checkbox v-hasPermission=" `acquisitionManagement.acquisition.allow`" v-model="checked" @change="allowEdit" :disabled="warehouseList.length==0">允许手动编辑重量</el-checkbox>
+          <el-checkbox
+            v-hasPermission=" `acquisitionManagement.acquisition.allow`"
+            v-model="checked"
+            @change="allowEdit"
+            :disabled="warehouseList.length==0"
+          >允许手动编辑重量</el-checkbox>
         </div>
       </template>
     </BaseHeaderLayout>
@@ -23,7 +40,7 @@
         <el-checkbox v-model="checked" @change="allowEdit">允许手动编辑重量</el-checkbox>
       </div>
       <el-button type="primary" @click="newAcquisition('','','新增')">新增</el-button>
-    </div> -->
+    </div>-->
     <el-dialog title="新增" :visible.sync="newAcquisitionDialogVisible" width="50%">
       <acquisitionManagementAdd></acquisitionManagementAdd>
     </el-dialog>
@@ -38,9 +55,7 @@
         <el-table-column prop="warehouseName" label="仓库名称"></el-table-column>
         <el-table-column prop="goodsName" label="货名"></el-table-column>
         <el-table-column label="水分范围(%)">
-          <template slot-scope="{ row }">
-            {{row.waterMin}}-{{row.waterMax}}
-          </template>
+          <template slot-scope="{ row }">{{row.waterMin}}-{{row.waterMax}}</template>
         </el-table-column>
         <el-table-column prop="waterBase" label="基准水分(%)"></el-table-column>
         <el-table-column prop="deductWeight" label="扣重比"></el-table-column>
@@ -51,243 +66,287 @@
         <el-table-column label="操作" width="300">
           <template slot-scope="scope">
             <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'查看')">查看</el-button>
-            <el-button v-if="scope.row.status!='审核中'" size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')"
-              v-hasPermission=" `acquisitionManagement.acquisitionCustomer.edit`">编辑</el-button>
-            <el-button v-if="scope.row.status=='审核中'" size="mini" :disabled="!scope.row.taskId"
-              @click="newAcquisition(scope.$index, scope.row,'审核中')">审核中</el-button>
-            <el-button size="mini" :disabled="!userJurisdiction" type="danger" @click="delRow(scope.$index, scope.row)"
-              v-hasPermission=" `acquisitionManagement.acquisitionCustomer.delete`">删除</el-button>
+            <el-button
+              v-if="scope.row.status!='审核中'"
+              size="mini"
+              @click="newAcquisition(scope.$index, scope.row,'编辑')"
+              v-hasPermission=" `acquisitionManagement.acquisitionCustomer.edit`"
+            >编辑</el-button>
+            <el-button
+              v-if="scope.row.status=='审核中'"
+              size="mini"
+              :disabled="!scope.row.taskId"
+              @click="newAcquisition(scope.$index, scope.row,'审核中')"
+            >审核中</el-button>
+            <el-button
+              size="mini"
+              :disabled="!userJurisdiction"
+              type="danger"
+              @click="delRow(scope.$index, scope.row)"
+              v-hasPermission=" `acquisitionManagement.acquisitionCustomer.delete`"
+            >删除</el-button>
             <el-button size="mini" @click="print(scope.$index, scope.row)">打印</el-button>
           </template>
         </el-table-column>
       </el-table>
       <div class="paging">
-        <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>
+        <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>
   </div>
 </template>
 <script>
-  import {
-    getPurchasePrice,
-    selectWarehouseSelf,
-    purchasePriceAllowEdit,
-    purchasePriceLook,
-    purchasePriceDel
-  } from '@/model/houseSelfCollect/index'
-  import {
-    getHp
-  } from '@/utils/getHasPermission'
-  export default {
-    components: {},
-    watch: {},
-    data() {
-      return {
-        newAcquisitionDialogVisible: false,
-        visible: false,
-        checked: false,
-        currentPage: 1,
-        pageSize: 10,
-        deptBudgetTotal: 0,
-        deptCircularPage: {},
-        compId: '',
-        accountName: '',
-        tableData: [],
-        selectVal: '',
-        goodsNameList: [],
-        warehouseList: [],
-        userJurisdiction: false,
-        userJurisdictionAllow: true,
-        warehouseName:'',
-      }
+import {
+  getPurchasePrice,
+  selectWarehouseSelf,
+  purchasePriceAllowEdit,
+  purchasePriceLook,
+  purchasePriceDel
+} from '@/model/houseSelfCollect/index'
+import { getHp } from '@/utils/getHasPermission'
+export default {
+  components: {},
+  watch: {},
+  data() {
+    return {
+      newAcquisitionDialogVisible: false,
+      visible: false,
+      checked: false,
+      currentPage: 1,
+      pageSize: 10,
+      deptBudgetTotal: 0,
+      deptCircularPage: {},
+      compId: '',
+      accountName: '',
+      tableData: [],
+      selectVal: '',
+      goodsNameList: [],
+      warehouseList: [],
+      userJurisdiction: false,
+      userJurisdictionAllow: true,
+      warehouseName: ''
+    }
+  },
+  activated() {
+    //获取公司id
+    this.compId = sessionStorage.getItem('ws-pf_compId')
+    //用户名
+    this.accountName = sessionStorage.getItem('ws-pf_staffName')
+    this.getWarehouseSelf()
+    //获取用户权限,决策人、统计
+    this.getUserJurisdiction()
+  },
+  computed() {},
+  created() {},
+  methods: {
+    getUserJurisdiction() {
+      this.userJurisdiction = getHp('acquisitionManagement.acquisition.view')
+      this.userJurisdictionAllow = getHp(
+        'acquisitionManagement.acquisition.allow'
+      )
+      this.userJurisdictionAudit = getHp(
+        'acquisitionManagement.acquisition.edit'
+      )
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
     },
-    activated() {
-      //获取公司id
-      this.compId = sessionStorage.getItem('ws-pf_compId')
-      //用户名
-      this.accountName = sessionStorage.getItem('ws-pf_staffName')
-      this.getWarehouseSelf()
-      //获取用户权限,决策人、统计
-      this.getUserJurisdiction()
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
     },
-    computed() {},
-    created() {},
-    methods: {
-      getUserJurisdiction() {
-        this.userJurisdiction = getHp('acquisitionManagement.acquisition.view')
-        this.userJurisdictionAllow = getHp('acquisitionManagement.acquisition.allow')
-        this.userJurisdictionAudit = getHp('acquisitionManagement.acquisition.edit')
-      },
-      handleSizeChange(val) {
-        console.log(`每页 ${val} 条`)
-        this.pageSize = val
-        this.getList()
-      },
-      handleCurrentChange(val) {
-        this.currentPage = val
-        console.log(`当前页: ${val}`)
-        this.getList()
-      },
-      warehouseChange(e) {
-           for (let i = 0; i < this.warehouseList.length; i++) {
+    warehouseChange(e) {
+      for (let i = 0; i < this.warehouseList.length; i++) {
         if (this.warehouseList[i].id == this.selectVal) {
+          sessionStorage.setItem(
+            'houseSelfCollect_house',
+            JSON.stringify(this.warehouseList[i])
+          )
           this.warehouseName = this.warehouseList[i].warehouseName
           this.WAREHOUSE[0].payname = this.warehouseList[i].id
         }
       }
-        let _obj = this.warehouseList.find((item) => {
-          return item.id === this.selectVal;
-        });
-        if (_obj.allowEdit == 1) {
-
-          this.checked = true
-        } else {
-          this.checked = false
-        }
-        this.currentPage = 1
-        this.pageSize = 10
-        this.getList()
-      },
-      newAcquisition(index, row, type) {
-        let _obj = {}
-        let _query = {}
-        switch (type) {
-          case '新增':
-            _obj = this.warehouseList.find((item) => {
-              return item.id === this.selectVal;
-            });
-            _query = {
-              warehouseId: _obj.id,
-              warehouseName: _obj.warehouseName,
-              compId: this.compId,
-              type: type,
-              goodsNameList: this.goodsNameList
-            }
-            break
-          default:
-            _query = {
-              data: JSON.stringify(row),
-              type: type,
-              goodsNameList: this.goodsNameList
-            }
-            break
-        }
-        this.$router.push({
-          name: 'acquisitionManagementAdd',
-          query: _query
-        })
-      },
-      //获取仓库
-      getWarehouseSelf() {
-        selectWarehouseSelf({
-          compId: this.compId,
-        }).toPromise().then((response) => {
+      let _obj = this.warehouseList.find(item => {
+        return item.id === this.selectVal
+      })
+      if (_obj.allowEdit == 1) {
+        this.checked = true
+      } else {
+        this.checked = false
+      }
+      this.currentPage = 1
+      this.pageSize = 10
+      this.getList()
+    },
+    newAcquisition(index, row, type) {
+      let _obj = {}
+      let _query = {}
+      switch (type) {
+        case '新增':
+          _obj = this.warehouseList.find(item => {
+            return item.id === this.selectVal
+          })
+          _query = {
+            warehouseId: _obj.id,
+            warehouseName: _obj.warehouseName,
+            compId: this.compId,
+            type: type,
+            goodsNameList: this.goodsNameList
+          }
+          break
+        default:
+          _query = {
+            data: JSON.stringify(row),
+            type: type,
+            goodsNameList: this.goodsNameList
+          }
+          break
+      }
+      this.$router.push({
+        name: 'acquisitionManagementAdd',
+        query: _query
+      })
+    },
+    //获取仓库
+    getWarehouseSelf() {
+      selectWarehouseSelf({
+        compId: this.compId
+      })
+        .toPromise()
+        .then(response => {
           this.warehouseList = response
           // if(this.userJurisdiction){
           //   this.warehouseList.unshift({warehouseName:response[0].flag})
           // }
-                console.log(this.WAREHOUSE[0].payname)
-          this.selectVal = this.warehouseList[0].id
-          if (this.warehouseName) {
-            this.selectVal = this.WAREHOUSE[0].payname
+          debugger
+          let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
+          if (_wareHouse) {
+            _wareHouse = JSON.parse(_wareHouse)
+            this.selectVal = _wareHouse.id
+            this.warehouseName = _wareHouse.warehouseName
+            if (_wareHouse.allowEdit == 1) {
+              this.checked = true
+            } else {
+              this.checked = false
+            }
           } else {
-            this.WAREHOUSE[0].payname = this.warehouseList[0].id
+            console.log(this.WAREHOUSE[0].payname)
+            this.selectVal = this.warehouseList[0].id
+            if (this.warehouseName) {
+              this.selectVal = this.WAREHOUSE[0].payname
+            } else {
+              this.WAREHOUSE[0].payname = this.warehouseList[0].id
+            }
+            this.warehouseName = this.warehouseList[0].warehouseName
+            if (this.warehouseList[0].allowEdit == 1) {
+              this.checked = true
+            } else {
+              this.checked = false
+            }
           }
-          this.warehouseName = this.warehouseList[0].warehouseName
-          if (this.warehouseList[0].allowEdit == 1) {
 
-            this.checked = true
-          } else {
-            this.checked = false
-          }
           // this.tableData = response.records
           this.getList()
         })
-      },
-      //获取列表数据
-      getList() {
-        this.goodsNameList = []
-        getPurchasePrice({
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          warehouseId: this.selectVal,
-          compId: this.compId,
-
-        }).toPromise().then((response) => {
+    },
+    //获取列表数据
+    getList() {
+      this.goodsNameList = []
+      getPurchasePrice({
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        warehouseId: this.selectVal,
+        compId: this.compId
+      })
+        .toPromise()
+        .then(response => {
           for (let i = 0; i < response.records.length; i++) {
             this.goodsNameList.push(response.records[i].goodsName)
           }
           this.tableData = response.records
           this.deptBudgetTotal = response.total
         })
-      },
-      allowEdit(val) {
-        purchasePriceAllowEdit({
-          warehouseId: this.selectVal
-        }).toPromise().then((response) => {
+    },
+    allowEdit(val) {
+      purchasePriceAllowEdit({
+        warehouseId: this.selectVal
+      })
+        .toPromise()
+        .then(response => {
           // this.tableData = response.records
         })
-      },
-      // 删除
-      delRow(index, row) {
-        //删除
-        this.$confirm('确定删除该条设置?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
+    },
+    // 删除
+    delRow(index, row) {
+      //删除
+      this.$confirm('确定删除该条设置?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          purchasePriceDel({
+            id: row.id
           })
-          .then(() => {
-            purchasePriceDel({
-                id: row.id,
-              })
-              .toPromise()
-              .then((response) => {
-                this.$notify.success({
-                  title: '成功',
-                  message: '删除成功',
-                })
-                this.getList()
+            .toPromise()
+            .then(response => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功'
               })
-              .catch((response) => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
-          })
-          .catch(() => {
-            return false
-          })
-      },
-      print(index, row) {
-        // 打印价格对照表
-        purchasePriceLook({
-          id: row.id
-        }).toPromise().then((response) => {
+              this.getList()
+            })
+            .catch(response => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    print(index, row) {
+      debugger
+      // 打印价格对照表
+      purchasePriceLook({
+        id: row.id
+      })
+        .toPromise()
+        .then(response => {
           // this.tableData = response.records
           // this.getList()
-          localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
-          window.open( '../../../static/print.html?name=' + row.goodsName)
+          localStorage.setItem(
+            'pricePrintList',
+            JSON.stringify(response.detailPrints)
+          )
+          window.open('../../../static/print.html?name=' + row.goodsName)
         })
-      },
-      validate() {
-
-      }
     },
+    validate() {}
   }
+}
 </script>
 <style lang="scss" scoped>
-  .header {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-  }
+.header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
 
-  /deep/.el-table .cell {
-    text-align: center;
-  }
+/deep/.el-table .cell {
+  text-align: center;
+}
 
-  .paging {
-    text-align: center;
-  }
+.paging {
+  text-align: center;
+}
 </style>

+ 229 - 108
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -26,7 +26,7 @@
               <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterBase" @input="changeBaseWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
-          <div class="grid-content">
+          <div v-if="baseInfoForm.paramType != '1'" class="grid-content">
             <el-form-item label="扣重比">
               <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.deductWeight" :disabled="!isEdit"></el-input>
             </el-form-item>
@@ -53,6 +53,19 @@
               <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.saleLimit" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
+          <div class="grid-content">
+            <el-form-item label="参数类型">
+              <el-radio-group
+                @change="paramTypeChange"
+                v-model="baseInfoForm.paramType"
+                :disabled="!isEdit"
+              >
+                <el-radio label="1" >升水扣重</el-radio>
+                <el-radio label="2">升水扣钱</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+          
         </div>
       </el-form>
       <el-row class="row3">
@@ -62,9 +75,9 @@
         </div>
         <div class="content" v-for="(item,index) in priceList" :key="index">
           <div class="top">
-            <div class="left">
-              <div class="text">基准单价(元/公斤)</div>
-              <el-input type="number" @mousewheel.native.prevent v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
+            <div  class="left">
+              <div v-if="baseInfoForm.paramType == '2'"class="text">基准单价(元/公斤)</div>
+              <el-input v-if="baseInfoForm.paramType == '2'"type="number" @mousewheel.native.prevent v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
             </div>
             <el-button @click="delSetPrice(item,index)" :disabled="!isEdit">删除</el-button>
           </div>
@@ -79,7 +92,8 @@
           <div class="count">
             <div class="left">
               <div>水分(%)</div>
-              <div>降幅(元/0.1%)</div>
+              <div v-if="baseInfoForm.paramType == '2'">降幅(元/0.1%)</div>
+              <div v-else>扣重比</div>
             </div>
             <div class="right">
               <div class="line"></div>
@@ -301,7 +315,8 @@
             passDate: '',
             dryGrainPrice: '',
             details: [],
-            detailPrints: []
+            detailPrints: [],
+            paramType:'1'
           }
           this.baseInfoForm.warehouseId = this.$route.query.warehouseId
           this.baseInfoForm.warehouseName = this.$route.query.warehouseName
@@ -366,6 +381,9 @@
     },
     mounted() {},
     methods: {
+      paramTypeChange(){
+        // this.makeTableList()
+      },
       // 查看/编辑获取数据
       getData() {
         this.type = this.$route.query.type
@@ -691,14 +709,16 @@
           }
           return false
         }
-        if (this.baseInfoForm.deductWeight == '' || _baseWaterValidate(0, 3, 2, '', 'deductWeight', parseFloat(this
-            .baseInfoForm.deductWeight))) {
-          if (_baseWaterValidate(0, 3, 2, '', 'deductWeight', parseFloat(this.baseInfoForm.deductWeight))) {
-            that.$message.error('扣重比输入错误!');
-          } else {
-            this.$message.error('扣重比不能为空!');
+        if(this.baseInfoForm.paramType == '2'){
+          if (this.baseInfoForm.deductWeight == '' || _baseWaterValidate(0, 3, 2, '', 'deductWeight', parseFloat(this
+              .baseInfoForm.deductWeight))) {
+            if (_baseWaterValidate(0, 3, 2, '', 'deductWeight', parseFloat(this.baseInfoForm.deductWeight))) {
+              that.$message.error('扣重比输入错误!');
+            } else {
+              this.$message.error('扣重比不能为空!');
+            }
+            return false
           }
-          return false
         }
         if (this.baseInfoForm.dryGrainPrice == '' || _baseWaterValidate(0, 1000, 4, '', 'deductWeight', parseFloat(this
             .baseInfoForm.dryGrainPrice))) {
@@ -754,8 +774,8 @@
         }
         for (let i = 0; i < this.priceList.length; i++) {
           let _item = this.priceList[i]
-          if (_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 2, '', 'deductWeight', parseFloat(_item
-              .basicUnitPrice))) {
+          if (this.baseInfoForm.paramType == '2' &&(_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 8, '', 'deductWeight', parseFloat(_item
+              .basicUnitPrice)))) {
             if (_item.basicUnitPrice == '') {
               that.$message.error('基准单价不能为空!');
             } else {
@@ -771,12 +791,22 @@
           for (let j = 0; j < _item.detailList.length; j++) {
             let _item1 = _item.detailList[j]
             if (_item1.type == 4) {
-              if (_item1.jfprice == '' || _baseWaterValidate(0, 100, 3, '', 'deductWeight', parseFloat(_item1
+              if (_item1.jfprice == '' || _baseWaterValidate(0, 100, 8, '', 'deductWeight', parseFloat(_item1
                   .jfprice))) {
                 if (_item1.jfprice == '') {
-                  that.$message.error('降幅价格不能为空!');
+                  if(this.baseInfoForm.paramType == '1'){
+                    that.$message.error('扣重比不能为空!');
+                  }
+                  else{
+                    that.$message.error('降幅价格不能为空!');
+                  }
                 } else {
-                  that.$message.error('降幅输入错误!');
+                  if(this.baseInfoForm.paramType == '1'){
+                    that.$message.error('扣重比输入错误!');
+                  }
+                  else{
+                    that.$message.error('降幅输入错误!');
+                  }
                 }
                 return false
               }
@@ -822,7 +852,6 @@
           isValidate = this.validate()
          
         if (isValidate) {
-          this.isCountShow = false
           this.makeTableList()
           this.baseInfoForm.details = []
           this.makePriceDataList()
@@ -854,17 +883,18 @@
               this.getEditCheckList()
               isValidate = this.validate()
               if (isValidate) {
-                purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
-                  let that = this
-                  this.$confirm(`是否确定通过?`, {
-                    cancelButtonText: '取消',
-                    confirmButtonText: '确定',
-                    type: 'warning',
-                  }).then(() => {
+                let that = this
+                this.$confirm(`是否确定通过?`, {
+                  cancelButtonText: '取消',
+                  confirmButtonText: '确定',
+                  type: 'warning',
+                }).then(() => {
+                  purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
                     //审核
                     that.audit(this.baseInfoForm, true, 2)
                   })
                 })
+                
               }
               break;
           }
@@ -906,52 +936,83 @@
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
         let _waterMax = parseFloat(this.baseInfoForm.waterBase)
         let _count = (_waterMax - _waterMin) / 0.1 
-        for (let i = 0; i < _count; i++) {
-          // if (i == 0) {
-          //   _waterMax -= 0.1
-          // } 
-          // else {
-          //   _waterMax -= 0.5
-          // }
-          _waterMax -= 0.1
-          let priceList = this.calculatePrice(this.keepOneDecimal(_waterMax ))
-          
-          _obj = {
-            waterMin: this.keepOneDecimal(_waterMax ),
-            waterMax: this.keepOneDecimal(_waterMax + 0.09),
-            price1: this.keepTwoDecimal(priceList[0]),
-            price2: this.keepTwoDecimal(priceList[1]),
-            price3: this.keepTwoDecimal(priceList[2]),
-            priceOther: this.keepTwoDecimal(priceList[3]),
-          }
-          _list.unshift(_obj)
-        }
-        _obj = {}
-        _waterMin = parseFloat(this.baseInfoForm.waterBase)
-        _waterMax = parseFloat(this.baseInfoForm.waterMax)
-        _count = (_waterMax - _waterMin) / 0.1
-        for (let i = 0; i < _count; i++) {
-          // if (i == 0) {
-          //   _waterMin += 0.4
-          // } else {
-          //   _waterMin += 0.5
-          // }
-          if (i != 0) {
-            _waterMin += 0.1
+        if(this.baseInfoForm.paramType == '2'){
+          for (let i = 0; i < _count; i++) {
+            // if (i == 0) {
+            //   _waterMax -= 0.1
+            // } 
+            // else {
+            //   _waterMax -= 0.5
+            // }
+            _waterMax -= 0.1
+            let priceList = this.calculatePrice(this.keepOneDecimal(_waterMax ))
+            
+            _obj = {
+              waterMin: this.keepOneDecimal(_waterMax ),
+              waterMax: this.keepOneDecimal(_waterMax + 0.09),
+              price1: this.keepTwoDecimal(priceList[0]),
+              price2: this.keepTwoDecimal(priceList[1]),
+              price3: this.keepTwoDecimal(priceList[2]),
+              priceOther: this.keepTwoDecimal(priceList[3]),
+            }
+            _list.unshift(_obj)
           }
-          
-          let priceList = this.calculatePriceRight(this.keepOneDecimal(_waterMin ))
-          _obj = {
-            waterMin: this.keepOneDecimal(_waterMin ),
-            waterMax: this.keepOneDecimal(_waterMin + 0.09),
-            price1: this.keepTwoDecimal(priceList[0]),
-            price2: this.keepTwoDecimal(priceList[1]),
-            price3: this.keepTwoDecimal(priceList[2]),
-            priceOther: this.keepTwoDecimal(priceList[3]),
+          _obj = {}
+          _waterMin = parseFloat(this.baseInfoForm.waterBase)
+          _waterMax = parseFloat(this.baseInfoForm.waterMax)
+          _count = (_waterMax - _waterMin) / 0.1
+          for (let i = 0; i < _count; i++) {
+            // if (i == 0) {
+            //   _waterMin += 0.4
+            // } else {
+            //   _waterMin += 0.5
+            // }
+            if (i != 0) {
+              _waterMin += 0.1
+            }
+            
+            let priceList = this.calculatePriceRight(this.keepOneDecimal(_waterMin ))
+            _obj = {
+              waterMin: this.keepOneDecimal(_waterMin ),
+              waterMax: this.keepOneDecimal(_waterMin + 0.09),
+              price1: this.keepTwoDecimal(priceList[0]),
+              price2: this.keepTwoDecimal(priceList[1]),
+              price3: this.keepTwoDecimal(priceList[2]),
+              priceOther: this.keepTwoDecimal(priceList[3]),
+            }
+            _list.push(_obj)
+            console.log('_list', _list)
+
           }
-          _list.push(_obj)
-          console.log('_list', _list)
+        }
+        else{
+          _obj = {}
+          _waterMin = parseFloat(this.baseInfoForm.waterMin)
+          _waterMax = parseFloat(this.baseInfoForm.waterMax)
+          _count = (_waterMax - _waterMin) / 0.1
+          for (let i = 0; i < _count; i++) {
+            // if (i == 0) {
+            //   _waterMin += 0.4
+            // } else {
+            //   _waterMin += 0.5
+            // }
+            if (i != 0) {
+              _waterMin += 0.1
+            }
+            
+            let priceList = this.calculatePriceRight(this.keepOneDecimal(_waterMin ))
+            _obj = {
+              waterMin: this.keepOneDecimal(_waterMin ),
+              waterMax: this.keepOneDecimal(_waterMin + 0.09),
+              price1: this.keepTwoDecimal(priceList[0]),
+              price2: this.keepTwoDecimal(priceList[1]),
+              price3: this.keepTwoDecimal(priceList[2]),
+              priceOther: this.keepTwoDecimal(priceList[3]),
+            }
+            _list.push(_obj)
+            console.log('_list', _list)
 
+          }
         }
         this.baseInfoForm.detailPrints = _list
         this.tableData = _list
@@ -989,27 +1050,54 @@
               if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
                 if (_priceList[i].detailList[j].type != 1) {
                   let baseprice = ''
-                  if (j == index) {
-                    baseprice = parseFloat(_priceList[i].basicUnitPrice)
-                  } else {
-                    baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) + (parseFloat(_priceList[i].detailList[j + 2]
-                      .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.1 * parseFloat(_priceList[i]
-                      .detailList[j + 1].jfprice))
+                  if(this.baseInfoForm.paramType == '1'){
+                    if (j == index) {
+                      baseprice = parseFloat(_priceList[i].basicUnitPrice)
+                    } else {
+                      baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) + (parseFloat(_priceList[i].detailList[j + 2]
+                        .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.1 * (this.baseInfoForm.dryGrainPrice * (parseFloat(_priceList[i].detailList[j].water) 
+                              - parseFloat(_priceList[i].detailList[j - 2].water))*parseFloat(_priceList[i].detailList[j - 1].jfprice)/100/((parseFloat(_priceList[i].detailList[j].water) 
+                              - parseFloat(_priceList[i].detailList[j - 2].water))/0.1)))
+                    }
+                    _leftObj.priceList.push({
+                      index: j,
+                      priceStart: parseFloat(_priceList[i].detailList[j].water),
+                      priceEnd: parseFloat(_priceList[i].detailList[j - 2].water),
+                      type: parseFloat(_priceList[i].detailList[j].type),
+                      water: _priceList[i].detailList[j].water,
+                      jfprice: parseFloat(this.baseInfoForm.dryGrainPrice * (parseFloat(_priceList[i].detailList[j].water) 
+                              - parseFloat(_priceList[i].detailList[j - 2].water))*parseFloat(_priceList[i].detailList[j - 1].jfprice)/100/((parseFloat(_priceList[i].detailList[j].water) 
+                              - parseFloat(_priceList[i].detailList[j - 2].water))/0.1)),
+                      baseprice: baseprice,
+                      price: (parseFloat(_priceList[i].detailList[j].water) - parseFloat(_priceList[i].detailList[j -
+                        2].water)) / 0.1 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
+                    })
                   }
-                  _leftObj.priceList.push({
-                    index: j,
-                    priceStart: parseFloat(_priceList[i].detailList[j].water),
-                    priceEnd: parseFloat(_priceList[i].detailList[j - 2].water),
-                    type: parseFloat(_priceList[i].detailList[j].type),
-                    water: _priceList[i].detailList[j].water,
-                    jfprice: parseFloat(_priceList[i].detailList[j - 1].jfprice),
-                    baseprice: baseprice,
-                    price: (parseFloat(_priceList[i].detailList[j].water) - parseFloat(_priceList[i].detailList[j -
-                      2].water)) / 0.1 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
-                  })
+                  else{
+                    if (j == index) {
+                      baseprice = parseFloat(_priceList[i].basicUnitPrice)
+                    } else {
+                      baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) + (parseFloat(_priceList[i].detailList[j + 2]
+                        .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.1 * parseFloat(_priceList[i]
+                        .detailList[j + 1].jfprice))
+                    }
+                    _leftObj.priceList.push({
+                      index: j,
+                      priceStart: parseFloat(_priceList[i].detailList[j].water),
+                      priceEnd: parseFloat(_priceList[i].detailList[j - 2].water),
+                      type: parseFloat(_priceList[i].detailList[j].type),
+                      water: _priceList[i].detailList[j].water,
+                      jfprice: parseFloat(_priceList[i].detailList[j - 1].jfprice),
+                      baseprice: baseprice,
+                      price: (parseFloat(_priceList[i].detailList[j].water) - parseFloat(_priceList[i].detailList[j -
+                        2].water)) / 0.1 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
+                    })
+                  }
+                  
                 }
               }
             }
+          
             // for (let j = (_priceList[i].detailList.length + 1) / 2 - 1; j > 0; j--) {
             //   if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
             //     if (_priceList[i].detailList[j].type != 1) {
@@ -1037,32 +1125,65 @@
             // }
             this.left.push(_leftObj)
             console.log('this.left', this.left)
-                  for (let k = index; k <= _priceList[i].detailList.length; k++) {
-              if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
-                if (_priceList[i].detailList[k].type != 3) {
-                  let baseprice = ''
-                  if (k == index) {
-                    baseprice = parseFloat(_priceList[i].basicUnitPrice)
-                  } else {
-                    baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) - (parseFloat(_priceList[i].detailList[k]
-                      .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.1 * parseFloat(_priceList[i]
-                      .detailList[k - 1].jfprice))
+            if(this.baseInfoForm.paramType == '2'){
+              for (let k = index; k <= _priceList[i].detailList.length; k++) {
+                if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
+                  if (_priceList[i].detailList[k].type != 3) {
+                    let baseprice = ''
+                    if (k == index) {
+                        baseprice = parseFloat(_priceList[i].basicUnitPrice)
+                    } else {
+                        baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) - (parseFloat(_priceList[i].detailList[k]
+                          .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.1 * parseFloat(_priceList[i]
+                          .detailList[k - 1].jfprice))
+                    }
+                    _rightObj.priceList.push({
+                      index: k,
+                      priceStart: parseFloat(_priceList[i].detailList[k].water),
+                      priceEnd: parseFloat(_priceList[i].detailList[k + 2].water),
+                      type: parseFloat(_priceList[i].detailList[k].type),
+                      water: _priceList[i].detailList[k].water,
+                      jfprice: parseFloat(_priceList[i].detailList[k + 1].jfprice),
+                      baseprice: baseprice,
+                      price: (parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
+                        k].water)) / 0.1 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
+                    })
+                  }
+                }
+              }
+            }
+            else{
+              for (let k = 0; k <= _priceList[i].detailList.length; k++) {
+                if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
+                  if (_priceList[i].detailList[k].type != 3) {
+                    let baseprice = ''
+                    if (k == 0) {
+                        baseprice = parseFloat(this.baseInfoForm.dryGrainPrice)
+                    } else {
+                      var waterCount = 0
+                      for(var p=0;p<_rightObj.priceList.length;p++){
+                        waterCount += (_rightObj.priceList[p].priceEnd - _rightObj.priceList[p].priceStart)*_rightObj.priceList[p].param/100
+                      }
+                      baseprice = parseFloat(parseFloat(this.baseInfoForm.dryGrainPrice) * ( 1- waterCount))
+                    }
+                    _rightObj.priceList.push({
+                      index: k,
+                      priceStart: parseFloat(_priceList[i].detailList[k].water),
+                      priceEnd: parseFloat(_priceList[i].detailList[k + 2].water),
+                      type: parseFloat(_priceList[i].detailList[k].type),
+                      water: _priceList[i].detailList[k].water,
+                      param:_priceList[i].detailList[k + 1].jfprice,
+                      jfprice: parseFloat(this.baseInfoForm.dryGrainPrice * (parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
+                        k].water))*parseFloat(_priceList[i].detailList[k + 1].jfprice)/100/((parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
+                        k].water))/0.1)),
+                      baseprice: baseprice,
+                      price: (parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
+                        k].water)) / 0.1 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
+                    })
                   }
-                  _rightObj.priceList.push({
-                    index: k,
-                    priceStart: parseFloat(_priceList[i].detailList[k].water),
-                    priceEnd: parseFloat(_priceList[i].detailList[k + 2].water),
-                    type: parseFloat(_priceList[i].detailList[k].type),
-                    water: _priceList[i].detailList[k].water,
-                    jfprice: parseFloat(_priceList[i].detailList[k + 1].jfprice),
-                    baseprice: baseprice,
-                    price: (parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
-                      k].water)) / 0.1 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
-                  })
                 }
               }
             }
-
 
             // for (let k = (_priceList[i].detailList.length + 1) / 2 - 1; k <= _priceList[i].detailList.length; k++) {
             //   if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {

+ 1 - 1
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -44,7 +44,7 @@
             <td class="col col-bgc">霉变粒(%)</td>
             <td class="col">{{tableData.qualityInspectionManagement.mildewGrain}}</td>
             <td class="col col-bgc">扣杂(公斤)</td>
-            <td class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td class="col">{{tableData.qualityInspectionManagement.buckleMiscellaneous}}</td>
             <td class="col col-bgc">净重(公斤)</td>
             <td class="col">{{tableData.netWeight}}</td>
           </tr>

+ 119 - 44
src/views/houseSelfCollect/inspectInfo.vue

@@ -48,10 +48,19 @@
                   :value="item.goodsName" />
               </ws-select>
             </ws-form-item>
-            <ws-form-item label="扣重比" span="1" prop="buckleWeightRatio">
+            
+             <ws-form-item v-if="inspect.paramType != '1'" label="扣重比" span="1" prop="buckleWeightRatio">
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleWeightRatio" placeholder="请输入扣重比" maxlength="100" size="small"
                 :disabled="disabled" />
             </ws-form-item>
+            <ws-form-item v-else label="扣杂" span="1" prop="buckleWeightRatio">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100" size="small"
+                :disabled="disabled" />
+                <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
+                />
+                <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="未复检" maxlength="100" size="small"
+                disabled />
+            </ws-form-item>
             <ws-form-item label="类型" span="1" prop="type">
               <ws-select v-model="inspect.type" :disabled="disabled" @change="typeChange">
                 <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
@@ -85,6 +94,10 @@
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
                 @change="waterContentChange('water')" :disabled="disabled" />
+                <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="请输入水分占比" maxlength="100" size="small"
+                />
+                <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="未复检" maxlength="100" size="small"
+                disabled />
             </ws-form-item>
             <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比" maxlength="100" size="small"
@@ -105,7 +118,8 @@
           </ws-info-table>
           <div class="but">
             <el-button @click="cancel" v-if="this.types != 2" type="primary">取消</el-button>
-            <el-button @click="print" v-if="this.types != 2" type="primary">保存并打印</el-button>
+            <el-button @click="print" v-if="this.types ==3 || this.types ==4 ||this.types ==1" type="primary">保存</el-button>
+            <el-button @click="print" v-if="this.types ==5 " type="primary">确认并打印</el-button>
             <el-button @click="cancel" v-if="this.types == 2" type="primary">关闭</el-button>
           </div>
         </div>
@@ -153,6 +167,8 @@
           tidalGrainPrice: 0,
           buckleWeightRatio: 0,
           natureOfGrainPurchase:'贸易粮',
+          buckleMiscellaneous:0,
+          paramType:1,
           type:'潮粮'
         },
         disabled: false,
@@ -194,7 +210,7 @@
       this.warehouseName = this.$route.query.warehouseName
       this.cangNo = this.$route.query.warehouseNo
       this.count = Number(this.$route.query.count) + 1
-      this.purchasePriceList = this.$route.query.purchasePriceList
+      // this.purchasePriceList = this.$route.query.purchasePriceList
       this.id = this.$route.query.id
       if (this.types == 2) {
         this.disabled = true
@@ -204,6 +220,14 @@
         this.disabled = false
         this.disabled1 = true
         this.information = '编辑'
+      }else if (this.types == 4) {
+        this.disabled = true
+        this.disabled1 = true
+        this.information = '编辑'
+      }else if (this.types == 5) {
+        this.disabled = false
+        this.disabled1 = true
+        this.information = '编辑'
       }
       else{
         this.disabled1 = false
@@ -252,18 +276,25 @@
             }).then((response) => {
               //编辑接口
               this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if(this.types==3){
+                this.inspect.flag=0
+              }else if(this.types==4){
+                this.inspect.flag=1
+              }
                getinspectEdit(this.inspect)
                 .toPromise()
-                .then((response) => {
+                .then((response) => { 
+                  this.types = ''
+        // this.inspect = [] 
+        this.isShowPrint = false
+        this.$router.push({path:'inspectionManagement'})
                 })
             })
             this.dialogTableVisible = true;
           }
         })
-        this.types = ''
-        // this.inspect = [] 
-        this.isShowPrint = false
-        this.$router.push({path:'inspectionManagement'})
+       
       },
       typeChange(){
         if(this.inspect.type == '干粮' && this.inspect.goodsName){
@@ -275,10 +306,8 @@
         }
       },
       closePrint(){
-           this.types = ''
         // this.inspect = [] 
         this.isShowPrint = false
-        this.$router.push({path:'inspectionManagement'})
       },
       print() {
         if (!this.inspect.qualityNo) {
@@ -338,27 +367,29 @@
           })
           return
         }
-        if (
-          this.inspect.buckleWeightRatio < 0 ||
-          this.inspect.buckleWeightRatio > 2
-        ) {
-          this.$message({
-            message: '扣重比输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (
-          String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
-          String(this.inspect.buckleWeightRatio).length -
-            (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
-            2
-        ) {
-          this.$message({
-            message: '扣重比输入错误',
-            type: 'warning',
-          })
-          return
+        if(this.inspect.paramType == '2'){
+          if (
+            this.inspect.buckleWeightRatio < 0 ||
+            this.inspect.buckleWeightRatio > 2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.inspect.buckleWeightRatio).length -
+              (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
+              2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
         }
         if (!this.inspect.type) {
           this.$message({
@@ -563,6 +594,48 @@
               return false
             })
         } else if (this.types == 3) {
+          this.inspect.flag=0
+          this.$confirm('确定保存初检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+               getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  this.$router.push({path:'inspectionManagement'})
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        }
+        else if (this.types == 4) {
+          this.inspect.flag=1
+          this.inspect.reInspector=sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存复检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  this.$router.push({path:'inspectionManagement'})
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        }else if (this.types == 5) {
+          this.inspect.flag=2
+          this.inspect.reInspector=sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
           this.$confirm('确定保存质检信息?', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
@@ -588,6 +661,7 @@
               return false
             })
         }
+
       },
       cancel() {
         this.types = ''
@@ -632,23 +706,20 @@
         }
       },
 
-      // waterContentChange() {
-      //   debugger
-      //   if (this.inspect.goodsName) {
       waterContentChange(type) {
         if (this.inspect.goodsName&&type!='water') {
+          getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+          .toPromise()
+          .then((response) => { 
+            this.$set(this.inspect,'dryGrainPrice',response)
+          })
           for (var i = 0; i < this.purchasePriceList.length; i++) {
             if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
               this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
+              this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
+              
             }
           }
-          if(this.inspect.type == '干粮'){
-             getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
-                .toPromise()
-                .then((response) => { 
-                  this.$set(this.inspect,'dryGrainPrice',response)
-                })
-          }
         }
         //潮粮单价改变事件
         if (
@@ -664,8 +735,11 @@
             })
             .toPromise()
             .then((response) => {
-              this.inspect.tidalGrainPrice = response
-              this.unitPrice = response
+              if(this.inspect.paramType == '1'){
+                this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
+              }else{
+                this.inspect.tidalGrainPrice = response
+              }
             })
         }
         if(this.inspect.goodsName && this.inspect.customerName ){
@@ -713,6 +787,7 @@
           .then((response) => {
             this.goodNameList = []
             this.goodNameList = response
+            this.purchasePriceList = response
           })
         // 品级
         packList({
@@ -753,7 +828,7 @@
               })
             }
           })
-        if (this.types == 2 || this.types == 3) {
+        if (this.types !=1) {
           //查看
           getinspectLook({
               id: ids

+ 21 - 13
src/views/houseSelfCollect/inspectionManagement.vue

@@ -82,12 +82,27 @@
       <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
       <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
       <el-table-column prop="updateDate" label="质检时间"></el-table-column>
-      <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="400" label="操作">
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <span v-if='scope.row.confirm=="1"'>
+            已确认
+          </span>
+          <span v-else>
+            {{scope.row.status}}
+          </span>
+          </template>
+      </el-table-column>
+      <el-table-column width="500" label="操作">
         <template slot-scope="scope">
           <el-button @click="inspectInfo(scope.row, 2)" v-hasPermission="`acquisitionManagement.acquisitionQuality.view`">查看</el-button>
-          <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status!='已称皮重'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">编辑</el-button>
-          <el-button @click="del(scope.row)" v-if="scope.row.status=='已质检'" type="danger" v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
+          
+          <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status=='已初检'" v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`">初检</el-button>
+           <el-button @click="inspectInfo(scope.row, 5)" v-if="scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.con`">确认</el-button>
+           <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.again`">复检</el-button>
+            <!-- <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status=='已初检'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">初检</el-button>
+            <el-button @click="inspectInfo(scope.row, 5)" v-if="scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">确认</el-button>
+            <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.status!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.edit`">复检</el-button> -->
+          <el-button @click="del(scope.row)" v-if="!scope.row.weighingManagement || scope.row.weighingManagement.status=='已质检'" type="danger" v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
           <el-button @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印</el-button>
         </template>
       </el-table-column>
@@ -151,9 +166,7 @@ export default {
       isShowPrint: false,
       printData: {},
       deductWeight:'',//扣重比
-      saleLimit:'',
-      purchasePriceList:[]
-
+      saleLimit:''
     }
   },
   activated() {
@@ -188,8 +201,7 @@ export default {
           id: row.id,
           warehouseName: this.warehouseName,
           count: this.warehouseCount,
-          warehouseNo: this.warehouseNo,
-          purchasePriceList:this.purchasePriceList
+          warehouseNo: this.warehouseNo
         },
       })
     },
@@ -201,7 +213,6 @@ export default {
           this.warehouseNo = this.warehouseList[i].No
           this.cangid = this.warehouseList[i].id
           this.WAREHOUSE[1].payname = this.warehouseList[i].value
-          this.purchasePriceList = this.warehouseList[i].purchasePriceList
         }
       }
       this.getList()
@@ -255,14 +266,12 @@ export default {
               value: response[i].warehouseName,
               id: response[i].id,
               count: response[i].count,
-              purchasePriceList: response[i].purchasePriceList,
               No:response[i].commonWarehouseNo
             })
             if (this.cangid&&this.cangid == response[i].id) {
               this.warehouseName = response[i].warehouseName
               this.warehouseCount =  response[i].count
               this.warehouseNo =  response[i].commonWarehouseNo
-              this.purchasePriceList =  response[i].purchasePriceList
             } 
           }
           if(this.warehouseList.length > 0 && !this.cangid){
@@ -270,7 +279,6 @@ export default {
             this.warehouseCount =  this.warehouseList[0].count
             this.warehouseNo =  this.warehouseList[0].No
             this.cangid =  this.warehouseList[0].id
-            this.purchasePriceList =  this.warehouseList[0].purchasePriceList
             this.WAREHOUSE[1].payname = this.warehouseList[0].value
           }
           this.getList()

+ 1 - 13
src/views/houseSelfCollect/paymentManagement.vue

@@ -390,22 +390,10 @@ export default {
       this.getList()
     },
     settlement(index, row) {
-      var data = {}
-      var data1 = {}
-      for (let i = 0; i < this.warehouseList.length; i++) {
-        if (this.warehouseList[i].id == this.warehouseNameKey) {
-          data = this.warehouseList[i]
-        }
-      }
-      for (let i = 0; i < data.purchasePriceList.length; i++) {
-        if (data.purchasePriceList[i].goodsName == row.goodsName) {
-          data1 = data.purchasePriceList[i]
-        }
-      }
       if (row.goodsName)
         this.$router.push({
           path: 'settlement',
-          query: { type: index, id: row.id, waterMin: data1.waterMin }
+          query: { type: index, id: row.id }
         })
     },
     payment() {

+ 17 - 12
src/views/houseSelfCollect/settlement.vue

@@ -141,7 +141,7 @@
                 disabled
               />
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣重比" span="1" prop="waterContent">
+            <ws-form-item v-if="paymentList.type=='潮粮' && paymentList.qualityInspectionManagement.paramType != '1'" label="扣重比" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent
               @input='buckleWeightRatiochange'
               v-model="paymentList.buckleWeightRatio"
@@ -160,7 +160,7 @@
                 disabled
               />
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣重" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮" && paymentList.qualityInspectionManagement.paramType == "1"' label="扣重" span="1" prop="waterContent">
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.qualityInspectionManagement.weightDeduction" placeholder="请输入扣重" maxlength="100" size="small" disabled/>
             </ws-form-item>
             <ws-form-item v-if='paymentList.type=="潮粮"' label="掉水(%)" span="1" prop="waterContent">
@@ -191,8 +191,8 @@
               disabled
               />
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂(公斤)" span="1" prop="waterContent">
-              <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.weighingManagement.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂" span="1" prop="waterContent">
+              <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.qualityInspectionManagement.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
             </ws-form-item>
             <ws-form-item  label="扣单价(元/公斤)" span="1" prop="unitDeduction">
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.unitDeduction" @input="grainMoney" placeholder="请输入扣单价" maxlength="100" size="small" :disabled="disabled"/>
@@ -491,13 +491,18 @@ export default {
           } 
           this.paymentList.buckleWeightRatio = this.paymentList.qualityInspectionManagement.buckleWeightRatio
           this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(4)
-          this.paymentList.qualityInspectionManagement.waterMin=this.$route.query.waterMin
-          this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
-          this.paymentList.qualityInspectionManagement.weightDeduction=this.paymentList.qualityInspectionManagement.weightDeduction.toFixed(2)
-          this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
-          this.paymentList.base = this.paymentList.base.toFixed(3)
-          this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
-          this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+          if(this.paymentList.qualityInspectionManagement.paramType == '2'){
+            this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
+            this.paymentList.qualityInspectionManagement.weightDeduction=this.paymentList.qualityInspectionManagement.weightDeduction.toFixed(2)
+            this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
+            this.paymentList.base = this.paymentList.base.toFixed(3)
+            this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+            this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+          }
+          else{
+            this.paymentList.pureWeight=this.paymentList.weighingManagement.netWeight * (100 - this.paymentList.param)/100
+            this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+          }
           if(!this.paymentList.dryGrainPrice){
             this.paymentList.dryGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base
           }
@@ -727,7 +732,7 @@ export default {
       postpaymentedit(this.paymentList).toPromise().then((response) => {
          getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
              this.printData= response
-             console.log(this.printData,"结算打印")
+             console.log(this.printData,'结算打印')
          })
          this.isShowPrint = true
         },

+ 4 - 7
src/views/houseSelfCollect/weighingManagement.vue

@@ -98,7 +98,7 @@
           <el-button @click="weightCheck(scope.row, 1)" v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' " v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`" >毛重</el-button >
           <!-- scope.row.paymentManagement.status == '待结算' && -->
           <el-button :disabled = "scope.row.allow == 2" @click="weightCheck(scope.row, 2)"  v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') " v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
-          <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button >
+          <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' ||scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button >
         </template>
       </el-table-column>
     </el-table>
@@ -200,7 +200,6 @@ export default {
         if (this.warehouseList[i].value == e) {
           this.warehouseId = this.warehouseList[i].warehouseId
           this.cangid = this.warehouseList[i].warehouseId
-          this.purchasePriceList = this.warehouseList[i].warehouseList
           this.allowEdit = this.warehouseList[i].allowEdit
           this.WAREHOUSE[2].payname = this.warehouseList[i].value
           this.common.name  =  this.warehouseList[i].value
@@ -231,8 +230,9 @@ export default {
           warehouseId: this.warehouseId,
           monitorUrl1: this.monitorUrl1,
           monitorUrl2: this.monitorUrl2,
-          purchasePriceList: this.purchasePriceList,
-          allowEdit:this.allowEdit
+          allowEdit:this.allowEdit,
+          cangid:this.cangid,
+          paramType:row.qualityInspectionManagement.paramType
         },
       })
     },
@@ -260,7 +260,6 @@ export default {
             this.warehouseList.push({
               value: response[i].warehouseName,
               warehouseId: response[i].id,
-              warehouseList:response[i].purchasePriceList,
               allowEdit:response[i].allowEdit,
               monitorUrl1:response[i].monitorUrl1,
               monitorUrl2:response[i].monitorUrl2
@@ -273,14 +272,12 @@ export default {
               this.warehouseNo =  response[i].commonWarehouseNo
               this.monitorUrl1 =  response[i].monitorUrl1
               this.monitorUrl2 =  response[i].monitorUrl2
-              this.purchasePriceList =  response[i].purchasePriceList
             }
           }
            if(this.warehouseList.length > 0 && !this.cangid){
             this.warehouseName = this.warehouseList[0].value
             this.cangid =  this.warehouseList[0].warehouseId
             this.warehouseId =  this.warehouseList[0].warehouseId
-            this.purchasePriceList =  this.warehouseList[0].purchasePriceList
             this.WAREHOUSE[1].payname = this.warehouseList[0].value
             this.common.name  =  this.warehouseList[0].value
             this.monitorUrl1 =  this.warehouseList[0].monitorUrl1

+ 26 - 15
src/views/houseSelfCollect/weightCheck.vue

@@ -86,8 +86,8 @@
               </ws-form-item>
               <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
               <div class="formItem">
-                <ws-form-item label="扣(公斤)" span="1" prop="buckleWeightRatio" v-if="information == '皮重'">
-                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous" @input="calculation" placeholder="请输入扣"
+                <ws-form-item label="扣(公斤)" span="1" prop="buckleWeightRatio" v-if="information == '皮重' && paramType == '2'">
+                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous" @input="calculation" placeholder="请输入扣"
                     maxlength="100" size="small" />
                 </ws-form-item>
 
@@ -98,7 +98,7 @@
               </div>
             </ws-info-table>
             <div class="but">
-              <el-button @click="cancel" type="primary">取消</el-button>
+              <el-button @click="cancel" type="primary">关闭</el-button>
               <el-button @click="print" v-if="this.information == '毛重'" type="primary">保存</el-button>
               <el-button @click="print" v-if="this.information == '皮重'" type="primary">保存并打印</el-button>
             </div>
@@ -158,7 +158,8 @@
     grossWeight,
     getamount,
     getPrint,
-    getweighingList
+    getweighingList,
+    getinspectLookGoods
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   import html2canvas from 'html2canvas'
@@ -204,10 +205,14 @@
         param: 9600,
         monitorUrl1: '',
         monitorUrl2: '',
+        cangid:'',
+        paramType:'1'
       }
     },
     activated() {
       console.log(this.common.name)
+      this.cangid = this.$route.query.cangid
+      this.paramType = this.$route.query.paramType
       this.getList()
       this.tpyeNo = this.$route.query.tpyeNo
       this.weighingList.number = this.$route.query.number
@@ -225,8 +230,8 @@
         this.$route.query.grossWeight = 0
       }
       this.weighingList.grossWeight = this.$route.query.grossWeight
-      this.purchasePriceList = this.$route.query.purchasePriceList
-      console.log(this.purchasePriceList, '上限')
+      // this.purchasePriceList = this.$route.query.purchasePriceList
+      // console.log(this.purchasePriceList, '上限')
       this.allowEdit = this.$route.query.allowEdit
       if (this.allowEdit == 0) {
         this.disabled = true
@@ -251,12 +256,15 @@
         this.pageSize = val
         this.getList()
       },
-      handleCurrentChange(val) {
-        this.currentPage = val
-        console.log(`当前页: ${val}`)
-        this.getList()
-      },
       getList() {
+        // 货名
+        getinspectLookGoods({
+            warehouseId: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.purchasePriceList = response
+          })
         getweighingList({
             compId: sessionStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
@@ -350,7 +358,9 @@
         this.index = val
         if (this.information == '皮重') {
           this.information = '毛重'
+          this.tpyeNo = 1
         } else {
+          this.tpyeNo = 2
           this.information = '皮重'
         }
         this.getList()
@@ -366,6 +376,7 @@
           weight: val.grossWeight
         }
         this.weighingList = val;
+        this.paramType = val.qualityInspectionManagement.paramType
       },
       async closePort() {
         console.log('closePort');
@@ -468,9 +479,9 @@
       },
       closePrint() {
         this.isShowPrint = false
-        this.$router.push({
-          path: 'weighingManagement'
-        })
+        // this.$router.push({
+        //   path: 'weighingManagement'
+        // })
       },
       print() {
         if (!this.weighingList.grossWeight) {
@@ -604,7 +615,7 @@
                               title: '成功',
                               message: '保存成功',
                             })
-                            this.$router.go(-1)
+                            // this.$router.go(-1)
                           })
                           .catch((response) => {
                             // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 0 - 1
src/views/outboundManagement/weighingManagement.vue

@@ -204,7 +204,6 @@
 						}
 						this.warehouseName = this.warehouseList[0].value
 						this.warehouseId = this.warehouseList[0].warehouseId
-						this.purchasePriceList = this.warehouseList[0].warehouseList
 						this.getList()
 					})
 			},

+ 31 - 6
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -201,7 +201,11 @@
           class="table_td"
           prop="netWeight"
           label="净重"
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div @click.stop='fujian1(scope.row)'>{{scope.row.netWeight}}</div>
+          </template>
+        </el-table-column>
         <el-table-column
           width="120"
           class="table_td"
@@ -288,6 +292,13 @@
       <img width="100" height="100" :src="item" alt="">
       </div>
     </WinseaContentModal>
+    <WinseaContentModal
+      v-model="accessoryTFs1"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <img width="100" height="100" :src="appendixIdss1" alt="">
+    </WinseaContentModal>
     </el-scrollbar>
     <el-dialog
       width="25%"
@@ -375,7 +386,7 @@
       <el-form>
         <el-form-item label="已付定金" :label-width="formLabelWidth">
           <el-input
-            v-model="deposit"
+            v-model="orderList.deposit"
             autocomplete="off"
             class="deal"
             placeholder="输入定金金额"
@@ -535,7 +546,9 @@ export default {
         },
       },
       accessoryTFs: false,
+      accessoryTFs1: false,
       appendixIdss: [],
+      appendixIdss1:'',
     }
   },
   activated() {
@@ -547,11 +560,11 @@ export default {
     varietyClick(row) {
       if (
         row.settlementWeight < 0 ||
-        row.settlementWeight > 100000 ||
+        row.settlementWeight > 200 ||
         (String(row.settlementWeight).indexOf('.') != -1 &&
           String(row.settlementWeight).length -
             (String(row.settlementWeight).indexOf('.') + 1) >
-            2)
+            3)
       ) {
         this.$message({
           message: '结算重量输入错误',
@@ -632,7 +645,7 @@ export default {
     },
     //定金
     amendconfirm() {
-      this.contractManagementInfo.deposit = this.deposit
+      this.contractManagementInfo.deposit = this.orderList.deposit 
       this.contractManagementInfo.depositUrl = this.depositUrl
       this.$confirm(`确定提交定金信息?`, {
         cancelButtonText: '取消',
@@ -667,6 +680,18 @@ export default {
       }
       this.appendixIdss = this.orderList.depositUrl
       this.accessoryTFs = true
+    },
+     //定金附件
+    fujian1(item) {
+      if (this.orderList.poundImg === null || this.orderList.poundImg === '') {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      }
+      this.appendixIdss1 = item.poundImg
+      
+      this.accessoryTFs1 = true
     },
     //备注
     addRemarks() {
@@ -802,7 +827,7 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择一条要审核的条目')
       } else {
-        this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
+        this.$confirm(`审核通过后,任务将发送给下一级,是否确定通过?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
           type: 'warning',

+ 43 - 18
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -34,14 +34,14 @@
 				<span v-else>出库量: 0 吨</span>
 				<span v-if="orderList.unitContractPrice">合同单价: {{ orderList.unitContractPrice }} 元/吨</span>
 				<span v-else>合同单价: 0 元/吨</span>
-				<span v-if="amountReceivable">应收: {{ amountReceivable }} 元</span>
+				<span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(2) }} 元</span>
 				<span v-else>应收: 0 元</span>
-				<span v-if="amountReceived">已收: {{ amountReceived }} 元
+				<span v-if="amountReceived">已收: {{ amountReceived.toFixed(2) }} 元
 					<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
 						src="../../../public/img/fujian.png" @click="fujian1()" alt="" />
 				</span>
 				<span v-else>已收: 0 元</span>
-				<span v-if="uncollectedAmount">未收: {{ uncollectedAmount }} 元</span>
+				<span v-if="uncollectedAmount">未收: {{ uncollectedAmount.toFixed(2) }} 元</span>
 				<span v-else>未收: 0 元</span>
 				<span v-if="orderList.deposit">定金: {{ orderList.deposit }} 元
 					<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
@@ -65,9 +65,9 @@
 				<el-table-column class="table_td" prop="tare" label="皮重(吨)"></el-table-column>
 				<el-table-column class="table_td" prop="netWeight" label="净重(吨)">
 					<template slot-scope="scope">
-						<span style="color: #ce4545;"
-							v-if="scope.row.returnFlag == 1">-{{scope.row.netWeight}}(退)</span>
-						<span v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
+						<span style="color: #ce4545;" @click='fujian2(scope.row)'
+							v-if="scope.row.returnFlag == 1">{{scope.row.netWeight}}(退)</span>
+						<span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
 					</template>
 				</el-table-column>
 				<el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
@@ -81,7 +81,7 @@
 								<span v-if="scope.row.returnFlag == null">{{scope.row.settlementWeight }}</span>
 							</div>
 						</div>
-						<img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+						<img  v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
 							src="../../../public/img/edit.png" @click="whether(scope.row)"
 							v-if="scope.row.identification == 'false'" alt="" />
 						<i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
@@ -118,6 +118,10 @@
 				</div>
 			</div>
 		</WinseaContentModal>
+		<WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
+			@on-cancel="handleClose">
+			<img width="100" height="100" :src="appendixIdss2" alt="">      
+		</WinseaContentModal>
 		<!-- 收款 -->
 		<el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
 			<el-form :model="form">
@@ -132,7 +136,7 @@
 						class="deal" />
 				</el-form-item>
 				<el-form-item label="上传收款截图" :label-width="formLabelWidth">
-					<el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+					<el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
 						:on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
 						<i class="el-icon-plus"></i>
 					</el-upload>
@@ -140,17 +144,17 @@
 			</el-form>
 			<div slot="footer" class="dialog-footer">
 				<el-button @click="dialogFormVisible1 = false">取 消</el-button>
-				<el-button type="primary" @click="collectment()">提 交</el-button>
+				<el-button  v-hasPermission="`report.goodsSaleOutReport.payment`" type="primary" @click="collectment()">提 交</el-button>
 			</div>
 		</el-dialog>
 		<!-- 定金 -->
 		<el-dialog width="25%" title="定金" :visible.sync="dialogFormVisible2" :append-to-body="true">
 			<el-form :model="form">
 				<el-form-item label="已收定金(元)" :label-width="formLabelWidth">
-					<el-input v-model="deposit" autocomplete="off" placeholder="输入定金金额" class="deal"></el-input>
+					<el-input v-model="orderList.deposit" autocomplete="off" placeholder="输入定金金额" class="deal"></el-input>
 				</el-form-item>
 				<el-form-item label="上传定金截图" :label-width="formLabelWidth">
-					<el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+					<el-upload action="https://www.zthymaoyi.com/upload/admin" :limit='1' list-type="picture-card"
 						:on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
 						<i class="el-icon-plus"></i>
 					</el-upload>
@@ -165,12 +169,12 @@
 		<el-dialog width="25%" title="备注" :visible.sync="collectForm1" :append-to-body="true">
 			<el-form :model="form">
 				<div class="beizhu">
-					<el-input v-model="remark" autocomplete="off" placeholder="备注信息,不超过1000字" class="deal"></el-input>
+					<el-input v-model="orderList.remark" autocomplete="off" placeholder="备注信息,不超过1000字" class="deal"></el-input>
 				</div>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
-				<el-button @click="collectForm1 = false">取 消</el-button>
-				<el-button type="primary" @click="adoptRemarks()">保存</el-button>
+				<el-button  @click="collectForm1 = false">关闭</el-button>
+				<el-button  v-hasPermission="`report.goodsSaleOutReport.carry`" type="primary" @click="adoptRemarks()">保存</el-button>
 			</div>
 		</el-dialog>
 	</div>
@@ -272,11 +276,21 @@
 				appendixIdss: [],
 				accessoryTFs1: false,
 				appendixIdss1: [],
+				appendixIdss2:'',
+				accessoryTFs2: false,
 				addressUrlArray: [],
 				addressUrlArray1: [],
 			}
 		},
 		activated() {
+       var now = new Date();
+       var year = now.getFullYear(); //得到年份
+       var month = now.getMonth(); //得到月份
+       var date = now.getDate(); //得到日期
+       month = month + 1;
+       month = month.toString().padStart(2, "0");
+       date = date.toString().padStart(2, "0");
+       this.collectionDate = `${year}-${month}-${date}`;
 			this.getList()
 			this.showType = this.isShow
 		},
@@ -366,7 +380,7 @@
 				this.collectForm1 = true
 			},
 			adoptRemarks() {
-				this.remarkInformation.remark = this.remark
+				this.remarkInformation.remark = this.orderList.remark
 				this.$confirm(`确定要保存备注信息?`, {
 						confirmButtonText: '确定',
 						cancelButtonText: '取消',
@@ -446,7 +460,7 @@
 				this.dialogFormVisible2 = true
 			},
 			depositSubmit() {
-				this.remarkInformation.deposit = this.deposit
+				this.remarkInformation.deposit = this.orderList.deposit
 				this.remarkInformation.depositUrl = this.depositUrl
 				this.$confirm(`确定提交定金信息?`, {
 					cancelButtonText: '取消',
@@ -458,8 +472,8 @@
 							this.remarkInformationList.id = this.contractNoList[i].id
 						}
 					}
-					this.remarkInformationList.deposit = this.deposit
-					this.remarkInformationList.depositUrl = this.depositUrl
+					this.remarkInformationList.deposit = this.orderList.deposit
+					this.remarkInformationList.depositUrl = this.depositUrl.toString()
 					disOrRemarks(this.remarkInformationList)
 						.toPromise()
 						.then((response) => {
@@ -488,6 +502,16 @@
 				this.appendixIdss = this.orderList.depositUrl
 				this.accessoryTFs = true
 			},
+			fujian2(item) {
+				if (item.poundImg === null || item.poundImg === '') {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				}
+				this.appendixIdss2 = item.poundImg
+				this.accessoryTFs2 = true
+			},
 			handleClose() {
 				this.accessoryTFs = false
 			},
@@ -574,6 +598,7 @@
 							this.money = ''
 							this.collectionDate = ''
 							this.collectionScreenshot = ''
+							this.$refs.upload.clearFiles()
 							this.dialogFormVisible1 = false
 							this.getList()
 						})

+ 1 - 1
src/views/tranManagement/tranManagementFireFeedback.vue

@@ -283,7 +283,7 @@ export default {
     isShow(val) {
       this.showType = val
     },
-       freightspace(newVal) {debugger
+       freightspace(newVal) {
         this.file_is_show = false
         if (true) {
             this.$nextTick(()=>{ // $nextTick 是在 DOM 更新循环结束之后执行延迟回调

+ 1 - 1
src/views/tranManagement/tranManagementReceivingloading.vue

@@ -76,7 +76,7 @@
             >{{ deptBudgetList.deliveryDateEnd }}</ws-form-item>
             <!--合同编号-->
             <ws-form-item label="合同编号" span="1" prop="contractNo">{{ deptBudgetList.contractNo }}</ws-form-item>
-            <ws-form-item label="运输方式" span="1" prop="contractNo">{{ deptBudgetList.contractNo }}</ws-form-item>
+            <ws-form-item label="运输方式" span="1" prop="contractNo">{{ deptBudgetList.tranType }}</ws-form-item>
           </ws-info-table>
 
           <div class="small-title" style="font-size: 16px;width: 50%;float: left;">卸车详情</div>

+ 1 - 1
src/views/tranManagement/tranManagementTransporFeedback.vue

@@ -69,7 +69,7 @@
         <!--合同编号-->
         <ws-form-item label="合同编号" span="1" prop="contractNo">{{ deptBudgetList.contractNo }}</ws-form-item>
         <!-- 运输方式 -->
-        <ws-form-item label="运输方式" span="1" prop="contractNo">{{ deptBudgetList.contractNo }}</ws-form-item>
+        <ws-form-item label="运输方式" span="1" prop="contractNo">{{ deptBudgetList.tranType }}</ws-form-item>
       </ws-info-table>
       <div class="small-title" style="font-size: 16px; width: 50%;float: left;">装车详情</div>
       <!-- 导入 -->

+ 0 - 1
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -489,7 +489,6 @@ export default {
       this.$router.go(-1)
     },
     del(index, row) {
-      debugger
       if(row.status == null){
         if (this.deptBudgetList.tranCarInfoList.length > 1) {
                   this.deptBudgetList.tranCarInfoList.splice(index, 1)

+ 89 - 7
src/views/warehouse/warehouseManagementDelivery.vue

@@ -194,7 +194,8 @@
           </ws-form-item>
           <!-- 出库类型 -->
           <ws-form-item label="出库类型" span="1">
-            <ws-select
+            <ws-input v-model='deptBudgetList.inOutType' class="right-bottom" :disabled="isSelectType" placeholder='暂无' />
+            <!-- <ws-select
               v-model="deptBudgetList.deliveryType"
               placeholder=""
               class="typeselect"
@@ -206,16 +207,33 @@
                 :label="item.constValue"
                 :value="item.constValue"
               />
-            </ws-select>
+            </ws-select> -->
           </ws-form-item>
           <!--车牌号-->
-          <ws-form-item label="车牌号" span="1" prop="sourceGoods">
+         <ws-form-item label="车牌号" span="1" prop="carNo">
             <ws-input
+              v-if="!carstatus"
               v-model="deptBudgetList.carNo"
               placeholder="请输入车牌号"
-              maxlength="20"
+              maxlength="7"
               size="small"
             />
+            <el-select
+              v-if="carstatus"
+              filterable
+              :filter-method="dataFilter2"
+              v-model="deptBudgetList.carNo"
+              placeholder="请选择车牌号"
+              class="typeselect"
+              @change="carChange"
+            >
+              <el-option
+                v-for="item in options2"
+                :key="item.constKey"
+                :label="item.carNo + '(' + item.tranCarNo + ')'"
+                :value="item.carNo"
+              />
+            </el-select>
           </ws-form-item>
         </ws-info-table>
       </div>
@@ -238,14 +256,30 @@
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
         <!--自检员-->
-        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
             v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
           />
-        </ws-form-item>
+        </ws-form-item> -->
+             <ws-form-item label="自检员" span="1" prop="qualityInspector">
+            <el-select
+              v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+              placeholder="请选择自检员"
+              filterable
+              clearable
+              @change="qualityInspectorChange"
+            >
+              <el-option
+                v-for="item in qualityInspectorList"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+          </ws-form-item>
       </div>
       <div class="neifor">
         <ws-info-table>
@@ -352,6 +386,9 @@ export default {
   },
   data() {
     return {
+      isSelectType:true,
+       carstatus: false,
+       qualityInspectorList:[],
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -427,14 +464,25 @@ export default {
     this.deptBudgetList.warehouseType = this.$route.query.warehouseType
     this.deptBudgetList.warehouseId = this.$route.query.warehouseId
     this.getList()
+  
   },
   methods: {
+      qualityInspectorChange(e){
+      console.log(e)
+    },
     uploadSuccessHandle1(res){
       this.deptBudgetList.addressUrl=res.url
     },
     //返回按钮
     revert() {
       this.$router.push({ path: 'warehouseManagementList' })
+    },
+        carChange(e) {
+      for (let i = 0; i < this.tranCarInfoList.length; i++) {
+        if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+          this.deptBudgetList.tranCarNo=this.tranCarInfoList[i].tranCarNo
+        }
+      }
     },
     typeChange(e){
 
@@ -442,12 +490,45 @@ export default {
     contractNoChange(e){
       for (var i = 0; i < this.outContractNo.length; i++) {
         if (this.outContractNo[i].contractNo == e) {
+             if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
           this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
           this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+          this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+          if(this.outContractNo[i].tranCarInfoList){
+            this.options2=this.outContractNo[i].tranCarInfoList
+            this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
+            this.carstatus=true
+          }
         }
       }
     },
-    
+    dataFilter2(val) {
+      this.deptBudgetList.carNo = val
+      if (val) {
+        //val存在
+        this.options1 = this.outContractNo1.filter((item) => {
+          if (
+            !!~item.carNo.indexOf(val) ||
+            !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options2 = this.tranCarInfoList
+      }
+    },
     dataFilter(val) {
       // console.log(val,"名")
       this.deptBudgetList.staffList = val
@@ -1301,6 +1382,7 @@ export default {
         .toPromise()
         .then((response) => {
           // this.agent = response
+          this.qualityInspectorList = response
           this.options = response
            this.staffList = response
         })

+ 29 - 1
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -203,13 +203,30 @@
           </ws-form-item>
 
           <!--车牌号-->
-          <ws-form-item label="车牌号" span="1" prop="sourceGoods">
+          <ws-form-item label="车牌号" span="1" prop="carNo">
             <ws-input
+              v-if="!carstatus"
               v-model="dataList.carNo"
               placeholder="请输入车牌号"
               maxlength="20"
               size="small"
             />
+             <el-select
+              v-if="carstatus"
+              filterable
+              :filter-method="dataFilter2"
+              v-model="deptBudgetList.carNo"
+              placeholder="请选择车牌号"
+              class="typeselect"
+              @change="carChange"
+            >
+              <el-option
+                v-for="item in options2"
+                :key="item.constKey"
+                :label="item.carNo + '(' + item.tranCarNo + ')'"
+                :value="item.carNo"
+              />
+            </el-select>
           </ws-form-item>
         </ws-info-table>
       </div>
@@ -539,6 +556,17 @@ export default {
     contractNoChange(e){
       for (var i = 0; i < this.outContractNo.length; i++) {
         if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
           this.dataList.goodsName = this.outContractNo[i].goodsName
           this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
           if(this.outContractNo[i].tranCarInfoList){

+ 110 - 31
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -25,7 +25,7 @@
     <ws-form ref="dataList" :model="dataList" :rules="rules">
       <div class="basicInformation">
         <h2>
-          {{ deptBudgetList1.warehouseName }}
+          {{ deptBudgetList1.warehouseName }}
           <span class="position" v-show="this.$route.query.warehouseType == 1">
             {{ deptBudgetList1.binNumber }}仓位
           </span>
@@ -149,8 +149,9 @@
             />
           </ws-form-item>
           <!--净重(吨)-->
-          <ws-form-item label="扣款" span="1" prop="deductionAmount">
+          <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
             <ws-input
+            @input="kkInput(dataList.deductionAmount)"
               v-model="dataList.deductionAmount"
               placeholder="请输入扣款金额"
               maxlength="120"
@@ -207,6 +208,7 @@
               placeholder
               class="typeselect"
               @change="selectstorageType"
+               :disabled="isSelectType"
             >
               <ws-option
                 v-for="item in storageType"
@@ -331,14 +333,31 @@
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
         <!--质检员-->
-        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
             v-model="dataList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
           />
-        </ws-form-item>
+        </ws-form-item> -->
+           <ws-form-item label="自检员" span="1" prop="qualityInspector">
+            <el-select
+              v-model="dataList.warehouseInOutDetail.qualityInspector"
+              placeholder="请选择自检员"
+              filterable
+              clearable
+               :filter-method="dataFilter"
+              @change="qualityInspectorChange"
+            >
+              <el-option
+                v-for="item in qualityInspectorList"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+          </ws-form-item>
       </div>
       <div class="neifor">
         <ws-info-table>
@@ -445,10 +464,13 @@ export default {
     },
   },
   computed: {
-    ...mapGetters(['deptBudgetList']),
+    ...mapGetters(['dataList']),
   },
   data() {
     return {
+      isSelectType:true,
+      isGetCost:false,
+      qualityInspectorList:[],
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -478,10 +500,10 @@ export default {
       storageType: [],
       deliveryType: [],
       outContractNo: [],
+      outContractNo1: [],
       // 提交类型
       submitType: true,
       typeList:['干粮','潮粮'],
-      storageType: [],
       appendixIdsAdd: '',
       uploadSuccess: {},
       warehouseInOutDetail: {},
@@ -569,27 +591,44 @@ export default {
     this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
     this.dataList.statusFlag = this.$route.statusFlag
     this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
-    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
-    this.deptBudgetList.createType = this.$route.query.createType
-      this.dataList.temporaryOutType = this.$route.query.temporaryOutType
-      this.dataList.cost=this.$route.query.cost
-      this.dataList.freight=this.$route.query.freight
-      this.dataList.type=this.$route.query.type
-      this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
-      this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
-      this.dataList.solidGrainWater=this.$route.query.solidGrainWater
-      this.dataList.pureWeight=this.$route.query.pureWeight
-      this.dataList.deductionAmount=this.$route.query.deductionAmount
-      this.dataList.deductionWeight=this.$route.query.deductionWeight
+    this.dataList.warehouseType = this.$route.query.warehouseType
+    this.dataList.createType = this.$route.query.createType
+    this.dataList.temporaryOutType = this.$route.query.temporaryOutType
+    this.dataList.cost=this.$route.query.cost
+    this.dataList.freight=this.$route.query.freight
+    this.dataList.type=this.$route.query.type
+    this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
+    this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
+    this.dataList.solidGrainWater=this.$route.query.solidGrainWater
+    this.dataList.pureWeight=this.$route.query.pureWeight
+    this.dataList.deductionAmount=this.$route.query.deductionAmount
+    this.dataList.deductionWeight=this.$route.query.deductionWeight
+    this.dataList.inOutTypeFlag=1
+    if(this.dataList.cost){
+      this.isGetCost = true
+      this.cost = this.dataList.cost 
+    }
+
   },
   methods: {
+        kkInput(val){
+      console.log(val)
+      if(this.isGetCost){
+        if(this.dataList.cost>val){
+           this.dataList.cost = this.cost - this.dataList.deductionAmount
+          }
+      }
+    },
+       qualityInspectorChange(e){
+      console.log(e)
+    },
     uploadSuccessHandle1(res){
       this.dataList.addressUrl=res.url
     },
     pureweight(status){
-      console.log(this.deptBudgetList)
-      if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
-        this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
+      console.log(this.dataList)
+      if(this.dataList.netWeight&&this.dataList.tidalGrainWater&&this.dataList.solidGrainWater&&this.dataList.buckleWeightRatio){
+        this.dataList.pureWeight=(this.dataList.netWeight*(100-(this.dataList.tidalGrainWater-this.dataList.solidGrainWater)*this.dataList.buckleWeightRatio))/100
       }
     },
     //返回按钮
@@ -599,6 +638,7 @@ export default {
     carChange(e){
         for (let i = 0; i < this.tranCarInfoList.length; i++) {
           if(this.tranCarInfoList[i].carNo==this.dataList.carNo){
+            this.dataList.tranCarNo=this.tranCarInfoList[i].tranCarNo
             this.dataList.freight=this.tranCarInfoList[i].tranPrice
           }
           
@@ -610,9 +650,33 @@ export default {
     contractNoChange(e){
       for (var i = 0; i < this.outContractNo.length; i++) {
         if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              this.dataList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              this.dataList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.dataList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.dataList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '退库') {
+              this.dataList.inOutTypeKey = 6
+            }
           this.dataList.goodsName = this.outContractNo[i].goodsName
           this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          this.dataList.cost= this.outContractNo[i].contractPrice
+            this.cost = this.outContractNo[i].contractPrice
+          if(this.cost){
+            this.isGetCost = true
+              this.dataList.cost = this.cost - this.dataList.deductionAmount
+          }else{
+             this.isGetCost = false
+             this.dataList.cost = this.dataList.cost
+          }
+          this.dataList.inOutType = this.outContractNo[i].inOutType
+          if(this.outContractNo[i].inOutType=='移库入库'){
+            this.isSelectType = false
+          }else{
+            this.isSelectType = true
+          }
           if(this.outContractNo[i].tranCarInfoList){
             this.options2=this.outContractNo[i].tranCarInfoList
             this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
@@ -623,7 +687,7 @@ export default {
     },
     dataFilter1(val) {
        console.log(val)
-        this.deptBudgetList.contractNo = val;
+        this.dataList.contractNo = val;
         if (val) { //val存在
           this.options1 = this.outContractNo1.filter((item) => {
             if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
@@ -635,7 +699,7 @@ export default {
         }
       },
       dataFilter2(val) {
-        this.deptBudgetList.carNo = val;
+        this.dataList.carNo = val;
         if (val) { //val存在
           this.options1 = this.outContractNo1.filter((item) => {
             if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
@@ -648,7 +712,7 @@ export default {
       },
     dataFilter(val) {
       // console.log(val,"名")
-      this.deptBudgetList.staffList = val
+      this.dataList.staffList = val
       if (val) {
         //val存在
         this.options = this.staffList.filter((item) => {
@@ -665,6 +729,7 @@ export default {
       }
     },
     editClick(status){
+       this.isGetCost = false
       if(status==1){
         this.disabled1=!this.disabled1
       }else{
@@ -674,7 +739,7 @@ export default {
     selectstaff(e) {
       for (var i = 0; i < this.staffList.length; i++) {
         if (this.staffList[i].staffName == e) {
-          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          this.dataList.personChargeKey = this.staffList[i].staffId
         }
       }
     },
@@ -685,7 +750,7 @@ export default {
         confirmButtonText: '确定',
         type: 'warning',
       })
-        .then(() => {debugger
+        .then(() => {
           this.$refs.dataList.validate((valid) => {
             if (valid) {
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
@@ -825,8 +890,8 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
-        this.deptBudgetList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
+        this.dataList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
+        this.dataList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
         (this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
           String(this.dataList.solidGrainWater).length -
             (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
@@ -1270,10 +1335,16 @@ export default {
         })
       // 类型
       if (this.$route.query.warehouseType == '1') {
+        this.storageType = []
         pullDown({ constId: 'CON5' })
           .toPromise()
           .then((response) => {
-            this.storageType = response
+            // this.storageType = response
+               for(let i = 0;i<response.length;i++){
+                if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
+                  this.storageType.push(response[i])
+                }
+            }
           })
       } else if (this.$route.query.warehouseType == '2') {
         //临时仓库入库类型
@@ -1290,16 +1361,24 @@ export default {
           })
       }
       //合同编号
-      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
+      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'), flag: 6 })
         .toPromise()
         .then((response) => {
+          this.options1 = response
           this.outContractNo = response
         })
+      //合同编号2
+      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'), flag: 7 })
+        .toPromise()
+        .then((response) => {
+          this.outContractNo1 = response
+        })
       //经办人
       getstaff({ compId: sessionStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.id })
         .toPromise()
         .then((response) => {
           this.options = response
+          this.qualityInspectorList = response
           this.staffList = response
           //  this.agent = response
         })

+ 20 - 8
src/views/warehouse/warehouseManagementPut.vue

@@ -431,7 +431,6 @@
               placeholder="请选择自检员"
               filterable
               clearable
-              :filter-method="qualityDataFilter"
               @change="qualityInspectorChange"
             >
               <el-option
@@ -643,7 +642,7 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {debugger
+  mounted() {
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
@@ -653,8 +652,9 @@ export default {
     this.getList()
     this.deptBudgetList.grade = '一等品'
     this.deptBudgetList.gradeKey = '1'
+    this.deptBudgetList.inOutTypeFlag=1
        if(this.deptBudgetList.cost){
-        if(this.deptBudgetList.cost>val){
+        if(this.deptBudgetList.cost>this.deptBudgetList.deductionAmount){
            this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
           }
        else{
@@ -662,10 +662,10 @@ export default {
        }
       }
     // if (this.deptBudgetList.warehouseType == 1) {
-    //   this.deptBudgetList.inOutType = '采购入库'
+    //   // this.deptBudgetList.inOutType = '采购入库'
     //   this.deptBudgetList.inOutTypeKey = '1'
     // } else {
-    //   this.deptBudgetList.inOutType = '退库'
+    //   // this.deptBudgetList.inOutType = '退库'
     //   this.deptBudgetList.inOutTypeKey = '1'
     // }
   },
@@ -673,7 +673,7 @@ export default {
     qualityInspectorChange(e){
       console.log(e)
     },
-    kkInput(val){debugger
+    kkInput(val){
       console.log(val)
       if(this.isGetCost){
         if(this.deptBudgetList.cost>val){
@@ -735,6 +735,7 @@ export default {
     carChange(e) {
       for (let i = 0; i < this.tranCarInfoList.length; i++) {
         if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+          this.deptBudgetList.tranCarNo=this.tranCarInfoList[i].tranCarNo
           this.deptBudgetList.freight = this.tranCarInfoList[i].tranPrice
         }
       }
@@ -1804,9 +1805,20 @@ export default {
         )
       }
     },
-    contractNoChange(e) {debugger
+    contractNoChange(e) {
       for (var i = 0; i < this.outContractNo.length; i++) {
         if (this.outContractNo[i].contractNo == e) {
+          if (this.outContractNo[i].inOutType == '采购入库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '退库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
           this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
           this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
           // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
@@ -1902,7 +1914,7 @@ export default {
         this.storageType = []
         pullDown({ constId: 'CON5' })
           .toPromise()
-          .then((response) => {debugger
+          .then((response) => {
             // this.storageType = response
             for(let i = 0;i<response.length;i++){
                 if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){

+ 2 - 0
src/views/workNotification/message.vue

@@ -298,6 +298,8 @@ export default {
               this.number.report = item.number
             } else if (item.businessType === 'SALE') {
               this.number.sale = item.number
+            }else if (item.businessType === 'Tran') {
+              this.number.tran = item.number
             }
 
             this.tabIndexs.forEach(ite => {