浏览代码

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

mxx 3 年之前
父节点
当前提交
99ef390451

+ 223 - 105
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()
@@ -834,6 +863,7 @@
             case '新增':
               isValidate = this.validate()
               if (isValidate) {
+                debugger
                 purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
                   // this.tableData = response.records
                   this.isCountShow = false
@@ -854,17 +884,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 +937,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
@@ -985,31 +1047,60 @@
             }
           }
            console.log(index)
-          for (let j = index; j >= 0; j--) {
+          if(this.baseInfoForm.paramType == '2'){
+            for (let j = index; j >= 0; j--) {
               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,28 +1128,54 @@
             // }
             this.left.push(_leftObj)
             console.log('this.left', this.left)
-                  for (let k = index; k <= _priceList[i].detailList.length; k++) {
+            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 == '1'){
+                    if (k == index) {
+                      baseprice = parseFloat(this.baseInfoForm.dryGrainPrice)
+                    } else {
+                      baseprice = parseFloat(parseFloat(this.baseInfoForm.dryGrainPrice) - (parseFloat(_priceList[i].detailList[k+2]
+                        .water) - parseFloat(_priceList[i].detailList[k].water)) / 0.1 * (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)))
+                    }
+                    _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(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)
-                  })
+                  else{
+                    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)
+                    })
+                  }
+                  
                 }
               }
             }
