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

+ 37 - 14
public/static/print.html

@@ -18,44 +18,61 @@
       border-top: 1px solid #EBEEF5;
        border-left: 1px solid #EBEEF5;
         border-right: 1px solid #EBEEF5;
-        padding: 20px;
+        /* padding: 20px; */
         box-sizing: border-box;
     }
     .name{
-      font-size: 20px;
+      font-size: 14px;
       font-weight: 500;
       color: #323233;
     }
     .price{
       position: absolute;
-     top: 25px;
          right: 10px;
          bottom: 0;
          margin: auto;
          font-size: 14px;
 
     }
+    .tableBox tr{
+      font-size: 12px;
+      padding:0!important;
+    }
+    .tableBox td{
+      font-size: 12px;
+      padding:0!important;
+    }
+    .tableBox .cell{
+      text-align:center;
+    }
     </style>
   </head>
   <body>
     <div id="app">
-      <div class="content">
+      <div class="content" v-for="(item,index) in 4">
         <div class="title">
-          <div class="name">{{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==0">水分({{waterMin}}-{{waterMax}})一等单价 {{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==1">水分({{waterMin}}-{{waterMax}})二等单价 {{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==2">水分({{waterMin}}-{{waterMax}})三等单价 {{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==3">水分({{waterMin}}-{{waterMax}})等外单价 {{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 :data="tableData" style="width: 600px" :row-class-name="tableRowClassName" class="tableBox">
+          <div>
+            
+          </div>
+           <el-table-column prop="waterMin" label="水分下限(%)" header-align="center">
            </el-table-column>
-           <el-table-column prop="waterMax" label="水分上限(%)">
+           <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
            </el-table-column>
-           <el-table-column prop="price1" label="一等单价">
+           <el-table-column prop="price1" label="一等单价" v-if="index==0" header-align="center">
            </el-table-column>
-           <el-table-column prop="price2" label="二等单价">
+           <el-table-column prop="price2" label="二等单价" v-if="index==1" header-align="center">
            </el-table-column>
-           <el-table-column prop="price3" label="三等单价">
+           <el-table-column prop="price3" label="三等单价" v-if="index==2" header-align="center">
            </el-table-column>
-           <el-table-column prop="priceOther" label="等外单价">
+           <el-table-column prop="priceOther" label="等外单价" v-if="index==3" header-align="center">
            </el-table-column>
          </el-table>
       </div>
@@ -69,7 +86,9 @@
       el: '#app',
       data: {
         tableData: "",
-        name:""
+        name:"",
+        waterMin:'',
+        waterMax:''
       },
       computed: {},
       methods: {
@@ -97,10 +116,14 @@
       }
       },
       mounted() {
-       let _data = localStorage.getItem("pricePrintList")
+        debugger
+        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+'价格对照表(按水分)'
         window.print()
         window.onafterprint = function(event) {

+ 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) => {

+ 1 - 1
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -259,7 +259,7 @@
             return false
           })
       },
-      print(index, row) {
+      print(index, row) {debugger
         // 打印价格对照表
         purchasePriceLook({
           id: row.id

+ 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) {

+ 41 - 19
src/views/houseSelfCollect/inspectInfo.vue

@@ -48,18 +48,19 @@
                   :value="item.goodsName" />
               </ws-select>
             </ws-form-item>
-            <ws-form-item label="扣杂" span="1" prop="buckleWeightRatio">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.BuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
+            
+             <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" placeholder="请输入扣杂" maxlength="100" size="small"
                 :disabled="disabled" />
-                <ws-input v-if='types!=3' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
+                <ws-input v-if='types==4||inspect.reBuckleMiscellaneous!=null' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small"
                 :disabled="disabled" />
                 <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="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 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" />
@@ -93,7 +94,7 @@
             <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!=3' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="请输入水分占比" maxlength="100" size="small"
+                <ws-input v-if='types==4||inspect.reWaterContent!=null' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="请输入水分占比" maxlength="100" size="small"
                 :disabled="disabled" />
                 <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent" placeholder="未复检" maxlength="100" size="small"
                 disabled />
@@ -117,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>
@@ -166,6 +168,7 @@
           buckleWeightRatio: 0,
           natureOfGrainPurchase:'贸易粮',
           BuckleMiscellaneous:0,
+          paramType:1,
           type:'潮粮'
         },
         disabled: false,
@@ -221,6 +224,10 @@
         this.disabled = false
         this.disabled1 = true
         this.information = '编辑'
+      }else if (this.types == 5) {
+        this.disabled = false
+        this.disabled1 = true
+        this.information = '编辑'
       }
       else{
         this.disabled1 = false
@@ -593,26 +600,40 @@
             })
             .then(() => {
               // return
-              getinspectEdit(this.inspect)
+               getinspectEdit(this.inspect)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('修改成功')
-                  getinspectLook({
-                      id: this.inspect.id
-                    })
-                    .toPromise()
-                    .then((response) => {
-                      this.inspect = response
-                    })
-                  this.isShowPrint = true
+                  this.$router.push({path:'inspectionManagement'})
                 })
             })
             .catch(() => {
               return false
             })
-        }else if (this.types == 4) {
+        }
+        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: '取消',
@@ -690,6 +711,7 @@
         if (this.inspect.goodsName&&type!='water') {
           for (var i = 0; i < this.purchasePriceList.length; i++) {
             if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
+              this.$set(this.inspect,'paramType',this.purchasePriceList[i].paramType)
               this.$set(this.inspect,'buckleWeightRatio',this.purchasePriceList[i].deductWeight)
             }
           }

+ 19 - 5
src/views/houseSelfCollect/inspectionManagement.vue

@@ -82,13 +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="inspectInfo(scope.row, 4)" 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.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>

+ 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() {

+ 16 - 11
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">
@@ -192,7 +192,7 @@
               />
             </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-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
         },

+ 0 - 5
src/views/houseSelfCollect/weighingManagement.vue

@@ -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,7 +230,6 @@ export default {
           warehouseId: this.warehouseId,
           monitorUrl1: this.monitorUrl1,
           monitorUrl2: this.monitorUrl2,
-          purchasePriceList: this.purchasePriceList,
           allowEdit:this.allowEdit
         },
       })
@@ -260,7 +258,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 +270,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

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

@@ -86,10 +86,10 @@
               </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 == '皮重'">
+                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous" @input="calculation" placeholder="请输入扣"
                     maxlength="100" size="small" />
-                </ws-form-item>
+                </ws-form-item> -->
 
                 <ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="information == '皮重'">
                   <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight" placeholder="请输入净重" maxlength="100" size="small"
@@ -158,7 +158,8 @@
     grossWeight,
     getamount,
     getPrint,
-    getweighingList
+    getweighingList,
+    getinspectLookGoods
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   import html2canvas from 'html2canvas'
@@ -225,8 +226,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
@@ -257,6 +258,14 @@
         this.getList()
       },
       getList() {
+        // 货名
+        getinspectLookGoods({
+            warehouseId: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.purchasePriceList = response
+          })
         getweighingList({
             compId: sessionStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,

+ 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()
 					})
 			},

+ 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 更新循环结束之后执行延迟回调

+ 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=='退库'){

+ 4 - 2
vue.config.js

@@ -141,8 +141,10 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        // target: 'http://192.168.1.101:8090/',
-        target: 'http://192.168.1.115:8090/',
+        target: 'http://192.168.1.101:8090/',
+        // target: 'http://192.168.1.115:8090/',
+        // target: 'http://192.168.1.122:8090/',
+        // target: 'http://192.168.1.115:8090/',
         // target: 'http://192.168.1.122:9100/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',