@@ -1097,6 +1214,7 @@
       // 获取当前价格左右价格区间数据
       getOtherPrice(list, water, direction) {},
       calculatePriceRight(_waterMax) {
+        debugger
         //获取每个分界值
         let _listResult = []
         for (let i = 0; i < this.right.length; i++) {

+ 75 - 60
src/views/houseSelfCollect/inspectInfo.vue

@@ -48,10 +48,14 @@
                   :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="buckleMiscellaneous">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleMiscellaneous" 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" />
@@ -152,8 +156,10 @@
         inspect: {
           tidalGrainPrice: 0,
           buckleWeightRatio: 0,
+          buckleMiscellaneous:0,
           natureOfGrainPurchase:'贸易粮',
-          type:'潮粮'
+          type:'潮粮',
+          paramType:'1'
         },
         disabled: false,
         disabled1: false,
@@ -338,28 +344,31 @@
           })
           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({
             message: '类型不能为空',
@@ -636,19 +645,21 @@
       //   debugger
       //   if (this.inspect.goodsName) {
       waterContentChange(type) {
+        var that = this
         if (this.inspect.goodsName&&type!='water') {
+          getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+          .toPromise()
+          .then((response) => { 
+            that.$set(that.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,43 +675,47 @@
             })
             .toPromise()
             .then((response) => {
-              this.inspect.tidalGrainPrice = response
-              this.unitPrice = response
+              if(that.inspect.paramType == '1'){
+                that.inspect.tidalGrainPrice = parseFloat(response) - parseFloat(that.inspect.buckleMiscellaneous)/100*parseFloat(that.inspect.dryGrainPrice)
+              }else{
+                that.inspect.tidalGrainPrice = response
+              }
+              that.unitPrice = response
             })
         }
         if(this.inspect.goodsName && this.inspect.customerName ){
              // //查看当前用户对应货名有未结算状态的送货
-       let count = 0
-        if (
-          this.inspect.goodsName &&
-          this.inspect.customerName 
-        ) {
-          getCount({
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          customerName: this.inspect.customerName,
-          goodsName: this.inspect.goodsName,
-        })  .toPromise()
-          .then((response) => {
-               count = response
+          let count = 0
+          if (
+            this.inspect.goodsName &&
+            this.inspect.customerName 
+          ) {
+            getCount({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            customerName: this.inspect.customerName,
+            goodsName: this.inspect.goodsName,
+          })  .toPromise()
+            .then((response) => {
+                count = response
+            })
+          //  货名下拉校验
+          getamount({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            customerName: this.inspect.customerName,
+            goodsName: this.inspect.goodsName,
           })
-        //  货名下拉校验
-        getamount({
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          customerName: this.inspect.customerName,
-          goodsName: this.inspect.goodsName,
-        })
-          .toPromise()
-          .then((response) => {
-            for (let i = 0; i < this.purchasePriceList.length; i++) {
-              if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
-                if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
-                  this.tipFlag = false
-                  this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+            .toPromise()
+            .then((response) => {
+              for (let i = 0; i < this.purchasePriceList.length; i++) {
+                if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+                  if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
+                    this.tipFlag = false
+                    this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+                  }
                 }
               }
-            }
-          })
-        }
+            })
+          }
         }
       },
 

+ 15 - 15
src/views/houseSelfCollect/paymentManagement.vue

@@ -344,21 +344,21 @@ export default {
           this.deptBudgetTotal = response.total
         })
         this.isShowAdopt = true
-    //  getpayment({
-    //      currentPage: 1,
-    //     pageSize: 99999,
-    //     warehouseName: this.warehouseName,
-    //     managementType : 1 
-    //   })
-    //     .toPromise()
-    //     .then((response) => {
-    //       for(let i = 0 ; i < response.length ; i++){
-    //         if(response[i].taskId){
-    //           this.isShowAdopt = true
-    //           return
-    //         }
-    //       }
-    //     })
+     getpayment({
+         currentPage: 1,
+        pageSize: 99999,
+        warehouseName: this.warehouseName,
+        managementType : 1 
+      })
+        .toPromise()
+        .then((response) => {
+          for(let i = 0 ; i < response.length ; i++){
+            if(response[i].taskId){
+              this.isShowAdopt = true
+              return
+            }
+          }
+        })
     },
     del(row) {
       this.$confirm(

+ 4 - 4
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"/>
@@ -727,7 +727,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
         },

+ 3 - 3
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"

+ 33 - 8
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -44,7 +44,7 @@
           >
           <ws-button
             type="primary"
-            v-hasPermission="`report.goodsProcurementInReport.edit`"
+            v-hasPermission="`report.goodsProcurementInReport.view`"
             @click="addRemarks()"
             >备注</ws-button
           >
@@ -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%"
@@ -360,7 +371,7 @@
       <div slot="footer" class="dialog-footer">
         <span v-if="roleFlag == 1 ">
         <el-button @click="dialogFormVisible11 = false">取 消</el-button>
-        <el-button type="primary" @click="remarksSubmit()">保存</el-button>
+        <el-button type="primary" v-hasPermission="`report.goodsProcurementInReport.edit`" @click="remarksSubmit()">保存</el-button>
         </span>
         <span v-else><el-button @click="dialogFormVisible11 = false">关 闭</el-button></span>
       </div>
@@ -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()
 						})

+ 5 - 7
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -983,16 +983,16 @@ export default {
     },
     requestadd(list, status) {
       list.compId = sessionStorage.getItem('ws-pf_compId')
-      // list.publisher =
-      //   sessionStorage.getItem('ws-pf_roleName') +
-      //   sessionStorage.getItem('ws-pf_staffName')
+      list.publisher =
+        sessionStorage.getItem('ws-pf_roleName') +
+        sessionStorage.getItem('ws-pf_staffName')
       warehousetask(list)
         .toPromise()
         .then(response => {
           woekflowhandle({
             taskId: list.taskId,
             approved: true,
-            auditMind: '',
+            auditMind: '34',
             needReapply: false
           })
             .toPromise()
@@ -1004,9 +1004,7 @@ export default {
     },
     requestaudit(list, status) {
       list.compId = sessionStorage.getItem('ws-pf_compId')
-      // list.publisher =
-      //   sessionStorage.getItem('ws-pf_roleName') +
-      //   sessionStorage.getItem('ws-pf_staffName')
+      list.publisher =sessionStorage.getItem('ws-pf_roleName') + sessionStorage.getItem('ws-pf_staffName')
       warehousetask(list)
         .toPromise()
         .then(response => {

+ 1 - 1
vue.config.js

@@ -141,7 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.120: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/',